mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
* Bestow - Fixed a problem that if the target of a bestow enchantment aura got illegal, the bestow permanent did not chnage back to be a creature.
This commit is contained in:
parent
f0f407457e
commit
a85fa82de0
2 changed files with 51 additions and 2 deletions
|
|
@ -1884,6 +1884,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
if (card != null && card.isCreature()) {
|
||||
UUID wasAttachedTo = perm.getAttachedTo();
|
||||
perm.attachTo(null, this);
|
||||
BestowAbility.becomeCreature(perm, this);
|
||||
fireEvent(new GameEvent(GameEvent.EventType.UNATTACHED, wasAttachedTo, perm.getId(), perm.getControllerId()));
|
||||
} else if (movePermanentToGraveyardWithInfo(perm)) {
|
||||
somethingHappened = true;
|
||||
|
|
@ -1909,7 +1910,9 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
if (attachedTo == null
|
||||
|| !((TargetCard) spellAbility.getTargets().get(0)).canTarget(perm.getControllerId(), perm.getAttachedTo(), spellAbility, this)) {
|
||||
if (movePermanentToGraveyardWithInfo(perm)) {
|
||||
attachedTo.removeAttachment(perm.getId(), this);
|
||||
if (attachedTo != null) {
|
||||
attachedTo.removeAttachment(perm.getId(), this);
|
||||
}
|
||||
somethingHappened = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue