public Spoils ScoreKill(Spoils spoils) { RPGWins++; RPGGold += spoils.Gold; RPGXP += spoils.XP; RPGStaminaPotions += spoils.StamPot; RPGHealingPotions += spoils.HealthPot; return(spoils); }
new public Result Attack(UserState target, CommandEventArgs e) { int dmg = (int)((target.RPGLevel * .25) * r.Next(8, 100)); target.RPGHitpoints -= dmg; if (target.RPGHitpoints <= 0) { Spoils spoils = target.Die(this); return(new Result(true, dmg, this.ScoreKill(spoils))); } else { return(new Result(false, dmg)); } }
public Result Attack(UserState target, CommandEventArgs e, Result combatResult) { int dmg = (int)((target.RPGLevel * .25) * r.Next(8, 100)); target.RPGHitpoints -= dmg; if (target.RPGHitpoints <= 0) { Spoils spoils = target.Die(this); if (combatResult.TargetDead) { spoils.Gold = 0; spoils.HealthPot = 0; spoils.StamPot = 0; } return(new Result(true, dmg, this.ScoreKill(spoils))); } else { return(new Result(false, dmg)); } }
public Result(bool dead, int dmg, Spoils spoils) { TargetDead = dead; Damage = dmg; Spoils = spoils; }