diff --git a/CharmOverhaul/CharmOverhaul.cs b/CharmOverhaul/CharmOverhaul.cs index 0d52c16..37a33b0 100644 --- a/CharmOverhaul/CharmOverhaul.cs +++ b/CharmOverhaul/CharmOverhaul.cs @@ -101,6 +101,7 @@ public override void Initialize() On.HutongGames.PlayMaker.Actions.SendMessage.OnEnter += OnSendMessageAction; On.HutongGames.PlayMaker.Actions.SendMessageV2.DoSendMessage += OnSendMessageV2Action; On.HutongGames.PlayMaker.Actions.Wait.OnEnter += OnWaitAction; + On.HutongGames.PlayMaker.Actions.SpawnObjectFromGlobalPoolOverTime.OnUpdate += OnSpawnObjectFromGlobalPoolOverTimeAction; ModHooks.GetPlayerIntHook += OnGetPlayerIntHook; ModHooks.HeroUpdateHook += OnHeroUpdateHook; @@ -194,6 +195,16 @@ private int OnExtraDamageGetType(On.ExtraDamageable.orig_GetDamageOfType orig, E return orig(extraDamageTypes); } + private void OnSpawnObjectFromGlobalPoolOverTimeAction(On.HutongGames.PlayMaker.Actions.SpawnObjectFromGlobalPoolOverTime.orig_OnUpdate orig, SpawnObjectFromGlobalPoolOverTime self) + { + if (self.Fsm.GameObject.name == "Dung" && self.Fsm.Name == "Control" && self.State.Name == "Equipped") + { + self.frequency.Value = 0.75f - ((HeroController.instance.gameObject.transform.Find("Charm Effects").gameObject.LocateMyFSM("Fury").ActiveStateName == "Activate" || HeroController.instance.gameObject.transform.Find("Charm Effects").gameObject.LocateMyFSM("Fury").ActiveStateName == "Stay Furied") ? 0.375f : 0); + } + + orig(self); + } + // Increases Flukenest damage private void OnSpellFluke(On.SpellFluke.orig_OnEnable orig, SpellFluke self) @@ -298,12 +309,12 @@ private void OnSendMessageAction(On.HutongGames.PlayMaker.Actions.SendMessage.or orig(self); } - // Greed + Gathering Swarm instant money + // Wayward Compass + Gathering Swarm instant money private void OnGeoEnable(On.GeoControl.orig_OnEnable orig, GeoControl self) { orig(self); - if (PlayerDataAccess.equippedCharm_1 && PlayerDataAccess.equippedCharm_24 && !PlayerDataAccess.brokenCharm_24) + if (PlayerDataAccess.equippedCharm_1 && PlayerDataAccess.equippedCharm_2) { HeroController.instance.AddGeo((int)Math.Pow(5, self.type)); self.Disable(0f); @@ -420,6 +431,8 @@ private void OnCharmUpdate(On.HeroController.orig_CharmUpdate orig, HeroControll // Heavy Blow + Nailmaster's Glory Spell Damage self.gameObject.transform.Find("Attacks/Great Slash").gameObject.LocateMyFSM("damages_enemy").GetFsmIntVariable("attackType").Value = (PlayerDataAccess.equippedCharm_15 && PlayerDataAccess.equippedCharm_26) ? 3 : 0; self.gameObject.transform.Find("Attacks/Dash Slash").gameObject.LocateMyFSM("damages_enemy").GetFsmIntVariable("attackType").Value = (PlayerDataAccess.equippedCharm_15 && PlayerDataAccess.equippedCharm_26) ? 3 : 0; + self.gameObject.transform.Find("Attacks/Cyclone Slash/Hits/Hit L").gameObject.LocateMyFSM("damages_enemy").GetFsmIntVariable("attackType").Value = (PlayerDataAccess.equippedCharm_15 && PlayerDataAccess.equippedCharm_26) ? 3 : 0; + self.gameObject.transform.Find("Attacks/Cyclone Slash/Hits/Hit R").gameObject.LocateMyFSM("damages_enemy").GetFsmIntVariable("attackType").Value = (PlayerDataAccess.equippedCharm_15 && PlayerDataAccess.equippedCharm_26) ? 3 : 0; // Fury of the Fallen Overcharming if (PlayerDataAccess.equippedCharm_6 && PlayerDataAccess.overcharmed) @@ -698,15 +711,17 @@ private void OnFSMEnable(On.PlayMakerFSM.orig_OnEnable orig, PlayMakerFSM self) } } - // Sets Dashmaster, Hiveblood, Deep Focus, Flukenest, and Carefree Melody costs. + // Sets Wayward Compass, Flukenest, Hiveblood, Dashmaster, Deep Focus, Dreamshield, and Carefree Melody costs. private void OnHCAwake(On.HeroController.orig_Awake orig, HeroController self) { orig(self); - PlayerData.instance.SetInt("charmCost_31", 1); + PlayerData.instance.SetInt("charmCost_2", 0); + PlayerData.instance.SetInt("charmCost_11", 2); PlayerData.instance.SetInt("charmCost_29", 3); + PlayerData.instance.SetInt("charmCost_31", 1); PlayerData.instance.SetInt("charmCost_34", 3); - PlayerData.instance.SetInt("charmCost_11", 2); + PlayerData.instance.SetInt("charmCost_38", 2); PlayerData.instance.SetInt("charmCost_40", 2); } @@ -755,7 +770,7 @@ private IEnumerator CDash() HeroController.instance.gameObject.transform.Find("Effects/SD Burst").gameObject.LocateMyFSM("damages_enemy").GetFsmIntVariable("damageDealt").Value = (PlayerDataAccess.equippedCharm_34 ? 2 : 1) * (13 + (PlayerDataAccess.nailSmithUpgrades * 4)); } - private List dreamZones = new List() + private readonly List dreamZones = new() { MapZone.DREAM_WORLD, MapZone.ROYAL_QUARTER, MapZone.WHITE_PALACE, MapZone.FINAL_BOSS, MapZone.GODSEEKER_WASTE, MapZone.GODS_GLORY }; diff --git a/CharmOverhaul/CharmOverhaul.csproj b/CharmOverhaul/CharmOverhaul.csproj index 33e051f..79dd127 100644 --- a/CharmOverhaul/CharmOverhaul.csproj +++ b/CharmOverhaul/CharmOverhaul.csproj @@ -10,7 +10,7 @@ Copyright © Exempt-Medic 2022 Exempt-Medic 7035 - 1.1.2.* + 1.2.0.* false bin\$(Configuration)\ latest diff --git a/README.md b/README.md index 3946104..b6103e8 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,84 @@ Personal attempt to port the Charm Overhaul mod to 1.5. Coded almost entirely from scratch, following the information found in [this Steam discussion post](https://steamcommunity.com/app/367520/discussions/0/1732089092462513717/). -Requires: -* SFCore -* HKMirror + +**Changes**: + +Crystal Heart Changes: +* Damaged increased to 13 plus 4 more for each Nail upgrade. Doubled with Deep Focus. +* Charge time increases by 0.2s with Deep Focus and decreases by 0.2s with Quick Focus. + +Single Charm Changes: +* Reduces the cost of Wayward Compass, Flukenest, Hiveblood, Dashmaster, Deep Focus, Dreamshield, and Carefree Melody by 1 +* Joni's Blessing increased from 40% to 50% +* Glowing Womb damaged increased by 1 (increased by 2 with Defender's Crest) +* Flukenest base damage increased to 5 (increased to 7 with Shaman Stone) +* Heavy Blow increases Nail damage by 15% +* Sprintmaster increases walking speed (such as in Dirtmouth) +* If you are Overcharmed with Fury of the Fallen equipped, your current and max HP becomes 1 +* Steady Body prevents hard landings from long falls +* Soul Eater grants 2 **less** Soul from all sources + +Charm Combos: +Avaricious Swarm (Gathering Swarm + Fragile/Unbreakable Greed): +* Generates 1-25 Geo every 10 seconds. Dream Wielder lets it work while in Dreams, Wayward Compass makes it every 8 seconds, and Defender's Crest increases the Geo gained. + +Balanced Blow (Heavy Blow + Steady Body): +* Increases parry invulnerability time by 0.15s + +Blazing Speed (Fury of the Fallen + Sprintmaster): +* Increases movement speed by 2 while Fury is active (stack with Dashmaster combo) + +Burning Odor (Defender's Crest + Fury of the Fallen) +* While Fury is active, Defender's Crest cloud damage increased by 2 and they spawn twice as often + +Depraved Womb (Glowing Womb + Soul Eater): +* Spawn time reduced by 1 second + +Doom Desire (Fury of the Fallen + Fragile/Unbreakable Greed): +* Gain Geo equal to 20% of Nail damage dealt, even when Fury is not active + +Entrenched Shell (Stalwart Shell + Baldur Shell): +* Increases i-frames after taking damage by 0.3s + +Gilded Hunger (Fragile/Unbreakable Greed + Soul Eater): +* Gain Soul equal to Geo gained + +Hiveshell (Hiveblood + Baldur Shell): +* Baldur Shell repairs itself over time if you don't take damage. Takes 20/24/28/32 seconds depending on stage + +Hivesong (Hiveblood + Grubsong): +* Gain Soul when taking damage while Hiveblood is regenerating (5 if in stage 1, 10 if in stage 2). Increased by 5 with Grubberfly's Elegy + +Kinematic Shell (Stalwart Shell + Defender's Crest): +* While falling at maximum velocity, become invulnerable and deal 20 damage to any enemies you collide with + +Lifeblood Elegy (Joni's Blessing + Grubberfly's Elegy): +* Grubberfly's does not end when taking damage + +Lifeblood Melody (Joni's Blessing + Carefree Melody): +* Gain 1 Lifeblood when Carefree Melody prevents damage. Gain an additional Lifeblood if you have Fragile/Unbreakable Heart equipped **and** have found Lifeblood Core + +Shadow Thief (Sharp Shadow + Voidheart + Soul Catcher): +* Gain 8 Soul when hitting enemies with Sharp Shadow + +Shield Breacher (Heavy Blow + Nailmaster's Glory): +* Nail Arts deal Spell damage (they do not grant Soul, but can go through shields, such as the Watcher Knights) + +Sorcerer Stone (Shaman Stone + Kingsoul): +* 11% chance to fire a Vengeful Spirit that costs 11 Soul when striking left/right with the Nail while at full Soul. Chance increases by 11% for each filled Soul Vessel + +Umbral Vision (Sharp Shadow + Sprintmaster): +* Shade Cloak has 0.25s more i-frames + +Vengeful Melody (Carefree Melody + Fury of the Fallen): +* 1% chance to crit for 1.25* damage with Nail strikes whil Fury is **not** active. Chance increases for each missing Mask + +Void Twister (Voidheart + Spell Twister): +* Reduces cost of upgraded Spells by an additional 2 + +Wayward Swarm (Wayward Compass + Gathering Swarm): +* Geo is instantly added + +Worldsoul / Godsoul (Kingsoul + Soul Catcher / Soul Eater): +* Increases Soul from Kingsoul by 1 (Soul Catcher), 2 (Soul Eater), or 3 (both)