mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +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;
|
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.
|
// for cards like Glorious Anthem, etc.
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ import forge.card.spellability.Target;
|
|||||||
import forge.game.GameState;
|
import forge.game.GameState;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.zone.ZoneType;
|
import forge.game.zone.ZoneType;
|
||||||
import forge.gui.GuiDialog;
|
|
||||||
import forge.util.Aggregates;
|
import forge.util.Aggregates;
|
||||||
|
import forge.util.Lang;
|
||||||
|
|
||||||
public class PumpEffect extends SpellAbilityEffect {
|
public class PumpEffect extends SpellAbilityEffect {
|
||||||
|
|
||||||
@@ -241,24 +241,11 @@ public class PumpEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sa.hasParam("Optional")) {
|
if (sa.hasParam("Optional")) {
|
||||||
if (sa.getActivatingPlayer().isHuman()) {
|
final String targets = Lang.joinHomogenous(tgtCards);
|
||||||
final StringBuilder targets = new StringBuilder();
|
final String message = sa.hasParam("OptionQuestion") ? sa.getParam("OptionQuestion").replace("TARGETS", targets) : "Apply pump to " + targets + "?";
|
||||||
for (final Card tc : tgtCards) {
|
|
||||||
targets.append(tc);
|
if ( !sa.getActivatingPlayer().getController().confirmAction(sa, null, message) )
|
||||||
}
|
return;
|
||||||
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())) {
|
|
||||||
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")) {
|
if (sa.hasParam("RememberObjects")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user