コード例 #1
0
 internal static void CombatDirector_SetNextSpawnAsBoss(On.RoR2.CombatDirector.orig_SetNextSpawnAsBoss orig, CombatDirector self)
 {
     orig(self);
     var selected = CurrentRun.nextBoss;
     selected.spawnCard.directorCreditCost = (int)((self.monsterCredit / CurrentRun.nextBossCount) / Spawners.GetTierDef(CurrentRun.nextBossElite).costMultiplier);
     self.OverrideCurrentMonsterCard(selected);
     self.SetFieldValue<CombatDirector.EliteTierDef>("currentActiveEliteTier", Spawners.GetTierDef(CurrentRun.nextBossElite));
     self.SetFieldValue<EliteIndex>("currentActiveEliteIndex", CurrentRun.nextBossElite);
     Log.Message($"{selected.spawnCard.name} cost has been set to {selected.cost} for {CurrentRun.nextBossCount} {CurrentRun.nextBossElite} bosses with available credit: {self.monsterCredit}",Log.LogLevel.Info);
     CurrentRun.nextBossCount = 1;
     CurrentRun.nextBossElite = EliteIndex.None;
     On.RoR2.CombatDirector.SetNextSpawnAsBoss -= CombatDirector_SetNextSpawnAsBoss;
 }
コード例 #2
0
        internal static void CombatDirector_SetNextSpawnAsBoss(On.RoR2.CombatDirector.orig_SetNextSpawnAsBoss orig, CombatDirector self)
        {
            orig(self);
            self.monsterCredit *= 100;
            var selected = DebugToolkit.nextBoss;

            //todo: fix this line.
            // selected.cost = (int)((self.monsterCredit / DebugToolkit.nextBossCount) / DebugToolkit.GetTierDef(DebugToolkit.nextBossElite).costMultiplier);
            self.OverrideCurrentMonsterCard(selected);
            self.SetFieldValue <CombatDirector.EliteTierDef>("currentActiveEliteTier", DebugToolkit.GetTierDef(DebugToolkit.nextBossElite));
            self.SetFieldValue <EliteIndex>("currentActiveEliteIndex", DebugToolkit.nextBossElite);
            Log.Message($"{selected.spawnCard.name} cost has been set to {selected.cost} for {DebugToolkit.nextBossCount} {DebugToolkit.nextBossElite.ToString()} bosses with available credit: {self.monsterCredit}", Log.LogLevel.Info);
            DebugToolkit.nextBossCount = 1;
            DebugToolkit.nextBossElite = EliteIndex.None;
            On.RoR2.CombatDirector.SetNextSpawnAsBoss -= CombatDirector_SetNextSpawnAsBoss;
        }
コード例 #3
0
ファイル: Hooks.cs プロジェクト: mistername/RoR2Cheats
        private static void CombatDirector_SetNextSpawnAsBoss(On.RoR2.CombatDirector.orig_SetNextSpawnAsBoss orig, CombatDirector self)
        {
            orig(self);

            if (RoR2Cheats.nextBossSet)
            {
                self.monsterCredit *= 100;
                var selected = RoR2Cheats.nextBoss;
                selected.cost = (int)((self.monsterCredit / RoR2Cheats.nextBossCount) / RoR2Cheats.GetTierDef(RoR2Cheats.nextBossElite).costMultiplier);
                self.OverrideCurrentMonsterCard(selected);
                self.SetFieldValue <CombatDirector.EliteTierDef>("currentActiveEliteTier", RoR2Cheats.GetTierDef(RoR2Cheats.nextBossElite));
                self.SetFieldValue <EliteIndex>("currentActiveEliteIndex", RoR2Cheats.nextBossElite);
                Log.Message($"{selected.spawnCard.name} cost has been set to {selected.cost} for {RoR2Cheats.nextBossCount} {RoR2Cheats.nextBossElite.ToString()} bosses with available credit: {self.monsterCredit}");
                RoR2Cheats.ResetNextBoss();
                return;
            }
        }