Пример #1
0
        public IEnumerator Panic(int player, int target, Drop drop, int cardIndex)
        {
            PlayerController pc       = playerControllers[player];
            PlayerController targetPc = playerControllers[target];
            Card             c        = null;

            switch (drop)
            {
            case Drop.Hand:
                if (target == player)
                {
                    c = null;
                }
                else
                {
                    c = targetPc.StealCardFromHand(cardIndex);
                }
                break;

            case Drop.Properties:
                c = targetPc.UnequipProperty(cardIndex);
                break;

            case Drop.Weapon:
                c = targetPc.UnequipWeapon();
                break;
            }
            pc.DiscardCardUsed();
            if (c != null)
            {
                pc.AddCard(c);
            }
            yield return(targetPc.StolenBy(player));
        }
Пример #2
0
        public IEnumerator CatBalou(int player, int target, Drop drop, int cardIndex)
        {
            PlayerController pc       = playerControllers[player];
            PlayerController targetPc = playerControllers[target];
            Card             c        = null;

            switch (drop)
            {
            case Drop.Hand:
                if (player == target && cardIndex < pc.DraggedCardIndex)
                {
                    pc.DraggedCardIndex--;
                }
                c = targetPc.StealCardFromHand(cardIndex);
                break;

            case Drop.Properties:
                c = targetPc.UnequipProperty(cardIndex);
                break;

            case Drop.Weapon:
                c = targetPc.UnequipWeapon();
                break;
            }
            pc.DiscardCardUsed();
            DiscardCard(c);
            yield return(targetPc.StolenBy(player));
        }
Пример #3
0
        public void StealProperty(int player, int target, int index)
        {
            PlayerController pc       = playerControllers[player];
            PlayerController targetPc = playerControllers[target];
            Card             c        = targetPc.UnequipProperty(index);

            pc.AddCard(c);
            targetPc.StolenBy(player);
        }