public static void RegisterBanner()
        {
            CardPool cardPool     = UnityEngine.ScriptableObject.CreateInstance <CardPool>();
            var      cardDataList = (Malee.ReorderableArray <CardData>)AccessTools.Field(typeof(CardPool), "cardDataList").GetValue(cardPool);

            foreach (var card in CustomCardManager.CustomCardData)
            {
                if (card.Value.GetLinkedClassID() == RetrospectiveUnknownVoyage.getClan().GetID() && card.Value.GetSpawnCharacterData() != null && !card.Value.GetSpawnCharacterData().IsChampion())
                {
                    cardDataList.Add(card.Value);
                }

                new RewardNodeDataBuilder()
                {
                    RewardNodeID   = "Touhou_UnitBanner",
                    MapNodePoolIDs = new List <string> {
                        "RandomChosenMainClassUnit", "RandomChosenSubClassUnit"
                    },
                    Name                      = "RewardNodeData_Touhou_UnitBanner_TooltipBodyKey",
                    Description               = "RewardNodeData_Touhou_UnitBanner_TooltipTitleKey",
                    RequiredClass             = RetrospectiveUnknownVoyage.getClan(),
                    FrozenSpritePath          = "influka/Clan/POI_Map_Clan_Touhou_Frozen.png",
                    EnabledSpritePath         = "influka/Clan/POI_Map_Clan_Touhou_Enabled.png",
                    EnabledVisitedSpritePath  = "influka/Clan/POI_Map_Clan_Touhou_Enabled.png",
                    DisabledSpritePath        = "influka/Clan/POI_Map_Clan_Touhou_Disabled.png",
                    DisabledVisitedSpritePath = "influka/Clan/POI_Map_Clan_Touhou_VisitedDisabled.png",
                    GlowSpritePath            = "influka/Clan/MSK_Map_Clan_Touhou_01.png",
                    MapIconPath               = "influka/Clan/POI_Map_Clan_Touhou_Enabled.png",
                    MinimapIconPath           = "influka/Clan/Icon_MiniMap_ClanBanner.png",
                    SkipCheckInBattleMode     = true,
                    OverrideTooltipTitleBody  = false,
                    NodeSelectedSfxCue        = "Node_Banner",
                    RewardBuilders            = new List <IRewardDataBuilder>
                    {
                        new DraftRewardDataBuilder()
                        {
                            DraftRewardID         = "Touhou_UnitsDraft",
                            _RewardSpritePath     = "influka/Clan/POI_Map_Clan_Touhou_Enabled.png",
                            _RewardTitleKey       = "TouhouReward_Title",
                            _RewardDescriptionKey = "TouhouReward_Desc",
                            Costs = new int[] { 100 },
                            _IsServiceMerchantReward = false,
                            DraftPool           = cardPool,
                            ClassType           = (RunState.ClassType) 7,
                            DraftOptionsCount   = 2,
                            RarityFloorOverride = CollectableRarity.Uncommon
                        }
                    }
                }.BuildAndRegister();
            }
        }
Example #2
0
        public static void AddSpell(CardDataBuilder r, string IDName)
        {
            r.CardID  = IDName;
            r.NameKey = IDName + "_Name";
            r.OverrideDescriptionKey = IDName + "_Desc";
            r.LinkedClass            = RetrospectiveUnknownVoyage.getClan();
            r.ClanID      = TouhouClan.ID;
            r.CardPoolIDs = new List <string> {
                TouhouClan.ID, MegaPool
            };

            r.AssetPath = rootPath + scardPath;


            //API.Log(BepInEx.Logging.LogLevel.All, string.Join("\t", new string[] { "Spell", r.NameKey.Localize(), r.Rarity.ToString(), r.Cost.ToString(), r.OverrideDescriptionKey.Localize() }));
        }
Example #3
0
        public static void AddUnit(CardDataBuilder r, string IDName, CharacterData character)
        {
            r.CardID  = IDName;
            r.NameKey = IDName + "_Name";
            r.OverrideDescriptionKey = IDName + "_Desc";
            r.LinkedClass            = RetrospectiveUnknownVoyage.getClan();
            r.ClanID      = TouhouClan.ID;
            r.CardPoolIDs = new List <string> {
                TouhouClan.ID, UnitsAllBanner
            };
            r.CardType    = CardType.Monster;
            r.TargetsRoom = true;

            r.AssetPath = rootPath + ucardPath;
            r.EffectBuilders.Add(
                new CardEffectDataBuilder
            {
                EffectStateName    = "CardEffectSpawnMonster",
                TargetMode         = TargetMode.DropTargetCharacter,
                ParamCharacterData = character,
            });

            //API.Log(BepInEx.Logging.LogLevel.All, string.Join("\t", new string[] { "Unit", r.NameKey.Localize(), r.Rarity.ToString(), r.Cost.ToString(), character.GetSize().ToString(), character.GetHealth().ToString(), character.GetAttackDamage().ToString(), character.GetLocalizedSubtype(), r.OverrideDescriptionKey.Localize() }));
        }