return new PerplexingChimeraControlExchangeEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Spell spell = game.getStack().getSpell(targetPointer.getFirst(game, source));
Player controller = game.getPlayer(source.getControllerId());
if (spell != null && controller != null) {
Player spellCaster = game.getPlayer(spell.getControllerId());
// controller gets controll of spell
spell.setControllerId(controller.getId());
// and chooses new targets
spell.chooseNewTargets(game, controller.getId());
game.informPlayers(new StringBuilder(controller.getName()).append(" got control of ").append(spell.getName()).append(" spell.").toString());
// and spell controller get control of Perplexing Chimera
if (spellCaster != null) {
ContinuousEffect effect = new PerplexingChimeraControlEffect();
effect.setTargetPointer(new FixedTarget(spellCaster.getId()));
game.addEffect(effect, source);