mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
Merge pull request #6590 from 18ths/world_rule_range_of_influence
fixed world rule with range of influence
This commit is contained in:
commit
bd40d90286
2 changed files with 38 additions and 9 deletions
|
|
@ -2235,13 +2235,19 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
newestPermanent = null;
|
||||
}
|
||||
}
|
||||
|
||||
PlayerList newestPermanentControllerRange = state.getPlayersInRange(newestPermanent.getControllerId(), this);
|
||||
|
||||
// 801.12 The "world rule" applies to a permanent only if other world permanents are within its controller's range of influence.
|
||||
for (Permanent permanent : worldEnchantment) {
|
||||
if (!Objects.equals(newestPermanent, permanent)) {
|
||||
if (newestPermanentControllerRange.contains(permanent.getControllerId())
|
||||
&& !Objects.equals(newestPermanent, permanent)) {
|
||||
movePermanentToGraveyardWithInfo(permanent);
|
||||
somethingHappened = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: implement the rest
|
||||
|
||||
return somethingHappened;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue