Decompiled source of PromisedEigong v1.1.2
PromisedEigong.dll
Decompiled 4 days ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using BlendModes; using DG.Tweening; using DG.Tweening.Core; using DG.Tweening.Plugins.Options; using HarmonyLib; using I2.Loc; using Microsoft.CodeAnalysis; using NineSolsAPI; using NineSolsAPI.Preload; using PromisedEigong.AppearanceChangers; using PromisedEigong.Core; using PromisedEigong.Effects; using PromisedEigong.Effects.GameplayEffects; using PromisedEigong.Effects.MusicPlayers; using PromisedEigong.Gameplay; using PromisedEigong.Gameplay.AttackFactories; using PromisedEigong.Gameplay.HealthChangers; using PromisedEigong.LevelChangers; using PromisedEigong.ModSystem; using PromisedEigong.PoolObjectWrapper; using PromisedEigong.PreloadObjectHandlers; using PromisedEigong.SpeedChangers; using PromisedEigong.WeightChanges; using RCGMaker.Core; using RCGMaker.Runtime.Sprite; using Shapes; using TMPro; using UnityEngine; using UnityEngine.Events; using UnityEngine.Rendering.PostProcessing; using UnityEngine.SceneManagement; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("PromisedEigong")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("Promised Eigong")] [assembly: AssemblyFileVersion("1.1.2.0")] [assembly: AssemblyInformationalVersion("1.1.2+ec907ceffa72f0456af02918a587505506130c9d")] [assembly: AssemblyProduct("PromisedEigong")] [assembly: AssemblyTitle("PromisedEigong")] [assembly: AssemblyVersion("1.1.2.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace PromisedEigong { public static class PromisedEigongModGlobalSettings { public static class EigongLocs { public const string EIGONG_TITLE_LOC = "Characters/NameTag_YiKong"; public const string ROOT_PROGRESS_LOC = "AG_ST_Hub/M322_AG_ST_古樹解封進度_Bubble00"; } public static class EigongRefs { public const string SCENE_NORMAL_ENDING_EIGONG = "A11_S0_Boss_YiGung_回蓬萊"; public const string SCENE_TRUE_ENDING_EIGONG = "A11_S0_Boss_YiGung"; public const string SCENE_NEW_KUNLUN = "AG_ST_Hub"; public const string BIND_MONSTER_EIGONG_NAME = "Boss_Yi Gung"; public const string BG_MASTER_TRANSFORM = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight"; public const string FX_CAMERA_PATH = "GameLevel/CameraCore/DockObj/OffsetObj/ShakeObj/SceneCamera/AmplifyLightingSystem/FxCamera"; public const string BEAUTIFUL_FX_CAMERA_NAME = "BeautifulFxCamera"; public const string BEAUTIFUL_FX_CAMERA_PATH = "GameLevel/CameraCore/DockObj/OffsetObj/ShakeObj/SceneCamera/AmplifyLightingSystem/BeautifulFxCamera"; public const string CAMERA_FX_MASTER_TRANSFORM = "GameLevel/CameraCore/DockObj/OffsetObj/ShakeObj/SceneCamera/AmplifyLightingSystem"; public const string BOSS_AMBIENCE_SOURCE_PATH = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/Boss三階BGM/BGM_Boss_A11_P3"; public const string EIGONG_TITLE_NAME_PATH = "GameCore(Clone)/RCG LifeCycle/UIManager/GameplayUICamera/MonsterHPRoot/BossHPRoot/UIBossHP(Clone)/Offset(DontKeyAnimationOnThisNode)/AnimationOffset/BossName"; public const string EIGONG_CUTSCENE_TITLE_NAME_PATH = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/[CutScene] 一進/Boss Intro Acting 字卡/View/Boss_YiGung/Subtitle_Text/Title"; public const string CUTSCENE_SCENE_CHANGER_PATH = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/[CutScene] 易公死亡/演出結束換景 (要自己拉)"; public const string JUDGMENT_CUT_PREFAB_HOLDER_NAME = "FX Full Screen Slash "; public const string JUDGMENT_CUT_PART_2_PREFAB_HOLDER_NAME = "白一閃FX Full Screen"; public const string JUDGMENT_CUT_CRIMSON_PREFAB_HOLDER_NAME = "FX Full Screen Danger"; public const string JUDGMENT_CUT_CRIMSON_PART_2_PREFAB_HOLDER_NAME = "紅一閃FX Full Screen Danger"; public const string JUDGMENT_CUT_NEW_NAME = "(Spawned) Judgment Cut"; public const string JUDGMENT_CUT_PART_2_NEW_NAME = "(Spawned) Judgment Cut Part 2"; public const string JUDGMENT_CUT_CRIMSON_NEW_NAME = "(Spawned) Judgment Cut Crimson"; public const string JUDGMENT_CUT_CRIMSON_PART_2_NEW_NAME = "(Spawned) Judgment Cut Crimson Part 2"; public const string PO_VFX_TAI_DANGER = "Effect_TaiDanger(Clone)"; public const string PO_VFX_JIECHUAN_FIRE = "Fire_FX_damage_Long jiechuan(Clone)"; public const string PO_VFX_JIECHUAN_FIRE_IMAGE = "Light"; public const string PO_VFX_EIGONG_FOO_EXPLOSION = "Fx_YiGong Foo Explosion_pool obj(Clone)"; public const string PO_VFX_EIGONG_FOO = "Fx_YiGong 貼符(Clone)"; public const string PO_VFX_EIGONG_CRIMSON_GEYSER = "Fx_YiGong Upper12_pool obj(Clone)"; public const string PO_VFX_EIGONG_CRIMSON_PILLAR = "FireExplosionPillar_FX_damage(Clone)"; public const string PO_VFX_EIGONG_JUDGMENT_CUT = "白2 FullScreen Slash FX Damage(Clone)"; public const string PO_VFX_EIGONG_JUDGMENT_CUT_PART_2 = "白閃 FullScreen Slash FX Damage(Clone)"; public const string PO_VFX_EIGONG_JUDGMENT_CUT_CRIMSON = "紅閃 FullScreen Slash FX Damage Danger(Clone)"; public const string PO_VFX_EIGONG_JUDGMENT_CUT_CRIMSON_LINE = "Line"; public const string PO_VFX_EIGONG_JUDGMENT_CUT_CRIMSON_SHAPE_1 = "SHape"; public const string PO_VFX_EIGONG_JUDGMENT_CUT_CRIMSON_SHAPE_2 = "SHape 2"; } public static class EigongPreloadRefs { public const string BIG_BAD_SCENE = "結局演出_大爆炸 P2"; public const string BIG_BAD_PATH = "GameLevel/Room/3DBG Master 背景/BIGBAD"; public const string BEAUTIFUL_FX_CAMERA_PRELOAD_PATH = "GameLevel/CameraCore/DockObj/OffsetObj/ShakeObj/SceneCamera/AmplifyLightingSystem/FxCamera"; } public static class EigongBackground { public const string RED_FX = "GameLevel/CameraCore/DockObj/全畫面遮色/Fade/Red"; public const string GREEN_FX = "GameLevel/CameraCore/DockObj/全畫面遮色/Fade/Green"; public const string BLACK_FX = "GameLevel/CameraCore/DockObj/全畫面遮色/Fade/Black"; public const string BLACK_2_FX = "GameLevel/CameraCore/DockObj/全畫面遮色/Fade/Black/Black (1)"; public const string BLUE_FX = "GameLevel/CameraCore/DockObj/全畫面遮色/Fade/Blue"; public const string DONUT_FX = "GameLevel/CameraCore/DockObj/全畫面遮色/Fade/Donut (1)"; public const string PLATFORM_LIGHT_FX = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/Directional Light"; public const string ANIMATOR_REF = "GameLevel/CameraCore/DockObj/全畫面遮色"; public const string GIANT_BALL = "GameLevel/Room/3DBG Master 背景/3D 大背景/STGiantBall"; public const string CORE_VINES_ROOT = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/showdownscene3d_Vines"; public const string CORE_VINES_PARENT = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/showdownscene3d_Vines/COREVINES_脫殼中"; public const string CORE_VINES_INFECTED_PARENT = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/showdownscene3d_Vines/COREVINES_感染前"; public const string CORE_VINES_INFECTED_PARENT_FINAL = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/showdownscene3d_Vines/COREVINES_感染後"; public const string BIG_BAD_OBJ = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/BIGBAD(Clone)(Clone)"; public const string BIG_BAD_ANIMATOR = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/BIGBAD(Clone)(Clone)/BIGBAD_ANIM"; public const string BIG_BAD_NECKVINES = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/BIGBAD(Clone)(Clone)/BIGBAD_ANIM/MORPH_GUYS/NECKVINES"; public const string BIG_BAD_NECKVINES_PARENT = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/BIGBAD(Clone)(Clone)/BIGBAD_ANIM/MORPH_GUYS"; public const string BIG_BAD_STATIC_OBJS = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/BIGBAD(Clone)(Clone)/BIGBAD_ANIM/STATIC_OBJS"; public const string BIG_BAD_MEATBALL = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/BIGBAD(Clone)(Clone)/HighEndFX(Disable for Switch)/P_MeatBall"; public const string BIG_BAD_MEATBALL_1 = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/BIGBAD(Clone)(Clone)/HighEndFX(Disable for Switch)/P_MeatBall (1)"; public const string BIG_BAD_MEATBALL_2 = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/BIGBAD(Clone)(Clone)/HighEndFX(Disable for Switch)/P_MeatBall (2)"; public const string BIG_BAD_HEAD = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/BIGBAD(Clone)(Clone)/BIGBAD_ANIM/MORPH_GUYS/HEAD"; public const string BIG_BAD_HAIR = "GameLevel/Room/3DBG Master 背景/3D 大背景/3DBG ScaleCompress/Scene BG_YiGungBoosFight/BIGBAD(Clone)(Clone)/BIGBAD_HAIRS"; public static readonly Color RED_COLOR = new Color(1f, 0f, 0f, 0.3129f); public static readonly Color RED_COLOR_PHASE_3 = new Color(1f, 0f, 0.5856f, 0.2929f); public static readonly Color GREEN_COLOR = new Color(0.607f, 0f, 0f, 0.4128f); public static readonly Color GREEN_COLOR_PHASE_3 = new Color(1f, 0f, 0.6f, 0.4128f); public static readonly Color BLACK_COLOR = new Color(0f, 0f, 0f, 1f); public static readonly Color BLACK_2_COLOR = new Color(0.2662f, 0.2f, 0f, 0.7128302f); public static readonly Color BLACK_2_COLOR_PHASE_3 = new Color(0f, 0.3956f, 0.1707547f, 0.5528302f); public static readonly Color BLUE_COLOR = new Color(0.6232f, 0f, 0.4174f, 1f); public static readonly Color BLUE_COLOR_PHASE_3 = new Color(0.3168f, 0f, 0.5476f, 1f); public static readonly Color DONUT_COLOR = new Color(0.2075f, 0f, 0.1193f, 0.2424f); public static readonly Color DONUT_COLOR_PHASE_3 = new Color(0.6275f, 0f, 0.1193f, 0.2324f); public static readonly Color PLATFORM_LIGHT_COLOR = new Color(0.5664f, 0.5202f, 0.3828f, 1f); public static readonly BlendMode RED_BLEND_MODE = (BlendMode)9; public static readonly BlendMode BLUE_BLEND_MODE = (BlendMode)12; public static readonly BlendMode BLUE_BLEND_MODE_PHASE_2 = (BlendMode)12; public static readonly Vector3 BIG_BAD_HAIR_SCALE = new Vector3(0.93f, 0.93f, 0.93f); public static readonly Vector3 BIG_BAD_NECKVINES_ROTATION = new Vector3(0f, 180f, 0f); public static readonly Vector3 BIG_BAD_NECK_VINES_OFFSET = new Vector3(0f, -3f, 0f); public static readonly Vector3 BIG_BAD_MEATBALL_2_SHAPE_POSITION = new Vector3(0f, 17f, 0f); public static readonly Vector3 BIG_BAD_MEATBALL_2_SHAPE_SCALE = new Vector3(4.7f, 4f, 4.7f); public static readonly Vector3 BIG_BAD_HEAD_SCALE = new Vector3(0.97f, 1.05f, 0.97f); public static readonly Vector3 BIG_BAD_HEAD_POSITION = new Vector3(0f, 70f, 0f); public const float GIANT_BALL_SPEED_1 = 25f; public const float CORE_VINES_SPEED_1 = 9f; public const float GIANT_BALL_SPEED_2 = 0.1f; public const float BIG_BAD_HEAD_SPEED = 3.5f; public const float BEAUTIFUL_FX_CAMERA_WEIGHT = 0.77f; } public static class EigongOST { public const string PHASE1_2_OST = "BGM_Boss_A11_P3"; public const string PHASE3_OST = "BGM_EndCredit_NineSols"; public const float PHASE3_LOOP_DELAY = 249f; } public static class EigongVFX { public const string DANGER_VFX_PATH = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/LogicRoot/DangerHintEffect"; public const string SIMPLE_DANGER_VFX_NAME = "SimpleEffect_TaiDanger"; public static readonly Vector3 STARTER_SIMPLE_DANGER_VFX_OFFSET_L = new Vector3(-74.7f, 73f, 0f); public static readonly Vector3 STARTER_SIMPLE_DANGER_VFX_OFFSET_R = new Vector3(74.7f, 73f, 0f); public static readonly Vector3 SLOW_STARTER_SIMPLE_DANGER_VFX_OFFSET_L_1 = new Vector3(-15.5f, 25f, 0f); public static readonly Vector3 SLOW_STARTER_SIMPLE_DANGER_VFX_OFFSET_R_1 = new Vector3(15.5f, 25f, 0f); public static readonly Vector3 SLOW_STARTER_SIMPLE_DANGER_VFX_OFFSET_L_2 = new Vector3(-18f, 47f, 0f); public static readonly Vector3 SLOW_STARTER_SIMPLE_DANGER_VFX_OFFSET_R_2 = new Vector3(18f, 47f, 0f); public static readonly Vector3 SLOW_STARTER_SIMPLE_DANGER_VFX_OFFSET_L_3 = new Vector3(-74.7f, 73f, 0f); public static readonly Vector3 SLOW_STARTER_SIMPLE_DANGER_VFX_OFFSET_R_3 = new Vector3(74.7f, 73f, 0f); public static readonly Vector3 SIMPLE_DANGER_VFX_SCALE = new Vector3(0.72f, 0.42f, 0.42f); public const float SIMPLE_DANGER_VFX_VALUE_BRIGHTNESS = 9f; public const float FIRE_VFX_VALUE_BRIGHTNESS = 4.1f; public const float FIRE_VFX_SATURATION = 1.1f; public const float SIMPLE_DANGER_VFX_SATURATION = 0.42f; public const float SIMPLE_DANGER_VFX_HIDE_TIME = 0.18f; public const float EIGONG_TRANSFORM_PHASE_3_DELAY = 6.648f; } public static class EigongSFX { public const string SIMPLE_DANGER_SFX_PATH = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/LogicRoot/Audio/EnemySFX_YiGong_AirSwords_OpenEye"; public const int STARTER_SIMPLE_DANGER_SFX_BOOST = 2; public const int SLOW_STARTER_SIMPLE_DANGER_SFX_BOOST_1 = 1; public const int SLOW_STARTER_SIMPLE_DANGER_SFX_BOOST_2 = 2; } public static class NewKunlunBackground { public const string PROGRESS_BAR = "AG_ST_Hub/Room/Prefab/SimpleCutSceneFSM_古樹核心解封程度/FSM Animator/View/HubSPWall/BigScreen/CONTENT/80/進度/進度條"; public const float BAR_WIDTH = 89f; public static readonly Color BAR_COLOR = new Color(1f, 0.3f, 0.3f); public static readonly Vector3 SKIP_POSITION = new Vector3(2695f, -3968f, 0.1f); } public static class EigongColors { public const string EIGONG_CHARACTER_VIEW_PATH = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung"; public const string EIGONG_CUTSCENE_VIEW_PATH = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/[CutScene] 二進/YiGung_Dummy/View/YiGung"; public const string FIRE_TRAIL_PATH = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/LogicRoot/Phase1 Activator/FireFX _ Fxplayer"; public const string EIGONG_SPRITE_FLASHER = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator"; public const string EIGONG_CHARACTER_BODY = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Body"; public const string EIGONG_CHARACTER_BODY_NAME = "Body"; public const string EIGONG_CHARACTER_HAIR_SPRITE = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Head/Hair/YiGong_Hair"; public const string EIGONG_CHARACTER_HAIR_SPRITE_NAME = "YiGong_Hair"; public const string EIGONG_CHARACTER_TIANHUO_HAIR_SPRITE = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Head/Virus (2階段後開)/YiGong_Virus"; public const string EIGONG_CHARACTER_TIANHUO_HAIR_SPRITE_NAME = "YiGong_Virus"; public const string EIGONG_CHARACTER_SWORD_SPRITE_NAME = "Sword Sprite"; public const string EIGONG_TIANHUO_HAIR_GLOW = "Glow"; public const string EIGONG_CHARACTER_BODY_SHADOW = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Body/Shadow"; public const string EIGONG_CHARACTER_SWORD = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Weapon/Sword/Sword Sprite"; public const string EIGONG_CHARACTER_SWORD_EFFECT = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Weapon/Sword/Effect"; public const string EIGONG_CHARACTER_CRIMSON_SLAM_EFFECT = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Attack Effect/Upper4/Sprite"; public const string EIGONG_CHARACTER_CRIMSON_GEYSER_EFFECT = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Attack Effect/Upper12/Sprite"; public const string EIGONG_CHARACTER_FOO = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Weapon/Foo/FooSprite"; public const string EIGONG_CHARACTER_FOO_EFFECT_1 = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Weapon/Foo/P_spark Up"; public const string EIGONG_CHARACTER_FOO_EFFECT_2 = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Weapon/Foo/P_spark Circle"; public const string EIGONG_CHARGE_WAVE_CRIMSON = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Attack Effect/紅白白紅/紅/AttackEffect"; public const string EIGONG_CHARGE_WAVE_CRIMSON_GLOW = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Attack Effect/紅白白紅/紅/Glow"; public const string EIGONG_CHARGE_WAVE_CRIMSON_2 = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Attack Effect/紅白白紅/究極紅/AttackEffect"; public const string EIGONG_CHARGE_WAVE_CRIMSON_2_GLOW = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/MonsterCore/Animator(Proxy)/Animator/View/YiGung/Attack Effect/紅白白紅/究極紅/Glow"; public const string EIGONG_CUTSCENE_BODY = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/[CutScene] 二進/YiGung_Dummy/View/YiGung/Body"; public const string EIGONG_CUTSCENE_SWORD = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/[CutScene] 二進/YiGung_Dummy/View/YiGung/Weapon/Sword/Sword Sprite"; public static readonly Color FIRE_COLOR = new Color(0.26f, 0.77f, 0.99f); public static readonly Color FIRE_LIGHT_COLOR = new Color(0f, 0.1f, 0.99f); public static readonly Color EIGONG_TRANSFORM_OVERLAY_COLOR_UPPER = new Color(0.9f, 0f, 0.1f, 1f); public static readonly Color EIGONG_TRANSFORM_OVERLAY_COLOR_LOWER = new Color(1f, 0f, 0f, 1f); public static readonly Color EIGONG_TRANSFORM_SHADOW_OVERLAY_COLOR_UPPER = new Color(0.1f, 0f, 0.01f, 1f); public static readonly Color EIGONG_TRANSFORM_SHADOW_OVERLAY_COLOR_LOWER = new Color(0.2f, 0f, 0f, 1f); public static readonly Color EIGONG_SPRITE_FLASH_COLOR = new Color(1f, 1f, 1f); public const float EIGONG_TRANSFORM_COLORCHANGE_SATURATION = 0f; public const float EIGONG_TRANSFORM_COLORCHANGE_VALUE_BRIGHTNESS = 3.3f; public const float EIGONG_TRANSFORM_COLORCHANGE_VALUE_BRIGHTNESS_HC = 1.9f; public const float EIGONG_TRANSFORM_SHADOW_COLORCHANGE_VALUE_BRIGHTNESS = 0f; public const int EIGONG_TRANSFORM_OVERLAY_BLEND_MODE = 7; public const float EIGONG_TRANSFORM_OVERLAY_ALPHA = 2.3f; public const float EIGONG_TRANSFORM_OVERLAY_ALPHA_HC = 1.7f; public const float EIGONG_BURNING_FX_STRENGTH = 0.53f; public const float EIGONG_CHARACTER_SWORD_EFFECT_SHIFT = 522f; public const float EIGONG_SWORD_SATURATION = 5f; public const float EIGONG_CHARACTER_SWORD_VALUE_BRIGHTNESS = 2.2f; public const float EIGONG_TAI_DANGER_VALUE_BRIGHTNESS = 5f; public const float EIGONG_CRIMSON_CUT_VALUE_BRIGHTNESS = 8.5f; public const int EIGONG_OVERLAY_SORTING_ORDER = -5; } public static class EigongAttacks { public const string STATES_PATH = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/"; public const string ATTACK_PATH = "GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/"; public const string ATTACK1_SLOW_STARTER = "[1] Starter Slow Attack 慢刀前揮"; public const string ATTACK1_SLOW_STARTER_WEIGHT = "[1] Starter Slow Attack 慢刀前揮/phase (0)"; public const string ATTACK1_SLOW_STARTER_WEIGHT_PHASE_2 = "[1] Starter Slow Attack 慢刀前揮/phase (1)"; public const string ATTACK1_SLOW_STARTER_WEIGHT_PHASE_3_NAME = "[1] Starter Slow Attack 慢刀前揮phase (2)"; public const string ATTACK2_TELEPORT_TO_TOP = "[2] Teleport To Top"; public const string ATTACK2_TELEPORT_TO_TOP_WEIGHT = "[2] Teleport To Top/phase (0)"; public const string ATTACK2_TELEPORT_TO_TOP_WEIGHT_PHASE_2 = "[2] Teleport To Top/phase (1)"; public const string ATTACK2_TELEPORT_TO_TOP_WEIGHT_PHASE_3 = "[2] Teleport To Top/phase (2)"; public const string ATTACK3_THRUST_DELAY = "[3] Thrust Delay 一閃"; public const string ATTACK3_THRUST_DELAY_WEIGHT = "[3] Thrust Delay 一閃/phase (0)"; public const string ATTACK3_THRUST_DELAY_WEIGHT_PHASE_2 = "[3] Thrust Delay 一閃/phase (1)"; public const string ATTACK3_THRUST_DELAY_WEIGHT_PHASE_3 = "[3] Thrust Delay 一閃/phase (2)"; public const string ATTACK4_SLASH_UP = "[4] Slash Up 上撈下打 大反危"; public const string ATTACK4_SLASH_UP_WEIGHT_PHASE_1 = "[3] Thrust Delay 一閃/phase (0)"; public const string ATTACK4_SLASH_UP_WEIGHT_PHASE_2 = "[3] Thrust Delay 一閃/phase (1)"; public const string ATTACK5_TELEPORT_TO_BACK = "[5] Teleport to Back"; public const string ATTACK5_TELEPORT_TO_BACK_WEIGHT = "[5] Teleport to Back/weight"; public const string ATTACK5_TELEPORT_TO_BACK_WEIGHT_PHASE_2 = "[5] Teleport to Back/weight (1)"; public const string ATTACK5_TELEPORT_TO_BACK_WEIGHT_PHASE_3 = "[5] Teleport to Back/weight (2)"; public const string ATTACK6_DOUBLE_ATTACK = "[6] Double Attack"; public const string ATTACK6_DOUBLE_ATTACK_WEIGHT = "[6] Double Attack/weight"; public const string ATTACK7_TELEPORT_FORWARD = "[7] Teleport Dash Forward"; public const string ATTACK7_TELEPORT_FORWARD_WEIGHT = "[7] Teleport Dash Forward/weight"; public const string ATTACK7_TELEPORT_FORWARD_WEIGHT_PHASE_2 = "[7] Teleport Dash Forward/weight (1)"; public const string ATTACK7_TELEPORT_FORWARD_WEIGHT_PHASE_3 = "[7] Teleport Dash Forward/weight (2)"; public const string ATTACK8_LONG_CHARGE = "[8] Long Charge (2階才有"; public const string ATTACK8_LONG_CHARGE_WEIGHT_PHASE_2 = "[8] Long Charge (2階才有/weight (1)"; public const string ATTACK8_LONG_CHARGE_WEIGHT_PHASE_3 = "[8] Long Charge (2階才有/weight (2)"; public const string ATTACK9_STARTER = "[9] Starter"; public const string ATTACK9_STARTER_WEIGHT_PHASE_1 = "[9] Starter/phase (0)"; public const string ATTACK9_STARTER_WEIGHT_PHASE_2 = "[9] Starter/phase (1)"; public const string ATTACK9_STARTER_WEIGHT_PHASE_3_NAME = "phase (2)"; public const string ATTACK10_FOO = "[10] Danger Foo Grab"; public const string ATTACK10_FOO_INTERRUPT_WEIGHT = "[10] Danger Foo Grab/interrupt weight"; public const string ATTACK10_FOO_INTERRUPT_WEIGHT_PHASE_2 = "[10] Danger Foo Grab/interrupt weight (1)"; public const string ATTACK10_FOO_INTERRUPT_WEIGHT_PHASE_3 = "[10] Danger Foo Grab/interrupt weight (2)"; public const string ATTACK11_GIANT_CHARGE_WAVE = "[11] GiantChargeWave 紅白白紅"; public const string ATTACK11_GIANT_CHARGE_WAVE_WEIGHT_PHASE_2 = "[11] GiantChargeWave 紅白白紅/weight (2)"; public const string ATTACK11_GIANT_CHARGE_WAVE_WEIGHT_PHASE_3 = "[11] GiantChargeWave 紅白白紅/weight (3)"; public const string ATTACK12_SLASH_UP_CRIMSON = "[12] UpSlash Down Danger"; public const string ATTACK12_SLASH_UP_CRIMSON_WEIGHT_PHASE_2 = "[12] UpSlash Down Danger/weight (1)"; public const string ATTACK12_SLASH_UP_CRIMSON_WEIGHT_PHASE_3 = "[12] UpSlash Down Danger/weight (2)"; public const string ATTACK13_TRIPLE_POKE = "[13] Tripple Poke 三連"; public const string ATTACK13_TRIPLE_POKE_WEIGHT = "[13] Tripple Poke 三連/weight"; public const string ATTACK13_TRIPLE_POKE_WEIGHT_PHASE_2 = "[13] Tripple Poke 三連/weight (1)"; public const string ATTACK14_CRIMSON_BALL = "[14] FooExplode Smash 下砸紅球"; public const string ATTACK15_TURN_AROUND_BRIGHT_EYES = "[15] TurnAroundPrepare"; public const string ATTACK15_TURN_AROUND_BRIGHT_EYES_WEIGHT_PHASE_2 = "[15] TurnAroundPrepare/weight (1)"; public const string ATTACK16_QUICK_FOO = "[16] QuickFoo"; public const string ATTACK16_QUICK_FOO_INTERRUPT_WEIGHT = "[16] QuickFoo/interrupt weight"; public const string ATTACK16_QUICK_FOO_INTERRUPT_WEIGHT_PHASE_2 = "[16] QuickFoo/interrupt weight (1)"; public const string ATTACK16_QUICK_FOO_INTERRUPT_WEIGHT_PHASE_3 = "[16] QuickFoo/interrupt weight (2)"; public const string ATTACK17_CRIMSON_SLAM = "[17] DownAttack Danger 空中下危"; public const string ATTACK17_CRIMSON_SLAM_WEIGHT = "[17] DownAttack Danger 空中下危/weight"; public const string ATTACK17_CRIMSON_SLAM_WEIGHT_PHASE_2 = "[17] DownAttack Danger 空中下危/weight (1)"; public const string ATTACK17_CRIMSON_SLAM_WEIGHT_PHASE_3 = "[17] DownAttack Danger 空中下危/weight (2)"; public const string ATTACK18_TELEPORT_TO_BACK_COMBO = "[18] Teleport to Back Combo"; public const string ATTACK18_TELEPORT_TO_BACK_COMBO_WEIGHT = "[18] Teleport to Back Combo/weight"; public const string ATTACK19_THRUST_FULL_SCREEN = "[19] Thrust Full Screen Slash"; public const string ATTACK20_TELEPORT_OUT = "[20] TeleportOut"; public const string ATTACK21_NEW_QUICK_CRIMSON_BALL = "[21] Quick Crimson Ball"; public const string ATTACK22_NEW_CHAIN_SLOW_STARTER = "[22] Slow Starter (Poke Chain 1)"; public const string ATTACK23_NEW_CHAIN_TRIPLE_POKE = "[23] Triple Poke (Poke Chain 2)"; public const string ATTACK24_NEW_CHAIN_DOUBLE_ATTACK = "[24] Double Attack (Poke Chain 3)"; public const string ATTACK25_NEW_CHAIN_SLASH_UP_CRIMSON = "[25] Slash Up Crimson (Poke Chain 4)"; public const string ATTACK26_NEW_CHAIN_TELEPORT_TO_BACK_SECOND = "[26] Teleport To Back (Poke Chain 5)"; public const string ATTACK27_NEW_CHAIN_CHARGE_WAVE = "[27] Charge Wave (Poke Chain 6)"; public const string ATTACK28_NEW_CHAIN_TELEPORT_TO_BACK_COMBO = "[28] Teleport To Back Combo (Poke Chain 7)"; public const string ATTACK29_NEW_CHAIN_TELEPORT_TO_BACK_FIRST = "[29] Teleport To Back (Poke Chain 3.5)"; public const string ATTACK30_NEW_CHAIN_JUMP_BACK = "[30] Jump Back (Poke Chain 0)"; public const string ATTACK32_NEW_TELEPORT_TO_BACK_TO_CS = "[32] Teleport To Back To Crimson Slam"; public const string ATTACK33_NEW_CRIMSON_SLAM_SPECIAL = "[33] Special Crimson Slam"; public const string ATTACK34_NEW_SAFEGUARD_TELEPORT_TO_TOP = "[34] Safeguard Teleport To Top Phase 3"; public const string ATTACK35_NEW_SAFEGUARD_JUMP_BACK = "[35] Safeguard Jump Back Phase 3"; public const string ATTACK36_NEW_CHAIN_ALTERNATE_SLASH_UP_CRIMSON = "[36] Alternate Slash Up Crimson (Poke Chain 4)"; public const string ATTACK37_NEW_CHAIN_ALTERNATE_JUMP_BACK = "[37] Alternate Jump Back (Poke Chain 3.5)"; public const string ATTACK38_SPECIAL_DOUBLE_ATTACK = "[38] Special Double Attack"; public const string ATTACK39_SPECIAL_DOUBLE_ATTACK_JUMP_BACK = "[39] Special Jump Back into Double Attack"; public const string ATTACK40_TELEPORT_TO_BACK_COMBO_PHASE_3 = "[40] Teleport To Back Combo Phase 3"; public const string POSTURE_BREAK = "PostureBreak"; public const string POSTURE_BREAK_PHASE_1 = "PostureBreak/phase0"; public const string POSTURE_BREAK_PHASE_2 = "PostureBreak/phase1"; public const string POSTURE_BREAK_PHASE_3 = "PostureBreak/phase2"; public const string JUMP_BACK = "JumpBack"; public const string JUMP_BACK_WEIGHT_PHASE_3 = "JumpBack/weight 2"; public const string ATTACK_PARRYING = "AttackParrying"; public const string ATTACK_PARRYING_WEIGHT = "AttackParrying/weight"; public const string ATTACK_PARRYING_WEIGHT_PHASE_2 = "AttackParrying/weight (1)"; public const string ATTACK_PARRYING_WEIGHT_PHASE_3 = "AttackParrying/weight (2)"; public const string ROLL_THROUGH = "RollThrough (PhaseChange Start"; } public static class EigongAttackAnimationRefs { public const string EIGONG_FOO_ATTACK_1 = "Attack10"; public const string EIGONG_FOO_ATTACK_2 = "Attack16"; public const string EIGONG_CRIMSON_BALL_ATTACK = "Attack14"; } public static class EigongTitle { public const string EIGONG_TITLE = "Promised Eigong"; public const string EIGONG_PHASE_3_TITLE = "Tianhuo Avatar"; public const string ROOT_PROGRESS_TEXT = "Root Decryption Progress: <color=#FF0000>ERROR ERROR 99% ERROR ERROR</color>"; public const string LVL_O_CHALLENGE_TEXT = "Lvl 0 Challenge"; public const float LVL_0_CHALLENGE_FONT_SIZE = 20f; public static readonly Color LVL_O_CHALLENGE_TEXT_COLOR = new Color(0.53f, 0.39f, 0.33f); public static readonly Vector3 LVL_0_CHALLENGE_LOCAL_POS = new Vector3(2f, 153f, 0f); public static string GetEigongName(string languageCode, string originalName) { switch (languageCode) { case "en-US": return "Promised " + originalName; case "es-US": case "es-ES": return originalName + " Prometida"; case "de-DE": return "Versprochene " + originalName; case "fr-FR": return originalName + " Promise"; case "it": return originalName + " Promessa"; case "ja": return "約束された" + originalName; case "ko": return "약속된" + originalName; case "pl": return "Obiecany " + originalName; case "pt-BR": return originalName + " Prometida"; case "ru": return "Будущий " + originalName; case "uk": return "Майбутній " + originalName; case "zh-CN": return "约定之" + originalName; case "zh-TW": return "約定之" + originalName; default: return "Promised " + originalName; } } public static string GetTianhuoAvatarName(string languageCode) { switch (languageCode) { case "en-US": return "Tianhuo Avatar"; case "es-US": case "es-ES": return "Avatar de Tianhuo"; case "de-DE": return "Tianhuo-Avatar"; case "fr-FR": return "Avatar de Tianhuo"; case "it": return "Avatar di Tianhuo"; case "ja": return "天禍の化身"; case "ko": return "천화 화신"; case "pl": return "Awatar Tianhuo"; case "pt-BR": return "Avatar do Tianhuo"; case "ru": return "Аватар Тяньхо"; case "uk": return "Аватар Тяньхо"; case "zh-CN": return "天禍化身"; case "zh-TW": return "天禍化身"; default: return "Tianhuo Avatar"; } } } public static class EigongHealth { public const int EIGONG_PHASE_1_HEALTH_VALUE = 4444; public const int EIGONG_PHASE_2_HEALTH_VALUE = 5555; public const int EIGONG_PHASE_3_HEALTH_VALUE = 6666; } public static class EigongDamageReduction { public const float EIGONG_SPIKED_ARROW_DR = 0.9f; public const float EIGONG_NORMAL_AND_ELECTRIC_ARROW_DR = 0.77f; public const float EIGONG_CHARGE_ATTACK_DR = 0.66f; public const float EIGONG_THIRD_ATTACK_JADE_DR = 0.22f; public const float EIGONG_POSTURE_DAMAGE_DR = 0.22f; public const float EIGONG_TAICHI_KICK_DAMAGE_DR = 0.5f; public const float EIGONG_COUNTER_JADE_DAMAGE_DR = 0.33f; public const float EIGONG_FOO_DR = 0f; public const float EIGONG_DEFAULT_DR = 0f; } public static class EigongProperties { public const bool EIGONG_FORBID_STUNNING = true; } public static class EigongDamageBoost { public const float EIGONG_FIRE_BOOST = 4.33f; public const float EIGONG_FIRE_BOOST_LVL_0 = 0.100000024f; public const float EIGONG_FOO_BOOST = 2.33f; public const float EIGONG_FOO_BOOST_PHASE_2_3 = 1.35f; public const float EIGONG_CRIMSON_BALL_BOOST = 8.77f; public const float EIGONG_DEFAULT_ATTACK_BOOST = 1.33f; public const float EIGONG_EARLY_DEFLECT_BOOST = 2.77f; } public static class EigongSpeed { public const float ATTACK1_SLOW_STARTER_SPEED = 1.77f; public const float ATTACK2_TELEPORT_TO_TOP_SPEED = 1.55f; public const float ATTACK2_TELEPORT_TO_TOP_SPEED_PHASE_3 = 1.25f; public const float ATTACK3_THRUST_DELAY_SPEED = 1.5f; public const float ATTACK4_SLASH_UP_SPEED = 1.17f; public const float ATTACK5_TELEPORT_TO_BACK_SPEED = 1.55f; public const float ATTACK5_TELEPORT_TO_BACK_SPEED_PHASE_3 = 2f; public const float ATTACK6_DOUBLE_ATTACK_SPEED = 1.5f; public const float ATTACK7_TELEPORT_FORWARD_SPEED = 1.55f; public const float ATTACK7_TELEPORT_FORWARD_SPEED_PHASE_3 = 2f; public const float ATTACK8_LONG_CHARGE_SPEED = 1.77f; public const float ATTACK9_STARTER_SPEED = 0.89f; public const float ATTACK10_FOO_SPEED = 1.33f; public const float ATTACK11_GIANT_CHARGE_WAVE_SPEED = 1.37f; public const float ATTACK12_SLASH_UP_CRIMSON_SPEED = 1.17f; public const float ATTACK13_TRIPLE_POKE_SPEED = 1.27f; public const float ATTACK14_CRIMSON_BALL_SPEED = 1.27f; public const float ATTACK15_TURN_AROUND_BRIGHT_EYES_SPEED = 1.33f; public const float ATTACK16_QUICK_FOO_SPEED = 1.17f; public const float ATTACK17_CRIMSON_SLAM_SPEED = 1.34f; public const float ATTACK18_TELEPORT_TO_BACK_COMBO_SPEED = 1.55f; public const float ATTACK18_TELEPORT_TO_BACK_COMBO_SPEED_PHASE_3 = 2f; public const float ATTACK21_NEW_INSTANT_CRIMSON_BALL_SPEED = 1.27f; public const float ATTACK21_NEW_INSTANT_CRIMSON_BALL_SKIP = 0.2f; public const float ATTACK22_NEW_CHAIN_SLOW_STARTER_SPEED = 1f; public const float ATTACK23_NEW_CHAIN_TRIPLE_POKE_SPEED = 1.27f; public const float ATTACK23_NEW_CHAIN_TRIPLE_POKE_SKIP = 0.12f; public const float ATTACK24_NEW_CHAIN_DOUBLE_ATTACK_SPEED = 1.5f; public const float ATTACK25_SLASH_UP_CRIMSON_SPEED = 1.34f; public const float ATTACK26_TELEPORT_TO_BACK_SPEED = 1f; public const float ATTACK27_NEW_CHAIN_CHARGE_WAVE_SKIP = 0.208f; public const float ATTACK32_NEW_CHAIN_TELEPORT_TO_BACK_TO_CS_SKIP = 0.451f; public const float ATTACK33_NEW_CRIMSON_SLAM_SPECIAL_SPEED = 1.33f; public static readonly Vector3 ATTACK33_NEW_CRIMSON_SLAM_OFFSET = new Vector3(0f, 86f, 0f); public const float JUMP_BACK_SPEED = 1.55f; public const float JUMP_BACK_SPEED_PHASE_3 = 2f; public const float POSTURE_BREAK_SPEED = 1f; public const float POSTURE_BREAK_SPEED_PHASE_3 = 8.7f; public const float ATTACK_PARRYING_SPEED = 1f; public const float ATTACK_PARRYING_SPEED_PHASE_3 = 8.7f; public const float ROLL_THROUGH_SPEED = 1f; public const float ROLL_THROUGH_SPEED_PHASE_3 = 4.3f; } public static class EigongDebug { public const bool IS_DEBUG_ACTIVATED = false; public const bool EIGONG_STATE_LOG = false; public const bool TEST_YI_INVINCIBLE = false; public const bool IS_PAUSE_MENU_BG_INVISIBLE = true; public const float PHASE_1_HEALTH_MULTIPLIER = 1f; public const float PHASE_2_HEALTH_MULTIPLIER = 1f; public const float PHASE_3_HEALTH_MULTIPLIER = 1f; } } public static class MyPluginInfo { public const string PLUGIN_GUID = "PromisedEigong"; public const string PLUGIN_NAME = "PromisedEigong"; public const string PLUGIN_VERSION = "1.1.2"; } } namespace PromisedEigong.PoolObjectWrapper { [HarmonyPatch] public class PoolObjectPatches { public static event Action<SpriteRenderer> OnFoundTaiDanger; public static event Action<SpriteRenderer> OnFoundSimpleTaiDanger; public static event Action<ParticleSystem> OnFoundJieChuanFireParticles; public static event Action<SpriteRenderer> OnFoundJieChuanFireImage; public static event Action<SpriteRenderer> OnFoundFooExplosionSprite; public static event Action<SpriteRenderer> OnFoundFooSprite; public static event Action<SpriteRenderer> OnFoundCrimsonGeyserSprite; public static event Action<SpriteRenderer> OnFoundCrimsonPillarSprite; public static event Action<SpriteRenderer> OnFoundJudgmentCutLine; public static event Action<SpriteRenderer> OnFoundJudgmentCutShape1; public static event Action<SpriteRenderer> OnFoundJudgmentCutShape2; public static event Action<SpriteRenderer> OnFoundJudgmentCutEigongBody; public static event Action<SpriteRenderer> OnFoundJudgmentCutEigongHair; public static event Action<SpriteRenderer> OnFoundJudgmentCutEigongTianhuoHair; public static event Action<SpriteRenderer> OnFoundJudgmentCutEigongSword; [HarmonyPostfix] [HarmonyPatch(typeof(PoolObject), "EnterLevelAwake")] private static void PoolHijack(PoolObject __instance) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); string name = ((Scene)(ref activeScene)).name; if ((name == "A11_S0_Boss_YiGung_回蓬萊" || name == "A11_S0_Boss_YiGung") ? true : false) { InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "Effect_TaiDanger(Clone)", PoolObjectPatches.OnFoundTaiDanger); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "Fx_YiGong Foo Explosion_pool obj(Clone)", PoolObjectPatches.OnFoundFooExplosionSprite); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "Fx_YiGong 貼符(Clone)", PoolObjectPatches.OnFoundFooSprite); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "Fx_YiGong Upper12_pool obj(Clone)", PoolObjectPatches.OnFoundCrimsonGeyserSprite); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "FireExplosionPillar_FX_damage(Clone)", PoolObjectPatches.OnFoundCrimsonPillarSprite); InvokeCallbackForComponents<ParticleSystem>((MonoBehaviour)(object)__instance, "Fire_FX_damage_Long jiechuan(Clone)", PoolObjectPatches.OnFoundJieChuanFireParticles); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "Fire_FX_damage_Long jiechuan(Clone)", PoolObjectPatches.OnFoundJieChuanFireImage, "Light"); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "紅閃 FullScreen Slash FX Damage Danger(Clone)", PoolObjectPatches.OnFoundJudgmentCutLine, "Line"); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "紅閃 FullScreen Slash FX Damage Danger(Clone)", PoolObjectPatches.OnFoundJudgmentCutShape1, "SHape"); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "紅閃 FullScreen Slash FX Damage Danger(Clone)", PoolObjectPatches.OnFoundJudgmentCutShape2, "SHape 2"); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "白2 FullScreen Slash FX Damage(Clone)", PoolObjectPatches.OnFoundJudgmentCutEigongBody, "Body"); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "白2 FullScreen Slash FX Damage(Clone)", PoolObjectPatches.OnFoundJudgmentCutEigongHair, "YiGong_Hair"); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "白2 FullScreen Slash FX Damage(Clone)", PoolObjectPatches.OnFoundJudgmentCutEigongTianhuoHair, "YiGong_Virus"); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "白2 FullScreen Slash FX Damage(Clone)", PoolObjectPatches.OnFoundJudgmentCutEigongSword, "Sword Sprite"); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "白閃 FullScreen Slash FX Damage(Clone)", PoolObjectPatches.OnFoundJudgmentCutEigongBody, "Body"); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "白閃 FullScreen Slash FX Damage(Clone)", PoolObjectPatches.OnFoundJudgmentCutEigongHair, "YiGong_Hair"); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "白閃 FullScreen Slash FX Damage(Clone)", PoolObjectPatches.OnFoundJudgmentCutEigongTianhuoHair, "YiGong_Virus"); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "紅閃 FullScreen Slash FX Damage Danger(Clone)", PoolObjectPatches.OnFoundJudgmentCutEigongBody, "Body"); InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "紅閃 FullScreen Slash FX Damage Danger(Clone)", PoolObjectPatches.OnFoundJudgmentCutEigongHair, "YiGong_Hair"); } } [HarmonyPostfix] [HarmonyPatch(typeof(CustomPoolObject), "EnterLevelAwake")] private static void PoolHijack(CustomPoolObject __instance) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); string name = ((Scene)(ref activeScene)).name; if ((name == "A11_S0_Boss_YiGung_回蓬萊" || name == "A11_S0_Boss_YiGung") ? true : false) { InvokeCallbackForComponents<SpriteRenderer>((MonoBehaviour)(object)__instance, "SimpleEffect_TaiDanger", PoolObjectPatches.OnFoundSimpleTaiDanger); } } private static void InvokeCallbackForComponents<T>(MonoBehaviour instance, string objName, Action<T> callback) where T : Component { if (!(((Object)instance).name != objName)) { T[] componentsInChildren = ((Component)instance).GetComponentsInChildren<T>(true); foreach (T obj in componentsInChildren) { callback?.Invoke(obj); } } } private static void InvokeCallbackForComponents<T>(MonoBehaviour instance, string objName, Action<T> callback, string objNameComparison) where T : Component { if (((Object)instance).name != objName) { return; } T[] componentsInChildren = ((Component)instance).GetComponentsInChildren<T>(true); foreach (T val in componentsInChildren) { if (objNameComparison == ((Object)(object)val).name) { callback?.Invoke(val); } } } } } namespace PromisedEigong.ModSystem { public class BossPhaseProvider { private MonsterBase monster; public static int CurrentPreAnimationPhase { get; private set; } = -1; public static int CurrentPostAnimationPhase { get; private set; } public static event Action<int> OnPhaseChangePreAnimation; public static event Action<int> OnPhaseChangePostAnimation; public void Setup(MonsterBase monster) { this.monster = monster; } public void HandleUpdateStep() { if (!((Object)(object)monster == (Object)null)) { CheckPreAnimationChange(); CheckPostAnimationChange(); } } private void CheckPreAnimationChange() { if (monster.PhaseIndex != CurrentPreAnimationPhase && (!((Object)(object)monster.currentMonsterState != (Object)(object)monster.GetState((States)131)) || !((Object)(object)monster.currentMonsterState != (Object)(object)monster.GetState((States)146)))) { CurrentPreAnimationPhase = monster.PhaseIndex; BossPhaseProvider.OnPhaseChangePreAnimation?.Invoke(CurrentPreAnimationPhase); } } private void CheckPostAnimationChange() { if (monster.PhaseIndex != CurrentPostAnimationPhase) { CurrentPostAnimationPhase = monster.PhaseIndex; BossPhaseProvider.OnPhaseChangePostAnimation?.Invoke(CurrentPostAnimationPhase); } } public void Dispose() { CurrentPreAnimationPhase = -1; CurrentPostAnimationPhase = 0; } } public class CustomPoolObject : MonoBehaviour { public void EnterLevelAwake() { } } public class DualStatePool<T> { public HashSet<T> AllItemsSet { get; } = new HashSet<T>(); public HashSet<T> ActiveItemsSet { get; } = new HashSet<T>(); public Stack<T> InactiveItemsPool { get; } = new Stack<T>(); public T Fetch() { if (InactiveItemsPool.Count == 0) { return default(T); } T val = InactiveItemsPool.Pop(); ActiveItemsSet.Add(val); return val; } public void InsertAsActive(T item) { AllItemsSet.Add(item); ActiveItemsSet.Add(item); } public void InsertAsInactive(T item) { AllItemsSet.Add(item); ActiveItemsSet.Remove(item); InactiveItemsPool.Push(item); } } public class EigongWrapper : MonoBehaviour, ICoroutineRunner { private bool hasInitialized; private bool hasFinishedInitializing; private bool hasEigongDied; private AmbienceSource phasesOst; private BossPhaseProvider bossPhaseProvider; private GameplayEffectManager gameplayEffectManager; private SpeedChangerManager speedChangerManager; private AttackEventManager attackEventManager; private SceneConnectionPoint cutsceneConnectionPoint; public MonsterBase LoadedEigong => SingletonBehaviour<MonsterManager>.Instance.ClosetMonster; private PromisedEigongMain MainInstance => PromisedEigongMain.Instance; private EffectsManager EffectsManager => MainInstance.EffectsManager; private WhiteScreen WhiteScreen => MainInstance.WhiteScreen; public event Action<int> OnCurrentEigongPhaseChangedPreAnimation; public event Action<int> OnCurrentEigongPhaseChangedPostAnimation; public event Action OnEigongTransformed; private void Awake() { MainInstance.SubscribeEigongWrapper(this); ChangeFixedEigongColors(); ChangeEigongCutsceneTitle(); bossPhaseProvider = new BossPhaseProvider(); gameplayEffectManager = new GameplayEffectManager(); attackEventManager = new AttackEventManager(); AddListeners(); } private void Update() { WaitForEigongInitialization(); bossPhaseProvider.HandleUpdateStep(); } private void AddListeners() { BossPhaseProvider.OnPhaseChangePreAnimation += HandlePhaseChangePreAnimation; BossPhaseProvider.OnPhaseChangePostAnimation += HandlePhaseChangePostAnimation; GeneralGameplayPatches.OnAttackStartCalled += HandleEigongStateChanged; } private void RemoveListeners() { BossPhaseProvider.OnPhaseChangePreAnimation -= HandlePhaseChangePreAnimation; BossPhaseProvider.OnPhaseChangePostAnimation -= HandlePhaseChangePostAnimation; GeneralGameplayPatches.OnAttackStartCalled -= HandleEigongStateChanged; } private void WaitForEigongInitialization() { hasInitialized = (Object)(object)LoadedEigong != (Object)null; if (!hasInitialized) { hasFinishedInitializing = false; } else if (!hasFinishedInitializing) { HandleEigongInitialization(); hasFinishedInitializing = true; } } private void HandleEigongInitialization() { //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Expected O, but got Unknown cutsceneConnectionPoint = GameObject.Find("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/[CutScene] 易公死亡/演出結束換景 (要自己拉)").GetComponent<SceneConnectionPoint>(); ChangeCharacterEigongColors(); ChangeOST(); ChangeEigongHealth(); BossGeneralState[] allBossStates = Object.FindObjectsOfType<BossGeneralState>(); ChangeAttackSpeedsPhase1(allBossStates); CreateNewAttacks(allBossStates); ModifiedBossGeneralState[] modifiedBossGeneralStates = Object.FindObjectsOfType<ModifiedBossGeneralState>(); ChangeAttackWeights(modifiedBossGeneralStates); AddAttackIdentifiers(allBossStates); bossPhaseProvider.Setup(LoadedEigong); gameplayEffectManager.Setup(LoadedEigong, this, this); attackEventManager.Setup(this, Object.FindObjectOfType<JudgmentCutSpawners>()); gameplayEffectManager.Initialize(); attackEventManager.Initialize(); LoadedEigong.postureSystem.OnPostureEmpty.AddListener(new UnityAction(HandlePostureEmpty)); } private void ChangeOST() { phasesOst = GameMusicPlayer.GetAmbienceSourceAtPath("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/Boss三階BGM/BGM_Boss_A11_P3"); GameMusicPlayer.ChangeMusic(this, phasesOst, "BGM_Boss_A11_P3", 0f); } private void ChangeEigongHealth() { MainHealthChanger mainHealthChanger = new MainHealthChanger(); mainHealthChanger.ChangeBaseHealthStat(LoadedEigong, 4444f); mainHealthChanger.ChangeHealthInPhase1(LoadedEigong, 4444f); mainHealthChanger.ChangeHealthInRemainingPhases(LoadedEigong, 1, 5555f, 4444f); mainHealthChanger.ChangeHealthInRemainingPhases(LoadedEigong, 2, 6666f, 4444f); } private void ChangeAttackWeights(ModifiedBossGeneralState[] modifiedBossGeneralStates) { new WeightChangerManager().ChangeWeights(new _1SlowStarterWeightChanger(), new _2TeleportToTopWeightChanger(), new _3ThrustDelayWeightChanger(), new _4SlashUpWeightChanger(), new _5TeleportToBackWeightChanger(), new _6DoubleAttackWeightChanger(), new _7TeleportForwardWeightChanger(), new _8LongChargeWeightChanger(), new _9StarterWeightChanger(), new _10FooWeightChanger(), new _11ChargeWaveWeightChanger(), new _12SlashUpCrimsonWeightChanger(), new _13TriplePokeWeightChanger(), new _15TurnAroundWeightChanger(), new _16QuickFooWeightChanger(), new _17CrimsonSlamWeightChanger(), new _18TeleportToBackComboWeightChanger(), new _X1PostureBreakWeightChanger(), new _X2JumpBackWeightChanger(), new _X3AttackParryingWeightChanger()); for (int i = 0; i < modifiedBossGeneralStates.Length; i++) { modifiedBossGeneralStates[i].ResetOriginalWeights(); } } private void CreateNewAttacks(BossGeneralState[] allBossStates) { BaseAttackFactory[] array = new BaseAttackFactory[19] { new _21QuickCrimsonBallFactory(), new _22SlowStarterPokeChainFactory(), new _23TriplePokeChainFactory(), new _24DoubleAttackPokeChainFactory(), new _25SlashUpCrimsonPokeChainFactory(), new _26TeleportToBackSecondPokeChainFactory(), new _27ChargeWavePokeChainFactory(), new _28TeleportToBackComboPokeChainFactory(), new _29TeleportToBackFirstPokeChainFactory(), new _30JumpBackPokeChainFactory(), new _32TeleportToBackSpecialCrimsonSlamPhase3Factory(), new _33SpecialCrimsonSlamPhase3Factory(), new _34TeleportToTopSafeguardPhase3Factory(), new _35JumpBackSafeguardPhase3Factory(), new _36AlternateSlashUpCrimsonPokeChainFactory(), new _37AlternateJumpBackPokeChainFactory(), new _38SpecialDoubleAttackFactory(), new _39SpecialDAJumpBackPhase3Factory(), new _40TeleportToBackComboPhase3Changer() }; foreach (BaseAttackFactory baseAttackFactory in array) { foreach (BossGeneralState val in allBossStates) { if (!(((Object)val).name != baseAttackFactory.AttackToBeCopied)) { baseAttackFactory.CopyAttack(val); break; } } } GameObject.Find("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/").AddComponent<ModifiedBossGeneralStateManager>(); } private void AddAttackIdentifiers(BossGeneralState[] allBossStates) { foreach (BossGeneralState val in allBossStates) { ((Component)val).gameObject.AddComponent<BossStateIdentifier>().IdName = ((Object)val).name; } } private void ChangeAttackSpeedsPhase1(BossGeneralState[] allBossStates) { speedChangerManager = new SpeedChangerManager(); speedChangerManager.SetBossStates(allBossStates); speedChangerManager.SetPhase(0); speedChangerManager.SetupSpeedChangers(new _1SlowStarterSpeedChanger(), new _2TeleportToTopSpeedChanger(), new _3ThrustDelaySpeedChanger(), new _4SlashUpSpeedChanger(), new _5TeleportToBackSpeedChanger(), new _6DoubleAttackSpeedChanger(), new _7TeleportForwardSpeedChanger(), new _8LongChargeSpeedChanger(), new _9StarterSpeedChanger(), new _10FooSpeedChanger(), new _11ChargeWaveSpeedChanger(), new _12SlashUpCrimsonSpeedChanger(), new _13TriplePokeSpeedChanger(), new _14CrimsonBallSpeedChanger(), new _15TurnAroundSpeedChanger(), new _16QuickFooSpeedChanger(), new _17CrimsonSlamSpeedChanger(), new _18TeleportToBackComboSpeedChanger(), new _X1PostureBreakSpeedChanger(), new _X2JumpBackSpeedChanger(), new _X3AttackParryingSpeedChanger(), new _X4RollThroughSpeedChanger()); speedChangerManager.ProcessSpeeds(); } private void ChangeAttackSpeedsPhase3() { speedChangerManager.SetPhase(2); speedChangerManager.ProcessSpeeds(); } private void ChangeFixedEigongColors() { EffectsManager.ChangeFixedEigongColors(); } private void ChangeCharacterEigongColors() { EffectsManager.ChangeCharacterEigongColors(); } private void ChangeEigongCutsceneTitle() { ((TMP_Text)GameObject.Find("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/[CutScene] 一進/Boss Intro Acting 字卡/View/Boss_YiGung/Subtitle_Text/Title").GetComponent<TextMeshPro>()).text = "Promised Eigong"; } private void HandleEigongStateChanged(BossStateIdentifier currentState) { LogStates(currentState); } private void HandlePostureEmpty() { if (!hasEigongDied && BossPhaseProvider.CurrentPostAnimationPhase == 2) { ((MonoBehaviour)MainInstance).StartCoroutine(BlinkWhiteScreenOnEigongDeath(!ApplicationCore.IsInBossMemoryMode)); hasEigongDied = true; } } private void HandlePhaseChangePreAnimation(int phase) { if (phase == 1) { ChangeAttackSpeedsPhase3(); ((MonoBehaviour)this).StartCoroutine(LoopPhase3Music()); ((MonoBehaviour)this).StartCoroutine(WaitForEigongTransformation()); } this.OnCurrentEigongPhaseChangedPreAnimation?.Invoke(phase); } private void HandlePhaseChangePostAnimation(int phase) { this.OnCurrentEigongPhaseChangedPostAnimation?.Invoke(phase); } private IEnumerator WaitForEigongTransformation() { yield return (object)new WaitForSeconds(6.648f); this.OnEigongTransformed?.Invoke(); } private IEnumerator BlinkWhiteScreenOnEigongDeath(bool transitionIntoCutscene) { float timer = 2.5f; WhiteScreen.Show(); yield return (object)new WaitForSeconds(WhiteScreen.ShowDuration); if (transitionIntoCutscene) { cutsceneConnectionPoint.ForceChangeScene(); } while (timer > 0f) { timer -= Time.deltaTime; yield return null; } WhiteScreen.Hide(); } private IEnumerator LoopPhase3Music() { while (true) { GameMusicPlayer.ChangeMusic(this, phasesOst, "", 0f); yield return null; GameMusicPlayer.ChangeMusic(this, phasesOst, "BGM_EndCredit_NineSols", 0f); yield return (object)new WaitForSeconds(249f); } } private void LogStates(BossStateIdentifier currentState) { } private void OnDestroy() { RemoveListeners(); gameplayEffectManager?.Dispose(); bossPhaseProvider?.Dispose(); attackEventManager?.Dispose(); ((MonoBehaviour)this).StopAllCoroutines(); } Coroutine ICoroutineRunner.StartCoroutine(IEnumerator routine) { return ((MonoBehaviour)this).StartCoroutine(routine); } void ICoroutineRunner.StopCoroutine(IEnumerator routine) { ((MonoBehaviour)this).StopCoroutine(routine); } } public interface ICoroutineRunner { Coroutine StartCoroutine(IEnumerator routine); void StopCoroutine(IEnumerator routine); } public class PreloadingManager { [CompilerGenerated] private ICoroutineRunner <coroutineRunner>P; [Preload("結局演出_大爆炸 P2", "GameLevel/Room/3DBG Master 背景/BIGBAD")] private GameObject bigBad; [Preload("結局演出_大爆炸 P2", "GameLevel/CameraCore/DockObj/OffsetObj/ShakeObj/SceneCamera/AmplifyLightingSystem/FxCamera")] private GameObject beautifulFXCamera; private KPreload preloader; public GameObject BigBad => bigBad; public GameObject BeautifulFXCamera => beautifulFXCamera; public event Action OnLoadingDone; public PreloadingManager(ICoroutineRunner coroutineRunner) { <coroutineRunner>P = coroutineRunner; base..ctor(); } public void Setup() { preloader = new KPreload(HandleProgressStep); preloader.AddPreloadClass(this); } public void StartPreloading() { <coroutineRunner>P.StartCoroutine(preloader.Preload(<coroutineRunner>P)); } private void OnLoadDone() { this.OnLoadingDone?.Invoke(); } private void HandleProgressStep(float progress) { if (!(progress < 1f)) { OnLoadDone(); } } public void Dispose() { preloader.Unload(); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("PromisedEigong", "PromisedEigong", "1.1.2")] public class PromisedEigongMain : BaseUnityPlugin, ICoroutineRunner { public Action OnEigongWrapperUpdated; public Harmony Harmony; public static ConfigEntry<bool> isLvl0Challenge; public static ConfigEntry<bool> shufflerChallenge; public static ConfigEntry<bool> shouldSkipHub; public static ConfigEntry<bool> highContrastEigong; public static ConfigEntry<GraphicsSettingsType> graphicsSettings; public static ConfigEntry<float> spriteFlasherStrength; private ConfigEntry<bool> isUsingHotReload; private bool canPreload = true; public static PromisedEigongMain Instance { get; private set; } public PreloadingManager PreloadingManager { get; private set; } public EffectsManager EffectsManager { get; private set; } public WhiteScreen WhiteScreen { get; private set; } public EigongWrapper EigongWrapper { get; private set; } private void Awake() { Instance = this; Initialize(); DisplayLoadedVersion(); InitializeSubmodels(); ApplyConfig(); AddListeners(); } public void SubscribeEigongWrapper(EigongWrapper eigongWrapper) { EigongWrapper = eigongWrapper; OnEigongWrapperUpdated?.Invoke(); } private void Initialize() { KLog.Init(((BaseUnityPlugin)this).Logger); RCGLifeCycle.DontDestroyForever(((Component)this).gameObject); Harmony = Harmony.CreateAndPatchAll(typeof(PromisedEigongMain).Assembly, (string)null); } private void DisplayLoadedVersion() { ToastManager.Toast((object)"PromisedEigong v1.1.2: Loaded."); } private void InitializeSubmodels() { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown PreloadingManager = new PreloadingManager(this); PreloadingManager.Setup(); EffectsManager = new EffectsManager(); EffectsManager.Setup(); GameObject val = new GameObject(); RCGLifeCycle.DontDestroyForever(val); WhiteScreen = val.AddComponent<WhiteScreen>(); } private void ApplyConfig() { isLvl0Challenge = ((BaseUnityPlugin)this).Config.Bind<bool>("Challenge", "LVL0Challenge", false, "(STILL WIP) For now, all this does is make the fire damage more forgiving. Makes lvl 0 challenges a little more bearable."); shufflerChallenge = ((BaseUnityPlugin)this).Config.Bind<bool>("Challenge", "ShufflerChallenge", true, "Shuffles every attack transition as an added challenge to prevent AI manipulation."); highContrastEigong = ((BaseUnityPlugin)this).Config.Bind<bool>("Graphics", "High Contrast Eigong", false, "If you're having trouble with Eigong's visibility in Phase 3, toggle this ON and she should have more contrast with the background."); graphicsSettings = ((BaseUnityPlugin)this).Config.Bind<GraphicsSettingsType>("Graphics", "General Mod Graphics", GraphicsSettingsType.High, "Change here the settings of the mod's graphics if you're having performance issues."); spriteFlasherStrength = ((BaseUnityPlugin)this).Config.Bind<float>("Graphics", "Sprite Flasher Strength", 0.7f, "The strength value in which Eigong's sprite will flash when hit. From 0 to 1, 0 does not flash at all, while 1 flashes the strongest."); shouldSkipHub = ((BaseUnityPlugin)this).Config.Bind<bool>("Debug", "AutoSkipHub", false, "Auto skip New Kunlun Control Hub if you're playing an Eigong save outside of MoB."); isUsingHotReload = ((BaseUnityPlugin)this).Config.Bind<bool>("Debug", "IsUsingHotReload", false, "Only Enable this to true if you're developing this mod with Hot Reload."); if (isUsingHotReload.Value) { HandleTitleScreenMenuLoaded(); } } private void AddListeners() { SystemPatches.OnPauseOpened += HandlePauseOpened; SystemPatches.OnTitleScreenMenuLoaded += HandleTitleScreenMenuLoaded; SystemPatches.OnTitleScreenMenuUnloaded += HandleTitleScreenMenuUnloaded; PreloadingManager.OnLoadingDone += HandlePreloadingDone; } private void HandlePauseOpened(PauseUIPanel pauseMenu) { ((Behaviour)((Component)pauseMenu).GetComponent<Image>()).enabled = false; } private void HandleTitleScreenMenuLoaded() { if (canPreload) { PreloadingManager.StartPreloading(); canPreload = false; } } private void HandleTitleScreenMenuUnloaded() { canPreload = true; } private void HandlePreloadingDone() { SceneManager.LoadScene("TitleScreenMenu"); } private void OnDestroy() { Harmony.UnpatchSelf(); PreloadingManager.Dispose(); EffectsManager.Dispose(); } Coroutine ICoroutineRunner.StartCoroutine(IEnumerator routine) { return ((MonoBehaviour)this).StartCoroutine(routine); } void ICoroutineRunner.StopCoroutine(IEnumerator routine) { ((MonoBehaviour)this).StopCoroutine(routine); } } [HarmonyPatch] public class SystemPatches { public static event Action<PauseUIPanel> OnPauseOpened; public static event Action OnTitleScreenMenuLoaded; public static event Action OnTitleScreenMenuUnloaded; [HarmonyPrefix] [HarmonyPatch(typeof(StartMenuLogic), "Awake")] private static void TitleScreenSpawn(StartMenuLogic __instance) { SystemPatches.OnTitleScreenMenuLoaded?.Invoke(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartMenuLogic), "CreateOrLoadSaveSlotAndPlay")] private static void TitleScreenDespawn(StartMenuLogic __instance) { SystemPatches.OnTitleScreenMenuUnloaded?.Invoke(); } [HarmonyPrefix] [HarmonyPatch(typeof(StealthGameMonster), "Awake")] private static void AddEigongWrapper(StealthGameMonster __instance) { if (((MonsterBase)__instance).BindMonster.Name == "Boss_Yi Gung") { ((Component)__instance).gameObject.AddComponent<EigongWrapper>(); } } [HarmonyPrefix] [HarmonyPatch(typeof(GameLevel), "Awake")] private static void AddGameLevelComponents(GameLevel __instance) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0005: Unknown result type (might be due to invalid IL or missing references) Scene activeScene = SceneManager.GetActiveScene(); switch (((Scene)(ref activeScene)).name) { case "AG_ST_Hub": MonoNodeExtension.AddComp((Component)(object)__instance, typeof(NewKunlunRoomChanger)); break; case "A11_S0_Boss_YiGung_回蓬萊": case "A11_S0_Boss_YiGung": MonoNodeExtension.AddComp((Component)(object)__instance, typeof(RootPinnacleBackgroundChanger)); MonoNodeExtension.AddComp((Component)(object)__instance, typeof(TitleChanger)); MonoNodeExtension.AddComp((Component)(object)__instance, typeof(JudgmentCutSpawners)); break; } } [HarmonyPrefix] [HarmonyPatch(typeof(Player), "Awake")] private static void AddPlayerComponents(Player __instance) { MonoNodeExtension.AddComp((Component)(object)__instance, typeof(PlayerWrapper)); } [HarmonyPostfix] [HarmonyPatch(typeof(PauseUIPanel), "ShowInit")] private static void CallPauseOpened(PauseUIPanel __instance) { SystemPatches.OnPauseOpened?.Invoke(__instance); } } } namespace PromisedEigong.Localization { [HarmonyPatch] public class LocalizationPatches { [HarmonyPostfix] [HarmonyPatch(typeof(LocalizationManager), "GetTranslation")] private static void ChangeEigongName(string Term, ref string __result) { if (!(Term != "Characters/NameTag_YiKong")) { __result = PromisedEigongModGlobalSettings.EigongTitle.GetEigongName(LocalizationManager.CurrentLanguageCode, __result); } } [HarmonyPostfix] [HarmonyPatch(typeof(LocalizationManager), "GetTranslation")] private static void ChangeRootProgressText(string Term, ref string __result) { if (Term == "AG_ST_Hub/M322_AG_ST_古樹解封進度_Bubble00") { __result = "Root Decryption Progress: <color=#FF0000>ERROR ERROR 99% ERROR ERROR</color>"; } } } } namespace PromisedEigong.Core { internal static class KLog { private static ManualLogSource logSource; private static string PREFIX = "KLOG! "; internal static void Init(ManualLogSource logSource) { KLog.logSource = logSource; } internal static void Debug(object data) { logSource.LogDebug((object)(PREFIX + data)); } internal static void Error(object data) { logSource.LogError((object)(PREFIX + data)); } internal static void Fatal(object data) { logSource.LogFatal((object)(PREFIX + data)); } internal static void Info(object data) { logSource.LogInfo((object)(PREFIX + data)); } internal static void Message(object data) { logSource.LogMessage((object)(PREFIX + data)); } internal static void Warning(object data) { logSource.LogWarning((object)(PREFIX + data)); } } public class KPreload { [CompilerGenerated] private Action<float> <onProgress>P; public static bool IsPreloading; private Dictionary<string, List<(string, IPreloadTarget)>> preloadTypes; private List<(GameObject, IPreloadTarget)> preloadObjs; private List<AsyncOperation> preloadOperationQueue; private List<AsyncOperation> inProgressLoads; private List<AsyncOperation> inProgressUnloads; private int target; public KPreload(Action<float> onProgress) { <onProgress>P = onProgress; preloadTypes = new Dictionary<string, List<(string, IPreloadTarget)>>(); preloadObjs = new List<(GameObject, IPreloadTarget)>(); preloadOperationQueue = new List<AsyncOperation>(); inProgressLoads = new List<AsyncOperation>(); inProgressUnloads = new List<AsyncOperation>(); base..ctor(); } public void AddPreload(string scene, string path, IPreloadTarget target) { if (!preloadTypes.TryGetValue(scene, out var value)) { value = new List<(string, IPreloadTarget)>(); preloadTypes.Add(scene, value); } value.Add((path, target)); } public void AddPreloadList(IEnumerable<(string, string)> paths, List<GameObject> outList) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown ListPreloadTarget val = new ListPreloadTarget(outList); foreach (var path in paths) { AddPreload(path.Item1, path.Item2, (IPreloadTarget)(object)val); } } public void AddPreloadClass<T>(T obj) { //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown if (IsPreloading) { KLog.Error("tried to call AddPreloadClass during preloading"); return; } FieldInfo[] fields = obj.GetType().GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); foreach (FieldInfo fieldInfo in fields) { PreloadAttribute customAttribute = ((MemberInfo)fieldInfo).GetCustomAttribute<PreloadAttribute>(); if (customAttribute != null) { AddPreload(customAttribute.Scene, customAttribute.Path, (IPreloadTarget)new ReflectionPreloadTarget((object)obj, fieldInfo)); } } } private IEnumerator DoPreloadScene(string sceneName, List<(string, IPreloadTarget)> scenePreloads) { AsyncOperation loadOp = SceneManager.LoadSceneAsync(sceneName, (LoadSceneMode)1); if (loadOp == null) { ToastManager.Toast((object)("Error loading scene: " + sceneName)); target--; yield break; } preloadOperationQueue.Add(loadOp); inProgressLoads.Add(loadOp); yield return loadOp; Scene sceneByName = SceneManager.GetSceneByName(sceneName); try { GameObject[] rootGameObjects = ((Scene)(ref sceneByName)).GetRootGameObjects(); GameObject[] array = rootGameObjects; for (int i = 0; i < array.Length; i++) { array[i].SetActive(false); } foreach (var scenePreload in scenePreloads) { string item = scenePreload.Item1; IPreloadTarget item2 = scenePreload.Item2; GameObject gameObjectFromArray = KUtils.GetGameObjectFromArray(rootGameObjects, item); if ((Object)(object)gameObjectFromArray == (Object)null) { KLog.Error("could not preload " + item + " in " + sceneName); item2.Set((GameObject)null, sceneName, item); continue; } GameObject val = Object.Instantiate<GameObject>(gameObjectFromArray); val.SetActive(false); Object.DontDestroyOnLoad((Object)(object)val); AutoAttributeManager.AutoReference(val); preloadObjs.Add((val, item2)); item2.Set(val, sceneName, item); } } catch (Exception data) { KLog.Error(data); } AsyncOperation val2 = SceneManager.UnloadSceneAsync(sceneName); inProgressUnloads.Add(val2); yield return val2; preloadOperationQueue.Remove(loadOp); } private IEnumerator DoPreload(ICoroutineRunner coroutineRunner) { if (preloadTypes.Count == 0) { yield break; } KLog.Info($"Preloading {preloadTypes.Count} scenes"); Stopwatch watch = Stopwatch.StartNew(); IsPreloading = true; DestroyAllGameObjects.DestroyingAll = true; try { target = preloadTypes.Count; Dictionary<string, List<(string, IPreloadTarget)>>.Enumerator preloadsToDo = preloadTypes.GetEnumerator(); float num = 0f; while ((double)num < 1.0) { while (preloadOperationQueue.Count < 4 && preloadsToDo.MoveNext()) { var (sceneName, scenePreloads) = (KeyValuePair<string, List<(string, IPreloadTarget)>>)(ref preloadsToDo.Current); coroutineRunner.StartCoroutine(DoPreloadScene(sceneName, scenePreloads)); if (inProgressLoads.Count % 4 == 0) { Stopwatch watchRes = Stopwatch.StartNew(); yield return Resources.UnloadUnusedAssets(); watchRes.Stop(); KLog.Info($"collecting resources in ${watchRes.ElapsedMilliseconds}"); } } yield return null; float num2 = inProgressLoads.Sum((AsyncOperation loadOp) => loadOp.progress * 0.5f) + inProgressUnloads.Sum((AsyncOperation loadOp) => loadOp.progress * 0.5f); num = ((target == 0) ? 1f : (num2 / (float)target)); <onProgress>P(num); KLog.Info($"progress {num}/1, in flight {preloadOperationQueue.Count}"); } } finally { KPreload kPreload = this; DestroyAllGameObjects.DestroyingAll = false; IsPreloading = false; kPreload.inProgressLoads.Clear(); kPreload.inProgressUnloads.Clear(); kPreload.preloadOperationQueue.Clear(); } watch.Stop(); KLog.Info($"Preloading done with {preloadObjs.Count} objects in {watch.ElapsedMilliseconds}ms"); } internal IEnumerator Preload(ICoroutineRunner coroutineRunner) { Scene activeScene = SceneManager.GetActiveScene(); if (((Scene)(ref activeScene)).name == "TitleScreenMenu") { yield return DoPreload(coroutineRunner); } <onProgress>P(1f); } internal void Unload() { foreach (var (val, val2) in preloadObjs) { if (Object.op_Implicit((Object)(object)val)) { Object.Destroy((Object)(object)val); } GameObject val3 = val; val2.Unset(val3); } preloadObjs.Clear(); } } public class KUtils { internal static GameObject? GetGameObjectFromArray(GameObject[] objects, string objName) { string text = string.Empty; int num = objName.IndexOf('/'); string rootName; if (num != -1) { if (num == 0 || num == objName.Length - 1) { throw new ArgumentException("Invalid GameObject path"); } rootName = objName.Substring(0, num); int num2 = num + 1; text = objName.Substring(num2, objName.Length - num2); } else { rootName = objName; } GameObject val = ((IEnumerable<GameObject>)objects).FirstOrDefault((Func<GameObject, bool>)((GameObject o) => ((Object)o).name == rootName)); if ((Object)(object)val == (Object)null) { return null; } if (text == string.Empty) { return val; } Transform val2 = val.transform.Find(text); if (!Object.op_Implicit((Object)(object)val2)) { return null; } return ((Component)val2).gameObject; } } } namespace PromisedEigong.WeightChanges { public abstract class BaseWeightChanger { protected BossGeneralState associatedBossState; protected LinkNextMoveStateWeight targetStateWeight = new LinkNextMoveStateWeight(); protected List<BossGeneralState> bossStates = new List<BossGeneralState>(); protected List<ModifiedBossGeneralState> modifiedBossStates = new List<ModifiedBossGeneralState>(); private FieldRef<BossGeneralState, LinkMoveGroupingNode[]> groupingNodesRef = AccessTools.FieldRefAccess<BossGeneralState, LinkMoveGroupingNode[]>("groupingNodes"); private FieldRef<LinkMoveGroupingNode, MonsterStateQueue> queueRef = AccessTools.FieldRefAccess<LinkMoveGroupingNode, MonsterStateQueue>("queue"); protected virtual WeightReplaceMode WeightReplaceMode { get; set; } public abstract void ChangeAttackWeight(); protected virtual void ProcessCurrentWeight() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) List<AttackWeight> list = new List<AttackWeight>(); foreach (BossGeneralState bossState in bossStates) { list.Add(CreateWeight(bossState)); } foreach (ModifiedBossGeneralState modifiedBossState in modifiedBossStates) { list.Add(CreateWeight(modifiedBossState)); } switch (WeightReplaceMode) { case WeightReplaceMode.Replace: targetStateWeight.stateWeightList = list; break; case WeightReplaceMode.Add: { foreach (AttackWeight item in list) { if (!targetStateWeight.stateWeightList.Contains(item)) { targetStateWeight.stateWeightList.Add(item); } } break; } default: throw new ArgumentOutOfRangeException(); } } protected virtual void ProcessCurrentGroupNodeWeight(int groupingNodeIndex, int phaseIndex) { //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) List<AttackWeight> list = new List<AttackWeight>(); foreach (BossGeneralState bossState in bossStates) { list.Add(CreateWeight(bossState)); } foreach (ModifiedBossGeneralState modifiedBossState in modifiedBossStates) { list.Add(CreateWeight(modifiedBossState)); } LinkMoveGroupingNode val = groupingNodesRef.Invoke(associatedBossState)[groupingNodeIndex]; LinkNextMoveStateWeight val2 = queueRef.Invoke(val).linkNextMoveStateWeights[phaseIndex]; switch (WeightReplaceMode) { case WeightReplaceMode.Replace: val2.stateWeightList = list; break; case WeightReplaceMode.Add: { foreach (AttackWeight item in list) { if (!val2.stateWeightList.Contains(item)) { val2.stateWeightList.Add(item); } } break; } default: throw new ArgumentOutOfRangeException(); } } protected void CreateStateWeight(string parentPath, string objClonePath, string name) { LinkNextMoveStateWeight component = GameObject.Find(objClonePath).GetComponent<LinkNextMoveStateWeight>(); Transform transform = GameObject.Find(parentPath).transform; LinkNextMoveStateWeight val = Object.Instantiate<LinkNextMoveStateWeight>(component, transform); ((Object)val).name = name; targetStateWeight = val; associatedBossState.linkNextMoveStateWeights.Add(val); } protected void SetStateWeight(string path) { targetStateWeight = GameObject.Find(path).GetComponent<LinkNextMoveStateWeight>(); } protected void SetAssociatedBossState(string path) { associatedBossState = GameObject.Find(path).GetComponent<BossGeneralState>(); } protected void CreateAndAddBossState(string path) { BossGeneralState component = GameObject.Find(path).GetComponent<BossGeneralState>(); bossStates.Add(component); } protected void CreateAndAddModifiedBossState(string path) { ModifiedBossGeneralState component = GameObject.Find(path).GetComponent<ModifiedBossGeneralState>(); modifiedBossStates.Add(component); component.SubscribeSource(((Object)associatedBossState).name); } protected void ClearBossStates() { bossStates.Clear(); modifiedBossStates.Clear(); } protected void SetWeightRandomness(bool isRandom) { targetStateWeight.IsRandom = isRandom; } protected AttackWeight CreateWeight(BossGeneralState bossState, int specifiedWeight = 1) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) AttackWeight result = default(AttackWeight); result.state = (MonsterState)(object)bossState; result.weight = specifiedWeight; return result; } protected AttackWeight CreateWeight(ModifiedBossGeneralState bossState, int specifiedWeight = 1) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) AttackWeight result = default(AttackWeight); result.state = (MonsterState)(object)bossState.BaseState; result.weight = specifiedWeight; return result; } } public class WeightChangerManager { public void ChangeWeights(params BaseWeightChanger[] weightChangers) { for (int i = 0; i < weightChangers.Length; i++) { weightChangers[i].ChangeAttackWeight(); } } } public enum WeightReplaceMode { Replace, Add } public class _10FooWeightChanger : BaseWeightChanger { public override void ChangeAttackWeight() { ChangePhase1(); ChangePhase2(); ChangePhase3(); } private void ChangePhase1() { SetStateWeight("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[10] Danger Foo Grab/interrupt weight"); SetAssociatedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[10] Danger Foo Grab"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[3] Thrust Delay 一閃"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[9] Starter"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/JumpBack"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[6] Double Attack"); ProcessCurrentWeight(); } private void ChangePhase2() { ClearBossStates(); SetStateWeight("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[10] Danger Foo Grab/interrupt weight (1)"); SetAssociatedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[10] Danger Foo Grab"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[2] Teleport To Top"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[3] Thrust Delay 一閃"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[4] Slash Up 上撈下打 大反危"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[12] UpSlash Down Danger"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[6] Double Attack"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[2] Teleport To Top"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/JumpBack"); ProcessCurrentWeight(); } private void ChangePhase3() { ClearBossStates(); WeightReplaceMode = WeightReplaceMode.Add; SetStateWeight("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[10] Danger Foo Grab/interrupt weight (2)"); SetAssociatedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[10] Danger Foo Grab"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[2] Teleport To Top"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[3] Thrust Delay 一閃"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[4] Slash Up 上撈下打 大反危"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[12] UpSlash Down Danger"); CreateAndAddModifiedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[38] Special Double Attack"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/JumpBack"); ProcessCurrentWeight(); } } public class _11ChargeWaveWeightChanger : BaseWeightChanger { protected override WeightReplaceMode WeightReplaceMode => WeightReplaceMode.Add; public override void ChangeAttackWeight() { ChangePhase2(); ChangePhase3(); } private void ChangePhase2() { SetStateWeight("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[11] GiantChargeWave 紅白白紅/weight (2)"); SetAssociatedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[11] GiantChargeWave 紅白白紅"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[3] Thrust Delay 一閃"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[2] Teleport To Top"); CreateAndAddModifiedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[21] Quick Crimson Ball"); CreateAndAddModifiedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[22] Slow Starter (Poke Chain 1)"); SetWeightRandomness(isRandom: true); ProcessCurrentWeight(); } private void ChangePhase3() { ClearBossStates(); WeightReplaceMode = WeightReplaceMode.Add; SetStateWeight("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[11] GiantChargeWave 紅白白紅/weight (3)"); SetAssociatedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[11] GiantChargeWave 紅白白紅"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[3] Thrust Delay 一閃"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[2] Teleport To Top"); CreateAndAddModifiedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[21] Quick Crimson Ball"); CreateAndAddModifiedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[22] Slow Starter (Poke Chain 1)"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[19] Thrust Full Screen Slash"); SetWeightRandomness(isRandom: true); ProcessCurrentWeight(); } } public class _12SlashUpCrimsonWeightChanger : BaseWeightChanger { public override void ChangeAttackWeight() { ChangePhase2(); } private void ChangePhase2() { SetStateWeight("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[12] UpSlash Down Danger/weight (1)"); SetAssociatedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[12] UpSlash Down Danger"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/JumpBack"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[3] Thrust Delay 一閃"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[18] Teleport to Back Combo"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[8] Long Charge (2階才有"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[9] Starter"); SetWeightRandomness(isRandom: true); ProcessCurrentWeight(); } } public class _13TriplePokeWeightChanger : BaseWeightChanger { protected override WeightReplaceMode WeightReplaceMode => WeightReplaceMode.Add; public override void ChangeAttackWeight() { ChangePhase1(); ChangePhase2(); } private void ChangePhase1() { SetStateWeight("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[13] Tripple Poke 三連/weight"); SetAssociatedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[13] Tripple Poke 三連"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[9] Starter"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[2] Teleport To Top"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/JumpBack"); ProcessCurrentWeight(); } private void ChangePhase2() { ClearBossStates(); SetStateWeight("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[13] Tripple Poke 三連/weight (1)"); SetAssociatedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[13] Tripple Poke 三連"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[9] Starter"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[2] Teleport To Top"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/JumpBack"); ProcessCurrentWeight(); } } public class _15TurnAroundWeightChanger : BaseWeightChanger { protected override WeightReplaceMode WeightReplaceMode => WeightReplaceMode.Add; public override void ChangeAttackWeight() { ChangePhase2(); } private void ChangePhase2() { SetStateWeight("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[15] TurnAroundPrepare/weight (1)"); SetAssociatedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[15] TurnAroundPrepare"); CreateAndAddModifiedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[21] Quick Crimson Ball"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[2] Teleport To Top"); ProcessCurrentWeight(); } } public class _16QuickFooWeightChanger : BaseWeightChanger { public override void ChangeAttackWeight() { ChangePhase1(); ChangePhase2(); ChangePhase3(); } private void ChangePhase1() { SetStateWeight("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[16] QuickFoo/interrupt weight"); SetAssociatedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[16] QuickFoo"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[3] Thrust Delay 一閃"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[9] Starter"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/JumpBack"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[1] Starter Slow Attack 慢刀前揮"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[6] Double Attack"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[2] Teleport To Top"); ProcessCurrentWeight(); } private void ChangePhase2() { ClearBossStates(); SetStateWeight("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[16] QuickFoo/interrupt weight (1)"); SetAssociatedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[16] QuickFoo"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[2] Teleport To Top"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[3] Thrust Delay 一閃"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[4] Slash Up 上撈下打 大反危"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[12] UpSlash Down Danger"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[1] Starter Slow Attack 慢刀前揮"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[6] Double Attack"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/JumpBack"); ProcessCurrentWeight(); } private void ChangePhase3() { ClearBossStates(); WeightReplaceMode = WeightReplaceMode.Add; SetStateWeight("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[16] QuickFoo/interrupt weight (2)"); SetAssociatedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[16] QuickFoo"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[2] Teleport To Top"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[3] Thrust Delay 一閃"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[4] Slash Up 上撈下打 大反危"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[12] UpSlash Down Danger"); CreateAndAddModifiedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[38] Special Double Attack"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/JumpBack"); ProcessCurrentWeight(); } } public class _17CrimsonSlamWeightChanger : BaseWeightChanger { public override void ChangeAttackWeight() { ChangePhase1(); ChangePhase2(); ChangePhase3(); } private void ChangePhase1() { SetStateWeight("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[17] DownAttack Danger 空中下危/weight"); SetAssociatedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[17] DownAttack Danger 空中下危"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[2] Teleport To Top"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[5] Teleport to Back"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[6] Double Attack"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[1] Starter Slow Attack 慢刀前揮"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[7] Teleport Dash Forward"); ProcessCurrentWeight(); } private void ChangePhase2() { ClearBossStates(); SetStateWeight("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[17] DownAttack Danger 空中下危/weight (1)"); SetAssociatedBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[17] DownAttack Danger 空中下危"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[2] Teleport To Top"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[5] Teleport to Back"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FSM Animator/LogicRoot/---Boss---/Boss_Yi Gung/States/Attacks/[4] Slash Up 上撈下打 大反危"); CreateAndAddBossState("GameLevel/Room/Prefab/EventBinder/General Boss Fight FSM Object Variant/FS