@@ -8,6 +8,7 @@ namespace APIPlugin
88 public static class NewCard
99 {
1010 public static List < CardInfo > cards = new List < CardInfo > ( ) ;
11+ public static Dictionary < int , List < AbilityIdentifier > > abilityIds = new Dictionary < int , List < AbilityIdentifier > > ( ) ;
1112
1213 public static void Add ( CardInfo card )
1314 {
@@ -24,7 +25,7 @@ public static void Add(string name, List<CardMetaCategory> metaCategories, CardC
2425 bool hideAttackAndHealth = false , int cost = 0 , int bonesCost = 0 , int energyCost = 0 ,
2526 List < GemType > gemsCost = null , SpecialStatIcon specialStatIcon = SpecialStatIcon . None ,
2627 List < Tribe > tribes = null , List < Trait > traits = null , List < SpecialTriggeredAbility > specialAbilities = null ,
27- List < Ability > abilities = null , EvolveParams evolveParams = null ,
28+ List < Ability > abilities = null , List < AbilityIdentifier > abilityIds = null , EvolveParams evolveParams = null ,
2829 string defaultEvolutionName = null , TailParams tailParams = null , IceCubeParams iceCubeParams = null ,
2930 bool flipPortraitForStrafe = false , bool onePerDeck = false ,
3031 List < CardAppearanceBehaviour . Appearance > appearanceBehaviour = null , Texture2D tex = null ,
@@ -125,6 +126,19 @@ public static void Add(string name, List<CardMetaCategory> metaCategories, CardC
125126 }
126127
127128 NewCard . cards . Add ( card ) ;
129+
130+ foreach ( AbilityIdentifier id in abilityIds )
131+ {
132+ if ( id . id != 0 )
133+ {
134+ card . abilities . Add ( id . id ) ;
135+ abilityIds . Remove ( id ) ;
136+ }
137+ }
138+ if ( abilityIds is not null )
139+ {
140+ NewCard . abilityIds [ NewCard . cards . Count - 1 ] = abilityIds ;
141+ }
128142 Plugin . Log . LogInfo ( $ "Loaded custom card { name } !") ;
129143 }
130144
0 commit comments