Resource icon

magic crafted weapons and armor 2015-02-01

Author
Fisher
Downloads
36
Views
1,585
First release
Last update
Rating
0.00 star(s) 0 ratings
No permission to download Join the discussion
There may be a better way to do this but it works. This is pieced together from google searches but I did not keep a record so I am in no way claiming this to be all my work. I really have no idea what I am doing.

This is what I added to BaseArmor:
Code:
else if (tool is BaseTool)
            {
                  if (craftItem != null && !craftItem.ForceNonExceptional)
				{ 
             
				
					CraftResource thisResource = CraftResources.GetFromType(resourceType);

                    //if (thisResource == ((BaseRunicTool)tool).Resource)
                    //{
                        Resource = thisResource;

                     
                      // CraftContext context = craftSystem.GetContext(from);

                        /* if (context != null && context.DoNotColor)
                            Hue = 0;
                        */
                        switch (thisResource)
                        {
							case CraftResource.DullCopper:
								{
									Identified = true;
									Durability = ArmorDurabilityLevel.Durable;
								    break;
								}
							case CraftResource.ShadowIron:
								{
									Identified = true;
									Durability = ArmorDurabilityLevel.Durable;
									ProtectionLevel = ArmorProtectionLevel.Guarding;
									break;
								}
							case CraftResource.Copper:
								{
									Identified = true;
									Durability = ArmorDurabilityLevel.Substantial;
									ProtectionLevel = ArmorProtectionLevel.Guarding;
									break;
								}
							case CraftResource.Bronze:
								{
									Identified = true;
									Durability = ArmorDurabilityLevel.Substantial;
									ProtectionLevel = ArmorProtectionLevel.Hardening;
									break;
								}
							case CraftResource.Gold:
								{
									Identified = true;
									Durability = ArmorDurabilityLevel.Massive;
									ProtectionLevel = ArmorProtectionLevel.Hardening;
									break;
								}
							case CraftResource.Agapite:
								{
									Identified = true;
									Durability = ArmorDurabilityLevel.Massive;
									ProtectionLevel = ArmorProtectionLevel.Fortification;
									break;
								}
							case CraftResource.Verite:
								{
									Identified = true;
									Durability = ArmorDurabilityLevel.Fortified;
									ProtectionLevel = ArmorProtectionLevel.Fortification;
									break;
								}
							case CraftResource.Valorite:
								{
									Identified = true;
									Durability = ArmorDurabilityLevel.Indestructible;
									ProtectionLevel = ArmorProtectionLevel.Invulnerability;
									break;
								}
							
                            case CraftResource.HornedLeather:
                                {
                                    Identified = true;
                                    Durability = ArmorDurabilityLevel.Substantial;
                                    ProtectionLevel = ArmorProtectionLevel.Hardening;
                                    break;
                                }
                            case CraftResource.BarbedLeather:
                                {
                                    Identified = true;
                                    Durability = ArmorDurabilityLevel.Fortified;
                                    ProtectionLevel = ArmorProtectionLevel.Fortification;
                                    break;
                                }
                            case CraftResource.SpinedLeather:
                                {
                                  Identified = true;
                                  Durability = ArmorDurabilityLevel.Durable;
                                 
                                  break;
                                }
                         
                              }
					}		 
				}

And what I added to BaseWeapon:

Code:
			else if (tool is BaseTool)
			{
				// Mondain's Legacy Mod
				if (craftItem != null && !craftItem.ForceNonExceptional)
				{
					CraftResource thisResource = CraftResources.GetFromType(resourceType);

					//if (thisResource == ((BaseTool)tool).Resource)
					//{
						Resource = thisResource;

						CraftContext context = craftSystem.GetContext(from);

						

						switch (thisResource)
						{
							case CraftResource.DullCopper:
								{
									Identified = true;
									DurabilityLevel = WeaponDurabilityLevel.Durable;
								    break;
								}
							case CraftResource.ShadowIron:
								{
									Identified = true;
									DurabilityLevel = WeaponDurabilityLevel.Durable;
									DamageLevel = WeaponDamageLevel.Ruin;
									AccuracyLevel = WeaponAccuracyLevel.Accurate;
									break;
								}
							case CraftResource.Copper:
								{
									Identified = true;
									DurabilityLevel = WeaponDurabilityLevel.Fortified;
									DamageLevel = WeaponDamageLevel.Ruin;
									AccuracyLevel = WeaponAccuracyLevel.Surpassingly;
									break;
								}
							case CraftResource.Bronze:
								{
									Identified = true;
									DurabilityLevel = WeaponDurabilityLevel.Fortified;
									DamageLevel = WeaponDamageLevel.Might;
									AccuracyLevel = WeaponAccuracyLevel.Surpassingly;
									break;
								}
							case CraftResource.Gold:
								{
									Identified = true;
									DurabilityLevel = WeaponDurabilityLevel.Indestructible;
									DamageLevel = WeaponDamageLevel.Force;
									AccuracyLevel = WeaponAccuracyLevel.Eminently;
									break;
								}
							case CraftResource.Agapite:
								{
									Identified = true;
									DurabilityLevel = WeaponDurabilityLevel.Indestructible;
									DamageLevel = WeaponDamageLevel.Power;
									AccuracyLevel = WeaponAccuracyLevel.Eminently;
									break;
								}
							case CraftResource.Verite:
								{
									Identified = true;
									DurabilityLevel = WeaponDurabilityLevel.Indestructible;
									DamageLevel = WeaponDamageLevel.Power;
									AccuracyLevel = WeaponAccuracyLevel.Exceedingly;
									break;
								}
							case CraftResource.Valorite:
								{
									Identified = true;
									DurabilityLevel = WeaponDurabilityLevel.Indestructible;
									DamageLevel = WeaponDamageLevel.Vanq;
									AccuracyLevel = WeaponAccuracyLevel.Supremely;
									break;
								}
							case CraftResource.OakWood:
								{
									Identified = true;
									DurabilityLevel = WeaponDurabilityLevel.Durable;
									
								
						            break;
								}
							case CraftResource.AshWood:
								{
									Identified = true;
									DurabilityLevel = WeaponDurabilityLevel.Fortified;
									DamageLevel = WeaponDamageLevel.Ruin;
									AccuracyLevel = WeaponAccuracyLevel.Accurate;
									break;
								}
							case CraftResource.YewWood:
								{
									Identified = true;
									DurabilityLevel = WeaponDurabilityLevel.Fortified;
									DamageLevel = WeaponDamageLevel.Force;
									AccuracyLevel = WeaponAccuracyLevel.Eminently;
									break;
								}
							case CraftResource.Heartwood:
								{
									Identified = true;
									DurabilityLevel = WeaponDurabilityLevel.Indestructible;
									DamageLevel = WeaponDamageLevel.Power;
									AccuracyLevel = WeaponAccuracyLevel.Eminently;
									break;
								}
							case CraftResource.Bloodwood:
								{
									Identified = true;
									DurabilityLevel = WeaponDurabilityLevel.Indestructible;
									DamageLevel = WeaponDamageLevel.Power;
									AccuracyLevel = WeaponAccuracyLevel.Exceedingly;
									break;
								}
							case CraftResource.Frostwood:
								{
									Identified = true;
									DurabilityLevel = WeaponDurabilityLevel.Indestructible;
									DamageLevel = WeaponDamageLevel.Vanq;
									AccuracyLevel = WeaponAccuracyLevel.Supremely;
									break;
								}
							
						}
					//}
				}
			}

The complete files are attached.

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back