mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
added isInstantOrSorcery method to MageObject
This commit is contained in:
parent
2ba78391f1
commit
aa63a262b6
2 changed files with 7 additions and 3 deletions
|
@ -65,7 +65,7 @@ class ErraticCyclopsTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
if (spell != null && spell.isControlledBy(controllerId)
|
||||
&& (spell.isInstant() || spell.isSorcery())) {
|
||||
&& spell.isInstantOrSorcery()) {
|
||||
this.getEffects().clear();
|
||||
this.addEffect(new BoostSourceEffect(
|
||||
spell.getConvertedManaCost(), 0, Duration.EndOfTurn
|
||||
|
|
|
@ -86,10 +86,10 @@ public interface MageObject extends MageItem, Serializable {
|
|||
|
||||
void setZoneChangeCounter(int value, Game game);
|
||||
|
||||
default boolean isHistoric(){
|
||||
default boolean isHistoric() {
|
||||
return getCardType().contains(CardType.ARTIFACT)
|
||||
|| getSuperType().contains(SuperType.LEGENDARY)
|
||||
|| hasSubtype(SubType.SAGA, null );
|
||||
|| hasSubtype(SubType.SAGA, null);
|
||||
}
|
||||
|
||||
default boolean isCreature() {
|
||||
|
@ -116,6 +116,10 @@ public interface MageObject extends MageItem, Serializable {
|
|||
return getCardType().contains(CardType.SORCERY);
|
||||
}
|
||||
|
||||
default boolean isInstantOrSorcery() {
|
||||
return this.isInstant() || this.isSorcery();
|
||||
}
|
||||
|
||||
default boolean isPlaneswalker() {
|
||||
return getCardType().contains(CardType.PLANESWALKER);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue