Package mage.game.permanent.token

Examples of mage.game.permanent.token.Token


                permanent = (Permanent) game.getLastKnownInformation(targetId, Zone.BATTLEFIELD);
            }
            if (permanent != null) {
                Player player = game.getPlayer(permanent.getControllerId());
                if (player != null) {
                    Token token = new SquirrelToken();
                    token.putOntoBattlefield(damageAmount, game, source.getSourceId(), player.getId());
                    return true;
                }
            }
        }
        return false;
View Full Code Here


    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            int amount = new ManacostVariableValue().calculate(game, source, this);
            Token token = new MarathWillOfTheWildElementalToken();
            token.getPower().initValue(amount);
            token.getToughness().initValue(amount);
            token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
            return true;
        }
        return false;
    }
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Player controller = game.getPlayer(source.getControllerId());
        if (controller != null) {
            for (UUID playerId : controller.getInRange()) {
                if (!playerId.equals(this.getTargetPointer().getFirst(game, source))) {
                    Token token = new DragonToken();
                    token.putOntoBattlefield(1, game, source.getSourceId(), playerId);
                }
            }
            return true;
        }
        return false;
View Full Code Here

            Spell spell = game.getStack().getSpell(targetId);
            if (game.getStack().counter(targetId, source.getSourceId(), game)) {
                countered = true;
            }
            if (spell != null) {
                Token token = new SwanSongBirdToken();
                token.putOntoBattlefield(1, game, source.getSourceId(), spell.getControllerId());
            }
        }
        return countered;
    }
View Full Code Here

            if (cost instanceof RemoveVariableCountersTargetCost) {
                xValue = ((RemoveVariableCountersTargetCost) cost).getAmount();
                break;
            }
        }
        Token tokenCopy = token.copy();
        tokenCopy.getAbilities().newId();
        tokenCopy.getPower().initValue(xValue);
        tokenCopy.getToughness().initValue(xValue);
        tokenCopy.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
        return true;
    }
View Full Code Here

        this.color.setWhite(true);

        this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(4)), false));

        // +1: Put a 1/1 white Soldier creature token onto the battlefield.
        Token token = new SoldierToken();
        token.setOriginalExpansionSetCode("ALA"); // to get the right image
        this.addAbility(new LoyaltyAbility(new CreateTokenEffect(token), 1));

        // +1: Target creature gets +3/+3 and gains flying until end of turn.
        Effects effects1 = new Effects();
        Effect effect = new BoostTargetEffect(3, 3, Duration.EndOfTurn);
View Full Code Here

        ManaCosts<ManaCost> cost = new ManaCostsImpl<>("{X}");
        if (player != null) {
            int costX = player.announceXMana(0, Integer.MAX_VALUE, "Announce the value for {X}", game, source);
            cost.add(new GenericManaCost(costX));
            if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) {
                Token token = new SoldierToken();
                token.putOntoBattlefield(costX, game, source.getSourceId(), source.getControllerId());
            }
        }
        return false;
    }
View Full Code Here

                Permanent permanent = game.getPermanent(permanentId);
                if (permanent != null) {
                    Player controller = game.getPlayer(permanent.getControllerId());
                    permanent.destroy(source.getSourceId(), game, false);
                    if (controller != null) {
                        Token spirit = new SpiritWhiteToken("AVR", 1);
                        spirit.putOntoBattlefield(1, game, source.getSourceId(), controller.getId());
                    }
                    affectedTargets++;
                }
            }
        }
View Full Code Here

            } else if (permanent.getName().equals("Crown of Empires")) {
                crown = true;
            }
            if (scepter && crown) break;
        }
        Token soldier = new SoldierToken();
        int count = scepter && crown ? 5 : 1;
        soldier.putOntoBattlefield(count, game, source.getSourceId(), source.getControllerId());
        return false;
    }
View Full Code Here

    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getTargets().getFirstTarget());
        if ( permanent != null ) {
            Player player = game.getPlayer(permanent.getControllerId());
            permanent.sacrifice(this.getId(), game);
            Token dragonToken = new DragonToken();
            dragonToken.putOntoBattlefield(1, game, this.getId(), player.getId());
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of mage.game.permanent.token.Token

Copyright © 2018 www.massapicom. 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.