Examples of revealCards()


Examples of mage.players.Player.revealCards()

        if (sourceObject != null && you != null && cardName != null && !cardName.isEmpty()) {
            if (you.getHand().size() > 0) {
                Cards revealed = new CardsImpl();
                Card card = you.getHand().getRandom(game);
                revealed.add(card);
                you.revealCards(sourceObject.getLogName(), revealed, game);
                if (card.getName().equals(cardName)) {
                    Permanent creature = game.getPermanent(targetPointer.getFirst(game, source));
                    if (creature != null) {
                        creature.damage(2, source.getSourceId(), game, false, true);
                        return true;
View Full Code Here

Examples of mage.players.Player.revealCards()

  @Override
  public boolean apply(Game game, Ability source) {
    Player player = game.getPlayer(source.getFirstTarget());
    if (player != null) {
      player.revealCards(player.getHand(), game);
      Player you = game.getPlayer(source.getControllerId());
      if (you != null) {
        TargetCard target = new TargetCard(Zone.PICK, filter);
        if (you.choose(player.getHand(), target, game)) {
          Card card = player.getHand().get(target.getFirstTarget(), game);
View Full Code Here

Examples of mage.players.Player.revealCards()

                    if (card != null){
                        cards.add(card);
                    }
                }
                //Reveal them
                player.revealCards("Reveal", cards, game);
                Card cardsArray[] = cards.getCards(game).toArray(new Card[0]);
                //If you reveal three cards with different names
                if(cardsArray.length == 3 && !cardsArray[0].getName().equals(cardsArray[1]) && !cardsArray[0].getName().equals(cardsArray[2]) && !cardsArray[1].getName().equals(cardsArray[2])){
                    //Choose one of them at random and put that card into your hand
                    Card randomCard = cards.getRandom(game);
View Full Code Here

Examples of mage.players.Player.revealCards()

        Player player = game.getPlayer(source.getFirstTarget());
        if (player != null && player.getLibrary().size() > 0) {
            Card card = player.getLibrary().getFromTop(game);
            Cards cards = new CardsImpl();
            cards.add(card);
            player.revealCards("Cerebral Eruption", cards, game);
            game.getState().setValue(source.getSourceId().toString(), card);
            int damage = card.getManaCost().convertedManaCost();
            player.damage(damage, source.getSourceId(), game, false, true);
            for (Permanent perm: game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) {
                perm.damage(damage, source.getSourceId(), game, false, true);
View Full Code Here

Examples of mage.players.Player.revealCards()

            }
            if (player.getLibrary().size() > 0) {
                Card card = player.getLibrary().getFromTop(game);
                Cards cards = new CardsImpl();
                cards.add(card);
                player.revealCards("Baneful Omen", cards, game);

                if (card != null) {
                    int loseLife = card.getManaCost().convertedManaCost();
                    Set<UUID> opponents = game.getOpponents(source.getControllerId());
                    for (UUID opponentUuid : opponents) {
View Full Code Here

Examples of mage.players.Player.revealCards()

                    Card card = player.getLibrary().remove(cardId, game);
                    if (card != null) {
                        cards.add(card);
                    }
                }
                player.revealCards(sourceCard.getName(), cards, game);

                CardsImpl cardsToKeep = new CardsImpl();
                if (cards.size() > 2) {
                    cardsToKeep.addAll(cards);
View Full Code Here

Examples of mage.players.Player.revealCards()

    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(targetPointer.getFirst(game, source));
        if (player != null && player.getHand().size() > 0) {
            Cards revealed = new CardsImpl();
            revealed.add(player.getHand().getRandom(game));
            player.revealCards("Hired Torturer", revealed, game);
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.revealCards()

        if (player.getLibrary().size() > 0) {
            Card card = player.getLibrary().getFromTop(game);
            Cards cards = new CardsImpl();
            cards.add(card);
            player.revealCards("Pain Seer", cards, game);

            if (card != null &&
                card.moveToZone(Zone.HAND, source.getSourceId(), game, false)) {
                player.loseLife(card.getManaCost().convertedManaCost(), game);
                return true;
View Full Code Here

Examples of mage.players.Player.revealCards()

                Player player = game.getPlayer(this.getControllerId());
                if (player != null) {
                    Cards cards = new CardsImpl();
                    Card card = player.getLibrary().getFromTop(game);
                    cards.add(card);
                    player.revealCards("Harsh Deceiver", cards, game);
                    if (card != null && card.getCardType().contains(CardType.LAND)) {
                            return true;
                    }
                }
        return false;
View Full Code Here

Examples of mage.players.Player.revealCards()

                player.gainLife(2, game);
            }

            Cards cards = new CardsImpl();
            cards.add(card);
            player.revealCards("Druidic Satchel", cards, game);
            return true;
        }
        return false;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.