public Weapon(int itemid) : base(itemid) { this.damage = int.Parse(ItemStats.GetStat(itemid, "damage")); this.damageType = StatParser.ParseDamageType(ItemStats.GetStat(itemid, "damagetype")); this.proc = null; size = StatParser.ParseWeaponSize(ItemStats.GetStat(itemid, "size")); this.Equippable = true; }
private static Ability CreateUnarmed(int abilityid, Warrior attacker) { DamageType damageType = StatParser.ParseDamageType(AbilityStats.GetStat(abilityid, "damagetype")); int speedBonus = int.Parse(AbilityStats.GetStat(abilityid, "speed")); int accuracyBonus = int.Parse(AbilityStats.GetStat(abilityid, "accuracy")); Ability proc; int procid = int.Parse(AbilityStats.GetStat(abilityid, "proc")); if (procid != -1) { proc = CreateAbility(attacker, procid); } else { proc = null; } return(new UnarmedAttack(attacker, damageType, speedBonus, accuracyBonus, proc)); }
public static string GetStat(int monsterid, string stat) { string result = StatParser.XMLStats(monsterid, stat, "monsters.xml"); return(result ?? getDefaultStat(stat)); }
public static bool MonsterExists(int monsterid) { return(StatParser.IDExists(monsterid, "monsters.xml")); }
public Armour(int itemid) : base(itemid) { location = StatParser.ParseArmourLocation(ItemStats.GetStat(itemid, "location")); this.Equippable = true; }
public static string GetStat(int abilityid, string stat) { string result = StatParser.XMLStats(abilityid, stat, "monster_abilities.xml"); return(result ?? getDefaultStat(stat)); }
public static string GetStat(int itemid, string stat) { string result = StatParser.XMLStats(itemid, stat, "items.xml"); return(result ?? getDefaultStat(stat)); }