mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 04:42:07 -08:00
* Bestow - Fixed that a permanent card cast with bestow has the bestow ability as spell ability.
This commit is contained in:
parent
6e45f70335
commit
4efc2a7582
4 changed files with 14 additions and 2 deletions
|
|
@ -168,7 +168,6 @@ class BestowTypeChangingEffect extends ContinuousEffectImpl implements SourceEff
|
|||
permanent.getCardType().remove(CardType.CREATURE);
|
||||
permanent.getSubtype().clear();
|
||||
if (!permanent.getSubtype().contains("Aura")) {
|
||||
|
||||
permanent.getSubtype().add("Aura");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ public interface Card extends MageObject {
|
|||
void setOwnerId(UUID ownerId);
|
||||
void addAbility(Ability ability);
|
||||
void addWatcher(Watcher watcher);
|
||||
void setSpellAbility(SpellAbility ability);
|
||||
SpellAbility getSpellAbility();
|
||||
List<String> getRules();
|
||||
List<Watcher> getWatchers();
|
||||
|
|
|
|||
|
|
@ -789,4 +789,10 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
|||
public void setZone(Zone zone, Game game) {
|
||||
game.setZone(getId(), zone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSpellAbility(SpellAbility ability) {
|
||||
spellAbility = ability;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,7 +235,8 @@ public class Spell implements StackObject, Card {
|
|||
// TODO: Find a better way to prevent bestow creatures from being effected by creature affecting abilities
|
||||
Permanent permanent = game.getPermanent(card.getId());
|
||||
if (permanent != null && permanent instanceof PermanentCard) {
|
||||
((PermanentCard) permanent).getCard().getCardType().add(CardType.CREATURE);
|
||||
permanent.setSpellAbility(ability); // otherwise spell ability without bestow will be set
|
||||
((PermanentCard) permanent).getCard().getCardType().add(CardType.CREATURE);
|
||||
}
|
||||
card.getCardType().add(CardType.CREATURE);
|
||||
}
|
||||
|
|
@ -1009,4 +1010,9 @@ public class Spell implements StackObject, Card {
|
|||
card.setZone(zone, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSpellAbility(SpellAbility ability) {
|
||||
throw new UnsupportedOperationException("Not supported.");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue