mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Cleanup in PumpEffect.java
This commit is contained in:
@@ -3956,30 +3956,6 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
this.tempDefenseBoost += n;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Setter for the field <code>tempAttackBoost</code>.
|
||||
* </p>
|
||||
*
|
||||
* @param n
|
||||
* a int.
|
||||
*/
|
||||
public final void setTempAttackBoost(final int n) {
|
||||
this.tempAttackBoost = n;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Setter for the field <code>tempDefenseBoost</code>.
|
||||
* </p>
|
||||
*
|
||||
* @param n
|
||||
* a int.
|
||||
*/
|
||||
public final void setTempDefenseBoost(final int n) {
|
||||
this.tempDefenseBoost = n;
|
||||
}
|
||||
|
||||
// for cards like Glorious Anthem, etc.
|
||||
/**
|
||||
* <p>
|
||||
|
||||
@@ -16,8 +16,8 @@ import forge.card.spellability.Target;
|
||||
import forge.game.GameState;
|
||||
import forge.game.player.Player;
|
||||
import forge.game.zone.ZoneType;
|
||||
import forge.gui.GuiDialog;
|
||||
import forge.util.Aggregates;
|
||||
import forge.util.Lang;
|
||||
|
||||
public class PumpEffect extends SpellAbilityEffect {
|
||||
|
||||
@@ -241,25 +241,12 @@ public class PumpEffect extends SpellAbilityEffect {
|
||||
}
|
||||
|
||||
if (sa.hasParam("Optional")) {
|
||||
if (sa.getActivatingPlayer().isHuman()) {
|
||||
final StringBuilder targets = new StringBuilder();
|
||||
for (final Card tc : tgtCards) {
|
||||
targets.append(tc);
|
||||
}
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
final String descBasic = "Apply pump to " + targets + "?";
|
||||
final String pumpDesc = sa.hasParam("OptionQuestion")
|
||||
? sa.getParam("OptionQuestion").replace("TARGETS", targets) : descBasic;
|
||||
sb.append(pumpDesc);
|
||||
if (!GuiDialog.confirm(sa.getSourceCard(), sb.toString())) {
|
||||
final String targets = Lang.joinHomogenous(tgtCards);
|
||||
final String message = sa.hasParam("OptionQuestion") ? sa.getParam("OptionQuestion").replace("TARGETS", targets) : "Apply pump to " + targets + "?";
|
||||
|
||||
if ( !sa.getActivatingPlayer().getController().confirmAction(sa, null, message) )
|
||||
return;
|
||||
}
|
||||
} else { //Computer player
|
||||
//TODO Add logic here if necessary but I think the AI won't cast
|
||||
//the spell in the first place if it would curse its own creature
|
||||
//and the pump isn't mandatory
|
||||
}
|
||||
}
|
||||
|
||||
if (sa.hasParam("RememberObjects")) {
|
||||
pumpRemembered = sa.getParam("RememberObjects");
|
||||
|
||||
Reference in New Issue
Block a user