Exemple #1
0
        static private void FixFactsWithBindClass()
        {
            List <BlueprintUnitFact> facts = new List <BlueprintUnitFact>();

            Main.logger.Log("RUA 0");
            foreach (string id in config.FactWithBindClass)
            {
                facts.Add(library.Get <BlueprintUnitFact>(id));
            }
            Main.logger.Log("RUA 1");
            facts.AddRange(draconicBreathFeatures);
            facts.AddRange(elementalBlastFeatures);
            Main.logger.Log("RUA 2");
            foreach (var fact in facts)
            {
                Main.logger.Log($"Fixing Fact {fact.name}, ID {fact.AssetGuid}");
                BindAbilitiesToClass comp = fact.GetComponent <BindAbilitiesToClass>();
                if (comp == null)
                {
                    Main.logger.Log("Bind Abl to class comp is NULL !");
                }
                if (comp.AdditionalClasses == null)
                {
                    Main.logger.Log("Comp.additionalClasses is NULL !");
                }
                if (comp.Archetypes == null)
                {
                    Main.logger.Log("Comp.Archetypes is NULL !");
                }
                HelpersNeu.Add <BlueprintCharacterClass>(ref comp.AdditionalClasses, ArcanistClass.arcanist);
                HelpersNeu.Add <BlueprintArchetype>(ref comp.Archetypes, archetype);
            }
        }
Exemple #2
0
        static private void FixSpecialComps()
        {
            //arcane 9, new arcane selection, wants a variant for blood arcanist
            BlueprintFeatureSelection arcane9_select = library.Get <BlueprintFeatureSelection>("20a2435574bdd7f4e947f405df2b25ce");
            BlueprintFeature          arcane9_scion  = library.Get <BlueprintFeature>("c66e61dea38f3d8479a54eabec20ac99");
            BlueprintFeature          arcane9_ba     = library.CopyAndAdd <BlueprintFeature>(
                arcane9_scion,
                "BloodlineArcaneNewArcanaFeatureArcanist",
                "b0a5863f046005d408d53f05894a6c3a"//MD5-32[ArcanistClass.Archetype.BloodArcanist.Arcane9.Feat]
                );

            arcane9_ba.RemoveComponent(arcane9_ba.GetComponent <LearnSpellParametrized>());
            arcane9_ba.RemoveComponent(arcane9_ba.GetComponent <PrerequisiteArchetypeLevel>());
            arcane9_ba.AddComponent(Helpers.Create <LearnSpellParametrized>(a => {
                a.SpellcasterClass = ArcanistClass.arcanist;
                a.SpellList        = library.Get <BlueprintSpellList>("ba0401fdeb4062f40a7aa95b6f07fe89");//wizard spelllist
            }));
            arcane9_ba.AddComponent(Helpers.Create <PrerequisiteArchetypeLevel>(a => {
                a.Archetype      = archetype;
                a.CharacterClass = ArcanistClass.arcanist;
                a.Level          = 1;
            }));
            HelpersNeu.Add(ref arcane9_select.AllFeatures, arcane9_ba);
            HelpersNeu.Add(ref arcane9_select.Features, arcane9_ba);
        }
Exemple #3
0
 static private void FixProgressions()
 {
     foreach (string id in config.BloodlineProgressions)
     {
         BlueprintProgression prog = library.Get <BlueprintProgression>(id);
         HelpersNeu.Add <BlueprintCharacterClass>(ref prog.Classes, ArcanistClass.arcanist);
         HelpersNeu.Add <BlueprintArchetype>(ref prog.Archetypes, archetype);
     }
 }
Exemple #4
0
        static public void Load()
        {
            BlueprintUnit irovetti = library.Get <BlueprintUnit>("8b2cbf4590ed9e84591cd9a1f55bbdb8");

            flagIsRisiaSpawned = Helpers.Create <BlueprintUnlockableFlag>();
            library.AddAsset(flagIsRisiaSpawned, "942339abe7b76dfb00324d433a0a9342");
            flagIsRisiaSpawned.Lock();
            flagIsRisiaSpawned.name = "flagIsRisiaSpawned";
            logger.Log("rua rua rua rua 1");
            spawner = HelpersNeu.CreateSpawner(irovetti, "c47dab2a47b4826ed16201142956d607",
                                               new UnityEngine.Vector3(11.77268f, 1.241176f, 1.633618f), UnityEngine.Quaternion.identity,
                                               false, false, new List <BlueprintSummonPool>());
            logger.Log("rua rua rua rua 2");

            /*EntityReference spawnerIrovettiRef = new EntityReference {
            *   UniqueId = "7d4ab0ca-92d9-4960-9225-c341558a47c8" //irovetti
            *  };
            *  UnitSpawner spawnerIrovetti = spawnerIrovettiRef.FindView() as UnitSpawner;
            *  spawner = UnityEngine.Object.Instantiate<UnitSpawner>(spawnerIrovetti);
            *  spawner.transform.SetPositionAndRotation(new UnityEngine.Vector3(11.77268f, 1.241176f, 1.633618f), UnityEngine.Quaternion.identity);
            *  spawner.UniqueId = "c47dab2a-47b4-826e-d162-01142956d607";*/
            EntityReference spawnerRef = new EntityReference {
                UniqueId = spawner.UniqueId
            };

            logger.Log("rua rua rua rua 3");
            BlueprintArea ElkTemple = library.Get <BlueprintArea>("340a310b850e1ed469a60388012734f9");

            logger.Log("rua rua rua rua 4");
            AreaDidLoadTrigger compNeu = Helpers.Create <AreaDidLoadTrigger>();

            compNeu.Conditions = new ConditionsChecker {
                Conditions = new Condition[] {
                    /*Helpers.Create<FlagUnlocked>(a => {
                     *  a.ConditionFlag = flagIsRisiaSpawned;
                     *  a.Not = true;
                     * })*/
                }
            };
            compNeu.Actions = new ActionList {
                Actions = new GameAction[] {
                    Helpers.Create <Spawn>(a => {
                        a.Spawners       = new EntityReference[] { spawnerRef };
                        a.ActionsOnSpawn = new ActionList();
                    }),
                    Helpers.Create <UnlockFlag>(a => a.flag = flagIsRisiaSpawned)
                }
            };
            logger.Log("rua rua rua rua 5");
            ElkTemple.AddComponent(compNeu);
            logger.Log("rua rua rua rua 6");
        }
Exemple #5
0
        static private void FixFactsWithReplaceCL()
        {
            List <BlueprintUnitFact> facts = new List <BlueprintUnitFact>();

            foreach (string id in config.FactWithReplaceCL)
            {
                facts.Add(library.Get <BlueprintUnitFact>(id));
            }
            facts.AddRange(draconicBreathFeatures);
            facts.AddRange(elementalBlastFeatures);
            foreach (var fact in facts)
            {
                ReplaceCasterLevelOfAbility comp = fact.GetComponent <ReplaceCasterLevelOfAbility>();
                HelpersNeu.Add <BlueprintCharacterClass>(ref comp.AdditionalClasses, ArcanistClass.arcanist);
                HelpersNeu.Add <BlueprintArchetype>(ref comp.Archetypes, archetype);
            }
        }
Exemple #6
0
        static private void FixFactsWithAddFeatureOnLevel()
        {
            List <BlueprintUnitFact> facts = new List <BlueprintUnitFact>();

            foreach (string id in config.FactWithAddFeatureOnLevel)
            {
                facts.Add(library.Get <BlueprintUnitFact>(id));
            }
            facts.AddRange(draconicAddFeatureOnLevels);
            foreach (BlueprintUnitFact fact in facts)
            {
                var comps = fact.GetComponents <AddFeatureOnClassLevel>();
                if (comps == null)
                {
                    throw new Exception($"Error on BloodArcanist.FixFactsWithAddFeatureOnLevel: Fact {fact.name} has null AddFeatureOnLevel comp!");
                }
                foreach (AddFeatureOnClassLevel comp in comps)
                {
                    HelpersNeu.Add <BlueprintCharacterClass>(ref comp.AdditionalClasses, ArcanistClass.arcanist);
                    HelpersNeu.Add <BlueprintArchetype>(ref comp.Archetypes, archetype);
                }
            }
        }
 static public void AddToRisia(ref BlueprintUnit risia)
 {
     CreateDispelAura();
     HelpersNeu.Add <BlueprintUnitFact>(ref risia.AddFacts, dispelHoly);
     HelpersNeu.Add <BlueprintUnitFact>(ref risia.AddFacts, dispelUnholy);
 }