Skip to content

Commit

Permalink
Fixing some combos, adding more reduced Charm costs, adding a new eff…
Browse files Browse the repository at this point in the history
…ect to Furious Odor. Updating the readme
  • Loading branch information
Exempt-Medic committed Feb 3, 2023
1 parent 48e3b37 commit 069e9fa
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 10 deletions.
27 changes: 21 additions & 6 deletions CharmOverhaul/CharmOverhaul.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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<MapZone> dreamZones = new List<MapZone>()
private readonly List<MapZone> dreamZones = new()
{
MapZone.DREAM_WORLD, MapZone.ROYAL_QUARTER, MapZone.WHITE_PALACE, MapZone.FINAL_BOSS, MapZone.GODSEEKER_WASTE, MapZone.GODS_GLORY
};
Expand Down
2 changes: 1 addition & 1 deletion CharmOverhaul/CharmOverhaul.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Copyright>Copyright © Exempt-Medic 2022</Copyright>
<Authors>Exempt-Medic</Authors>
<NoWarn>7035</NoWarn>
<AssemblyVersion>1.1.2.*</AssemblyVersion>
<AssemblyVersion>1.2.0.*</AssemblyVersion>
<Deterministic>false</Deterministic>
<OutputPath>bin\$(Configuration)\</OutputPath>
<LangVersion>latest</LangVersion>
Expand Down
84 changes: 81 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 069e9fa

Please sign in to comment.