Пример #1
0
        public Spoils ScoreKill(Spoils spoils)
        {
            RPGWins++;
            RPGGold           += spoils.Gold;
            RPGXP             += spoils.XP;
            RPGStaminaPotions += spoils.StamPot;
            RPGHealingPotions += spoils.HealthPot;

            return(spoils);
        }
Пример #2
0
        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));
            }
        }
Пример #3
0
        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));
            }
        }
Пример #4
0
 public Result(bool dead, int dmg, Spoils spoils)
 {
     TargetDead = dead;
     Damage     = dmg;
     Spoils     = spoils;
 }