if (card != null) {
if (!game.replaceEvent(GameEvent.getEvent(GameEvent.EventType.CAST_SPELL, ability.getId(), playerId))) {
game.bookmarkState();
removeFromHand(card, game);
card.moveToZone(Zone.STACK, ability.getId(), game, false);
Ability spellAbility = game.getStack().getSpell(ability.getId()).getSpellAbility();
if (spellAbility.activate(game, noMana)) {
for (KickerAbility kicker: card.getAbilities().getKickerAbilities()) {
kicker.activate(game, false);
}
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.SPELL_CAST, spellAbility.getId(), playerId));
game.fireInformEvent(name + " casts " + card.getName());
game.removeLastBookmark();
return true;
}
game.restoreState();