assert that each card has only one MagicCardEvent

master
melvin 2013-02-20 14:06:54 +08:00
parent 5f703a4ebf
commit 8791cb222b
1 changed files with 3 additions and 2 deletions

View File

@ -599,8 +599,9 @@ public class MagicCardDefinition {
mod.change(this);
}
public void setEvent(final MagicCardEvent cardEvent) {
this.cardEvent=cardEvent;
public void setEvent(final MagicCardEvent aCardEvent) {
assert cardEvent == MagicPlayCardEvent.create() : "Attempting to set two MagicCardEvents for " + this;
cardEvent = aCardEvent;
numSpellEvent++;
}