After some revisions, BestowTest is now fully passed! Now to fix the other tests that don't anymore...

This commit is contained in:
Kevin Shin 2018-08-25 04:43:38 -05:00
parent e1bfd8a196
commit 3ffd812bc6
3 changed files with 10 additions and 11 deletions

View file

@ -1981,10 +1981,10 @@ public abstract class GameImpl implements Game, Serializable {
Card card = this.getCard(perm.getId());
if (card != null && card.isCreature()) {
//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()));
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;
}
@ -2001,11 +2001,10 @@ public abstract class GameImpl implements Game, Serializable {
// handle bestow unattachment
Card card = this.getCard(perm.getId());
if (card != null && card.isCreature()) {
//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()));
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;
}

View file

@ -1470,6 +1470,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
zoneChangeInfo = new ZoneChangeInfo(event);
}
boolean successfullyMoved = ZonesHandler.moveCard(zoneChangeInfo, game);
//20180810 - 701.3d
detachAllAttachments(game);
return successfullyMoved;
}
@ -1483,6 +1484,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
ZoneChangeInfo.Exile info = new ZoneChangeInfo.Exile(event, exileId, name);
boolean successfullyMoved = ZonesHandler.moveCard(info, game);
//20180810 - 701.3d
detachAllAttachments(game);
return successfullyMoved;
}