mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +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
|
@ -56,7 +56,7 @@ public class SoulScarMage extends CardImpl {
|
|||
|
||||
public SoulScarMage(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}");
|
||||
|
||||
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Wizard");
|
||||
this.power = new MageInt(1);
|
||||
|
@ -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