Exemple #1
0
 public HealEffect(Warrior Attacker, int Effectiveness, int TriggerChance, string Origin)
 {
     this.attacker = Attacker;
     this.target = this.attacker;
     this.effectiveness = Effectiveness;
     this.triggerChance = TriggerChance;
     this.origin = Origin;
 }
Exemple #2
0
        public Run(Warrior Attacker)
        {
            this.attacker = Attacker;
            this.accuracyBonus = 100;
            this.speedBonus = 0;

            this.runSucceeds = true;
        }
Exemple #3
0
 public Attack(Warrior Attacker, Warrior Target, int Accuracy, int Strength, DamageType DamageType, Ability Proc)
 {
     this.damageType = DamageType;
     this.target = Target;
     this.attacker = Attacker;
     this.accuracy = Accuracy;
     this.strength = Strength;
     this.proc = Proc;
 }
        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 Ability CreateAbility(Warrior attacker, int abilityid)
 {
     if (abilityid == -1)
     {
         return null;
     }
     switch (AbilityStats.GetStat(abilityid, "type"))
     {
         case "unarmed":
             return CreateUnarmed(abilityid, attacker);
         default:
             return null;
     }
 }