Beispiel #1
0
        public static void CreatePriest(string playerName, string typeOfPriest)
        {
            List <Models.Action> actions = new List <Models.Action>();

            actions.Add(new FlashHeal("FLASH HEAL", Constants.BaseCooldown, Constants.PriestManaRegen, Constants.PriestSpellPower));
            if (typeOfPriest == "HOLY")
            {
                actions.Add(new Renew("RENEW", Constants.BaseCooldown, 200, 2, (int)(Constants.PriestSpellPower * 1.5)));
                actions.Add(new Serenity("SERENITY", Constants.BaseCooldown, 400, Constants.PriestSpellPower * 5));
                actions.Add(new PunishTheUnholy("PUNISH THE UNHOLY", Constants.BaseCooldown, 300, Constants.PriestSpellPower * 5));
                Hero holyPriest = new HolyPriest(playerName, Constants.PriestHealth, Constants.PriestHealthRegen
                                                 , actions, Constants.HeroBaseArmor, Constants.PriestMana, Constants.PriestManaRegen, Constants.PriestSpellPower);
                players.Add(holyPriest);
            }
            else if (typeOfPriest == "DISCIPLINE")
            {
                actions.Add(new Shield("POWER WORD: SHIELD", Constants.BaseCooldown, 200, 40));
                actions.Add(new Silence("SILENCE", Constants.BaseCooldown, 300));
                actions.Add(new PurgeTheWicked("PURGE THE WICKED", Constants.BaseCooldown, 300, Constants.PriestSpellPower * 5));
                Hero disciplinePriest = new DisciplinePriest(playerName, Constants.PriestHealth, Constants.PriestHealthRegen
                                                             , actions, Constants.HeroBaseArmor, Constants.PriestMana, Constants.PriestManaRegen, Constants.PriestSpellPower);
                players.Add(disciplinePriest);
            }
            else
            {
                actions.Add(new CurseOfDeath("CURSE OF DEATH", Constants.BaseCooldown, 150, 3, Constants.PriestSpellPower));
                actions.Add(new Sadism("SADISM", Constants.BaseCooldown, 300, 50, 30));
                actions.Add(new MindBlast("MIND BLAST", Constants.BaseCooldown, 300, Constants.PriestSpellPower * 4));
                Hero shadowPriest = new ShadowPriest(playerName, Constants.PriestHealth, Constants.PriestHealthRegen
                                                     , actions, Constants.HeroBaseArmor, Constants.PriestMana, Constants.PriestManaRegen, Constants.PriestSpellPower);
                players.Add(shadowPriest);
            }
        }
Beispiel #2
0
        public void ExecuteAgressiveAction(Hero player, Hero enemy)
        {
            enemy.TakeDamage(this.Damage);
            player.Actions.Where(a => a.Name == this.Name).First().SetCooldown(AbilityCooldownConstants.PurgeTheWickedCooldown);

            DisciplinePriest priest = (DisciplinePriest)player;

            priest.PassiveDuration--;
            if (priest.PassiveDuration <= 0)
            {
                priest.IsShielded = false;
            }
        }
Beispiel #3
0
        public void ExecuteAgressiveAction(Hero player, Hero enemy)
        {
            enemy.StunnedDuration += AbilityDurationConstants.SilenceDuration;

            DisciplinePriest priest = (DisciplinePriest)player;

            priest.PassiveDuration--;
            player.Actions.Where(a => a.Name == this.Name).First().SetCooldown(AbilityCooldownConstants.SilenceCooldown);
            if (priest.PassiveDuration <= 0)
            {
                priest.IsShielded = false;
            }
        }
        public void DisciplinePriestTakingDamageWhenArmorIsLessThanDamage()
        {
            //Arrange
            DisciplinePriest sut = new DisciplinePriest("Patric", health, healthRegeneration, new List <Action>()
            {
                new Shield("SHIELD", 3, 3, 4)
            }, armor, mana, manaRegen, spellPower);

            //Act
            sut.TakeDamage(damage);

            //Assert
            Assert.AreEqual(155, sut.Health);
        }
        public void ActivatePassiveWithShield()
        {
            //Arrange
            DisciplinePriest sut = new DisciplinePriest("Patric", health, healthRegeneration, new List <Action>()
            {
                new Shield("SHIELD", 3, 3, 4)
            }, armor, mana, manaRegen, spellPower);

            //Act
            sut.ActivatePassive("SHIELD", sut);

            //Assert
            Assert.IsTrue(sut.IsShielded);
            Assert.AreEqual(3, sut.PassiveDuration);
        }