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

Merge pull request from thejayvm/fix-scythe-of-the-wretched

Fix Scythe of the Wretched
This commit is contained in:
LevelX2 2015-06-20 01:09:09 +02:00
commit 567c71be78

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;
}