mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Fixed a problem with zone change counter comparation.
This commit is contained in:
parent
456c405c11
commit
bb99148b78
1 changed files with 6 additions and 3 deletions
|
@ -70,9 +70,12 @@ public class DiesAttachedTriggeredAbility extends TriggeredAbilityImpl {
|
|||
Permanent attachment = game.getPermanentOrLKIBattlefield(getSourceId());
|
||||
if (attachment != null
|
||||
&& zEvent.getTargetId() != null && attachment.getAttachedTo() != null
|
||||
&& zEvent.getTargetId().equals(attachment.getAttachedTo())
|
||||
&& attachment.getAttachedToZoneChangeCounter() == zEvent.getTarget().getZoneChangeCounter(game) - 1) {
|
||||
triggered = true;
|
||||
&& zEvent.getTargetId().equals(attachment.getAttachedTo())) {
|
||||
Permanent attachedTo = game.getPermanentOrLKIBattlefield(attachment.getAttachedTo());
|
||||
if (attachedTo != null
|
||||
&& attachment.getAttachedToZoneChangeCounter() == attachedTo.getZoneChangeCounter(game)) { // zoneChangeCounter is stored in Permanent
|
||||
triggered = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (triggered) {
|
||||
|
|
Loading…
Reference in a new issue