示例#1
0
        public void TestExplosiveMasteringBurning()
        {
            var game     = CreateGame();
            var champion = ChampionEnemies.First();

            PrepareEnemyToBeBeaten(champion);
            var chempBeginHealth = champion.Stats.Health;
            var hero             = game.GameManager.Hero;

            var explosiveCocktail = new ProjectileFightItem(FightItemKind.ExplosiveCocktail, hero);

            explosiveCocktail.Count = 10;
            hero.Inventory.Add(explosiveCocktail);
            hero.ActiveFightItem = explosiveCocktail;

            for (int i = 0; i < 10; i++)
            {
                //champion.OnHitBy(explosiveCocktail);
                UseFightItem(hero, champion, hero.ActiveProjectileFightItem);
                if (champion.HasLastingEffect(Roguelike.Effects.EffectType.Firing))
                {
                    break;
                }
                GotoNextHeroTurn();
            }

            Assert.True(champion.HasLastingEffect(Roguelike.Effects.EffectType.Firing));
        }
示例#2
0
        public void TestExplosiveMasteringBurning()
        {
            var game             = CreateGame();
            var champion         = ChampionEnemies.First();
            var chempBeginHealth = champion.Stats.Health;
            var hero             = game.GameManager.Hero;

            var explosiveCocktail = new ProjectileFightItem(FightItemKind.ExplosiveCocktail, hero);

            for (int i = 0; i < 10; i++)
            {
                champion.OnHitBy(explosiveCocktail);
                if (champion.HasLastingEffect(Roguelike.Effects.EffectType.Firing))
                {
                    break;
                }
            }

            Assert.True(champion.HasLastingEffect(Roguelike.Effects.EffectType.Firing));
        }
示例#3
0
        public void TestBasicFightItem(FightItemKind kind)
        {
            var game = CreateGame();

            //take one which is active to make sure will have it's turn
            RevealAllEnemies(game);
            var enemy = ChampionEnemies.Where(i => i.PowerKind == EnemyPowerKind.Champion).First();

            Assert.True(enemy.Revealed && enemy.Alive);
            enemy.Stats.SetNominal(EntityStatKind.Health, 100);
            var enemyBeginHealth = enemy.Stats.Health;
            var hero             = game.GameManager.Hero;

            var fi = ActivateFightItem(kind, hero);

            var damage1 = fi.Damage;

            Assert.Greater(damage1, 0);
            Assert.AreEqual(enemy.OnHitBy(fi), HitResult.Hit);
            var chempAfter1HitHealth = enemy.Stats.Health;

            Assert.Greater(enemyBeginHealth, chempAfter1HitHealth);
            var firstExplCoctailDamage = enemyBeginHealth - chempAfter1HitHealth;

            IncreaseAbility(hero, fi.AbilityKind);

            fi = ActivateFightItem(kind, hero);
            var damage2 = fi.Damage;

            Assert.Greater(damage2, damage1);
            enemy.OnHitBy(fi);
            GotoNextHeroTurn();//effect prolonged - make turn to see effect
            var chempAfter2HitHealth = enemy.Stats.Health;
            var secExplCoctailDamage = chempAfter1HitHealth - chempAfter2HitHealth;

            Assert.Greater(secExplCoctailDamage, firstExplCoctailDamage);
        }