コード例 #1
0
 public override int Visit(DamagePDToAllCreaturesOfTargetPlayerSpellAbility spellAbility)
 {
     if (Target is PlayerTarget && Target.Character != Owner)
     {
         return(0);
     }
     return(-1);
 }
コード例 #2
0
        public override int Visit(DamagePDToAllCreaturesOfTargetPlayerSpellAbility spell)
        {
            // Handle Card targets
            List <CreatureCard> modCards = new List <CreatureCard>();

            foreach (PlayerTarget t in PlayerTargets)
            {
                foreach (CreatureCard card in GameManager.UserDict[t.Character].Player.Inner)
                {
                    card.Health -= spell.numPd;
                    if (card.Health > 0)
                    {
                        card.PoisonDamage += spell.numPd;
                    }
                    modCards.Add(card);
                }

                foreach (CreatureCard card in GameManager.UserDict[t.Character].Player.Outer)
                {
                    card.Health -= spell.numPd;
                    if (card.Health > 0)
                    {
                        card.PoisonDamage += spell.numPd;
                    }
                    modCards.Add(card);
                }
            }

            // Prepare responses
            foreach (CharacterEnum ch in GameManager.UserDict.Keys.ToList())
            {
                if (modCards.Any())
                {
                    AddResponse(ch, new CardsModifiedResponse(modCards));
                }
            }
            return(0);
        }
コード例 #3
0
 public override int Visit(DamagePDToAllCreaturesOfTargetPlayerSpellAbility ability)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 public abstract int Visit(DamagePDToAllCreaturesOfTargetPlayerSpellAbility damagePDToAllCreaturesOfTargetPlayerSpellAbility);
コード例 #5
0
 public override int Visit(DamagePDToAllCreaturesOfTargetPlayerSpellAbility damagePDToAllCreaturesOfTargetPlayerSpellAbility)
 {
     return(0);
 }