diff --git a/.vs/CharmMod/DesignTimeBuild/.dtbcache.v2 b/.vs/CharmMod/DesignTimeBuild/.dtbcache.v2 index e829b01..77125ad 100644 Binary files a/.vs/CharmMod/DesignTimeBuild/.dtbcache.v2 and b/.vs/CharmMod/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/CharmMod/FileContentIndex/561a8c7f-5404-4af7-8724-90063666468a.vsidx b/.vs/CharmMod/FileContentIndex/2b4530f4-1571-4da9-b2d2-723e6e78cd82.vsidx similarity index 61% rename from .vs/CharmMod/FileContentIndex/561a8c7f-5404-4af7-8724-90063666468a.vsidx rename to .vs/CharmMod/FileContentIndex/2b4530f4-1571-4da9-b2d2-723e6e78cd82.vsidx index ba3277a..6c83eb9 100644 Binary files a/.vs/CharmMod/FileContentIndex/561a8c7f-5404-4af7-8724-90063666468a.vsidx and b/.vs/CharmMod/FileContentIndex/2b4530f4-1571-4da9-b2d2-723e6e78cd82.vsidx differ diff --git a/.vs/CharmMod/FileContentIndex/6ebc614c-dd31-4a59-b256-bfe23bc26700.vsidx b/.vs/CharmMod/FileContentIndex/3135abdc-e682-4ea7-afa5-7a8ac795ef36.vsidx similarity index 97% rename from .vs/CharmMod/FileContentIndex/6ebc614c-dd31-4a59-b256-bfe23bc26700.vsidx rename to .vs/CharmMod/FileContentIndex/3135abdc-e682-4ea7-afa5-7a8ac795ef36.vsidx index 020e82b..7670442 100644 Binary files a/.vs/CharmMod/FileContentIndex/6ebc614c-dd31-4a59-b256-bfe23bc26700.vsidx and b/.vs/CharmMod/FileContentIndex/3135abdc-e682-4ea7-afa5-7a8ac795ef36.vsidx differ diff --git a/.vs/CharmMod/FileContentIndex/e5c617e4-4078-4fb9-8156-fba431691fa9.vsidx b/.vs/CharmMod/FileContentIndex/85d2e977-9361-49a7-a99c-79465f8dde7e.vsidx similarity index 100% rename from .vs/CharmMod/FileContentIndex/e5c617e4-4078-4fb9-8156-fba431691fa9.vsidx rename to .vs/CharmMod/FileContentIndex/85d2e977-9361-49a7-a99c-79465f8dde7e.vsidx diff --git a/.vs/CharmMod/FileContentIndex/fbcfac5c-f880-4b83-9eef-257e43d56fef.vsidx b/.vs/CharmMod/FileContentIndex/fbcfac5c-f880-4b83-9eef-257e43d56fef.vsidx new file mode 100644 index 0000000..a35568f Binary files /dev/null and b/.vs/CharmMod/FileContentIndex/fbcfac5c-f880-4b83-9eef-257e43d56fef.vsidx differ diff --git a/.vs/CharmMod/FileContentIndex/ff877a2d-7a9d-4b0b-b5b1-bc4ac7037d5b.vsidx b/.vs/CharmMod/FileContentIndex/ff877a2d-7a9d-4b0b-b5b1-bc4ac7037d5b.vsidx deleted file mode 100644 index 42e9d25..0000000 Binary files a/.vs/CharmMod/FileContentIndex/ff877a2d-7a9d-4b0b-b5b1-bc4ac7037d5b.vsidx and /dev/null differ diff --git a/.vs/CharmMod/v17/.futdcache.v1 b/.vs/CharmMod/v17/.futdcache.v1 index bf82df2..8f9fc5b 100644 Binary files a/.vs/CharmMod/v17/.futdcache.v1 and b/.vs/CharmMod/v17/.futdcache.v1 differ diff --git a/.vs/CharmMod/v17/.suo b/.vs/CharmMod/v17/.suo index 1726c5a..08f2c65 100644 Binary files a/.vs/CharmMod/v17/.suo and b/.vs/CharmMod/v17/.suo differ diff --git a/.vs/ProjectEvaluation/charmmod.metadata.v2 b/.vs/ProjectEvaluation/charmmod.metadata.v2 index 7d7f210..ae46eee 100644 Binary files a/.vs/ProjectEvaluation/charmmod.metadata.v2 and b/.vs/ProjectEvaluation/charmmod.metadata.v2 differ diff --git a/.vs/ProjectEvaluation/charmmod.projects.v2 b/.vs/ProjectEvaluation/charmmod.projects.v2 index 02bf7f6..b5aef21 100644 Binary files a/.vs/ProjectEvaluation/charmmod.projects.v2 and b/.vs/ProjectEvaluation/charmmod.projects.v2 differ diff --git a/Abilities/WindScythe.cs b/Abilities/WindScythe.cs index 60f9fa0..a10f62b 100644 --- a/Abilities/WindScythe.cs +++ b/Abilities/WindScythe.cs @@ -4,6 +4,7 @@ namespace Fyrenest { public class WindScythe : IAbility { + public static readonly WindScythe Instance = new(); public string Name => "Wind Scythe"; public AbilityTrigger Trigger => AbilityTrigger.Fireball; @@ -17,12 +18,17 @@ public void Load() { damageEnemies.attackType = AttackTypes.Spell; damageEnemies.circleDirection = true; if (PlayerData.instance.fireballLevel == 1) damageEnemies.damageDealt = (PlayerData.instance.equippedCharm_19) ? (PlayerData.instance.GetInt(nameof(PlayerData.nailDamage)) * 2) : PlayerData.instance.GetInt(nameof(PlayerData.nailDamage)); - if (PlayerData.instance.fireballLevel > 1) damageEnemies.damageDealt = (PlayerData.instance.equippedCharm_19) ? (PlayerData.instance.GetInt(nameof(PlayerData.nailDamage)) * 3) : (PlayerData.instance.GetInt(nameof(PlayerData.nailDamage)) * 2); + if (SoulSpell.Instance.Equipped()) damageEnemies.damageDealt *= 2; damageEnemies.ignoreInvuln = false; damageEnemies.direction = 180f; damageEnemies.moveDirection = true; damageEnemies.magnitudeMult = 1f; damageEnemies.specialType = SpecialTypes.None; + if (SoulSpell.Instance.Equipped()) + { + scythePreload.transform.SetScaleX(3f); + scythePreload.transform.SetScaleY(3f); + } } public void Perform() diff --git a/CharmMod.cs b/CharmMod.cs index 1f309a7..d003d35 100644 --- a/CharmMod.cs +++ b/CharmMod.cs @@ -9,12 +9,12 @@ using ItemChanger; using ItemChanger.Tags; using ItemChanger.UIDefs; -using Modding.Menu; - +using Modding.Menu; + namespace Fyrenest { - public class Fyrenest : Mod, IMod - { + public class Fyrenest : Mod, IMod, IMenuMod, ITogglableMod + { public override string GetVersion() => "2.10.41.38"; private static List Charms = new() @@ -55,7 +55,7 @@ public class Fyrenest : Mod, IMod private Dictionary> BoolSetters = new(); private Dictionary> IntGetters = new(); private Dictionary<(string, string), Action> FSMEdits = new(); - private List<(int Period, Action Func)> Tickers = new(); + private List<(int Period, Action Func)> Tickers = new(); public static List Abilities; public static Dictionary> Preloads; @@ -65,28 +65,28 @@ public class Fyrenest : Mod, IMod - private void LoadAbilities() + private void LoadAbilities() { Abilities = new List(); // Find all abilities var assembly = Assembly.GetExecutingAssembly(); - foreach (var type in assembly.GetTypes()) + foreach (var type in assembly.GetTypes()) { - if (type.GetInterface("IAbility") != null) + if (type.GetInterface("IAbility") != null) { // Type is an ability Abilities.Add(Activator.CreateInstance(type) as IAbility); } } - foreach (IAbility ability in Abilities) + foreach (IAbility ability in Abilities) { Log($"Registered ability {ability.Name}!"); } } public override void Initialize(Dictionary> preloadedObjects) - { + { Preloads = preloadedObjects; LoadAbilities(); @@ -214,9 +214,9 @@ private void OnUpdate() { charm.Settings(Settings).Cost = charm.DefaultCost; } - if(optionOne == true) - { - //give charms when certain things are done. + if(optionOne == true) + { + //give charms when certain things are done. if (PlayerData.instance.colosseumBronzeCompleted) Quickfall.Instance.Settings(Settings).Got = true; if (PlayerData.instance.colosseumSilverCompleted) Slowfall.Instance.Settings(Settings).Got = true; if (PlayerData.instance.hasShadowDash) PowerfulDash.Instance.Settings(Settings).Got = true; @@ -241,55 +241,65 @@ private void OnUpdate() if (PlayerData.instance.visitedWhitePalace) ElderStone.Instance.Settings(Settings).Got = true; if (PlayerData.instance.gaveSlykey && PlayerData.instance.slyConvoNailHoned && PlayerData.instance.completionPercentage > 100) SlyDeal.Instance.Settings(Settings).Got = true; if (PlayerData.instance.honedNail) GiantNail.Instance.Settings(Settings).Got = true; - if (PlayerData.instance.hasAllNailArts && PlayerData.instance.hasKingsBrand) MatosBlessing.Instance.Settings(Settings).Got = true; - //end - //ik it is messy, but what else is there to do? Also, if u are seeing this code and think that there is a more appropriate time to give the charm, DM me on discord. I am BubkisLord#5187 + if (PlayerData.instance.hasAllNailArts && PlayerData.instance.hasKingsBrand) MatosBlessing.Instance.Settings(Settings).Got = true; + //end + //ik it is messy, but what else is there to do? Also, if u are seeing this code and think that there is a more appropriate time to give the charm, DM me on discord. I am BubkisLord#5187 } - } - private bool optionOne = true; - private bool optionTwo = true; - - public List GetMenuData(IMenuMod.MenuEntry? toggleButtonEntry) - { - return new List - { - new IMenuMod.MenuEntry { - Name = "Charms Enabled", - Description = "Toggle if charms are enabled.", - Values = new string[] { - "On", - "Off" - }, - Saver = opt => this.optionOne = opt switch { - 0 => true, - 1 => false, - // This should never be called - _ => throw new InvalidOperationException() - }, - Loader = () => this.optionOne switch { - true => 0, - false => 1, - } - }, - new IMenuMod.MenuEntry { - Name = "Lore Enabled", - Description = "Toggle if custom text is enabled", - Values = new string[] { - "On", - "Off" - }, - Saver = opt => this.optionTwo = opt switch { - 0 => true, - 1 => false, - // This should never be called - _ => throw new InvalidOperationException() - }, - Loader = () => this.optionTwo switch { - true => 0, - false => 1, - } - } - }; + } + + public bool ToggleButtonInsideMenu => true; + + private bool optionOne = true; + private bool optionTwo = true; + + public List GetMenuData(IMenuMod.MenuEntry? toggleButtonEntry) + { + IMenuMod.MenuEntry e = toggleButtonEntry.Value; + IMenuMod.MenuEntry entry = new(e.Name, e.Values, "Toggle all effects of the Fyrenest mod.", e.Saver, e.Loader); + + List menuEntries = new() { entry }; + { + new IMenuMod.MenuEntry + { + Name = "Charms Enabled", + Description = "Toggle if charms are enabled.", + Values = new string[] { + "On", + "Off" + }, + Saver = opt => this.optionOne = opt switch + { + 0 => true, + 1 => false, + // This should never be called + _ => throw new InvalidOperationException() + }, + Loader = () => this.optionOne switch + { + true => 0, + false => 1, + } + }; + new IMenuMod.MenuEntry { + Name = "Lore Enabled", + Description = "Toggle if custom text is enabled", + Values = new string[] { + "On", + "Off" + }, + Saver = opt => this.optionTwo = opt switch { + 0 => true, + 1 => false, + // This should never be called + _ => throw new InvalidOperationException() + }, + Loader = () => this.optionTwo switch { + true => 0, + false => 1, + } + }; + }; + return menuEntries; } private int charmSelect = 1; @@ -695,11 +705,11 @@ public void TakeAllOurCharms() { charm.Settings(Settings).Got = false; } - } - - public void Unload() - { - throw new NotImplementedException(); - } + } + + public void Unload() + { + throw new NotImplementedException(); + } } } diff --git a/Charms/MarkofStrength.cs b/Charms/MarkofStrength.cs index c90b576..4e2d971 100644 --- a/Charms/MarkofStrength.cs +++ b/Charms/MarkofStrength.cs @@ -26,9 +26,11 @@ public void UpdateTriggers(PlayerData data, HeroController controller) { if (Equipped()) { - //ShadeSoul + //Remove ShadeSoul FsmState castShadeSoul = HeroController.instance.spellControl.GetState("Fireball 2"); castShadeSoul.RemoveAction(3); + + //Add Wind Scythe castShadeSoul.InsertCustomAction("Fireball 2", () => HandleTrigger(AbilityTrigger.Fireball), 3); } if (!Equipped()) @@ -36,8 +38,9 @@ public void UpdateTriggers(PlayerData data, HeroController controller) //Add ShadeSoul back. FsmState castShadeSoul = HeroController.instance.spellControl.GetState("Fireball 2"); FsmStateAction action = HeroController.instance.spellControl.GetAction("Fireball 2", 0); - castShadeSoul.InsertAction(action, 0); - } + HeroController.instance.spellControl.InsertAction("Fireball 2", action, 0); + } + WindScythe.Instance.Load(); return; } private void HandleTrigger(AbilityTrigger trigger) diff --git a/bin/Debug/net472/Fyrenest.dll b/bin/Debug/net472/Fyrenest.dll index f7cd6ff..d09aadc 100644 Binary files a/bin/Debug/net472/Fyrenest.dll and b/bin/Debug/net472/Fyrenest.dll differ diff --git a/bin/Debug/net472/Fyrenest.pdb b/bin/Debug/net472/Fyrenest.pdb index 7e4176c..97c2a0e 100644 Binary files a/bin/Debug/net472/Fyrenest.pdb and b/bin/Debug/net472/Fyrenest.pdb differ diff --git a/obj/Debug/net472/Fyrenest.dll b/obj/Debug/net472/Fyrenest.dll index f7cd6ff..d09aadc 100644 Binary files a/obj/Debug/net472/Fyrenest.dll and b/obj/Debug/net472/Fyrenest.dll differ diff --git a/obj/Debug/net472/Fyrenest.pdb b/obj/Debug/net472/Fyrenest.pdb index 7e4176c..97c2a0e 100644 Binary files a/obj/Debug/net472/Fyrenest.pdb and b/obj/Debug/net472/Fyrenest.pdb differ