mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38: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) {
|
||||
final CardManaCost m = c.getManaCost();
|
||||
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()) {
|
||||
if (kw.startsWith(c.getName() + " is ") || kw.startsWith("CARDNAME is ")) {
|
||||
|
||||
@@ -76,7 +76,7 @@ public enum Counters {
|
||||
|
||||
/** The DESPAIR. */
|
||||
DESPAIR(),
|
||||
|
||||
|
||||
/** The DEVOTION. */
|
||||
DEVOTION(),
|
||||
|
||||
|
||||
@@ -137,15 +137,17 @@ public final class CardManaCost implements Comparable<CardManaCost> {
|
||||
public List<ManaCostShard> getShards() {
|
||||
return this.shards;
|
||||
}
|
||||
|
||||
|
||||
public int getShardCount(ManaCostShard which) {
|
||||
if ( which == ManaCostShard.COLORLESS )
|
||||
if (which == ManaCostShard.COLORLESS) {
|
||||
return genericCost;
|
||||
}
|
||||
|
||||
int res = 0;
|
||||
for(ManaCostShard shard : shards)
|
||||
{
|
||||
if ( shard == which ) res++;
|
||||
for (ManaCostShard shard : shards) {
|
||||
if (shard == which) {
|
||||
res++;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user