mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Fixed shares subtype check.
This commit is contained in:
parent
04ba280be1
commit
4ce652efe5
2 changed files with 10 additions and 1 deletions
|
@ -117,7 +117,7 @@ class KondasBannerTypeBoostEffect extends BoostAllEffect {
|
||||||
Permanent equipedCreature = game.getPermanent(equipment.getAttachedTo());
|
Permanent equipedCreature = game.getPermanent(equipment.getAttachedTo());
|
||||||
if (equipedCreature != null) {
|
if (equipedCreature != null) {
|
||||||
for (Permanent perm: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
for (Permanent perm: game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) {
|
||||||
if (CardUtil.shareSubtypes(perm, equipedCreature) || perm.getAbilities().contains(ChangelingAbility.getInstance())) {
|
if (CardUtil.shareSubtypes(perm, equipedCreature)) {
|
||||||
if (!this.affectedObjectsSet || objects.contains(perm.getId())) {
|
if (!this.affectedObjectsSet || objects.contains(perm.getId())) {
|
||||||
perm.addPower(power.calculate(game, source, this));
|
perm.addPower(power.calculate(game, source, this));
|
||||||
perm.addToughness(toughness.calculate(game, source, this));
|
perm.addToughness(toughness.calculate(game, source, this));
|
||||||
|
|
|
@ -47,6 +47,7 @@ import mage.abilities.costs.mana.ManaCost;
|
||||||
import mage.abilities.costs.mana.ManaCosts;
|
import mage.abilities.costs.mana.ManaCosts;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.costs.mana.VariableManaCost;
|
import mage.abilities.costs.mana.VariableManaCost;
|
||||||
|
import mage.abilities.keyword.ChangelingAbility;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.SplitCard;
|
import mage.cards.SplitCard;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
@ -100,6 +101,14 @@ public class CardUtil {
|
||||||
throw new IllegalArgumentException("Params can't be null");
|
throw new IllegalArgumentException("Params can't be null");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (card1.getCardType().contains(CardType.CREATURE) && card2.getCardType().contains(CardType.CREATURE)) {
|
||||||
|
if (card1.getAbilities().contains(ChangelingAbility.getInstance()) ||
|
||||||
|
card1.getSubtype().contains(ChangelingAbility.ALL_CREATURE_TYPE) ||
|
||||||
|
card2.getAbilities().contains(ChangelingAbility.getInstance()) ||
|
||||||
|
card2.getSubtype().contains(ChangelingAbility.ALL_CREATURE_TYPE)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
for (String subtype : card1.getSubtype()) {
|
for (String subtype : card1.getSubtype()) {
|
||||||
if (card2.getSubtype().contains(subtype)) {
|
if (card2.getSubtype().contains(subtype)) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in a new issue