use of mage.game.permanent.token.RiptideReplicatorToken in project mage by magefree.
the class RiptideReplicatorEffect method apply.
@Override
public boolean apply(Game game, Ability source) {
ObjectColor color = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color");
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
if (subType == null) {
return false;
}
int x = (new CountersSourceCount(CounterType.CHARGE)).calculate(game, source, this);
Token token = new RiptideReplicatorToken(color, subType, x);
return token.putOntoBattlefield(1, game, source, source.getControllerId());
}
Aggregations