forked from External/mage
Permanents now detach all attachments when they change zones. Ready to test.
This commit is contained in:
parent
1bc022a94a
commit
e1bfd8a196
3 changed files with 76 additions and 10 deletions
|
|
@ -1980,10 +1980,11 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
// handle bestow unattachment
|
||||
Card card = this.getCard(perm.getId());
|
||||
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()));
|
||||
//TODO: cleanup
|
||||
//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;
|
||||
}
|
||||
|
|
@ -2000,10 +2001,11 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
// handle bestow unattachment
|
||||
Card card = this.getCard(perm.getId());
|
||||
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()));
|
||||
//TODO: cleanup
|
||||
//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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue