mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- CheckStyle.
This commit is contained in:
@@ -257,19 +257,23 @@ public final class CardUtil {
|
|||||||
public static ArrayList<String> getOnlyColors(final Card c) {
|
public static ArrayList<String> getOnlyColors(final Card c) {
|
||||||
final CardManaCost m = c.getManaCost();
|
final CardManaCost m = c.getManaCost();
|
||||||
final byte color_profile = m.getColorProfile();
|
final byte color_profile = m.getColorProfile();
|
||||||
|
|
||||||
final Set<String> colors = new HashSet<String>();
|
|
||||||
if ((color_profile & forge.card.CardColor.WHITE) > 0 )
|
|
||||||
colors.add(Constant.Color.WHITE);
|
|
||||||
if ((color_profile & forge.card.CardColor.BLACK) > 0 )
|
|
||||||
colors.add(Constant.Color.BLACK);
|
|
||||||
if ((color_profile & forge.card.CardColor.BLUE) > 0 )
|
|
||||||
colors.add(Constant.Color.BLUE);
|
|
||||||
if ((color_profile & forge.card.CardColor.RED) > 0 )
|
|
||||||
colors.add(Constant.Color.RED);
|
|
||||||
if ((color_profile & forge.card.CardColor.GREEN) > 0 )
|
|
||||||
colors.add(Constant.Color.GREEN);
|
|
||||||
|
|
||||||
|
final Set<String> colors = new HashSet<String>();
|
||||||
|
if ((color_profile & forge.card.CardColor.WHITE) > 0) {
|
||||||
|
colors.add(Constant.Color.WHITE);
|
||||||
|
}
|
||||||
|
if ((color_profile & forge.card.CardColor.BLACK) > 0) {
|
||||||
|
colors.add(Constant.Color.BLACK);
|
||||||
|
}
|
||||||
|
if ((color_profile & forge.card.CardColor.BLUE) > 0) {
|
||||||
|
colors.add(Constant.Color.BLUE);
|
||||||
|
}
|
||||||
|
if ((color_profile & forge.card.CardColor.RED) > 0) {
|
||||||
|
colors.add(Constant.Color.RED);
|
||||||
|
}
|
||||||
|
if ((color_profile & forge.card.CardColor.GREEN) > 0) {
|
||||||
|
colors.add(Constant.Color.GREEN);
|
||||||
|
}
|
||||||
|
|
||||||
for (final String kw : c.getKeyword()) {
|
for (final String kw : c.getKeyword()) {
|
||||||
if (kw.startsWith(c.getName() + " is ") || kw.startsWith("CARDNAME is ")) {
|
if (kw.startsWith(c.getName() + " is ") || kw.startsWith("CARDNAME is ")) {
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public enum Counters {
|
|||||||
|
|
||||||
/** The DESPAIR. */
|
/** The DESPAIR. */
|
||||||
DESPAIR(),
|
DESPAIR(),
|
||||||
|
|
||||||
/** The DEVOTION. */
|
/** The DEVOTION. */
|
||||||
DEVOTION(),
|
DEVOTION(),
|
||||||
|
|
||||||
|
|||||||
@@ -137,15 +137,17 @@ public final class CardManaCost implements Comparable<CardManaCost> {
|
|||||||
public List<ManaCostShard> getShards() {
|
public List<ManaCostShard> getShards() {
|
||||||
return this.shards;
|
return this.shards;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getShardCount(ManaCostShard which) {
|
public int getShardCount(ManaCostShard which) {
|
||||||
if ( which == ManaCostShard.COLORLESS )
|
if (which == ManaCostShard.COLORLESS) {
|
||||||
return genericCost;
|
return genericCost;
|
||||||
|
}
|
||||||
|
|
||||||
int res = 0;
|
int res = 0;
|
||||||
for(ManaCostShard shard : shards)
|
for (ManaCostShard shard : shards) {
|
||||||
{
|
if (shard == which) {
|
||||||
if ( shard == which ) res++;
|
res++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user