/** * bookmarks the current state and restores it if player doesn't pay the * mana cost * * @param ability * @param game * @param sourceId * @param payingPlayerId * @return true if the cost was paid */ @Override public boolean payOrRollback(Ability ability, Game game, UUID sourceId, UUID payingPlayerId) { int bookmark = game.bookmarkState(); handlePhyrexianManaCosts(payingPlayerId, ability, game); if (pay(ability, game, sourceId, payingPlayerId, false, null)) { game.removeBookmark(bookmark); return true; } game.restoreState(bookmark, ability.getRule()); return false; }