mirror of
https://github.com/correl/mage.git
synced 2025-03-16 01:06:34 -09:00
fixed Torbran, Thane of Red Fell not increasing damage to players
This commit is contained in:
parent
316f823ebf
commit
520de8a6d5
1 changed files with 7 additions and 3 deletions
|
@ -78,7 +78,7 @@ class TorbranThaneOfRedFellEffect extends ReplacementEffectImpl {
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
if (player == null
|
if (player == null
|
||||||
|| !player.hasOpponent(game.getControllerId(event.getTargetId()), game)
|
|| !player.hasOpponent(getControllerOrSelf(event.getTargetId(), game), game)
|
||||||
|| !source.isControlledBy(game.getControllerId(event.getSourceId()))) {
|
|| !source.isControlledBy(game.getControllerId(event.getSourceId()))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -90,8 +90,12 @@ class TorbranThaneOfRedFellEffect extends ReplacementEffectImpl {
|
||||||
sourceObject = sourcePermanent;
|
sourceObject = sourcePermanent;
|
||||||
}
|
}
|
||||||
return sourceObject != null
|
return sourceObject != null
|
||||||
&& sourceObject.getColor(game).isRed()
|
&& sourceObject.getColor(game).isRed();
|
||||||
&& !sourceObject.getId().equals(source.getSourceId());
|
}
|
||||||
|
|
||||||
|
private static UUID getControllerOrSelf(UUID id, Game game) {
|
||||||
|
UUID outId = game.getControllerId(id);
|
||||||
|
return outId == null ? id : outId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue