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:
parent
7a4d4265a4
commit
3206cb75e7
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue