Merge pull request #4886 from GitHubMage/master

"Fixing" previous AliFromCairo fix
This commit is contained in:
LevelX2 2018-04-30 18:51:11 +02:00 committed by GitHub
commit f3890daaab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,7 +97,7 @@ class AliFromCairoReplacementEffect extends ReplacementEffectImpl {
&& (controller.getLife() > 0) &&(controller.getLife() - event.getAmount()) < 1
&& event.getPlayerId().equals(controller.getId())
) {
return true;
return true;
}
}
return false;
@ -106,17 +106,12 @@ class AliFromCairoReplacementEffect extends ReplacementEffectImpl {
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Player controller = game.getPlayer(source.getControllerId());
// 10/1/2008: The ability doesn't change how much damage is dealt;
// it just changes how much life that damage makes you lose.
// An effect such as Spirit Link will see the full amount of damage being dealt.
game.fireEvent(event);
if (controller != null) {
controller.setLife(1, game, source);
// 10/1/2008: The ability doesn't change how much damage is dealt;
// it just changes how much life that damage makes you lose.
// An effect such as Spirit Link will see the full amount of damage being dealt.
event.setAmount(controller.getLife() - 1);
}
return true;
return false;
}
}