예제 #1
0
            private static void DoXpGive(MinionStartingStats __instance, GameObject go)
            {
                __instance.Apply(go);
                var resume = go.GetComponent <MinionResume>();
                var config = AdvancedStartOptions.GetConfig();

                resume.AddExperience(XPForSkillPoints(config.startSkillPoints));
            }
예제 #2
0
            public static void Postfix(MinionStartingStats __instance, bool is_starter_minion)
            {
                var config = AdvancedStartOptions.GetConfig();

                if (is_starter_minion)
                {
                    // Set all stats to 10.
                    foreach (var attribute in DUPLICANTSTATS.ALL_ATTRIBUTES)
                    {
                        __instance.StartingLevels[attribute] += config.startAttributeBoost;
                    }
                }
            }
예제 #3
0
            public static void Postfix(int headquartersCell)
            {
                var config  = AdvancedStartOptions.GetConfig();
                var techMap = new Dictionary <string, Tech>();

                foreach (var tech in Db.Get().Techs.resources)
                {
                    techMap[tech.Id] = tech;
                }
                foreach (var tech in config.startTechs)
                {
                    Research.Instance.GetOrAdd(techMap[tech]).Purchased();
                }

                var target = Grid.CellToPosCBC(headquartersCell, Grid.SceneLayer.Move);

                foreach (var entry in config.startItems)
                {
                    new CarePackageInfo(entry.Key, entry.Value, null).Deliver(target);
                }
            }