mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
- Fixed Soul-Scar Mage. Bug #3163
This commit is contained in:
parent
04c80c27a3
commit
10a043f19b
1 changed files with 10 additions and 4 deletions
|
@ -114,8 +114,14 @@ class SoulScarMageDamageReplacementEffect extends ReplacementEffectImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
boolean weControlSource = game.getControllerId(event.getSourceId()).equals(source.getControllerId());
|
UUID sourceControllerId = game.getControllerId(event.getSourceId());
|
||||||
boolean isNoncombatDamage = !((DamageCreatureEvent)event).isCombatDamage();
|
UUID targetControllerId = game.getControllerId(event.getTargetId());
|
||||||
return weControlSource && isNoncombatDamage;
|
UUID controllerId = source.getControllerId();
|
||||||
|
boolean weControlSource = controllerId == sourceControllerId;
|
||||||
|
boolean opponentControlsTarget = game.getOpponents(sourceControllerId).contains(targetControllerId);
|
||||||
|
boolean isNoncombatDamage = !((DamageCreatureEvent) event).isCombatDamage();
|
||||||
|
return weControlSource
|
||||||
|
&& isNoncombatDamage
|
||||||
|
&& opponentControlsTarget;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue