mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
add battle card type to main branch
This commit is contained in:
parent
4706b695e7
commit
1727ec1fb5
2 changed files with 11 additions and 2 deletions
|
@ -211,12 +211,20 @@ public interface MageObject extends MageItem, Serializable, Copyable<MageObject>
|
|||
return getCardType(game).contains(CardType.TRIBAL);
|
||||
}
|
||||
|
||||
default boolean isBattle() {
|
||||
return isBattle(null);
|
||||
}
|
||||
|
||||
default boolean isBattle(Game game) {
|
||||
return getCardType(game).contains(CardType.BATTLE);
|
||||
}
|
||||
|
||||
default boolean isPermanent() {
|
||||
return isCreature() || isArtifact() || isPlaneswalker() || isEnchantment() || isLand();
|
||||
return isCreature() || isArtifact() || isPlaneswalker() || isEnchantment() || isLand() || isBattle();
|
||||
}
|
||||
|
||||
default boolean isPermanent(Game game) {
|
||||
return isCreature(game) || isArtifact(game) || isPlaneswalker(game) || isEnchantment(game) || isLand(game);
|
||||
return isCreature(game) || isArtifact(game) || isPlaneswalker(game) || isEnchantment(game) || isLand(game) || isBattle(game);
|
||||
}
|
||||
|
||||
default boolean isLegendary() {
|
||||
|
|
|
@ -13,6 +13,7 @@ import java.util.List;
|
|||
*/
|
||||
public enum CardType {
|
||||
ARTIFACT("Artifact", true, true),
|
||||
BATTLE("Battle", true, true),
|
||||
CONSPIRACY("Conspiracy", false, false),
|
||||
CREATURE("Creature", true, true),
|
||||
DUNGEON("Dungeon", false, false),
|
||||
|
|
Loading…
Reference in a new issue