mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Life Gain can't be replaced when the player can't gain life because of a static ability.
This commit is contained in:
@@ -379,14 +379,16 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
repParams.put("Affected", this);
|
repParams.put("Affected", this);
|
||||||
repParams.put("LifeGained", toGain);
|
repParams.put("LifeGained", toGain);
|
||||||
repParams.put("Source", source);
|
repParams.put("Source", source);
|
||||||
|
|
||||||
|
if (!canGainLife()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (game.getReplacementHandler().run(repParams) != ReplacementResult.NotReplaced) {
|
if (game.getReplacementHandler().run(repParams) != ReplacementResult.NotReplaced) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean newLifeSet = false;
|
boolean newLifeSet = false;
|
||||||
if (!canGainLife()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
final int lifeGain = toGain;
|
final int lifeGain = toGain;
|
||||||
|
|
||||||
if (lifeGain > 0) {
|
if (lifeGain > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user