@@ -16,6 +16,7 @@ public class CustomCard
1616 public static Dictionary < int , TailIdentifier > tailIds = new ( ) ;
1717
1818 public static Dictionary < string , Sprite > emissions = new ( ) ;
19+
1920 public string name ;
2021 public List < CardMetaCategory > metaCategories ;
2122 public CardComplexity ? cardComplexity ;
@@ -32,8 +33,8 @@ public class CustomCard
3233 public SpecialStatIcon ? specialStatIcon ;
3334 public List < Tribe > tribes ;
3435 public List < Trait > traits ;
35- public List < SpecialTriggeredAbility > specialAbilities = new ( ) ;
36- public List < Ability > abilities = new ( ) ;
36+ public List < SpecialTriggeredAbility > specialAbilities ;
37+ public List < Ability > abilities ;
3738 public EvolveParams evolveParams ;
3839 public string defaultEvolutionName ;
3940 public TailParams tailParams ;
@@ -48,10 +49,6 @@ public class CustomCard
4849 [ IgnoreMapping ] public Texture2D emissionTex ;
4950 public GameObject animatedPortrait ;
5051 public List < Texture > decals ;
51- public List < AbilityIdentifier > abilityIdList = new ( ) ;
52- public EvolveIdentifier evolveId ;
53- public IceCubeIdentifier iceCubeId ;
54- public TailIdentifier tailId ;
5552
5653 public CustomCard (
5754 string name ,
@@ -65,47 +62,16 @@ public CustomCard(
6562 CustomCard . cards . Add ( this ) ;
6663
6764 // Handle AbilityIdentifier
68- List < AbilityIdentifier > abilitiesToRemove = new List < AbilityIdentifier > ( ) ;
69- if ( abilityIdParam is not null )
65+ if ( abilityIdParam is not null && abilityIdParam . Count > 0 )
7066 {
71- foreach ( var id in abilityIdParam . Where ( id => id . id != 0 ) )
72- {
73- this . abilities . Add ( id . id ) ;
74- abilitiesToRemove . Add ( id ) ;
75- }
76-
77- foreach ( AbilityIdentifier id in abilitiesToRemove )
78- {
79- abilityIdParam . Remove ( id ) ;
80- }
81-
82- if ( abilityIdParam . Count > 0 )
83- {
84- CustomCard . abilityIds [ CustomCard . cards . Count - 1 ] = abilityIdParam ;
85- }
67+ CustomCard . abilityIds [ CustomCard . cards . Count - 1 ] = abilityIdParam ;
8668 }
8769
88- List < SpecialAbilityIdentifier > specialAbilitiesToRemove = new List < SpecialAbilityIdentifier > ( ) ;
89- if ( specialAbilityIdParam is not null )
70+ if ( specialAbilityIdParam is not null && specialAbilityIdParam . Count > 0 )
9071 {
91- foreach ( var id in specialAbilityIdParam . Where ( id => id . id != 0 ) )
92- {
93- this . specialAbilities . Add ( id . id ) ;
94- specialAbilitiesToRemove . Add ( id ) ;
95- }
96-
97- foreach ( SpecialAbilityIdentifier id in specialAbilitiesToRemove )
98- {
99- specialAbilityIdParam . Remove ( id ) ;
100- }
101-
102- if ( specialAbilityIdParam . Count > 0 )
103- {
104- CustomCard . specialAbilityIds [ CustomCard . cards . Count - 1 ] = specialAbilityIdParam ;
105- }
72+ CustomCard . specialAbilityIds [ CustomCard . cards . Count - 1 ] = specialAbilityIdParam ;
10673 }
10774
108-
10975 // Handle EvolveIdentifier
11076 if ( evolveId is not null )
11177 {
0 commit comments