mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +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
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
boolean weControlSource = game.getControllerId(event.getSourceId()).equals(source.getControllerId());
|
||||
boolean isNoncombatDamage = !((DamageCreatureEvent)event).isCombatDamage();
|
||||
return weControlSource && isNoncombatDamage;
|
||||
UUID sourceControllerId = game.getControllerId(event.getSourceId());
|
||||
UUID targetControllerId = game.getControllerId(event.getTargetId());
|
||||
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