mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
- Fixed Issue #1660
This commit is contained in:
parent
3caf66e4b6
commit
ec0e8181d5
1 changed files with 17 additions and 14 deletions
|
@ -73,25 +73,28 @@ public class DealsDamageToAPlayerAllTriggeredAbility extends TriggeredAbilityImp
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (!onlyCombat || ((DamagedPlayerEvent) event).isCombatDamage()) {
|
if (!onlyCombat || ((DamagedPlayerEvent) event).isCombatDamage()) {
|
||||||
Permanent permanent = game.getPermanent(event.getSourceId());
|
Permanent permanent = game.getPermanent(event.getSourceId());
|
||||||
if (permanent != null && filter.match(permanent, sourceId, controllerId, game)) {
|
if (permanent != null) {
|
||||||
if (!setTargetPointer.equals(SetTargetPointer.NONE)) {
|
controllerId = permanent.getControllerId();
|
||||||
for (Effect effect : this.getEffects()) {
|
if (filter.match(permanent, sourceId, controllerId, game)) {
|
||||||
effect.setValue("damage", event.getAmount());
|
if (!setTargetPointer.equals(SetTargetPointer.NONE)) {
|
||||||
switch (setTargetPointer) {
|
for (Effect effect : this.getEffects()) {
|
||||||
case PLAYER:
|
effect.setValue("damage", event.getAmount());
|
||||||
effect.setTargetPointer(new FixedTarget(permanent.getControllerId()));
|
switch (setTargetPointer) {
|
||||||
break;
|
case PLAYER:
|
||||||
case PERMANENT:
|
effect.setTargetPointer(new FixedTarget(permanent.getControllerId()));
|
||||||
effect.setTargetPointer(new FixedTarget(permanent.getId(), permanent.getZoneChangeCounter(game)));
|
break;
|
||||||
break;
|
case PERMANENT:
|
||||||
}
|
effect.setTargetPointer(new FixedTarget(permanent.getId(), permanent.getZoneChangeCounter(game)));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue