mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Merge pull request #1895 from spjspj/master
spjspj - Update SourceHasRemainedInSameZoneCondition with new
This commit is contained in:
commit
20b1a2ab6b
1 changed files with 8 additions and 0 deletions
|
@ -48,6 +48,14 @@ public class SourceHasRemainedInSameZoneCondition implements Condition {
|
|||
this.idToCheck = idToCheck;
|
||||
this.timesChangedZones = -1;
|
||||
}
|
||||
|
||||
public SourceHasRemainedInSameZoneCondition(UUID idToCheck, Game game) {
|
||||
this.idToCheck = idToCheck;
|
||||
this.timesChangedZones = -1;
|
||||
if (this.idToCheck != null && game != null && game.getCard(this.idToCheck) != null) {
|
||||
this.timesChangedZones = game.getState().getZoneChangeCounter(this.idToCheck);
|
||||
}
|
||||
}
|
||||
|
||||
public SourceHasRemainedInSameZoneCondition getInstance(UUID cardId) {
|
||||
return new SourceHasRemainedInSameZoneCondition(cardId);
|
||||
|
|
Loading…
Reference in a new issue