Exemple #1
0
        public override void impact(ref Ability ability)
        {
            //var critchance = calculateCrit(_player);
              //set potency for now, but change to damage later.
              var accroll = (MainWindow.d100(1, 10001)) / 100;

              if (ability.abilityType == "Cooldown") {
            ability.hits += 1;
              }

              if (ability.abilityType == "Weaponskill" || (ability.abilityType == "Instant")) {
            numberofattacks += 1;
            ability.attacks += 1;
            if (accroll < calculateACC()) {

              if (ability.name == "Fast Blade") { combo = PLDCombo.SavageBlade; }
              if (ability.name == "Savage Blade") { combo = PLDCombo.RageOfHalone; }
              if (ability.name == "Rage of Halone") { combo = PLDCombo.PLDNone; }

              double thisdamage = damage(ref ability, ability.potency);

              if (MainWindow.disdebuff == true) {
            thisdamage = Math.Floor(thisdamage *= 1.12);
              }

              numberofhits += 1;
              ability.hits += 1;

              totaldamage += (int)thisdamage;
              ability.damage += thisdamage;
              MainWindow.log(MainWindow.time.ToString("F2") + " - " + ability.name + " Deals " + thisdamage + " Damage. Next ability at: " + nextability);
            } else {
              numberofmisses += 1;
              ability.misses += 1;
              MainWindow.log("!!MISS!! - " + MainWindow.time.ToString("F2") + " - " + ability.name + " missed! Next ability at: " + ability.nextCast);
              // Does heavyshot buff get eaten by a miss?
            }
              }
              if (ability.abilityType == "AUTOA") {
            autoattack.hits += 1;
            numberofattacks += 1;
            if (accroll < calculateACC()) {
              var thisdamage = damage(ref ability, ability.potency);
              numberofhits += 1;
              totaldamage += thisdamage;
              autoattack.damage += thisdamage;
              MainWindow.log(MainWindow.time.ToString("F2") + " - " + ability.name + " Deals " + thisdamage + " Damage. Next AA at: " + ability.nextCast);
            } else {
              autoattack.misses += 1;
              numberofmisses += 1;
              MainWindow.log("!!MISS!! - " + MainWindow.time.ToString("F2") + " - " + ability.name + " missed! Next AA at: " + ability.nextCast);
            }
              }

              // If ability has debuff, create its timer.
              if (ability.debuffTime > 0 && accroll < calculateACC()) {
            if (ability.debuff > 0) {
              MainWindow.log(MainWindow.time.ToString("F2") + " - " + ability.name + "  DOT clipped.");
              //reset all buffs if clipping
              ability.dotbuff["fightorflight"] = false;
              ability.dotbuff["potion"] = false;
            }
            //If dot exists and ability doesn't miss, enable its time.

            ability.debuff = ability.debuffTime;

            if (fightorflight.buff > 0) { ability.dotbuff["fightorflight"] = true; }
            if (xpotionstrength.buff > 0) { ability.dotbuff["potion"] = true; }

            MainWindow.log(MainWindow.time.ToString("F2") + " - " + ability.name + " DoT has been applied.  Time Left: " + ability.debuff);
              }
              if (ability.buffTime > 0 && accroll < calculateACC()) {
            ability.buff = ability.buffTime;
            MainWindow.log(MainWindow.time.ToString("F2") + " - " + ability.name + " buff has been activated.  Time Left: " + ability.buff + ". Next ability at: " + nextability);
              }
              //Add buffs to dots
        }
Exemple #2
0
 public override void getStats(MainWindow cs)
 {
     base.getStats(cs);
       // Define AP and MP conversion.
       AP = STR; //or STR
       AMP = INT;
       combo = PLDCombo.PLDNone;
 }