use of mage.game.permanent.token.AngelVigilanceToken in project mage by magefree.
the class FinaleOfGloryEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
int xValue = source.getManaCostsToPay().getX();
if (xValue == 0) {
return false;
}
new CreateTokenEffect(new SoldierVigilanceToken(), xValue).apply(game, source);
if (xValue >= 10) {
new CreateTokenEffect(new AngelVigilanceToken(), xValue).apply(game, source);
}
return true;
}
use of mage.game.permanent.token.AngelVigilanceToken in project mage by magefree.
the class DivineVisitationEffect method replaceEvent.
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
if (event instanceof CreateTokenEvent) {
int amount = 0;
CreateTokenEvent tokenEvent = (CreateTokenEvent) event;
Iterator<Map.Entry<Token, Integer>> it = tokenEvent.getTokens().entrySet().iterator();
while (it.hasNext()) {
Map.Entry<Token, Integer> entry = it.next();
if (entry.getKey().isCreature(game)) {
amount += entry.getValue();
it.remove();
}
}
if (amount > 0) {
tokenEvent.getTokens().put(new AngelVigilanceToken(), amount);
}
}
return false;
}
Aggregations