mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08: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
|
|
@ -9,6 +9,7 @@ import mage.abilities.costs.mana.ManaCosts;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.keyword.ChangelingAbility;
|
||||
import mage.abilities.mana.ActivatedManaAbilityImpl;
|
||||
import mage.abilities.text.TextPart;
|
||||
import mage.abilities.text.TextPartSubType;
|
||||
|
|
@ -291,6 +292,9 @@ public abstract class MageObjectImpl implements MageObject {
|
|||
|
||||
@Override
|
||||
public boolean isAllCreatureTypes(Game game) {
|
||||
if (game == null) {
|
||||
return this.getAbilities().containsClass(ChangelingAbility.class);
|
||||
}
|
||||
return this.getSubtype(game).isAllCreatureTypes();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import mage.abilities.StaticAbility;
|
|||
import mage.abilities.effects.common.continuous.IsAllCreatureTypesSourceEffect;
|
||||
import mage.constants.Zone;
|
||||
|
||||
|
||||
/**
|
||||
* October 1, 2012
|
||||
* 702.71. Changeling
|
||||
|
|
@ -16,17 +15,25 @@ import mage.constants.Zone;
|
|||
*/
|
||||
public class ChangelingAbility extends StaticAbility {
|
||||
|
||||
private final boolean changelingText;
|
||||
|
||||
public ChangelingAbility() {
|
||||
this(true);
|
||||
}
|
||||
|
||||
public ChangelingAbility(boolean changelingText) {
|
||||
super(Zone.ALL, new IsAllCreatureTypesSourceEffect());
|
||||
this.changelingText = changelingText;
|
||||
}
|
||||
|
||||
private ChangelingAbility(final ChangelingAbility ability) {
|
||||
super(ability);
|
||||
this.changelingText = ability.changelingText;
|
||||
}
|
||||
|
||||
@Override
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue