11
22package sneckomod .cards .unknowns ;
33
4- import basemod .BaseMod ;
54import com .megacrit .cardcrawl .cards .AbstractCard ;
65import com .megacrit .cardcrawl .characters .AbstractPlayer ;
76import com .megacrit .cardcrawl .core .CardCrawlGame ;
87import com .megacrit .cardcrawl .dungeons .AbstractDungeon ;
8+ import com .megacrit .cardcrawl .helpers .CardLibrary ;
9+ import com .megacrit .cardcrawl .screens .compendium .CardLibraryScreen ;
910import sneckomod .CardIgnore ;
10- import sneckomod .TheSnecko ;
1111
1212import java .util .ArrayList ;
1313import java .util .function .Predicate ;
@@ -17,8 +17,12 @@ public class UnknownClass extends AbstractUnknownCard {
1717 public final static String ID = makeID ("UnknownClass" );
1818
1919 public UnknownClass (CardColor cardColor ) {
20- super (ID , determineCardImg (cardColor ), CardType .SKILL , CardRarity .UNCOMMON );
20+ super (ID + cardColor . name () , determineCardImg (cardColor ), CardType .SKILL , CardRarity .UNCOMMON );
2121 myColor = cardColor ;
22+ name = "???" ;
23+ originalName = "???" ;
24+ if (CardCrawlGame .isInARun ())
25+ rawDescription = "sneckomod:Unknown " + getCharName (myColor ) + " Card." ;
2226 }
2327
2428 public static String determineCardImg (CardColor myColor ) {
@@ -42,7 +46,7 @@ public static String determineCardImg(CardColor myColor) {
4246 }
4347 }
4448
45- public String getCharName (CardColor myColor ) {
49+ public static String getCharName (CardColor myColor ) {
4650 ArrayList <AbstractPlayer > theDudes = new ArrayList <AbstractPlayer >(CardCrawlGame .characterManager .getAllCharacters ());
4751 for (AbstractPlayer p : theDudes ) {
4852 if (p .getCardColor () == myColor )
@@ -59,23 +63,6 @@ public AbstractCard makeCopy() {
5963 return new UnknownClass (myColor );
6064 }
6165
62- @ Override
63- public void update () {
64- super .update ();
65- if (!this .rawDescription .equals ("sneckomod:Unknown " + getCharName (myColor ) + "." )) {
66- if (upgraded ) rawDescription = "sneckomod:Unknown Upgraded " + getCharName (myColor ) + " Card." ;
67- else
68- this .rawDescription = "sneckomod:Unknown " + getCharName (myColor ) + " Card." ;
69- initializeDescription ();
70- }
71- }
72-
73- public static CardColor getRandomCardColor () {
74- ArrayList <CardColor > myList = new ArrayList <>(BaseMod .getCardColors ());
75- myList .removeIf (c -> c == TheSnecko .Enums .SNECKO_CYAN );
76- return myList .get (AbstractDungeon .cardRandomRng .random (myList .size () - 1 ));
77- }
78-
7966 @ Override
8067 public Predicate <AbstractCard > myNeeds () {
8168 return c -> c .color == myColor ;
0 commit comments