mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- CheckStyle.
This commit is contained in:
@@ -600,6 +600,14 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
this.rememberedObjects.add(o);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* removeRemembered.
|
||||
* </p>
|
||||
*
|
||||
* @param o
|
||||
* a {@link java.lang.Object} object.
|
||||
*/
|
||||
public final void removeRemembered(final Object o) {
|
||||
this.rememberedObjects.remove(o);
|
||||
}
|
||||
@@ -5431,6 +5439,13 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
return this.typeContains("Equipment");
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* isScheme.
|
||||
* </p>
|
||||
*
|
||||
* @return a boolean.
|
||||
*/
|
||||
public final boolean isScheme() {
|
||||
return this.typeContains("Scheme");
|
||||
}
|
||||
|
||||
@@ -455,8 +455,8 @@ public final class GameActionUtil {
|
||||
int amount = amountString.matches("[0-9][0-9]?") ? Integer.parseInt(amountString)
|
||||
: CardFactoryUtil.xCount(source, source.getSVar(amountString));
|
||||
String plural = amount > 1 ? "s" : "";
|
||||
if (part.canPay(sourceAbility, source, p, cost) &&
|
||||
showYesNoDialog(source, "Do you want to remove " + amount + " " + counterType.getName()
|
||||
if (part.canPay(sourceAbility, source, p, cost)
|
||||
&& showYesNoDialog(source, "Do you want to remove " + amount + " " + counterType.getName()
|
||||
+ " counter" + plural + " from " + source + "?")) {
|
||||
source.subtractCounter(counterType, amount);
|
||||
} else {
|
||||
|
||||
@@ -1765,9 +1765,9 @@ public class AbilityFactory {
|
||||
public static CounterType getCounterType(String name, SpellAbility sa) throws Exception {
|
||||
CounterType counterType;
|
||||
|
||||
try{
|
||||
try {
|
||||
counterType = CounterType.getType(name);
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
String type = sa.getSVar(name);
|
||||
if (type.equals("")) {
|
||||
type = sa.getSourceCard().getSVar(name);
|
||||
|
||||
@@ -155,8 +155,8 @@ public class AnimateEffect extends AnimateEffectBase {
|
||||
|
||||
if (clearAbilities || clearSpells || removeAll) {
|
||||
for (final SpellAbility ab : c.getSpellAbilities()) {
|
||||
if (removeAll || (ab.isAbility() && clearAbilities) ||
|
||||
(ab.isSpell() && clearSpells)) {
|
||||
if (removeAll || (ab.isAbility() && clearAbilities)
|
||||
|| (ab.isSpell() && clearSpells)) {
|
||||
c.removeSpellAbility(ab);
|
||||
removedAbilities.add(ab);
|
||||
}
|
||||
|
||||
@@ -59,9 +59,9 @@ public class CountersPutEffect extends SpellEffect {
|
||||
|
||||
CounterType counterType;
|
||||
|
||||
try{
|
||||
try {
|
||||
counterType = AbilityFactory.getCounterType(sa.getParam("CounterType"), sa);
|
||||
} catch(Exception e) {
|
||||
} catch (Exception e) {
|
||||
System.out.println("Counter type doesn't match, nor does an SVar exist with the type name.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class PumpAllEffect extends SpellEffect {
|
||||
String desc = "";
|
||||
if (sa.hasParam("PumpAllDescription")) {
|
||||
desc = sa.getParam("PumpAllDescription");
|
||||
} else if (sa.hasParam("SpellDescription")){
|
||||
} else if (sa.hasParam("SpellDescription")) {
|
||||
desc = sa.getParam("SpellDescription").replace("CARDNAME", sa.getSourceCard().getName());
|
||||
}
|
||||
|
||||
|
||||
@@ -24,13 +24,13 @@ public class SetInMotionEffect extends SpellEffect {
|
||||
|
||||
int repeats = 1;
|
||||
|
||||
if(sa.hasParam("RepeatNum"))
|
||||
{
|
||||
if (sa.hasParam("RepeatNum")) {
|
||||
|
||||
repeats = AbilityFactory.calculateAmount(sa.getSourceCard(), sa.getParam("RepeatNum"), sa);
|
||||
}
|
||||
|
||||
for(int i=0;i<repeats;i++)
|
||||
{
|
||||
for (int i = 0; i < repeats; i++) {
|
||||
|
||||
controller.setSchemeInMotion();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user