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