diff --git a/FiendsNerf/FiendsNerfMod.cs b/FiendsNerf/FiendsNerfMod.cs index 64b54a5..108cde0 100644 --- a/FiendsNerf/FiendsNerfMod.cs +++ b/FiendsNerf/FiendsNerfMod.cs @@ -11,39 +11,55 @@ namespace FiendsNerf; public class FiendsNerfMod : MelonMod { + private static bool s_isAnalyzing = false; + // After getting the affinities of a demon [HarmonyPatch(typeof(datAisyoName), nameof(datAisyoName.Get))] private class Patch { public static void Postfix(ref int id, ref string __result) { - switch (id) + if (!s_isAnalyzing) { - case 199: - __result = "Null: Force/Light/Dark • Str: Nerve • Weak: Elec"; // Matador - break; - case 201: - __result = "Null: Light/Dark/Mind • Str: Curse • Weak: Fire"; // Daisoujou - break; - case 200: - __result = "Drn: Force • Null: Fire/Light/Dark • Str: Nerve • Weak: Ice"; // Hell Biker - break; - case 196: - __result = "Null: Fire/Light/Dark/Nerve • Weak: Elec"; // White Rider - break; - case 197: - __result = "Null: Elec/Force/Light/Dark/Mind • Weak: Ice"; // Red Rider - break; - case 198: - __result = "Drn: Ice • Null: Light/Dark/Curse • Weak: Force"; // Black Rider - break; - case 195: - __result = "Null: Ice/Light/Dark/Curse/Mind • Weak: Fire"; // Pale Rider - break; - case 202: - __result = "Rpl: Phys • Drn: Elec • Null: Light/Dark • Str: Ailments • Weak Force"; // Mother Harlot - break; + switch (id) + { + case 199: + __result = "Null: Force/Light/Dark • Str: Nerve • Weak: Elec"; // Matador + break; + case 201: + __result = "Null: Light/Dark/Mind • Str: Curse • Weak: Fire"; // Daisoujou + break; + case 200: + __result = "Drn: Force • Null: Fire/Light/Dark • Str: Nerve • Weak: Ice"; // Hell Biker + break; + case 196: + __result = "Null: Fire/Light/Dark/Nerve • Weak: Elec"; // White Rider + break; + case 197: + __result = "Null: Elec/Force/Light/Dark/Mind • Weak: Ice"; // Red Rider + break; + case 198: + __result = "Drn: Ice • Null: Light/Dark/Curse • Weak: Force"; // Black Rider + break; + case 195: + __result = "Null: Ice/Light/Dark/Curse/Mind • Weak: Fire"; // Pale Rider + break; + case 202: + __result = "Rpl: Phys • Drn: Elec • Null: Light/Dark • Str: Ailments • Weak Force"; // Mother Harlot + break; + } } + + s_isAnalyzing = false; + } + } + + [HarmonyPatch(typeof(datDevilFormat), nameof(datDevilFormat.Analyze))] + private class Patch2 + { + public static void Prefix() + { + s_isAnalyzing = true; } } diff --git a/MatthiewNocturne.sln b/MatthiewNocturne.sln index 0788922..35d120f 100644 --- a/MatthiewNocturne.sln +++ b/MatthiewNocturne.sln @@ -73,6 +73,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EveryoneGetsExp", "Everyone EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EscapeOnHard", "EscapeOnHard\EscapeOnHard.csproj", "{4D81714C-174C-447A-B2B7-EEAEEAFCD103}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RedCapoteBuff", "RedCapoteBuff\RedCapoteBuff.csproj", "{1C166E9D-6054-4149-BCFD-444560A6D475}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -222,5 +224,9 @@ Global {4D81714C-174C-447A-B2B7-EEAEEAFCD103}.Debug|Any CPU.Build.0 = Debug|Any CPU {4D81714C-174C-447A-B2B7-EEAEEAFCD103}.Release|Any CPU.ActiveCfg = Release|Any CPU {4D81714C-174C-447A-B2B7-EEAEEAFCD103}.Release|Any CPU.Build.0 = Release|Any CPU + {1C166E9D-6054-4149-BCFD-444560A6D475}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C166E9D-6054-4149-BCFD-444560A6D475}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C166E9D-6054-4149-BCFD-444560A6D475}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C166E9D-6054-4149-BCFD-444560A6D475}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/README.md b/README.md index 400e817..abc21d2 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,9 @@ -**DEV BRANCH** : adds support for configurations in various mods - Please report any **bug** you have with the mods by **opening an issue** ! You can also submit feature request to add configurations in existing mods. # Mods -## Modpack content +Up to date to [*Quality of Death*](https://gamebanana.com/mods/443748) **v1.0.3**. Some mods can be further configured (these), these will have Nocturne vanilla behaviour by default (=~ disabled). To enable them, check out their available presets. @@ -43,6 +41,7 @@ Some mods can be further configured (these), these will have Nocturne vanilla be | [RepulseBellEveryShop](https://gamebanana.com/mods/382242) | | | | [SkipAmalaMinigame](https://gamebanana.com/mods/415578) | | | | [TruePierce](https://gamebanana.com/mods/411510) | :heavy_check_mark: | [presets](_cfg_presets/TruePierce/) | +| [RedCapoteBuff](https://github.com/MatthiewPurple/red-capote-buff) | | | ### How to configure mods @@ -51,7 +50,7 @@ You can open them with any text editor, and edit the values as you see fit, each ## Bonus / Non-canonical mods -List of standalone mods that won't be part of the modpack (fate to be determined): +List of standalone mods that aren't part of the Quality Of Death modpack (fate to be determined): - [PiercingMagmaAxis](https://gamebanana.com/mods/380326) - [UncappedMagic](https://gamebanana.com/mods/416903) - [DanteOnNewGamePlus](https://gamebanana.com/mods/439012) diff --git a/RedCapoteBuff/RedCapoteBuff.csproj b/RedCapoteBuff/RedCapoteBuff.csproj new file mode 100644 index 0000000..4f786a2 --- /dev/null +++ b/RedCapoteBuff/RedCapoteBuff.csproj @@ -0,0 +1,35 @@ + + + + net6.0 + RedCapoteBuff + RedCapoteBuff + enable + enable + ..\bin\ + + + + + ..\_dlls\0Harmony.dll + False + + + ..\_dlls\Assembly-CSharp.dll + False + + + ..\_dlls\Il2CppInterop.Runtime.dll + False + + + ..\_dlls\Il2Cppmscorlib.dll + False + + + ..\_dlls\MelonLoader.dll + False + + + + diff --git a/RedCapoteBuff/RedCapoteBuffMod.cs b/RedCapoteBuff/RedCapoteBuffMod.cs new file mode 100644 index 0000000..7feeaf1 --- /dev/null +++ b/RedCapoteBuff/RedCapoteBuffMod.cs @@ -0,0 +1,61 @@ +// Copyright (c) MatthiewPurple. All Rights Reserved. Licensed under the MIT license. See License.txt in the project root for license information. + +using HarmonyLib; +using Il2Cpp; +using MelonLoader; +using RedCapoteBuff; + +[assembly: MelonInfo(typeof(RedCapoteBuffMod), "Red Capote buff", "1.0.0", "Matthiew Purple")] +[assembly: MelonGame("アトラス", "smt3hd")] + +namespace RedCapoteBuff; +public class RedCapoteBuffMod : MelonMod +{ + private static bool s_isRedCapote; // is true when the last used skill was Red Capote + + // After getting the description of a skill + [HarmonyPatch(typeof(datSkillHelp_msg), nameof(datSkillHelp_msg.Get))] + private class Patch + { + public static void Postfix(ref int id, ref string __result) + { + if (id == 276) + { + __result = "Maximizes Evasion/Hit Rate."; + } + } + } + + // Before displaying the text box + [HarmonyPatch(typeof(nbHelpProcess), nameof(nbHelpProcess.nbDispText))] + private class Patch2 + { + public static void Prefix(ref string text1, ref int type) + { + // If the text box is displaying the effect of Red Capote + if (type == 1 && s_isRedCapote) + { + type = 0; + text1 = "Evasion/Hit Rate maximized!"; + s_isRedCapote = false; + } + } + } + + // Before displying a skill name in the text box + [HarmonyPatch(typeof(nbHelpProcess), nameof(nbHelpProcess.nbDispSkillName))] + private class Patch3 + { + public static void Prefix(ref int id) + { + s_isRedCapote = id == 276; + } + } + + // When launching the game + public override void OnInitializeMelon() + { + // Buffs Red Capote + datNormalSkill.tbl[276].hojopoint = 8; // Self-Sukukaja x 8 + } +} diff --git a/TruePierce/TruePierceMod.cs b/TruePierce/TruePierceMod.cs index a2fe9fc..4459bc9 100644 --- a/TruePierce/TruePierceMod.cs +++ b/TruePierce/TruePierceMod.cs @@ -230,6 +230,15 @@ public static void Postfix(ref uint __result, ref int attr, ref int formindex, r if (s_hasPierce && isTypeTruePierce && (!isRepel || s_cfgAllowRepel.Value) && (__result < 100 || (__result >= 65536 && __result < 2147483648))) { __result = 100; // Forces the affinity to become "neutral" + if ((__result >> 20) % 2 == 1) + { + __result = 100 + 1048576; // Forces the affinity to become "neutral" but keeps Freeze/Shock resistance + } + else + { + __result = 100; // Forces the affinity to become "neutral" + } + nbMainProcess.nbGetMainProcessData().d31_kantuu = 1; // Displays the "Pierced!" message } }