mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Hindering Light - Fixed that target check did not work correctly for modal spells (e.g. Cryptic Command).
This commit is contained in:
parent
50e8e3930c
commit
d427e9a315
1 changed files with 12 additions and 10 deletions
|
@ -84,17 +84,19 @@ class HinderingLightPredicate implements ObjectPlayerPredicate<ObjectPlayer<Stac
|
|||
if (controllerId == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (Target target : input.getObject().getStackAbility().getTargets()) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
if (controllerId.equals(targetId)) {
|
||||
return true;
|
||||
for (UUID modeId :input.getObject().getStackAbility().getModes().getSelectedModes()) {
|
||||
input.getObject().getStackAbility().getModes().setActiveMode(modeId);
|
||||
for (Target target : input.getObject().getStackAbility().getTargets()) {
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
if (controllerId.equals(targetId)) {
|
||||
return true;
|
||||
}
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null && controllerId.equals(permanent.getControllerId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null && controllerId.equals(permanent.getControllerId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue