Exemple #1
0
        private void DirectorAPI_monsterActions(System.Collections.Generic.List <DirectorAPI.DirectorCardHolder> cards, DirectorAPI.StageInfo stage)
        {
            cards.Clear();
            CharacterSpawnCard turkeyCSC  = Resources.Load <CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscVulture");
            DirectorCard       turkeyCard = new DirectorCard
            {
                allowAmbushSpawn        = true,
                forbiddenUnlockable     = "",
                minimumStageCompletions = 0,
                preventOverhead         = false,
                requiredUnlockable      = "",
                selectionWeight         = 5,
                spawnDistance           = DirectorCore.MonsterSpawnDistance.Standard,
                spawnCard = turkeyCSC
            };

            var tempCard1 = new DirectorAPI.DirectorCardHolder();

            tempCard1.SetCard(turkeyCard);
            tempCard1.SetInteractableCategory(DirectorAPI.InteractableCategory.None);
            tempCard1.SetMonsterCategory(DirectorAPI.MonsterCategory.BasicMonsters);
            cards.Add(tempCard1);
            var tempCard2 = new DirectorAPI.DirectorCardHolder();

            tempCard2.SetCard(turkeyCard);
            tempCard2.SetInteractableCategory(DirectorAPI.InteractableCategory.None);
            tempCard2.SetMonsterCategory(DirectorAPI.MonsterCategory.Minibosses);
            cards.Add(tempCard2);
            var tempCard3 = new DirectorAPI.DirectorCardHolder();

            tempCard3.SetCard(turkeyCard);
            tempCard3.SetInteractableCategory(DirectorAPI.InteractableCategory.None);
            tempCard3.SetMonsterCategory(DirectorAPI.MonsterCategory.Champions);
            cards.Add(tempCard3);
        }
Exemple #2
0
 public static DirectorAPI.MonsterCategory GetMonsterCategory(this DirectorAPI.DirectorCardHolder holder)
 {
     if (directorAPI_monsterCat != null)
     {
         return(directorAPI_monsterCat.GetValue(holder));
     }
     else
     {
         return(default);
Exemple #3
0
        void SetupSpawnCard()
        {
            bulwarkDroneSpawnCard = TinkersSatchelPlugin.resources.LoadAsset <InteractableSpawnCard>("Assets/TinkersSatchel/Prefabs/Characters/BulwarkDrone/iscTkSatBulwarkDrone.asset");

            bulwarkDroneDirectorCard = new DirectorCard {
                spawnCard = bulwarkDroneSpawnCard,
                minimumStageCompletions = 0,
                preventOverhead         = false,
                selectionWeight         = 4, //equip drone is 2, normal drones are 7
                spawnDistance           = DirectorCore.MonsterSpawnDistance.Standard
            };
            bulwarkDroneDCH = new DirectorAPI.DirectorCardHolder {
                Card = bulwarkDroneDirectorCard,
                InteractableCategory = DirectorAPI.InteractableCategory.Drones,
                MonsterCategory      = DirectorAPI.MonsterCategory.Invalid
            };
        }
Exemple #4
0
        private static void BuildDirectorCard()
        {
            On.RoR2.CharacterSpawnCard.Awake += CharacterSpawnCard_Awake;
            CharacterSpawnCard characterSpawnCard = ScriptableObject.CreateInstance <CharacterSpawnCard>();

            On.RoR2.CharacterSpawnCard.Awake -= CharacterSpawnCard_Awake;

            DirectorAPI.DirectorCardHolder directorCardHolder = new DirectorAPI.DirectorCardHolder();
            DirectorCard directorCard = new DirectorCard();

            characterSpawnCard.directorCreditCost = 50;
            characterSpawnCard.forbiddenAsBoss    = false;
            characterSpawnCard.name = "cscClaymanDude";
            //characterSpawnCard.forbiddenFlags = RoR2.Navigation.NodeFlags.None;
            characterSpawnCard.hullSize        = HullClassification.Human;
            characterSpawnCard.nodeGraphType   = RoR2.Navigation.MapNodeGroup.GraphType.Ground;
            characterSpawnCard.noElites        = false;
            characterSpawnCard.prefab          = clayManMaster;
            characterSpawnCard.occupyPosition  = false;
            characterSpawnCard.sendOverNetwork = true;

            directorCard.allowAmbushSpawn        = true;
            directorCard.forbiddenUnlockable     = "";
            directorCard.minimumStageCompletions = 1;
            directorCard.preventOverhead         = false;
            directorCard.requiredUnlockable      = "";
            directorCard.selectionWeight         = 1;
            directorCard.spawnCard     = characterSpawnCard;
            directorCard.spawnDistance = DirectorCore.MonsterSpawnDistance.Standard;

            directorCardHolder.Card = directorCard;
            directorCardHolder.InteractableCategory = DirectorAPI.InteractableCategory.None;
            directorCardHolder.MonsterCategory      = DirectorAPI.MonsterCategory.BasicMonsters;

            DirectorAPI.MonsterActions += delegate(List <DirectorAPI.DirectorCardHolder> list, DirectorAPI.StageInfo stage)
            {
                if (stage.stage == DirectorAPI.Stage.SkyMeadow || stage.stage == DirectorAPI.Stage.AbandonedAqueduct || stage.stage == DirectorAPI.Stage.RallypointDelta || stage.stage == DirectorAPI.Stage.ScorchedAcres)
                {
                    if (!list.Contains(directorCardHolder))
                    {
                        list.Add(directorCardHolder);
                    }
                }
            };
        }
Exemple #5
0
        private static void BuildDirectorCard()
        {
            On.RoR2.CharacterSpawnCard.Awake += CharacterSpawnCard_Awake;
            CharacterSpawnCard characterSpawnCard = ScriptableObject.CreateInstance <CharacterSpawnCard>();

            On.RoR2.CharacterSpawnCard.Awake -= CharacterSpawnCard_Awake;

            DirectorAPI.DirectorCardHolder directorCardHolder = new DirectorAPI.DirectorCardHolder();
            DirectorCard directorCard = new DirectorCard();

            characterSpawnCard.directorCreditCost = 325;
            characterSpawnCard.forbiddenAsBoss    = false;
            characterSpawnCard.name = "cscMegaMushrum";
            //characterSpawnCard.forbiddenFlags = RoR2.Navigation.NodeFlags.None;
            characterSpawnCard.hullSize        = HullClassification.Golem;
            characterSpawnCard.loadout         = new SerializableLoadout();
            characterSpawnCard.nodeGraphType   = RoR2.Navigation.MapNodeGroup.GraphType.Ground;
            characterSpawnCard.noElites        = false;
            characterSpawnCard.occupyPosition  = false;
            characterSpawnCard.prefab          = megaMushrumMaster;
            characterSpawnCard.sendOverNetwork = true;

            directorCard.allowAmbushSpawn        = true;
            directorCard.forbiddenUnlockable     = "";
            directorCard.minimumStageCompletions = 4;
            directorCard.preventOverhead         = false;
            directorCard.requiredUnlockable      = "";
            directorCard.selectionWeight         = 1;
            directorCard.spawnCard     = characterSpawnCard;
            directorCard.spawnDistance = DirectorCore.MonsterSpawnDistance.Standard;

            directorCardHolder.Card = directorCard;
            directorCardHolder.InteractableCategory = DirectorAPI.InteractableCategory.None;
            directorCardHolder.MonsterCategory      = DirectorAPI.MonsterCategory.BasicMonsters;

            DirectorAPI.MonsterActions += delegate(List <DirectorAPI.DirectorCardHolder> list, DirectorAPI.StageInfo stage)
            {
                if (!list.Contains(directorCardHolder) && stage.stage == DirectorAPI.Stage.SkyMeadow)
                {
                    list.Add(directorCardHolder);
                }
            };
        }
Exemple #6
0
        public void Awake()
        {
            var archWispSpawnCard = Resources.Load <CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscArchWisp");

            archWispSpawnCard.directorCreditCost = 300;

            var archWispDirCard = new DirectorCard();

            archWispDirCard.allowAmbushSpawn        = true;
            archWispDirCard.forbiddenUnlockable     = "";
            archWispDirCard.minimumStageCompletions = 4;
            archWispDirCard.preventOverhead         = false;
            archWispDirCard.requiredUnlockable      = "";
            archWispDirCard.selectionWeight         = 1;
            archWispDirCard.spawnCard     = archWispSpawnCard;
            archWispDirCard.spawnDistance = DirectorCore.MonsterSpawnDistance.Standard;

            var archWispCard = new DirectorAPI.DirectorCardHolder();

            archWispCard.SetCard(archWispDirCard);
            archWispCard.SetInteractableCategory(DirectorAPI.InteractableCategory.None);
            archWispCard.SetMonsterCategory(DirectorAPI.MonsterCategory.Minibosses);

            DirectorAPI.MonsterActions += (list, stage) =>
            {
                foreach (DirectorAPI.DirectorCardHolder card in list)
                {
                    var csc = card.GetCard().spawnCard as CharacterSpawnCard;
                    if (csc.noElites && csc.name == "cscelectricworm")
                    {
                        csc.noElites = false;
                    }
                }

                if (!list.Contains(archWispCard))
                {
                    list.Add(archWispCard);
                }
            };

            R2API.AssetPlus.Languages.AddToken("ARCHWISP_BODY_NAME", "Archaic Wisp");
        }
        private static void CustomInteractables(
            DccsPool dccsPool, DirectorAPI.StageInfo stageInfo)
        {
            var cardHolder = new DirectorAPI.DirectorCardHolder()
            {
                Card = _my_iscCategoryChest2DamageDirectorCard,
                InteractableCategory = DirectorAPI.InteractableCategory.Chests
            };

            if (dccsPool)
            {
                DirectorAPI.Helpers.ForEachPoolEntryInDccsPool(dccsPool, (poolEntry) => {
                    if (poolEntry.dccs)
                    {
                        poolEntry.dccs.Clear();
                        var cardIndex = poolEntry.dccs.AddCard(cardHolder);
                    }
                });
            }
        }
        private static void OnlyGup(
            DccsPool dccsPool,
            List <DirectorAPI.DirectorCardHolder> mixEnemyArtifactsCards,
            DirectorAPI.StageInfo stageInfo)
        {
            var cardHolder = new DirectorAPI.DirectorCardHolder()
            {
                Card            = _myGupDC,
                MonsterCategory = DirectorAPI.MonsterCategory.BasicMonsters
            };

            if (dccsPool)
            {
                DirectorAPI.Helpers.ForEachPoolEntryInDccsPool(dccsPool, (poolEntry) => {
                    poolEntry.dccs.Clear();
                    _ = poolEntry.dccs.AddCard(cardHolder);
                });
            }

            mixEnemyArtifactsCards.Add(cardHolder);
        }
Exemple #9
0
        protected override DirectorAPI.DirectorCardHolder[] AllowedSpawns()
        {
            DirectorCard bisonDC = new DirectorCard
            {
                spawnCard               = Resources.Load <CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscBison"),
                selectionWeight         = 1,
                allowAmbushSpawn        = true,
                preventOverhead         = false,
                minimumStageCompletions = 0,
                requiredUnlockable      = "",
                forbiddenUnlockable     = "",
                spawnDistance           = DirectorCore.MonsterSpawnDistance.Standard
            };

            DirectorAPI.DirectorCardHolder bisonCard = new DirectorAPI.DirectorCardHolder
            {
                Card                 = bisonDC,
                MonsterCategory      = DirectorAPI.MonsterCategory.Minibosses,
                InteractableCategory = DirectorAPI.InteractableCategory.None
            };
            return(new DirectorAPI.DirectorCardHolder[1] {
                bisonCard
            });
        }
Exemple #10
0
        public void Awake()
        {
            int costChance   = base.Config.Bind <int>(new ConfigDefinition("00 - Credit Costs", "Shrine of Chance"), 20, new ConfigDescription("How many director credits the shrine costs to spawn.")).Value;
            int costBlood    = base.Config.Bind <int>(new ConfigDefinition("00 - Credit Costs", "Shrine of Blood"), 20, new ConfigDescription("How many director credits the shrine costs to spawn.")).Value;
            int costCombat   = base.Config.Bind <int>(new ConfigDefinition("00 - Credit Costs", "Shrine of Combat"), 20, new ConfigDescription("How many director credits the shrine costs to spawn.")).Value;
            int costOrder    = base.Config.Bind <int>(new ConfigDefinition("00 - Credit Costs", "Shrine of Order"), 30, new ConfigDescription("How many director credits the shrine costs to spawn.")).Value;
            int costMountain = base.Config.Bind <int>(new ConfigDefinition("00 - Credit Costs", "Shrine of the Mountain"), 20, new ConfigDescription("How many director credits the shrine costs to spawn.")).Value;
            int costWoods    = base.Config.Bind <int>(new ConfigDefinition("00 - Credit Costs", "Shrine of the Woods"), 15, new ConfigDescription("How many director credits the shrine costs to spawn.")).Value;
            int costCleanse  = base.Config.Bind <int>(new ConfigDefinition("00 - Credit Costs", "Cleansing Pool"), 5, new ConfigDescription("How many director credits the shrine costs to spawn.")).Value;

            #region stage1
            StageShrineWeights titanicPlains = new StageShrineWeights
            {
                //overall = base.Config.Bind<int>(new ConfigDefinition("10 - Titanic Plains", "Shrine Category Weight"), 10, new ConfigDescription("How likely it is for shrines to spawn on this map.")).Value,
                chance   = base.Config.Bind <int>(new ConfigDefinition("10 - Titanic Plains", "Shrine of Chance Weight"), 4, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                blood    = base.Config.Bind <int>(new ConfigDefinition("10 - Titanic Plains", "Shrine of Blood Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                combat   = base.Config.Bind <int>(new ConfigDefinition("10 - Titanic Plains", "Shrine of Combat Weight"), 3, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                order    = base.Config.Bind <int>(new ConfigDefinition("10 - Titanic Plains", "Shrine of Order Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                mountain = base.Config.Bind <int>(new ConfigDefinition("10 - Titanic Plains", "Shrine of the Mountain Weight"), 1, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                woods    = base.Config.Bind <int>(new ConfigDefinition("10 - Titanic Plains", "Shrine of the Woods Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                cleanse  = base.Config.Bind <int>(new ConfigDefinition("10 - Titanic Plains", "Cleansing Pool Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value
            };

            StageShrineWeights distantRoost = new StageShrineWeights
            {
                //overall = base.Config.Bind<int>(new ConfigDefinition("11 - Distant Roost", "Shrine Category Weight"), 10, new ConfigDescription("How likely it is for shrines to spawn on this map.")).Value,
                chance   = base.Config.Bind <int>(new ConfigDefinition("11 - Distant Roost", "Shrine of Chance Weight"), 4, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                blood    = base.Config.Bind <int>(new ConfigDefinition("11 - Distant Roost", "Shrine of Blood Weight"), 3, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                combat   = base.Config.Bind <int>(new ConfigDefinition("11 - Distant Roost", "Shrine of Combat Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                order    = base.Config.Bind <int>(new ConfigDefinition("11 - Distant Roost", "Shrine of Order Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                mountain = base.Config.Bind <int>(new ConfigDefinition("11 - Distant Roost", "Shrine of the Mountain Weight"), 1, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                woods    = base.Config.Bind <int>(new ConfigDefinition("11 - Distant Roost", "Shrine of the Woods Weight"), 2, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                cleanse  = base.Config.Bind <int>(new ConfigDefinition("11 - Distant Roost", "Cleansing Pool Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value
            };
            #endregion
            #region stage2
            StageShrineWeights wetlandAspect = new StageShrineWeights
            {
                //overall = base.Config.Bind<int>(new ConfigDefinition("20 - Wetland Aspect", "Shrine Category Weight"), 10, new ConfigDescription("How likely it is for shrines to spawn on this map.")).Value,
                chance   = base.Config.Bind <int>(new ConfigDefinition("20 - Wetland Aspect", "Shrine of Chance Weight"), 4, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                blood    = base.Config.Bind <int>(new ConfigDefinition("20 - Wetland Aspect", "Shrine of Blood Weight"), 3, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                combat   = base.Config.Bind <int>(new ConfigDefinition("20 - Wetland Aspect", "Shrine of Combat Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                order    = base.Config.Bind <int>(new ConfigDefinition("20 - Wetland Aspect", "Shrine of Order Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                mountain = base.Config.Bind <int>(new ConfigDefinition("20 - Wetland Aspect", "Shrine of the Mountain Weight"), 1, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                woods    = base.Config.Bind <int>(new ConfigDefinition("20 - Wetland Aspect", "Shrine of the Woods Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                cleanse  = base.Config.Bind <int>(new ConfigDefinition("20 - Wetland Aspect", "Cleansing Pool Weight"), 3, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value
            };

            StageShrineWeights abandonedAqueduct = new StageShrineWeights
            {
                //overall = base.Config.Bind<int>(new ConfigDefinition("21 - Abandoned Aqueduct", "Shrine Category Weight"), 8, new ConfigDescription("How likely it is for shrines to spawn on this map.")).Value,
                chance   = base.Config.Bind <int>(new ConfigDefinition("21 - Abandoned Aqueduct", "Shrine of Chance Weight"), 4, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                blood    = base.Config.Bind <int>(new ConfigDefinition("21 - Abandoned Aqueduct", "Shrine of Blood Weight"), 3, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                combat   = base.Config.Bind <int>(new ConfigDefinition("21 - Abandoned Aqueduct", "Shrine of Combat Weight"), 2, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                order    = base.Config.Bind <int>(new ConfigDefinition("21 - Abandoned Aqueduct", "Shrine of Order Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                mountain = base.Config.Bind <int>(new ConfigDefinition("21 - Abandoned Aqueduct", "Shrine of the Mountain Weight"), 1, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                woods    = base.Config.Bind <int>(new ConfigDefinition("21 - Abandoned Aqueduct", "Shrine of the Woods Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                cleanse  = base.Config.Bind <int>(new ConfigDefinition("21 - Abandoned Aqueduct", "Cleansing Pool Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value
            };
            #endregion
            #region stage3
            StageShrineWeights rallypointDelta = new StageShrineWeights
            {
                //overall = base.Config.Bind<int>(new ConfigDefinition("30 - Rallypoint Delta", "Shrine Category Weight"), 7, new ConfigDescription("How likely it is for shrines to spawn on this map.")).Value,
                chance   = base.Config.Bind <int>(new ConfigDefinition("30 - Rallypoint Delta", "Shrine of Chance Weight"), 4, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                blood    = base.Config.Bind <int>(new ConfigDefinition("30 - Rallypoint Delta", "Shrine of Blood Weight"), 3, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                combat   = base.Config.Bind <int>(new ConfigDefinition("30 - Rallypoint Delta", "Shrine of Combat Weight"), 2, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                order    = base.Config.Bind <int>(new ConfigDefinition("30 - Rallypoint Delta", "Shrine of Order Weight"), 1, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                mountain = base.Config.Bind <int>(new ConfigDefinition("30 - Rallypoint Delta", "Shrine of the Mountain Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                woods    = base.Config.Bind <int>(new ConfigDefinition("30 - Rallypoint Delta", "Shrine of the Woods Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                cleanse  = base.Config.Bind <int>(new ConfigDefinition("30 - Rallypoint Delta", "Cleansing Pool Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value
            };

            StageShrineWeights scorchedAcres = new StageShrineWeights
            {
                //overall = base.Config.Bind<int>(new ConfigDefinition("31 - Scorched Acres", "Shrine Category Weight"), 7, new ConfigDescription("How likely it is for shrines to spawn on this map.")).Value,
                chance   = base.Config.Bind <int>(new ConfigDefinition("31 - Scorched Acres", "Shrine of Chance Weight"), 4, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                blood    = base.Config.Bind <int>(new ConfigDefinition("31 - Scorched Acres", "Shrine of Blood Weight"), 3, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                combat   = base.Config.Bind <int>(new ConfigDefinition("31 - Scorched Acres", "Shrine of Combat Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                order    = base.Config.Bind <int>(new ConfigDefinition("31 - Scorched Acres", "Shrine of Order Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                mountain = base.Config.Bind <int>(new ConfigDefinition("31 - Scorched Acres", "Shrine of the Mountain Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                woods    = base.Config.Bind <int>(new ConfigDefinition("31 - Scorched Acres", "Shrine of the Woods Weight"), 1, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                cleanse  = base.Config.Bind <int>(new ConfigDefinition("31 - Scorched Acres", "Cleansing Pool Weight"), 3, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value
            };
            #endregion
            #region stage4
            StageShrineWeights abyssalDepths = new StageShrineWeights
            {
                //overall = base.Config.Bind<int>(new ConfigDefinition("40 - Abyssal Depths", "Shrine Category Weight"), 10, new ConfigDescription("How likely it is for shrines to spawn on this map.")).Value,
                chance   = base.Config.Bind <int>(new ConfigDefinition("40 - Abyssal Depths", "Shrine of Chance Weight"), 4, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                blood    = base.Config.Bind <int>(new ConfigDefinition("40 - Abyssal Depths", "Shrine of Blood Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                combat   = base.Config.Bind <int>(new ConfigDefinition("40 - Abyssal Depths", "Shrine of Combat Weight"), 3, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                order    = base.Config.Bind <int>(new ConfigDefinition("40 - Abyssal Depths", "Shrine of Order Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                mountain = base.Config.Bind <int>(new ConfigDefinition("40 - Abyssal Depths", "Shrine of the Mountain Weight"), 1, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                woods    = base.Config.Bind <int>(new ConfigDefinition("40 - Abyssal Depths", "Shrine of the Woods Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                cleanse  = base.Config.Bind <int>(new ConfigDefinition("40 - Abyssal Depths", "Cleansing Pool Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value
            };

            StageShrineWeights sirensCall = new StageShrineWeights
            {
                //overall = base.Config.Bind<int>(new ConfigDefinition("41 - Sirens Call", "Shrine Category Weight"), 10, new ConfigDescription("How likely it is for shrines to spawn on this map.")).Value,
                chance   = base.Config.Bind <int>(new ConfigDefinition("41 - Sirens Call", "Shrine of Chance Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                blood    = base.Config.Bind <int>(new ConfigDefinition("41 - Sirens Call", "Shrine of Blood Weight"), 3, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                combat   = base.Config.Bind <int>(new ConfigDefinition("41 - Sirens Call", "Shrine of Combat Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                order    = base.Config.Bind <int>(new ConfigDefinition("41 - Sirens Call", "Shrine of Order Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                mountain = base.Config.Bind <int>(new ConfigDefinition("41 - Sirens Call", "Shrine of the Mountain Weight"), 1, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                woods    = base.Config.Bind <int>(new ConfigDefinition("41 - Sirens Call", "Shrine of the Woods Weight"), 2, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                cleanse  = base.Config.Bind <int>(new ConfigDefinition("41 - Sirens Call", "Cleansing Pool Weight"), 3, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value
            };

            StageShrineWeights sunderedGrove = new StageShrineWeights
            {
                //overall = base.Config.Bind<int>(new ConfigDefinition("42 - Sundered Grove", "Shrine Category Weight"), 10, new ConfigDescription("How likely it is for shrines to spawn on this map.")).Value,
                chance   = base.Config.Bind <int>(new ConfigDefinition("42 - Sundered Grove", "Shrine of Chance Weight"), 4, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                blood    = base.Config.Bind <int>(new ConfigDefinition("42 - Sundered Grove", "Shrine of Blood Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                combat   = base.Config.Bind <int>(new ConfigDefinition("42 - Sundered Grove", "Shrine of Combat Weight"), 3, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                order    = base.Config.Bind <int>(new ConfigDefinition("42 - Sundered Grove", "Shrine of Order Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                mountain = base.Config.Bind <int>(new ConfigDefinition("42 - Sundered Grove", "Shrine of the Mountain Weight"), 1, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                woods    = base.Config.Bind <int>(new ConfigDefinition("42 - Sundered Grove", "Shrine of the Woods Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                cleanse  = base.Config.Bind <int>(new ConfigDefinition("42 - Sundered Grove", "Cleansing Pool Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value
            };
            #endregion

            StageShrineWeights skyMeadow = new StageShrineWeights
            {
                //overall = base.Config.Bind<int>(new ConfigDefinition("50 - Sky Meadow", "Shrine Category Weight"), 10, new ConfigDescription("How likely it is for shrines to spawn on this map.")).Value,
                chance   = base.Config.Bind <int>(new ConfigDefinition("50 - Sky Meadow", "Shrine of Chance Weight"), 4, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                blood    = base.Config.Bind <int>(new ConfigDefinition("50 - Sky Meadow", "Shrine of Blood Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                combat   = base.Config.Bind <int>(new ConfigDefinition("50 - Sky Meadow", "Shrine of Combat Weight"), 3, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                order    = base.Config.Bind <int>(new ConfigDefinition("50 - Sky Meadow", "Shrine of Order Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                mountain = base.Config.Bind <int>(new ConfigDefinition("50 - Sky Meadow", "Shrine of the Mountain Weight"), 1, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                woods    = base.Config.Bind <int>(new ConfigDefinition("50 - Sky Meadow", "Shrine of the Woods Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value,
                cleanse  = base.Config.Bind <int>(new ConfigDefinition("50 - Sky Meadow", "Cleansing Pool Weight"), 0, new ConfigDescription("How likely it is for the shrine to be spawned.")).Value
            };

            SpawnCard chanceSC   = Resources.Load <SpawnCard>("SpawnCards/InteractableSpawnCard/iscShrineChance");
            SpawnCard bloodSC    = Resources.Load <SpawnCard>("SpawnCards/InteractableSpawnCard/iscShrineBlood");
            SpawnCard combatSC   = Resources.Load <SpawnCard>("SpawnCards/InteractableSpawnCard/iscShrineCombat");
            SpawnCard orderSC    = Resources.Load <SpawnCard>("SpawnCards/InteractableSpawnCard/iscShrineRestack");
            SpawnCard mountainSC = Resources.Load <SpawnCard>("SpawnCards/InteractableSpawnCard/iscShrineBoss");
            SpawnCard woodsSC    = Resources.Load <SpawnCard>("SpawnCards/InteractableSpawnCard/iscShrineHealing");
            SpawnCard cleanseSC  = Resources.Load <SpawnCard>("SpawnCards/InteractableSpawnCard/iscShrineCleanse");

            Debug.Log("chance: " + chanceSC.directorCreditCost);
            Debug.Log("blood: " + bloodSC.directorCreditCost);
            Debug.Log("combat: " + combatSC.directorCreditCost);
            Debug.Log("order: " + orderSC.directorCreditCost);
            Debug.Log("mountain: " + mountainSC.directorCreditCost);
            Debug.Log("woods: " + woodsSC.directorCreditCost);
            Debug.Log("cleanse: " + cleanseSC.directorCreditCost);

            chanceSC.directorCreditCost   = costChance;
            bloodSC.directorCreditCost    = costBlood;
            combatSC.directorCreditCost   = costCombat;
            orderSC.directorCreditCost    = costOrder;
            mountainSC.directorCreditCost = costMountain;
            woodsSC.directorCreditCost    = costWoods;
            cleanseSC.directorCreditCost  = costCleanse;

            DirectorAPI.InteractableActions += delegate(List <DirectorAPI.DirectorCardHolder> cardList, DirectorAPI.StageInfo stage)
            {
                bool foundStage        = true;
                StageShrineWeights ssw = titanicPlains;
                switch (stage.stage)
                {
                case DirectorAPI.Stage.TitanicPlains:
                    ssw = titanicPlains;
                    break;

                case DirectorAPI.Stage.DistantRoost:
                    ssw = distantRoost;
                    break;

                case DirectorAPI.Stage.WetlandAspect:
                    ssw = wetlandAspect;
                    break;

                case DirectorAPI.Stage.AbandonedAqueduct:
                    ssw = abandonedAqueduct;
                    break;

                case DirectorAPI.Stage.RallypointDelta:
                    ssw = rallypointDelta;
                    break;

                case DirectorAPI.Stage.ScorchedAcres:
                    ssw = scorchedAcres;
                    break;

                case DirectorAPI.Stage.AbyssalDepths:
                    ssw = abyssalDepths;
                    break;

                case DirectorAPI.Stage.SirensCall:
                    ssw = sirensCall;
                    break;

                case DirectorAPI.Stage.SkyMeadow:
                    ssw = skyMeadow;
                    break;

                case DirectorAPI.Stage.Custom:
                    if (stage.CustomStageName == "rootjungle")
                    {
                        ssw = sunderedGrove;
                    }
                    else
                    {
                        foundStage = false;
                    }
                    break;

                default:
                    foundStage = false;
                    break;
                }

                if (foundStage)
                {
                    bool handledChance   = false;
                    bool handledBlood    = false;
                    bool handledCombat   = false;
                    bool handledOrder    = false;
                    bool handledMountain = false;
                    bool handledWoods    = false;
                    bool handledCleanse  = false;

                    List <DirectorAPI.DirectorCardHolder> toRemove = new List <DirectorAPI.DirectorCardHolder>();
                    foreach (DirectorAPI.DirectorCardHolder dc in cardList)
                    {
                        if (dc.InteractableCategory == DirectorAPI.InteractableCategory.Shrines)
                        {
                            /*Debug.Log("\n\n\ncard: " + dc.Card.spawnCard);
                             * Debug.Log("weight: " + dc.Card.selectionWeight);
                             * Debug.Log("preventoverhead: " + dc.Card.preventOverhead);
                             * Debug.Log("spawndistance: " + dc.Card.spawnDistance);*/

                            //Debug.Log("\nold selection weight: " + dc.Card.selectionWeight);
                            if (dc.Card.spawnCard == chanceSC)
                            {
                                handledChance           = true;
                                dc.Card.selectionWeight = ssw.chance;
                            }
                            else if (!handledBlood && dc.Card.spawnCard == bloodSC)
                            {
                                handledBlood            = true;
                                dc.Card.selectionWeight = ssw.blood;
                            }
                            else if (dc.Card.spawnCard == combatSC)
                            {
                                handledCombat           = true;
                                dc.Card.selectionWeight = ssw.combat;
                            }
                            else if (dc.Card.spawnCard == orderSC)
                            {
                                handledOrder            = true;
                                dc.Card.selectionWeight = ssw.order;
                            }
                            else if (dc.Card.spawnCard == mountainSC)
                            {
                                handledMountain         = true;
                                dc.Card.selectionWeight = ssw.mountain;
                            }
                            else if (dc.Card.spawnCard == woodsSC)
                            {
                                handledWoods            = true;
                                dc.Card.selectionWeight = ssw.woods;
                            }
                            else if (dc.Card.spawnCard == cleanseSC)
                            {
                                handledCleanse          = true;
                                dc.Card.selectionWeight = ssw.cleanse;
                            }
                            //Debug.Log("new selection weight: " + dc.Card.selectionWeight);

                            if (dc.Card.selectionWeight == 0)
                            {
                                //Debug.Log("removing from pool: " + dc.Card.spawnCard);
                                toRemove.Add(dc);
                            }
                        }
                    }

                    foreach (DirectorAPI.DirectorCardHolder dc in toRemove)
                    {
                        cardList.Remove(dc);
                    }

                    if (!handledChance && ssw.chance > 0)
                    {
                        DirectorCard newDC = new DirectorCard
                        {
                            spawnCard               = chanceSC,
                            selectionWeight         = ssw.chance,
                            allowAmbushSpawn        = false,
                            preventOverhead         = false,
                            minimumStageCompletions = 0,
                            requiredUnlockable      = "",
                            forbiddenUnlockable     = "",
                            spawnDistance           = DirectorCore.MonsterSpawnDistance.Standard
                        };
                        DirectorAPI.DirectorCardHolder newCard = new DirectorAPI.DirectorCardHolder
                        {
                            Card                 = newDC,
                            MonsterCategory      = DirectorAPI.MonsterCategory.None,
                            InteractableCategory = DirectorAPI.InteractableCategory.Shrines
                        };
                        cardList.Add(newCard);
                    }
                    if (!handledBlood && ssw.blood > 0)
                    {
                        DirectorCard newDC = new DirectorCard
                        {
                            spawnCard               = bloodSC,
                            selectionWeight         = ssw.blood,
                            allowAmbushSpawn        = false,
                            preventOverhead         = false,
                            minimumStageCompletions = 0,
                            requiredUnlockable      = "",
                            forbiddenUnlockable     = "",
                            spawnDistance           = DirectorCore.MonsterSpawnDistance.Standard
                        };
                        DirectorAPI.DirectorCardHolder newCard = new DirectorAPI.DirectorCardHolder
                        {
                            Card                 = newDC,
                            MonsterCategory      = DirectorAPI.MonsterCategory.None,
                            InteractableCategory = DirectorAPI.InteractableCategory.Shrines
                        };
                        cardList.Add(newCard);
                    }
                    if (!handledCombat && ssw.combat > 0)
                    {
                        DirectorCard newDC = new DirectorCard
                        {
                            spawnCard               = combatSC,
                            selectionWeight         = ssw.combat,
                            allowAmbushSpawn        = false,
                            preventOverhead         = false,
                            minimumStageCompletions = 0,
                            requiredUnlockable      = "",
                            forbiddenUnlockable     = "",
                            spawnDistance           = DirectorCore.MonsterSpawnDistance.Standard
                        };
                        DirectorAPI.DirectorCardHolder newCard = new DirectorAPI.DirectorCardHolder
                        {
                            Card                 = newDC,
                            MonsterCategory      = DirectorAPI.MonsterCategory.None,
                            InteractableCategory = DirectorAPI.InteractableCategory.Shrines
                        };
                        cardList.Add(newCard);
                    }
                    if (!handledOrder && ssw.order > 0)
                    {
                        DirectorCard newDC = new DirectorCard
                        {
                            spawnCard               = orderSC,
                            selectionWeight         = ssw.order,
                            allowAmbushSpawn        = false,
                            preventOverhead         = false,
                            minimumStageCompletions = 0,
                            requiredUnlockable      = "",
                            forbiddenUnlockable     = "",
                            spawnDistance           = DirectorCore.MonsterSpawnDistance.Standard
                        };
                        DirectorAPI.DirectorCardHolder newCard = new DirectorAPI.DirectorCardHolder
                        {
                            Card                 = newDC,
                            MonsterCategory      = DirectorAPI.MonsterCategory.None,
                            InteractableCategory = DirectorAPI.InteractableCategory.Shrines
                        };
                        cardList.Add(newCard);
                    }
                    if (!handledMountain && ssw.mountain > 0)
                    {
                        DirectorCard newDC = new DirectorCard
                        {
                            spawnCard               = mountainSC,
                            selectionWeight         = ssw.mountain,
                            allowAmbushSpawn        = false,
                            preventOverhead         = false,
                            minimumStageCompletions = 0,
                            requiredUnlockable      = "",
                            forbiddenUnlockable     = "",
                            spawnDistance           = DirectorCore.MonsterSpawnDistance.Standard
                        };
                        DirectorAPI.DirectorCardHolder newCard = new DirectorAPI.DirectorCardHolder
                        {
                            Card                 = newDC,
                            MonsterCategory      = DirectorAPI.MonsterCategory.None,
                            InteractableCategory = DirectorAPI.InteractableCategory.Shrines
                        };
                        cardList.Add(newCard);
                    }
                    if (!handledWoods && ssw.woods > 0)
                    {
                        DirectorCard newDC = new DirectorCard
                        {
                            spawnCard               = woodsSC,
                            selectionWeight         = ssw.woods,
                            allowAmbushSpawn        = false,
                            preventOverhead         = false,
                            minimumStageCompletions = 0,
                            requiredUnlockable      = "",
                            forbiddenUnlockable     = "",
                            spawnDistance           = DirectorCore.MonsterSpawnDistance.Standard
                        };
                        DirectorAPI.DirectorCardHolder newCard = new DirectorAPI.DirectorCardHolder
                        {
                            Card                 = newDC,
                            MonsterCategory      = DirectorAPI.MonsterCategory.None,
                            InteractableCategory = DirectorAPI.InteractableCategory.Shrines
                        };
                        cardList.Add(newCard);
                    }
                    if (!handledCleanse && ssw.cleanse > 0)
                    {
                        DirectorCard newDC = new DirectorCard
                        {
                            spawnCard               = cleanseSC,
                            selectionWeight         = ssw.cleanse,
                            allowAmbushSpawn        = false,
                            preventOverhead         = false,
                            minimumStageCompletions = 0,
                            requiredUnlockable      = "",
                            forbiddenUnlockable     = "",
                            spawnDistance           = DirectorCore.MonsterSpawnDistance.Standard
                        };
                        DirectorAPI.DirectorCardHolder newCard = new DirectorAPI.DirectorCardHolder
                        {
                            Card                 = newDC,
                            MonsterCategory      = DirectorAPI.MonsterCategory.None,
                            InteractableCategory = DirectorAPI.InteractableCategory.Shrines
                        };
                        cardList.Add(newCard);
                    }
                }
            };
        }
Exemple #11
0
        public static void PerroGrande()
        {
            GameObject fatAcridPrefab = PrefabAPI.InstantiateClone(Resources.Load <GameObject>("Prefabs/CharacterBodies/CrocoBody"), "DireseekerBody");

            CharacterBody bodyComponent = fatAcridPrefab.GetComponent <CharacterBody>();

            LanguageAPI.Add("FATACRID_BODY_NAME", "Perro Grande");
            LanguageAPI.Add("FATACRID_BODY_SUBTITLE", "(Forma Gigante)");

            bodyComponent.name              = "FatAcridBody";
            bodyComponent.baseNameToken     = "FATACRID_BODY_NAME";
            bodyComponent.subtitleNameToken = "FATACRID_BODY_SUBTITLE";
            bodyComponent.baseMoveSpeed     = 3f;
            bodyComponent.baseMaxHealth     = 3800f;
            bodyComponent.levelMaxHealth    = 1140f;
            bodyComponent.baseDamage        = 4f;
            bodyComponent.levelDamage       = 0.8f;
            bodyComponent.isChampion        = true;

            //resize

            fatAcridPrefab.GetComponent <ModelLocator>().modelBaseTransform.gameObject.transform.localScale *= 6f;
            //fatAcridPrefab.GetComponent<ModelLocator>().modelBaseTransform.gameObject.transform.Translate(new Vector3(0f, 5.6f, 0f));

            foreach (KinematicCharacterMotor kinematicCharacterMotor in fatAcridPrefab.GetComponentsInChildren <KinematicCharacterMotor>())
            {
                kinematicCharacterMotor.SetCapsuleDimensions(kinematicCharacterMotor.Capsule.radius * 6f, kinematicCharacterMotor.Capsule.height * 6f, 6f);
            }

            //

            CharacterModel model = fatAcridPrefab.GetComponentInChildren <CharacterModel>();

            Material newMat = UnityEngine.Object.Instantiate <Material>(model.baseRendererInfos[0].defaultMaterial);

            newMat.SetTexture("_MainTex", Assets.mainAssetBundle.LoadAsset <Material>("matDireseeker").GetTexture("_MainTex"));
            newMat.SetTexture("_EmTex", Assets.mainAssetBundle.LoadAsset <Material>("matDireseeker").GetTexture("_EmissionMap"));
            newMat.SetFloat("_EmPower", 80f);

            model.baseRendererInfos[0].defaultMaterial = newMat;

            GameObject acridMasterPrefab = PrefabAPI.InstantiateClone(Resources.Load <GameObject>("Prefabs/CharacterMasters/LemurianBruiserMaster"), "FatAcridMaster");

            CharacterMaster master = acridMasterPrefab.GetComponent <CharacterMaster>();

            master.bodyPrefab = fatAcridPrefab;
            master.isBoss     = true;

            DiggerPlugin.bodyPrefabs.Add(fatAcridPrefab);
            DiggerPlugin.masterPrefabs.Add(acridMasterPrefab);

            CharacterSpawnCard characterSpawnCard = ScriptableObject.CreateInstance <CharacterSpawnCard>();

            characterSpawnCard.name               = "cscFatAcrid";
            characterSpawnCard.prefab             = acridMasterPrefab;
            characterSpawnCard.sendOverNetwork    = true;
            characterSpawnCard.hullSize           = HullClassification.BeetleQueen;
            characterSpawnCard.nodeGraphType      = MapNodeGroup.GraphType.Ground;
            characterSpawnCard.requiredFlags      = NodeFlags.None;
            characterSpawnCard.forbiddenFlags     = NodeFlags.TeleporterOK;
            characterSpawnCard.directorCreditCost = 2000;
            characterSpawnCard.occupyPosition     = false;
            characterSpawnCard.loadout            = new SerializableLoadout();
            characterSpawnCard.noElites           = true;
            characterSpawnCard.forbiddenAsBoss    = false;

            DirectorCard card = new DirectorCard
            {
                spawnCard               = characterSpawnCard,
                selectionWeight         = 1,
                allowAmbushSpawn        = false,
                preventOverhead         = false,
                minimumStageCompletions = 5,
                spawnDistance           = DirectorCore.MonsterSpawnDistance.Close
            };

            DirectorAPI.DirectorCardHolder fatAcridCard = new DirectorAPI.DirectorCardHolder
            {
                Card                 = card,
                MonsterCategory      = DirectorAPI.MonsterCategory.Champions,
                InteractableCategory = DirectorAPI.InteractableCategory.None
            };

            DirectorAPI.MonsterActions += delegate(List <DirectorAPI.DirectorCardHolder> list, DirectorAPI.StageInfo stage)
            {
                if (stage.stage == DirectorAPI.Stage.AbandonedAqueduct || stage.stage == DirectorAPI.Stage.DistantRoost || stage.stage == DirectorAPI.Stage.RallypointDelta || stage.stage == DirectorAPI.Stage.SkyMeadow || stage.stage == DirectorAPI.Stage.VoidCell || stage.stage == DirectorAPI.Stage.WetlandAspect)
                {
                    if (!list.Contains(fatAcridCard))
                    {
                        list.Add(fatAcridCard);
                    }
                }
            };
        }
Exemple #12
0
        public static void CreateDireseeker()
        {
            if (DiggerPlugin.direseekerInstalled)
            {
                AddUnlockComponent();
            }

            if (DiggerPlugin.fatAcrid.Value)
            {
                PerroGrande();
            }

            CreateProjectiles();

            LanguageAPI.Add("DIRESEEKER_BODY_NAME", "Direseeker");
            LanguageAPI.Add("DIRESEEKER_BODY_SUBTITLE", "Track and Kill");
            //LanguageAPI.Add("DIRESEEKER_BODY_LORE", "Direseeker\n\nDireseeker is a giant Elder Lemurian that acts as a boss in the Stage 4 area Magma Barracks. Upon defeating it, the player will unlock the Miner character for future playthroughs. The path leading to Direseeker's location only appears in one of the three variants of the level, and even then Direseeker may or may not spawn with random chance. Completing the teleporter event will also prevent it from spawning.\nNote that in online co-op the boss may spawn for the Host, but not others, although they can still damage it.\nActivating the Artifact of Kin does not prevent it from appearing.\n\nCategories: Enemies | Bosses | Unlisted Enemies\n\nLanguages: Español");
            LanguageAPI.Add("DIRESEEKER_BODY_LORE", "Legends tell of a monstrous beast that once roamed the underground barracks of Petrichor V.\n\nFeared by the bravest of survivors and the nastiest of monsters, the massive beast was unrivaled. It donned blood-red scales, tempered by hellfire. It had burning yellow eyes, with a glare so intense it made the largest of creatures stop dead in their tracks. It had smoldering breath, hot enough to melt metal in an instant.\n\nOnly once stopped by a survivor strong enough to slay Providence himself, it was believed that the beast had finally met its match.\n\n<style=cIsHealth>Until it showed its terrifying face once again.</style>");
            LanguageAPI.Add("DIRESEEKER_BODY_OUTRO_FLAVOR", "..and so it left, in search of new prey.");

            //skills and states
            LoadoutAPI.AddSkill(typeof(EntityStates.Direseeker.SpawnState));
            LoadoutAPI.AddSkill(typeof(EntityStates.Direseeker.ChargeUltraFireball));
            LoadoutAPI.AddSkill(typeof(EntityStates.Direseeker.FireUltraFireball));

            if (!DiggerPlugin.direseekerInstalled)
            {
                bodyPrefab = PrefabAPI.InstantiateClone(Resources.Load <GameObject>("Prefabs/CharacterBodies/LemurianBruiserBody"), "DireseekerBody");

                CharacterBody bodyComponent = bodyPrefab.GetComponent <CharacterBody>();

                bodyComponent.name              = "DireseekerBody";
                bodyComponent.baseNameToken     = "DIRESEEKER_BODY_NAME";
                bodyComponent.subtitleNameToken = "DIRESEEKER_BODY_SUBTITLE";
                bodyComponent.baseMoveSpeed     = 11f;
                bodyComponent.baseMaxHealth     = 2800f;
                bodyComponent.levelMaxHealth    = 840f;
                bodyComponent.baseDamage        = 20f;
                bodyComponent.levelDamage       = 4f;
                bodyComponent.isChampion        = true;
                bodyComponent.portraitIcon      = Assets.mainAssetBundle.LoadAsset <Sprite>("texDireseekerIcon").texture;

                SkillSetup(bodyPrefab);

                var stateMachine = bodyComponent.GetComponentInChildren <EntityStateMachine>();
                if (stateMachine)
                {
                    stateMachine.initialStateType = new SerializableEntityStateType(typeof(EntityStates.Direseeker.SpawnState));
                }

                //resize

                bodyPrefab.GetComponent <ModelLocator>().modelBaseTransform.gameObject.transform.localScale *= 1.5f;
                //bodyPrefab.GetComponent<ModelLocator>().modelBaseTransform.gameObject.transform.Translate(new Vector3(0f, 5.6f, 0f));

                foreach (KinematicCharacterMotor kinematicCharacterMotor in bodyPrefab.GetComponentsInChildren <KinematicCharacterMotor>())
                {
                    kinematicCharacterMotor.SetCapsuleDimensions(kinematicCharacterMotor.Capsule.radius * 1.5f, kinematicCharacterMotor.Capsule.height * 1.5f, 1.5f);
                }

                //

                CharacterModel model = bodyPrefab.GetComponentInChildren <CharacterModel>();

                Material newMat = UnityEngine.Object.Instantiate <Material>(model.baseRendererInfos[0].defaultMaterial);
                newMat.SetTexture("_MainTex", Assets.mainAssetBundle.LoadAsset <Material>("matDireseeker").GetTexture("_MainTex"));
                newMat.SetTexture("_EmTex", Assets.mainAssetBundle.LoadAsset <Material>("matDireseeker").GetTexture("_EmissionMap"));
                newMat.SetFloat("_EmPower", 50f);

                model.baseRendererInfos[0].defaultMaterial = newMat;

                GameObject horn1 = Assets.mainAssetBundle.LoadAsset <GameObject>("DireHorn").InstantiateClone("DireseekerHorn", false);
                GameObject horn2 = Assets.mainAssetBundle.LoadAsset <GameObject>("DireHornBroken").InstantiateClone("DireseekerHornBroken", false);
                //GameObject rageFlame = Assets.mainAssetBundle.LoadAsset<GameObject>("DireseekerRageFlame").InstantiateClone("DireseekerRageFlame", false);
                GameObject burstFlame = Assets.mainAssetBundle.LoadAsset <GameObject>("DireseekerBurstFlame").InstantiateClone("DireseekerBurstFlame", false);

                ChildLocator childLocator = bodyPrefab.GetComponentInChildren <ChildLocator>();

                horn1.transform.SetParent(childLocator.FindChild("Head"));
                horn1.transform.localPosition = new Vector3(-2.5f, 1, -0.5f);
                horn1.transform.localRotation = Quaternion.Euler(new Vector3(45, 0, 90));
                horn1.transform.localScale    = new Vector3(100, 100, 100);

                horn2.transform.SetParent(childLocator.FindChild("Head"));
                horn2.transform.localPosition = new Vector3(2.5f, 1, -0.5f);
                horn2.transform.localRotation = Quaternion.Euler(new Vector3(45, 0, 90));
                horn2.transform.localScale    = new Vector3(100, -100, 100);

                /*rageFlame.transform.SetParent(childLocator.FindChild("Head"));
                 * rageFlame.transform.localPosition = new Vector3(0, 1, 0);
                 * rageFlame.transform.localRotation = Quaternion.Euler(new Vector3(270, 180, 0));
                 * rageFlame.transform.localScale = new Vector3(5, 5, 5);*/

                burstFlame.transform.SetParent(childLocator.FindChild("Head"));
                burstFlame.transform.localPosition = new Vector3(0, 1, 0);
                burstFlame.transform.localRotation = Quaternion.Euler(new Vector3(270, 180, 0));
                burstFlame.transform.localScale    = new Vector3(5, 5, 5);

                bodyPrefab.AddComponent <DireseekerController>().burstFlame = burstFlame.GetComponent <ParticleSystem>();

                Shader hotpoo = Resources.Load <Shader>("Shaders/Deferred/hgstandard");

                Material hornMat = horn1.GetComponentInChildren <MeshRenderer>().material;
                hornMat.shader = hotpoo;

                //add horns

                CharacterModel.RendererInfo[] infos    = model.baseRendererInfos;
                CharacterModel.RendererInfo[] newInfos = new CharacterModel.RendererInfo[]
                {
                    infos[0],
                    new CharacterModel.RendererInfo
                    {
                        renderer                 = horn1.GetComponentInChildren <MeshRenderer>(),
                        defaultMaterial          = hornMat,
                        defaultShadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.On,
                        ignoreOverlays           = true
                    },
                    new CharacterModel.RendererInfo
                    {
                        renderer                 = horn2.GetComponentInChildren <MeshRenderer>(),
                        defaultMaterial          = hornMat,
                        defaultShadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.On,
                        ignoreOverlays           = true
                    }
                };

                model.baseRendererInfos = newInfos;

                masterPrefab = PrefabAPI.InstantiateClone(Resources.Load <GameObject>("Prefabs/CharacterMasters/LemurianBruiserMaster"), "DireseekerMaster");

                CharacterMaster master = masterPrefab.GetComponent <CharacterMaster>();

                master.bodyPrefab = bodyPrefab;
                master.isBoss     = false;

                DiggerPlugin.bodyPrefabs.Add(bodyPrefab);
                DiggerPlugin.masterPrefabs.Add(masterPrefab);

                if (DiggerPlugin.enableDireseeker.Value && !DiggerPlugin.direseekerInstalled)
                {
                    CharacterSpawnCard characterSpawnCard = ScriptableObject.CreateInstance <CharacterSpawnCard>();
                    characterSpawnCard.name               = "cscDireseeker";
                    characterSpawnCard.prefab             = masterPrefab;
                    characterSpawnCard.sendOverNetwork    = true;
                    characterSpawnCard.hullSize           = HullClassification.BeetleQueen;
                    characterSpawnCard.nodeGraphType      = MapNodeGroup.GraphType.Ground;
                    characterSpawnCard.requiredFlags      = NodeFlags.None;
                    characterSpawnCard.forbiddenFlags     = NodeFlags.TeleporterOK;
                    characterSpawnCard.directorCreditCost = 800;
                    characterSpawnCard.occupyPosition     = false;
                    characterSpawnCard.loadout            = new SerializableLoadout();
                    characterSpawnCard.noElites           = true;
                    characterSpawnCard.forbiddenAsBoss    = false;

                    DirectorCard card = new DirectorCard
                    {
                        spawnCard               = characterSpawnCard,
                        selectionWeight         = 1,
                        allowAmbushSpawn        = false,
                        preventOverhead         = false,
                        minimumStageCompletions = 2,
                        spawnDistance           = DirectorCore.MonsterSpawnDistance.Close
                    };

                    DirectorAPI.DirectorCardHolder direseekerCard = new DirectorAPI.DirectorCardHolder
                    {
                        Card                 = card,
                        MonsterCategory      = DirectorAPI.MonsterCategory.Champions,
                        InteractableCategory = DirectorAPI.InteractableCategory.None
                    };

                    DirectorAPI.MonsterActions += delegate(List <DirectorAPI.DirectorCardHolder> list, DirectorAPI.StageInfo stage)
                    {
                        if (stage.stage == DirectorAPI.Stage.AbyssalDepths)
                        {
                            if (!list.Contains(direseekerCard))
                            {
                                list.Add(direseekerCard);
                            }
                        }
                    };
                }
            }

            if (DiggerPlugin.enableDireseekerSurvivor.Value)
            {
                survivorPrefab = PrefabAPI.InstantiateClone(Resources.Load <GameObject>("Prefabs/CharacterBodies/LemurianBruiserBody"), "DireseekerPlayerBody");

                CharacterBody bodyComponent2 = survivorPrefab.GetComponent <CharacterBody>();

                bodyComponent2.name              = "DireseekerPlayerBody";
                bodyComponent2.baseNameToken     = "DIRESEEKER_BODY_NAME";
                bodyComponent2.subtitleNameToken = "DIRESEEKER_BODY_SUBTITLE";
                bodyComponent2.baseMoveSpeed     = 11f;
                bodyComponent2.baseMaxHealth     = 2200f;
                bodyComponent2.levelMaxHealth    = 800f;
                bodyComponent2.baseRegen         = 0.5f;
                bodyComponent2.levelRegen        = 0.2f;
                bodyComponent2.baseDamage        = 20f;
                bodyComponent2.levelDamage       = 4f;
                bodyComponent2.isChampion        = false;
                bodyComponent2.portraitIcon      = Assets.mainAssetBundle.LoadAsset <Sprite>("texDireseekerPlayerIcon").texture;
                bodyComponent2.hideCrosshair     = true;

                SkillSetup(survivorPrefab);

                var stateMachine = survivorPrefab.GetComponentInChildren <EntityStateMachine>();
                if (stateMachine)
                {
                    stateMachine.initialStateType = new SerializableEntityStateType(typeof(EntityStates.Direseeker.SpawnState));
                }

                //resize

                survivorPrefab.GetComponent <ModelLocator>().modelBaseTransform.gameObject.transform.localScale *= 0.75f;
                survivorPrefab.transform.GetChild(0).localPosition = new Vector3(0, -2.75f, 0);
                survivorPrefab.transform.GetChild(2).localPosition = new Vector3(0, 0.8f, 1.5f);

                foreach (KinematicCharacterMotor kinematicCharacterMotor in survivorPrefab.GetComponentsInChildren <KinematicCharacterMotor>())
                {
                    kinematicCharacterMotor.SetCapsuleDimensions(kinematicCharacterMotor.Capsule.radius * 0.75f, kinematicCharacterMotor.Capsule.height * 0.75f, 0.75f);
                }

                //

                CharacterModel model2 = survivorPrefab.GetComponentInChildren <CharacterModel>();

                Material newMat = UnityEngine.Object.Instantiate <Material>(model2.baseRendererInfos[0].defaultMaterial);
                newMat.SetTexture("_MainTex", Assets.mainAssetBundle.LoadAsset <Material>("matDireseeker").GetTexture("_MainTex"));
                newMat.SetTexture("_EmTex", Assets.mainAssetBundle.LoadAsset <Material>("matDireseeker").GetTexture("_EmissionMap"));
                newMat.SetFloat("_EmPower", 50f);

                model2.baseRendererInfos[0].defaultMaterial = newMat;

                GameObject horn1b = Assets.mainAssetBundle.LoadAsset <GameObject>("DireHorn").InstantiateClone("DireseekerHorn", false);
                GameObject horn2b = Assets.mainAssetBundle.LoadAsset <GameObject>("DireHornBroken").InstantiateClone("DireseekerHornBroken", false);
                //GameObject rageFlame = Assets.mainAssetBundle.LoadAsset<GameObject>("DireseekerRageFlame").InstantiateClone("DireseekerRageFlame", false);
                GameObject burstFlame2 = Assets.mainAssetBundle.LoadAsset <GameObject>("DireseekerBurstFlame").InstantiateClone("DireseekerBurstFlame", false);

                ChildLocator childLocator2 = survivorPrefab.GetComponentInChildren <ChildLocator>();

                horn1b.transform.SetParent(childLocator2.FindChild("Head"));
                horn1b.transform.localPosition = new Vector3(-2.5f, 1, -0.5f);
                horn1b.transform.localRotation = Quaternion.Euler(new Vector3(45, 0, 90));
                horn1b.transform.localScale    = new Vector3(100, 100, 100);

                horn2b.transform.SetParent(childLocator2.FindChild("Head"));
                horn2b.transform.localPosition = new Vector3(2.5f, 1, -0.5f);
                horn2b.transform.localRotation = Quaternion.Euler(new Vector3(45, 0, 90));
                horn2b.transform.localScale    = new Vector3(100, -100, 100);

                /*rageFlame.transform.SetParent(childLocator.FindChild("Head"));
                 * rageFlame.transform.localPosition = new Vector3(0, 1, 0);
                 * rageFlame.transform.localRotation = Quaternion.Euler(new Vector3(270, 180, 0));
                 * rageFlame.transform.localScale = new Vector3(5, 5, 5);*/

                burstFlame2.transform.SetParent(childLocator2.FindChild("Head"));
                burstFlame2.transform.localPosition = new Vector3(0, 1, 0);
                burstFlame2.transform.localRotation = Quaternion.Euler(new Vector3(270, 180, 0));
                burstFlame2.transform.localScale    = new Vector3(5, 5, 5);

                survivorPrefab.AddComponent <DireseekerController>().burstFlame = burstFlame2.GetComponent <ParticleSystem>();

                Shader hotpoo = Resources.Load <Shader>("Shaders/Deferred/hgstandard");

                Material hornMat = horn1b.GetComponentInChildren <MeshRenderer>().material;
                hornMat.shader = hotpoo;

                //add horns

                CharacterModel.RendererInfo[] infos2    = model2.baseRendererInfos;
                CharacterModel.RendererInfo[] newInfos2 = new CharacterModel.RendererInfo[]
                {
                    infos2[0],
                    new CharacterModel.RendererInfo
                    {
                        renderer                 = horn1b.GetComponentInChildren <MeshRenderer>(),
                        defaultMaterial          = hornMat,
                        defaultShadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.On,
                        ignoreOverlays           = true
                    },
                    new CharacterModel.RendererInfo
                    {
                        renderer                 = horn2b.GetComponentInChildren <MeshRenderer>(),
                        defaultMaterial          = hornMat,
                        defaultShadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.On,
                        ignoreOverlays           = true
                    }
                };

                model2.baseRendererInfos = newInfos2;

                survivorPrefab.GetComponent <DeathRewards>().logUnlockableDef     = null;
                survivorPrefab.GetComponent <Interactor>().maxInteractionDistance = 5f;

                survivorPrefab.tag = "Player";

                SkinSetup();

                DiggerPlugin.bodyPrefabs.Add(survivorPrefab);

                GameObject displayPrefab = PrefabAPI.InstantiateClone(survivorPrefab.GetComponent <ModelLocator>().modelTransform.gameObject, "DireseekerDisplay", true);
                displayPrefab.AddComponent <NetworkIdentity>();
                displayPrefab.transform.localScale *= 0.5f;

                SurvivorDef survivorDef = new SurvivorDef
                {
                    displayNameToken = "DIRESEEKER_BODY_NAME",
                    descriptionToken = "MINER_DESCRIPTION",
                    primaryColor     = Color.red,
                    bodyPrefab       = survivorPrefab,
                    displayPrefab    = displayPrefab,
                    outroFlavorToken = "DIRESEEKER_BODY_OUTRO_FLAVOR"
                };

                SurvivorAPI.AddSurvivor(survivorDef);
            }
        }
Exemple #13
0
        private void Awake()
        {
            var archWispSpawnCard = Resources.Load <CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscArchWisp");

            archWispSpawnCard.directorCreditCost = 300;

            var archWispDirCard = new DirectorCard();

            archWispDirCard.allowAmbushSpawn        = true;
            archWispDirCard.forbiddenUnlockable     = "";
            archWispDirCard.minimumStageCompletions = 4;
            archWispDirCard.preventOverhead         = false;
            archWispDirCard.requiredUnlockable      = "";
            archWispDirCard.selectionWeight         = 1;
            archWispDirCard.spawnCard     = archWispSpawnCard;
            archWispDirCard.spawnDistance = DirectorCore.MonsterSpawnDistance.Standard;

            archWispCard = new DirectorAPI.DirectorCardHolder();
            archWispCard.SetCard(archWispDirCard);
            archWispCard.SetInteractableCategory(DirectorAPI.InteractableCategory.None);
            archWispCard.SetMonsterCategory(DirectorAPI.MonsterCategory.Minibosses);

            var diff  = new RoR2.DifficultyDef(3f, "REIN_DIFFICULTY_DEUTERIUM_NAME", "Textures/ItemIcons/texMaskIcon", "REIN_DIFFICULTY_DEUTERIUM_DESC", new Color(0f, 0f, 0f, 1f));
            var diff2 = new RoR2.DifficultyDef(4f, "REIN_DIFFICULTY_TRITIUM_NAME", "Textures/ItemIcons/texMaskIcon", "REIN_DIFFICULTY_TRITIUM_DESC", new Color(0f, 0f, 0f, 1f));

            diffInd1 = DifficultyAPI.AddDifficulty(diff);
            diffInd2 = DifficultyAPI.AddDifficulty(diff2);


            /*
             * //Disabled cards
             * cardAdjustments["BeetleMaster"] = new SpawnParams( 0.0f, 1.0f, true );
             * cardAdjustments["JellyfishMaster"] = new SpawnParams( 0.0f, 1.0f, true );
             *
             * //Reduced cards
             * cardAdjustments["BeetleQueenMaster"] = new SpawnParams( 0.25f, 1.0f, true );
             *
             * //Neutral cards
             * cardAdjustments["TitanMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["VagrantMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["GolemMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["LemurianMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["ClayBossMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["BeetleGuardMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["HermitCrabMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["BellMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["GravekeeperMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["ImpBossMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["ImpMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["MagmaWormMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["RoboBallbossMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["VultureMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["BisonMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             *
             * //Buffed cards
             * cardAdjustments["WispMaster"] = new SpawnParams( 3.0f, 1.0f, true );
             * cardAdjustments["ClayBruiserMaster"] = new SpawnParams( 2.0f, 1.0f, true );
             * cardAdjustments["GreaterWispMaster"] = new SpawnParams( 2.0f, 0.5f, true );
             * cardAdjustments["ElectricWormMaster"] = new SpawnParams( 2.0f, 0.5f, true );
             * cardAdjustments["LemurianBruiserMaster"] = new SpawnParams( 2.0f, 1.0f, true );
             */
        }
Exemple #14
0
 public static void SetCard(this DirectorAPI.DirectorCardHolder holder, DirectorCard card)
 {
     directorAPI_card?.SetValue(holder, card);
 }
Exemple #15
0
 public static DirectorCard GetCard(this DirectorAPI.DirectorCardHolder holder)
 {
     return(directorAPI_card?.GetValue(holder));
 }
Exemple #16
0
        public void Awake()
        {
            On.EntityStates.ClaymanMonster.SwipeForward.OnEnter += (orig, self) =>
            {
                EntityStates.ClaymanMonster.SwipeForward.attackString       = "Play_merc_sword_swing";
                EntityStates.ClaymanMonster.SwipeForward.selfForceMagnitude = 1800f;
                EntityStates.ClaymanMonster.SwipeForward.baseDuration       = 1f;
                EntityStates.ClaymanMonster.SwipeForward.damageCoefficient  = 1.4f;
                orig(self);
            };

            On.EntityStates.ClaymanMonster.Leap.OnEnter += (orig, self) =>
            {
                EntityStates.ClaymanMonster.Leap.verticalJumpSpeed = 20f;
                EntityStates.ClaymanMonster.Leap.horizontalJumpSpeedCoefficient = 2.3f;
                orig(self);
            };

            On.EntityStates.ClaymanMonster.SpawnState.OnEnter += (orig, self) =>
            {
                EntityStates.ClaymanMonster.SpawnState.duration = 3.2f;
                orig(self);
            };

            clayObject = PrefabAPI.InstantiateClone(Resources.Load <GameObject>("prefabs/characterbodies/ClayBody"), "MoffeinClayManBody", true);
            clayMaster = PrefabAPI.InstantiateClone(Resources.Load <GameObject>("prefabs/charactermasters/ClaymanMaster"), "MoffeinClayManMaster", true);

            CharacterSpawnCard beetleCSC = Resources.Load <CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscBeetle");

            //CharacterSpawnCard clayBossCSC = Resources.Load<CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscClayBoss");

            ModifyClayMan();
            ItemDisplays.DisplayRules(clayObject);

            CharacterSpawnCard clayManCSC = ScriptableObject.CreateInstance <CharacterSpawnCard>();

            clayManCSC.name               = "cscClayMan";
            clayManCSC.prefab             = clayMaster;
            clayManCSC.sendOverNetwork    = true;
            clayManCSC.hullSize           = HullClassification.Human;
            clayManCSC.nodeGraphType      = MapNodeGroup.GraphType.Ground;
            clayManCSC.requiredFlags      = NodeFlags.None;
            clayManCSC.forbiddenFlags     = NodeFlags.NoCharacterSpawn;
            clayManCSC.directorCreditCost = 16;
            clayManCSC.occupyPosition     = false;
            clayManCSC.loadout            = new SerializableLoadout();
            clayManCSC.noElites           = false;
            clayManCSC.forbiddenAsBoss    = false;

            DirectorCard clayManDC = new DirectorCard
            {
                spawnCard               = clayManCSC,
                selectionWeight         = 1,
                allowAmbushSpawn        = true,
                preventOverhead         = false,
                minimumStageCompletions = 0,
                spawnDistance           = DirectorCore.MonsterSpawnDistance.Close
            };

            DirectorAPI.DirectorCardHolder clayManCard = new DirectorAPI.DirectorCardHolder
            {
                Card                 = clayManDC,
                MonsterCategory      = DirectorAPI.MonsterCategory.BasicMonsters,
                InteractableCategory = DirectorAPI.InteractableCategory.None
            };

            //This causes errors

            /*DirectorAPI.FamilyActions += delegate (List<DirectorAPI.MonsterFamilyHolder> list, DirectorAPI.StageInfo stage)
             * {
             *  foreach (DirectorAPI.MonsterFamilyHolder holder in list)
             *  {
             *      foreach (DirectorCard dC in holder.FamilyChampions)
             *      {
             *          if (dC.spawnCard == clayBossCSC)
             *          {
             *              if (!holder.FamilyBasicMonsters.Contains(clayManDC))
             *              {
             *                  holder.FamilyBasicMonsters.Add(clayManDC);
             *              }
             *          }
             *      }
             *  }
             * };*/

            DirectorAPI.MonsterActions += delegate(List <DirectorAPI.DirectorCardHolder> list, DirectorAPI.StageInfo stage)
            {
                bool addClayMan = false;
                switch (stage.stage)
                {
                case DirectorAPI.Stage.ArtifactReliquary:
                case DirectorAPI.Stage.VoidCell:
                case DirectorAPI.Stage.AbandonedAqueduct:
                case DirectorAPI.Stage.RallypointDelta:
                    foreach (DirectorAPI.DirectorCardHolder dc in list)
                    {
                        if (dc.Card.spawnCard == beetleCSC)
                        {
                            dc.Card.selectionWeight = 1;
                        }
                    }
                    addClayMan = true;
                    break;

                case DirectorAPI.Stage.ScorchedAcres:
                    addClayMan = true;
                    foreach (DirectorAPI.DirectorCardHolder dc in list)
                    {
                        if (dc.Card.spawnCard == beetleCSC)
                        {
                            dc.Card.selectionWeight = 0;
                        }
                    }
                    break;

                case DirectorAPI.Stage.Custom:
                    if (stage.CustomStageName == "rootjungle")
                    {
                        addClayMan = true;
                    }
                    break;

                default:
                    break;
                }
                if (addClayMan)
                {
                    if (!list.Contains(clayManCard))
                    {
                        list.Add(clayManCard);
                    }
                }
            };
            On.EntityStates.ClaymanMonster.SpawnState.OnEnter += (orig, self) =>
            {
                orig(self);
                Util.PlayAttackSpeedSound("Play_clayBruiser_attack2_shoot", self.outer.gameObject, 1f);
            };
            ContentManager.collectContentPackProviders += ContentManager_collectContentPackProviders;
        }