mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
rename file
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -10249,6 +10249,7 @@ src/main/java/forge/AllZoneUtil.java svneol=native#text/plain
|
||||
src/main/java/forge/Base64Coder.java svneol=native#text/plain
|
||||
src/main/java/forge/ButtonUtil.java svneol=native#text/plain
|
||||
src/main/java/forge/Card.java svneol=native#text/plain
|
||||
src/main/java/forge/CardColor.java svneol=native#text/plain
|
||||
src/main/java/forge/CardContainer.java svneol=native#text/plain
|
||||
src/main/java/forge/CardFilter.java svneol=native#text/plain
|
||||
src/main/java/forge/CardList.java svneol=native#text/plain
|
||||
@@ -10257,7 +10258,6 @@ src/main/java/forge/CardListUtil.java svneol=native#text/plain
|
||||
src/main/java/forge/CardPowerToughness.java svneol=native#text/plain
|
||||
src/main/java/forge/CardReader.java svneol=native#text/plain
|
||||
src/main/java/forge/CardUtil.java svneol=native#text/plain
|
||||
src/main/java/forge/Card_Color.java svneol=native#text/plain
|
||||
src/main/java/forge/Card_Keywords.java -text
|
||||
src/main/java/forge/Card_Type.java svneol=native#text/plain
|
||||
src/main/java/forge/Color.java svneol=native#text/plain
|
||||
|
||||
@@ -1633,7 +1633,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
if (s.equals("")) {
|
||||
s = "0";
|
||||
}
|
||||
getCharacteristics().getCardColor().add(new Card_Color(new ManaCost(s), this, false, true));
|
||||
getCharacteristics().getCardColor().add(new CardColor(new ManaCost(s), this, false, true));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1653,10 +1653,10 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
*/
|
||||
public final long addColor(final String s, final Card c, final boolean addToColors, final boolean bIncrease) {
|
||||
if (bIncrease) {
|
||||
Card_Color.increaseTimestamp();
|
||||
CardColor.increaseTimestamp();
|
||||
}
|
||||
getCharacteristics().getCardColor().add(new Card_Color(new ManaCost(s), c, addToColors, false));
|
||||
return Card_Color.getTimestamp();
|
||||
getCharacteristics().getCardColor().add(new CardColor(new ManaCost(s), c, addToColors, false));
|
||||
return CardColor.getTimestamp();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1674,8 +1674,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
* a long.
|
||||
*/
|
||||
public final void removeColor(final String s, final Card c, final boolean addTo, final long timestampIn) {
|
||||
Card_Color removeCol = null;
|
||||
for (Card_Color cc : getCharacteristics().getCardColor()) {
|
||||
CardColor removeCol = null;
|
||||
for (CardColor cc : getCharacteristics().getCardColor()) {
|
||||
if (cc.equals(s, c, addTo, timestampIn)) {
|
||||
removeCol = cc;
|
||||
}
|
||||
@@ -1691,14 +1691,14 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
* determineColor.
|
||||
* </p>
|
||||
*
|
||||
* @return a {@link forge.Card_Color} object.
|
||||
* @return a {@link forge.CardColor} object.
|
||||
*/
|
||||
public final Card_Color determineColor() {
|
||||
public final CardColor determineColor() {
|
||||
if (this.isImmutable()) {
|
||||
return new Card_Color(this);
|
||||
return new CardColor(this);
|
||||
}
|
||||
Card_Color colors = null;
|
||||
ArrayList<Card_Color> globalChanges = AllZone.getColorChanger().getColorChanges();
|
||||
CardColor colors = null;
|
||||
ArrayList<CardColor> globalChanges = AllZone.getColorChanger().getColorChanges();
|
||||
colors = determineColor(globalChanges);
|
||||
colors.fixColorless();
|
||||
return colors;
|
||||
@@ -1712,7 +1712,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
* @param colors
|
||||
* a {@link java.util.ArrayList} object.
|
||||
*/
|
||||
public final void setColor(final ArrayList<Card_Color> colors) {
|
||||
public final void setColor(final ArrayList<CardColor> colors) {
|
||||
getCharacteristics().setCardColor(colors);
|
||||
}
|
||||
|
||||
@@ -1723,7 +1723,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
*
|
||||
* @return a {@link java.util.ArrayList} object.
|
||||
*/
|
||||
public final ArrayList<Card_Color> getColor() {
|
||||
public final ArrayList<CardColor> getColor() {
|
||||
return getCharacteristics().getCardColor();
|
||||
}
|
||||
|
||||
@@ -1735,8 +1735,8 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
* an ArrayList<Card_Color>
|
||||
* @return a Card_Color
|
||||
*/
|
||||
final Card_Color determineColor(final ArrayList<Card_Color> globalChanges) {
|
||||
Card_Color colors = new Card_Color(this);
|
||||
final CardColor determineColor(final ArrayList<CardColor> globalChanges) {
|
||||
CardColor colors = new CardColor(this);
|
||||
int i = getCharacteristics().getCardColor().size() - 1;
|
||||
int j = -1;
|
||||
if (globalChanges != null) {
|
||||
@@ -1744,7 +1744,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
}
|
||||
// if both have changes, see which one is most recent
|
||||
while (i >= 0 && j >= 0) {
|
||||
Card_Color cc = null;
|
||||
CardColor cc = null;
|
||||
if (getCharacteristics().getCardColor().get(i).getStamp() > globalChanges.get(j).getStamp()) {
|
||||
// Card has a more recent color stamp
|
||||
cc = getCharacteristics().getCardColor().get(i);
|
||||
@@ -1763,7 +1763,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
}
|
||||
}
|
||||
while (i >= 0) {
|
||||
Card_Color cc = getCharacteristics().getCardColor().get(i);
|
||||
CardColor cc = getCharacteristics().getCardColor().get(i);
|
||||
i--;
|
||||
for (String s : cc.toStringArray()) {
|
||||
colors.addToCardColor(s);
|
||||
@@ -1773,7 +1773,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
}
|
||||
}
|
||||
while (j >= 0) {
|
||||
Card_Color cc = globalChanges.get(j);
|
||||
CardColor cc = globalChanges.get(j);
|
||||
j--;
|
||||
for (String s : cc.toStringArray()) {
|
||||
colors.addToCardColor(s);
|
||||
|
||||
@@ -13,7 +13,7 @@ import forge.card.mana.ManaCost;
|
||||
* @author Forge
|
||||
* @version $Id$
|
||||
*/
|
||||
public class Card_Color {
|
||||
public class CardColor {
|
||||
// takes care of individual card color, for global color change effects use
|
||||
// AllZone.getGameInfo().getColorChanges()
|
||||
private EnumSet<Color> col;
|
||||
@@ -74,7 +74,7 @@ public class Card_Color {
|
||||
* @param baseColor
|
||||
* a boolean.
|
||||
*/
|
||||
Card_Color(final ManaCost mc, final Card c, final boolean addToColors, final boolean baseColor) {
|
||||
CardColor(final ManaCost mc, final Card c, final boolean addToColors, final boolean baseColor) {
|
||||
additional = addToColors;
|
||||
col = Color.convertManaCostToColor(mc);
|
||||
effectingCard = c;
|
||||
@@ -93,7 +93,7 @@ public class Card_Color {
|
||||
* @param c
|
||||
* a {@link forge.Card} object.
|
||||
*/
|
||||
public Card_Color(final Card c) {
|
||||
public CardColor(final Card c) {
|
||||
col = Color.colorless();
|
||||
additional = false;
|
||||
stamp = 0;
|
||||
@@ -188,7 +188,7 @@ public class CardList implements Iterable<Card> {
|
||||
|
||||
CardListFilter clrF = new CardListFilter() {
|
||||
public boolean addCard(final Card c) {
|
||||
ArrayList<Card_Color> cClrs = c.getColor();
|
||||
ArrayList<CardColor> cClrs = c.getColor();
|
||||
for (int i = 0; i < cClrs.size(); i++) {
|
||||
if (!cClrs.get(i).toStringArray().get(0).equals(clr1)
|
||||
&& !cClrs.get(i).toStringArray().get(0).equals(clr2)) {
|
||||
|
||||
@@ -468,9 +468,9 @@ public class CardReader implements Runnable, NewConstants {
|
||||
}
|
||||
} else if (line.startsWith("Colors:")) {
|
||||
final String value = line.substring("Colors:".length());
|
||||
ArrayList<Card_Color> newCols = new ArrayList<Card_Color>();
|
||||
ArrayList<CardColor> newCols = new ArrayList<CardColor>();
|
||||
for (String col : value.split(",")) {
|
||||
Card_Color newCol = new Card_Color(card);
|
||||
CardColor newCol = new CardColor(card);
|
||||
newCol.addToCardColor(col);
|
||||
newCols.add(newCol);
|
||||
}
|
||||
|
||||
@@ -913,7 +913,7 @@ public final class CardUtil {
|
||||
public static CardList getRadiance(final Card source, final Card origin, final String[] valid) {
|
||||
CardList res = new CardList();
|
||||
|
||||
for (Card_Color col : origin.getColor()) {
|
||||
for (CardColor col : origin.getColor()) {
|
||||
for (String strCol : col.toStringArray()) {
|
||||
if (strCol.equalsIgnoreCase("Colorless")) {
|
||||
continue;
|
||||
|
||||
@@ -9,7 +9,7 @@ import forge.card.mana.ManaCost;
|
||||
*
|
||||
*/
|
||||
public class ColorChanger {
|
||||
private ArrayList<Card_Color> globalColorChanges = new ArrayList<Card_Color>();
|
||||
private ArrayList<CardColor> globalColorChanges = new ArrayList<CardColor>();
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -29,10 +29,10 @@ public class ColorChanger {
|
||||
public final long addColorChanges(final String s, final Card c,
|
||||
final boolean addToColors, final boolean bIncrease) {
|
||||
if (bIncrease) {
|
||||
Card_Color.increaseTimestamp();
|
||||
CardColor.increaseTimestamp();
|
||||
}
|
||||
globalColorChanges.add(new Card_Color(new ManaCost(s), c, addToColors, false));
|
||||
return Card_Color.getTimestamp();
|
||||
globalColorChanges.add(new CardColor(new ManaCost(s), c, addToColors, false));
|
||||
return CardColor.getTimestamp();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,8 +50,8 @@ public class ColorChanger {
|
||||
* a long.
|
||||
*/
|
||||
public final void removeColorChanges(final String s, final Card c, final boolean addTo, final long timestamp) {
|
||||
Card_Color removeCol = null;
|
||||
for (Card_Color cc : globalColorChanges) {
|
||||
CardColor removeCol = null;
|
||||
for (CardColor cc : globalColorChanges) {
|
||||
if (cc.equals(s, c, addTo, timestamp)) {
|
||||
removeCol = cc;
|
||||
}
|
||||
@@ -88,7 +88,7 @@ public class ColorChanger {
|
||||
*
|
||||
* @return a {@link java.util.ArrayList} object.
|
||||
*/
|
||||
public final ArrayList<Card_Color> getColorChanges() {
|
||||
public final ArrayList<CardColor> getColorChanges() {
|
||||
return globalColorChanges;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1494,7 +1494,7 @@ public final class GuiDisplayUtil implements NewConstants {
|
||||
}
|
||||
c.setIsFaceDown(true);
|
||||
c.setManaCost("");
|
||||
c.setColor(new ArrayList<Card_Color>()); // remove all
|
||||
c.setColor(new ArrayList<CardColor>()); // remove all
|
||||
// colors
|
||||
c.addColor("0");
|
||||
c.setBaseAttack(2);
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import forge.Card_Color;
|
||||
import forge.CardColor;
|
||||
import forge.SetInfo;
|
||||
import forge.card.spellability.Ability_Mana;
|
||||
import forge.card.spellability.SpellAbility;
|
||||
@@ -20,7 +20,7 @@ public class CardCharacteristics {
|
||||
private String name = "";
|
||||
private ArrayList<String> type = new ArrayList<String>();
|
||||
private String manaCost = "";
|
||||
private ArrayList<Card_Color> cardColor = new ArrayList<Card_Color>();
|
||||
private ArrayList<CardColor> cardColor = new ArrayList<CardColor>();
|
||||
private boolean cardColorsOverridden = false;
|
||||
private int baseAttack = 0;
|
||||
private int baseDefense = 0;
|
||||
@@ -98,7 +98,7 @@ public class CardCharacteristics {
|
||||
*
|
||||
* @return the cardColor
|
||||
*/
|
||||
public final ArrayList<Card_Color> getCardColor() {
|
||||
public final ArrayList<CardColor> getCardColor() {
|
||||
return cardColor;
|
||||
}
|
||||
|
||||
@@ -108,8 +108,8 @@ public class CardCharacteristics {
|
||||
* @param cardColor0
|
||||
* the cardColor to set
|
||||
*/
|
||||
public final void setCardColor(final ArrayList<Card_Color> cardColor0) {
|
||||
this.cardColor = new ArrayList<Card_Color>(cardColor0); // TODO: Add 0
|
||||
public final void setCardColor(final ArrayList<CardColor> cardColor0) {
|
||||
this.cardColor = new ArrayList<CardColor>(cardColor0); // TODO: Add 0
|
||||
// to
|
||||
// parameter's
|
||||
// name.
|
||||
|
||||
@@ -18,7 +18,7 @@ import forge.Card;
|
||||
import forge.CardList;
|
||||
import forge.CardListFilter;
|
||||
import forge.CardUtil;
|
||||
import forge.Card_Color;
|
||||
import forge.CardColor;
|
||||
import forge.Combat;
|
||||
import forge.CombatUtil;
|
||||
import forge.Command;
|
||||
@@ -1005,7 +1005,7 @@ public class CardFactoryUtil {
|
||||
// card.setName("Morph");
|
||||
sourceCard.setIsFaceDown(true);
|
||||
sourceCard.setManaCost("");
|
||||
sourceCard.setColor(new ArrayList<Card_Color>()); // remove all
|
||||
sourceCard.setColor(new ArrayList<CardColor>()); // remove all
|
||||
// colors
|
||||
sourceCard.addColor("0");
|
||||
sourceCard.setBaseAttack(2);
|
||||
|
||||
Reference in New Issue
Block a user