mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[IKO] fixed Kaheera, the Orphanguard not correctly counting changelings
This commit is contained in:
parent
e615b31221
commit
9f9cb3327f
5 changed files with 18 additions and 11 deletions
|
@ -2,15 +2,13 @@ package mage.cards.d;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
|
||||||
import mage.abilities.effects.common.InfoEffect;
|
import mage.abilities.effects.common.InfoEffect;
|
||||||
import mage.abilities.effects.common.continuous.IsAllCreatureTypesSourceEffect;
|
import mage.abilities.keyword.ChangelingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.ComparisonType;
|
import mage.constants.ComparisonType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
|
||||||
import mage.filter.FilterPermanent;
|
import mage.filter.FilterPermanent;
|
||||||
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
import mage.filter.predicate.mageobject.ConvertedManaCostPredicate;
|
||||||
|
|
||||||
|
@ -34,7 +32,7 @@ public final class DrJuliusJumblemorph extends CardImpl {
|
||||||
this.toughness = new MageInt(4);
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
// Dr. Julius Jumblemorph is every creature type (even if this card isn't on the battlefield).
|
// Dr. Julius Jumblemorph is every creature type (even if this card isn't on the battlefield).
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new IsAllCreatureTypesSourceEffect()));
|
this.addAbility(new ChangelingAbility(false));
|
||||||
|
|
||||||
// Whenever a host enters the battlefield under your control, you may search your library and/or graveyard for a card with augment and combine it with that host. If you search your library this way, shuffle it.
|
// Whenever a host enters the battlefield under your control, you may search your library and/or graveyard for a card with augment and combine it with that host. If you search your library this way, shuffle it.
|
||||||
// TODO: Host currently isn't implemented, so this ability currently would never trigger
|
// TODO: Host currently isn't implemented, so this ability currently would never trigger
|
||||||
|
|
|
@ -93,7 +93,7 @@ enum KaheeraTheOrphanguardCompanionCondition implements CompanionCondition {
|
||||||
);
|
);
|
||||||
|
|
||||||
private static boolean checkTypes(Card card) {
|
private static boolean checkTypes(Card card) {
|
||||||
return subtypes.stream().anyMatch(subtype -> card.getSubtype().contains(subtype));
|
return subtypes.stream().anyMatch(subtype -> card.hasSubtype(subtype, null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
package mage.cards.m;
|
package mage.cards.m;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.keyword.ChangelingAbility;
|
||||||
import mage.abilities.effects.common.continuous.IsAllCreatureTypesSourceEffect;
|
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.Zone;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -26,7 +24,7 @@ public final class MistformUltimus extends CardImpl {
|
||||||
this.toughness = new MageInt(3);
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
// Mistform Ultimus is every creature type.
|
// Mistform Ultimus is every creature type.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new IsAllCreatureTypesSourceEffect()));
|
this.addAbility(new ChangelingAbility(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
private MistformUltimus(final MistformUltimus card) {
|
private MistformUltimus(final MistformUltimus card) {
|
||||||
|
|
|
@ -9,6 +9,7 @@ import mage.abilities.costs.mana.ManaCosts;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.ContinuousEffect;
|
import mage.abilities.effects.ContinuousEffect;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
|
import mage.abilities.keyword.ChangelingAbility;
|
||||||
import mage.abilities.mana.ActivatedManaAbilityImpl;
|
import mage.abilities.mana.ActivatedManaAbilityImpl;
|
||||||
import mage.abilities.text.TextPart;
|
import mage.abilities.text.TextPart;
|
||||||
import mage.abilities.text.TextPartSubType;
|
import mage.abilities.text.TextPartSubType;
|
||||||
|
@ -291,6 +292,9 @@ public abstract class MageObjectImpl implements MageObject {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAllCreatureTypes(Game game) {
|
public boolean isAllCreatureTypes(Game game) {
|
||||||
|
if (game == null) {
|
||||||
|
return this.getAbilities().containsClass(ChangelingAbility.class);
|
||||||
|
}
|
||||||
return this.getSubtype(game).isAllCreatureTypes();
|
return this.getSubtype(game).isAllCreatureTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ import mage.abilities.StaticAbility;
|
||||||
import mage.abilities.effects.common.continuous.IsAllCreatureTypesSourceEffect;
|
import mage.abilities.effects.common.continuous.IsAllCreatureTypesSourceEffect;
|
||||||
import mage.constants.Zone;
|
import mage.constants.Zone;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* October 1, 2012
|
* October 1, 2012
|
||||||
* 702.71. Changeling
|
* 702.71. Changeling
|
||||||
|
@ -16,17 +15,25 @@ import mage.constants.Zone;
|
||||||
*/
|
*/
|
||||||
public class ChangelingAbility extends StaticAbility {
|
public class ChangelingAbility extends StaticAbility {
|
||||||
|
|
||||||
|
private final boolean changelingText;
|
||||||
|
|
||||||
public ChangelingAbility() {
|
public ChangelingAbility() {
|
||||||
|
this(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ChangelingAbility(boolean changelingText) {
|
||||||
super(Zone.ALL, new IsAllCreatureTypesSourceEffect());
|
super(Zone.ALL, new IsAllCreatureTypesSourceEffect());
|
||||||
|
this.changelingText = changelingText;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ChangelingAbility(final ChangelingAbility ability) {
|
private ChangelingAbility(final ChangelingAbility ability) {
|
||||||
super(ability);
|
super(ability);
|
||||||
|
this.changelingText = ability.changelingText;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "Changeling <i>(This card is every creature type.)</i>";
|
return changelingText ? "Changeling <i>(This card is every creature type.)</i>" : super.getRule();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue