private BaseArmor CreateArmor(int level) { BaseArmor armor = Loot.RandomArmorOrShield(); armor.ProtectionLevel = (ArmorProtectionLevel)level; armor.Durability = (ArmorDurabilityLevel)BaseCreature.RandomMinMaxScaled(0, 5); return(armor); }
public override void OnDeath(Container c) { base.OnDeath(c); int magicItems = 8; c.DropItem(new Arrow(100)); c.DropItem(new Bolt(100)); c.DropItem(new Bandage(100)); for (int a = 0; a < magicItems; a++) { switch (Utility.RandomMinMax(1, 2)) { case 1: BaseWeapon weapon = Loot.RandomWeapon(); weapon.AccuracyLevel = (WeaponAccuracyLevel)Utility.RandomMinMax(1, 4); weapon.DamageLevel = (WeaponDamageLevel)Utility.RandomMinMax(1, 4); weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.RandomMinMax(1, 4); weapon.Identified = true; c.DropItem(weapon); break; case 2: BaseArmor armor = Loot.RandomArmorOrShield(); armor.ProtectionLevel = (ArmorProtectionLevel)Utility.RandomMinMax(1, 4); armor.DurabilityLevel = (ArmorDurabilityLevel)Utility.RandomMinMax(1, 4); armor.Identified = true; c.DropItem(armor); break; } } }