Search in sources :

Example 1 with GreenCatToken

use of mage.game.permanent.token.GreenCatToken in project mage by magefree.

the class WaitingInTheWeedsEffect method apply.

@Override
public boolean apply(Game game, Ability source) {
    Player controller = game.getPlayer(source.getControllerId());
    if (controller != null) {
        for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
            Token token = new GreenCatToken();
            int amount = game.getBattlefield().getAllActivePermanents(filter, playerId, game).size();
            token.putOntoBattlefield(amount, game, source, playerId);
        }
        return true;
    }
    return false;
}
Also used : Player(mage.players.Player) GreenCatToken(mage.game.permanent.token.GreenCatToken) Token(mage.game.permanent.token.Token) GreenCatToken(mage.game.permanent.token.GreenCatToken) UUID(java.util.UUID)

Aggregations

UUID (java.util.UUID)1 GreenCatToken (mage.game.permanent.token.GreenCatToken)1 Token (mage.game.permanent.token.Token)1 Player (mage.players.Player)1