simplfied code

master
melvin 2011-07-06 16:24:29 +08:00
parent 9c53b32069
commit 0c7b4b015e
1 changed files with 12 additions and 19 deletions

View File

@ -1,27 +1,20 @@
package magic.model.trigger;
public enum MagicTriggerType {
AtUpkeep(true), // player
AtEndOfTurn(true), // player
WhenDamageIsDealt(true), // damage
WhenSpellIsPlayed(true), // card on stack
WhenComesIntoPlay(true), // null
WhenOtherComesIntoPlay(true), // permanent
WhenPutIntoGraveyard(true), // graveyard trigger data
WhenOtherPutIntoGraveyardFromPlay(true), // permanent
WhenAttacks(true), // permanent
WhenBlocks(true), // permanent
IfDamageWouldBeDealt(false), // damage
AtUpkeep, // player
AtEndOfTurn, // player
WhenDamageIsDealt, // damage
WhenSpellIsPlayed, // card on stack
WhenComesIntoPlay, // null
WhenOtherComesIntoPlay, // permanent
WhenPutIntoGraveyard, // graveyard trigger data
WhenOtherPutIntoGraveyardFromPlay, // permanent
WhenAttacks, // permanent
WhenBlocks, // permanent
IfDamageWouldBeDealt, // damage
;
private final boolean stack;
private MagicTriggerType(final boolean stack) {
this.stack=stack;
}
public boolean usesStack() {
return stack;
return this != IfDamageWouldBeDealt;
}
}