/// <summary> /// This runs the simulation /// </summary> /// <returns>True if the caster dies</returns> public bool Run(out int damage) { damage = 0; //int currentFocus = Focus; Dice.RollD3() + Dice.Roll() + 2; int currentFocus = Dice.RollD3() + Dice.RollD3() + 2; while (currentFocus > 0) { currentFocus--; int hitRoll = MAT + Dice.Roll(2); if (IsBoostHit) { currentFocus--; hitRoll += Dice.Roll(1); } if (hitRoll >= TargetDef) { int damRoll = Dice.Roll(2) + Strength; if (IsBoostDam) { currentFocus--; damRoll += Dice.Roll(1); } if (IsWeaponMaster) { damRoll += Dice.Roll(1); } if (damRoll > TargetArm) { damage += damRoll - TargetArm; } } } if (damage >= TargetHealth) { return(true); } return(false); }
public bool Run(out int damage) { bool success = false; damage = 0; int seraphCurrentFury = SeraphFury; int shots = Dice.RollD3() + 1; for (int i = 0; i < shots; i++) { int hitRoll = Dice.Roll(2) + SeraphRAT; if (seraphCurrentFury > 0) { seraphCurrentFury--; hitRoll += Dice.Roll(); } if (hitRoll >= WitchDefence) { int damageRoll = Dice.Roll(2) + SeraphStrength; if (seraphCurrentFury > 0 && (AlwaysBoostDamage || i + seraphCurrentFury >= shots)) { seraphCurrentFury--; damageRoll += Dice.Roll(); } if (damageRoll > WitchArmour) damage += (damageRoll - WitchArmour); if (damage >= WitchHealth) success = true; } } return success; }