public VanillaStats() { protections = new Dictionary <DamageType.Types, ElementVanillaStat>(); ele_damageBoosts = new Dictionary <DamageType.Types, ElementVanillaStat>(); eleAttackDamage = new Dictionary <DamageType.Types, WeaponVanillaStat>(); resistances = new Dictionary <DamageType.Types, ElementVanillaStat>(); int index = 1000; foreach (DamageType.Types type in EnumUtils.Elements()) { protections.Add(type, (ElementVanillaStat)Registry.VanillaStats.Register(new ElementVanillaStat(Fields.INSTANCE.EquipmentStats_m_damageProtection, type, type.ToString().ToLower() + "" + "protection", index++, VanillaStat.Type.ArmorStat))); ele_damageBoosts.Add(type, (ElementVanillaStat)Registry.VanillaStats.Register(new ElementVanillaStat(Fields.INSTANCE.EquipmentStats_m_damageAttack, type, type.ToString().ToLower() + "" + "damageboost", index++, VanillaStat.Type.GearStat))); eleAttackDamage.Add(type, (WeaponVanillaStat)Registry.VanillaStats.Register(new WeaponVanillaStat(type, type.ToString().ToLower() + "" + "attackdamage", index++, VanillaStat.Type.WeaponStat))); resistances.Add(type, (ElementVanillaStat)Registry.VanillaStats.Register(new ElementVanillaStat(Fields.INSTANCE.EquipmentStats_m_damageResistance, type, type.ToString().ToLower() + "" + "resistance", index++, VanillaStat.Type.GearStat))); } }
public static float GetLootMulti(Character mob) { float multi = 1; multi += HP * mob.Stats.MaxHealth; multi += PROTECTION * mob.Stats.GetDamageProtection(DamageType.Types.Physical); float res = 0; foreach (DamageType.Types type in EnumUtils.Elements()) { res += mob.Stats.GetDamageResistance(type); } multi += RES * res; Log.Debug(mob.Name + " Mob loot multi is: " + multi); return(multi); }