public static int AddVillainTarget(string name, int health, DamageType damageType)
        {
            VillainTarget villainTarget = new VillainTarget(name, health, damageType);

            villainTarget.AddSelfToParentList(ActiveGame.AllTargets, ActiveGame.NonHeroTargets, ActiveGame.VillainTargets);

            return(villainTarget.UniqueId);
        }
Example #2
0
        public void HealGlobalAddNewVillainModTest()
        {
            Setup.SetupTestInfrastructure();
            ActiveGame activeGame = GameContainer.ActiveGame;

            try
            {
                AmountModifier   healthModifier = new AmountModifier("Obsidion Field", "Increase all damage by 1", ModifierTargets.VillainTargets, AmountModifierType.Health, 1, false);
                CharacterAccount fromAccount    = activeGame.AllTargets[43];
                GameContainer.AddHealthModifier(healthModifier, fromAccount);

                VillainTarget villain = new VillainTarget("Generic Villain", 10, DamageType.Energy);

                Assert.IsTrue(villain.HealingModList.ContainsValue(healthModifier), "New villain character does not contain the expected modifier");
            }
            catch (Exception e)
            {
                Assert.Fail("Test failed: " + e);
            }
        }