1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-12 01:01:04 -09:00

get last known info so creatures get reanimated when equipped creature dies in combat

This commit is contained in:
Jason Wall 2015-06-19 00:48:30 -06:00
parent 7a4d4265a4
commit 3206cb75e7

View file

@ -113,11 +113,10 @@ class ScytheOfTheWretchedTriggeredAbility extends TriggeredAbilityImpl {
ZoneChangeEvent zoneChange = (ZoneChangeEvent) event;
if (zoneChange.isDiesEvent() && zoneChange.getTarget().getCardType().contains(CardType.CREATURE)) {
Permanent equippedCreature = getEquippedCreature(game);
if (equippedCreature == null) {
return false;
}
for (MageObjectReference mor : zoneChange.getTarget().getDealtDamageByThisTurn()) {
if (mor.refersTo(equippedCreature, game)) {
Permanent permanent = (Permanent) game.getLastKnownInformation(mor.getSourceId(), Zone.BATTLEFIELD);
if((equippedCreature != null && mor.refersTo(equippedCreature, game))
|| (permanent != null && permanent.getAttachments().contains(getSourceId()))) {
setTarget(new FixedTarget(event.getTargetId()));
return true;
}