forked from External/mage
Add tests for Camellia, refactor SacrificedPermanentBatchEvent. (#12769)
Added SacrificedPermanentEvent, to be used in SacrificedPermanentBatchEvent to prevent adding incorrect GameEvents.
This commit is contained in:
parent
e290bc8c1a
commit
6a19ec48df
5 changed files with 113 additions and 9 deletions
|
|
@ -1421,9 +1421,9 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
if (player != null) {
|
||||
game.informPlayers(player.getLogName() + " sacrificed " + this.getLogName() + CardUtil.getSourceLogName(game, source));
|
||||
}
|
||||
GameEvent sacrificedEvent = GameEvent.getEvent(GameEvent.EventType.SACRIFICED_PERMANENT, objectId, source, controllerId);
|
||||
game.fireEvent(sacrificedEvent);
|
||||
game.getState().addSimultaneousSacrificedPermanentToBatch(sacrificedEvent, game);
|
||||
SacrificedPermanentEvent sacrificedPermanentEvent = new SacrificedPermanentEvent(objectId, source, controllerId);
|
||||
game.fireEvent(sacrificedPermanentEvent);
|
||||
game.getState().addSimultaneousSacrificedPermanentToBatch(sacrificedPermanentEvent, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue