private static void AddOrcish(ItemCollection loot, int enemyEntityID) { int roll = UnityEngine.Random.Range(0, 101) + (luckMod - 5); bool addOrcishItem = false; if ((enemyEntityID == (int)MobileTypes.OrcWarlord && roll > 80) || (enemyEntityID == (int)MobileTypes.OrcShaman && roll > 90) || (enemyEntityID == (int)MobileTypes.OrcSergeant && roll > 95) || (enemyEntityID == (int)MobileTypes.Orc && roll > 98)) { addOrcishItem = true; } if (addOrcishItem) { int typeRoll = UnityEngine.Random.Range(0, 100); DaggerfallUnityItem item; if (typeRoll > 50) { Weapons weapon = (Weapons)UnityEngine.Random.Range((int)Weapons.Dagger, (int)Weapons.Long_Bow + 1); item = ItemBuilder.CreateItem(ItemGroups.Weapons, (int)weapon); ItemBuilder.ApplyWeaponMaterial(item, WeaponMaterialTypes.Orcish); item.currentCondition = (int)(UnityEngine.Random.Range(0.3f, 0.75f) * item.maxCondition); loot.AddItem(item); } else { Armor armor = (Armor)UnityEngine.Random.Range((int)Armor.Cuirass, (int)Armor.Tower_Shield + 1); item = ItemBuilder.CreateItem(ItemGroups.Armor, (int)armor); ItemBuilder.ApplyArmorMaterial(item, ArmorMaterialTypes.Orcish); item.currentCondition = (int)(UnityEngine.Random.Range(0.3f, 0.75f) * item.maxCondition); loot.AddItem(item); } } }
private static void AddDaedric(ItemCollection loot, int enemyEntityID) { int roll = UnityEngine.Random.Range(0, 101) + (luckMod - 5); bool addDaedricItem = false; if ((enemyEntityID == (int)MobileTypes.DaedraLord && roll > 70) || (enemyEntityID == (int)MobileTypes.DaedraSeducer && roll > 75) || ((enemyEntityID == (int)MobileTypes.FireDaedra || enemyEntityID == (int)MobileTypes.FrostDaedra) && roll > 80) || (enemyEntityID == (int)MobileTypes.Daedroth && roll > 80)) { addDaedricItem = true; } if (addDaedricItem) { int typeRoll = UnityEngine.Random.Range(0, 100); DaggerfallUnityItem item; if (typeRoll > 50 || enemyEntityID == (int)MobileTypes.DaedraSeducer) { Weapons weapon = (Weapons)UnityEngine.Random.Range((int)Weapons.Dagger, (int)Weapons.Long_Bow + 1); item = ItemBuilder.CreateItem(ItemGroups.Weapons, (int)weapon); ItemBuilder.ApplyWeaponMaterial(item, WeaponMaterialTypes.Daedric); item.currentCondition = (int)(UnityEngine.Random.Range(0.3f, 0.75f) * item.maxCondition); loot.AddItem(item); } else { Armor armor = (Armor)UnityEngine.Random.Range((int)Armor.Cuirass, (int)Armor.Tower_Shield + 1); item = ItemBuilder.CreateItem(ItemGroups.Armor, (int)armor); ItemBuilder.ApplyArmorMaterial(item, ArmorMaterialTypes.Daedric); item.currentCondition = (int)(UnityEngine.Random.Range(0.3f, 0.75f) * item.maxCondition); loot.AddItem(item); } } }