forked from External/mage
* Reworked dealtDamageByThisTurn handling of permanents to take zone change of referenced objects into account.
This commit is contained in:
parent
2e8eeff49f
commit
532ff611c4
6 changed files with 105 additions and 118 deletions
|
|
@ -55,6 +55,17 @@ public class MageObjectReference implements Comparable<MageObjectReference> {
|
|||
this.zoneChangeCounter = card.getZoneChangeCounter();
|
||||
}
|
||||
|
||||
public MageObjectReference(MageObject mageObject) {
|
||||
this.sourceId = mageObject.getId();
|
||||
if (mageObject instanceof Card) {
|
||||
this.zoneChangeCounter = ((Card)mageObject).getZoneChangeCounter();
|
||||
} else if (mageObject instanceof Permanent) {
|
||||
this.zoneChangeCounter = ((Permanent)mageObject).getZoneChangeCounter();
|
||||
} else {
|
||||
this.zoneChangeCounter = 0;
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* That values manually (can be used to let it reference to a Permanent
|
||||
* that is not yet on the battlefield.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue