mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Checkstyle
This commit is contained in:
@@ -261,8 +261,7 @@ public class CardFactoryUtil {
|
|||||||
|
|
||||||
final List<Card> bLand = CardLists.getType(land, sminBL);
|
final List<Card> bLand = CardLists.getType(land, sminBL);
|
||||||
|
|
||||||
for( Card ut : Iterables.filter(bLand, CardPredicates.Presets.UNTAPPED) )
|
for (Card ut : Iterables.filter(bLand, CardPredicates.Presets.UNTAPPED)) {
|
||||||
{
|
|
||||||
return ut;
|
return ut;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3109,15 +3108,15 @@ public class CardFactoryUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static List<String> getColorByProminence(final List<Card> list) {
|
public static List<String> getColorByProminence(final List<Card> list) {
|
||||||
final HashMap<String, Integer> counts = new HashMap<String,Integer>();
|
final HashMap<String, Integer> counts = new HashMap<String, Integer>();
|
||||||
for(String color : Constant.Color.ONLY_COLORS) {
|
for (String color : Constant.Color.ONLY_COLORS) {
|
||||||
counts.put(color, 0);
|
counts.put(color, 0);
|
||||||
}
|
}
|
||||||
for(Card c : list) {
|
for (Card c : list) {
|
||||||
List<String> colors = c.determineColor().toStringList();
|
List<String> colors = c.determineColor().toStringList();
|
||||||
for(String col : colors) {
|
for (String col : colors) {
|
||||||
if (counts.containsKey(col)) {
|
if (counts.containsKey(col)) {
|
||||||
counts.put(col.toString(), counts.get(col.toString())+1);
|
counts.put(col.toString(), counts.get(col.toString()) + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3373,7 +3372,7 @@ public class CardFactoryUtil {
|
|||||||
for (Card tmp : lands) {
|
for (Card tmp : lands) {
|
||||||
int score = tmp.isTapped() ? 2 : 0;
|
int score = tmp.isTapped() ? 2 : 0;
|
||||||
score += tmp.isBasicLand() ? 1 : 0;
|
score += tmp.isBasicLand() ? 1 : 0;
|
||||||
if( score >= maxScore ) {
|
if (score >= maxScore) {
|
||||||
worstLand = tmp;
|
worstLand = tmp;
|
||||||
maxScore = score;
|
maxScore = score;
|
||||||
}
|
}
|
||||||
@@ -3719,13 +3718,13 @@ public class CardFactoryUtil {
|
|||||||
final String[] k = parse.split(" ");
|
final String[] k = parse.split(" ");
|
||||||
final int manacost = Integer.parseInt(k[1]);
|
final int manacost = Integer.parseInt(k[1]);
|
||||||
|
|
||||||
final String actualTrigger = "Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard" +
|
final String actualTrigger = "Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard"
|
||||||
"| OptionalDecider$ You | ValidCard$ Card.Self | Execute$ SoulshiftAbility" +
|
+ "| OptionalDecider$ You | ValidCard$ Card.Self | Execute$ SoulshiftAbility"
|
||||||
"| TriggerController$ TriggeredCardController | TriggerDescription$ " + parse +
|
+ "| TriggerController$ TriggeredCardController | TriggerDescription$ " + parse
|
||||||
" (When this creature dies, you may return target Spirit card with converted mana cost "
|
+ " (When this creature dies, you may return target Spirit card with converted mana cost "
|
||||||
+ manacost + " or less from your graveyard to your hand.)";
|
+ manacost + " or less from your graveyard to your hand.)";
|
||||||
final String abString = "DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand" +
|
final String abString = "DB$ ChangeZone | Origin$ Graveyard | Destination$ Hand"
|
||||||
"| ValidTgts$ Spirit.YouOwn+cmcLE" + manacost;
|
+ "| ValidTgts$ Spirit.YouOwn+cmcLE" + manacost;
|
||||||
final Trigger parsedTrigger = TriggerHandler.parseTrigger(actualTrigger, card, true);
|
final Trigger parsedTrigger = TriggerHandler.parseTrigger(actualTrigger, card, true);
|
||||||
card.addTrigger(parsedTrigger);
|
card.addTrigger(parsedTrigger);
|
||||||
card.setSVar("SoulshiftAbility", abString);
|
card.setSVar("SoulshiftAbility", abString);
|
||||||
@@ -4279,7 +4278,7 @@ public class CardFactoryUtil {
|
|||||||
re.setLayer(ReplacementLayer.Other);
|
re.setLayer(ReplacementLayer.Other);
|
||||||
|
|
||||||
card.addReplacementEffect(re);
|
card.addReplacementEffect(re);
|
||||||
} else if(kw.equals("CARDNAME enters the battlefield tapped.")) {
|
} else if (kw.equals("CARDNAME enters the battlefield tapped.")) {
|
||||||
String parse = kw;
|
String parse = kw;
|
||||||
card.removeIntrinsicKeyword(parse);
|
card.removeIntrinsicKeyword(parse);
|
||||||
|
|
||||||
@@ -4485,7 +4484,7 @@ public class CardFactoryUtil {
|
|||||||
|
|
||||||
final String parse = card.getKeyword().get(n).toString();
|
final String parse = card.getKeyword().get(n).toString();
|
||||||
card.setCanMorph(true);
|
card.setCanMorph(true);
|
||||||
Map<String,String> sVars = card.getSVars();
|
Map<String, String> sVars = card.getSVars();
|
||||||
|
|
||||||
final String[] k = parse.split(":");
|
final String[] k = parse.split(":");
|
||||||
final Cost cost = new Cost(card, k[1], true);
|
final Cost cost = new Cost(card, k[1], true);
|
||||||
|
|||||||
Reference in New Issue
Block a user