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()));