use of mage.game.permanent.token.SurvivorToken in project mage by magefree.
the class VarchildBetrayerOfKjeldorEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
int damage = (int) this.getValue("damage");
if (damage > 0) {
Effect effect = new CreateTokenTargetEffect(new SurvivorToken(), damage);
effect.setTargetPointer(getTargetPointer());
return effect.apply(game, source);
}
return false;
}
use of mage.game.permanent.token.SurvivorToken in project mage by magefree.
the class OpponentCreateSurvivorTokenCost method pay.
@Override
public boolean pay(Ability ability, Game game, Ability source, UUID controllerId, boolean noMana, Cost costToPay) {
Player controller = game.getPlayer(controllerId);
if (controller != null) {
TargetOpponent target = new TargetOpponent();
if (controller.chooseTarget(Outcome.Neutral, target, ability, game)) {
Player opponent = game.getPlayer(target.getFirstTarget());
if (opponent != null) {
Effect effect = new CreateTokenTargetEffect(new SurvivorToken());
effect.setTargetPointer(new FixedTarget(opponent.getId(), game));
paid = effect.apply(game, ability);
}
}
}
return paid;
}
Aggregations