Exemplo n.º 1
0
        public override int Visit(ReturnToHandAbility ability)
        {
            foreach (CardTarget target in CardTargets)
            {
                if (Caller.Hand.Count >= AmaruConstants.HAND_MAX_SIZE)
                {
                    return(0);
                }
                Place        origin  = GameManager.UserDict[target.Character].Player.GetCardFromId(target.CardId, Place.INNER) == null ? Place.OUTER : Place.INNER;
                CreatureCard oldCard = ((CreatureCard)GameManager.GetPlayer(target.Character).GetCardFromId(target.CardId, origin));
                CreatureCard moved   = (CreatureCard)oldCard.Original;

                // TODO: gestire se l'area è piena
                if (origin == Place.OUTER)
                {
                    Caller.Outer.Remove(oldCard);
                }
                else if (origin == Place.INNER)
                {
                    Caller.Inner.Remove(oldCard);
                }
                else//*/
                {
                    return(0);
                }
                Caller.Hand.Add(moved);
                foreach (CharacterEnum c in GameManager.UserDict.Keys)
                {
                    AddResponse(c, new EvocationResponse(Owner, oldCard, moved, Place.HAND, deleteOriginal: true));
                }
            }
            return(0);
        }
 public override int Visit(ReturnToHandAbility ability)
 {
     if (Target is CardTarget && Target.Character == this.Owner)
     {
         return(0);
     }
     return(-1);
 }
Exemplo n.º 3
0
 public override int Visit(ReturnToHandAbility returnToHandAbility)
 {
     return(0);
 }
Exemplo n.º 4
0
 public abstract int Visit(ReturnToHandAbility returnToHandAbility);