fixed Replacement Effects

This commit is contained in:
Hanmac
2016-12-28 15:01:33 +00:00
parent 3629be1a38
commit 08a2b54e76
3 changed files with 3 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ public class ReplaceEffect extends SpellAbilityEffect {
}
// effect was updated
originalParams.put("ReplacementResult", ReplacementResult.Updated);
break;
}
default:
// effect was replaced with something else

View File

@@ -410,6 +410,7 @@ public class Player extends GameEntity implements Comparable<Player> {
} else {
return false;
}
break;
default:
return false;
}

View File

@@ -43,7 +43,7 @@ public class ReplaceGainLife extends ReplacementEffect {
*/
@Override
public boolean canReplace(Map<String, Object> runParams) {
if (!runParams.get("Event").equals("GainLife") && (int)runParams.get("LifeGained") <= 0) {
if (!runParams.get("Event").equals("GainLife") || ((int)runParams.get("LifeGained")) <= 0) {
return false;
}
if (this.getMapParams().containsKey("ValidPlayer")) {