diff --git a/ChronoArk-gameplay-plugins.sln b/ChronoArk-gameplay-plugins.sln index a2a5177..b3776ca 100644 --- a/ChronoArk-gameplay-plugins.sln +++ b/ChronoArk-gameplay-plugins.sln @@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "More-cursed-battles", "src\ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lift-Curse-Card-placement", "src\Lift-Curse-Card-placement\Lift-Curse-Card-placement.csproj", "{36BE8C8A-31CF-48EA-BDAA-370B2566ADFA}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Remove-elemental-debuff-persistence", "src\Remove-elemental-debuff-persistence\Remove-elemental-debuff-persistence.csproj", "{4F47122E-A054-4043-B8A6-E73FEEA8A5C8}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -33,6 +35,10 @@ Global {36BE8C8A-31CF-48EA-BDAA-370B2566ADFA}.Debug|Any CPU.Build.0 = Debug|Any CPU {36BE8C8A-31CF-48EA-BDAA-370B2566ADFA}.Release|Any CPU.ActiveCfg = Release|Any CPU {36BE8C8A-31CF-48EA-BDAA-370B2566ADFA}.Release|Any CPU.Build.0 = Release|Any CPU + {4F47122E-A054-4043-B8A6-E73FEEA8A5C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F47122E-A054-4043-B8A6-E73FEEA8A5C8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F47122E-A054-4043-B8A6-E73FEEA8A5C8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F47122E-A054-4043-B8A6-E73FEEA8A5C8}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/More-cursed-battles/MoreCursedBattlesPlugin.cs b/src/More-cursed-battles/MoreCursedBattlesPlugin.cs index 6f58a19..0987132 100644 --- a/src/More-cursed-battles/MoreCursedBattlesPlugin.cs +++ b/src/More-cursed-battles/MoreCursedBattlesPlugin.cs @@ -31,12 +31,12 @@ public class MoreCursedBattlesPlugin : BaseUnityPlugin void Awake() { - cursedBattleNumberConf = Config.Bind("Generation config", "number_of_cursed_battles_per_stage", 2, "Maximum number of cursed battles per stage counting default one. Set to 5 to curse all non-boss battles on every stage"); - enabledInSanctuary = Config.Bind("Generation config", "cursed_battles_in_Sanctuary", false, "Enables/Disables cursed fight generation in the final area."); + cursedBattleNumberConf = Config.Bind("Generation config", "number_of_cursed_battles_per_stage", 2, "Maximum number of cursed battles per stage counting default one. Set to 4 to curse all non-boss battles on every stage."); + enabledInSanctuary = Config.Bind("Generation config", "cursed_battles_in_Sanctuary", true, "Enables/Disables cursed fight generation in the final area."); - startingLiftingAmountConf = Config.Bind("Item config", "starting_lifting_scroll_amount", 2, "Amount of starting lifting scrolls. Lifting scrolls are identified. Mind that 1-2 cursed fights no longer drop lifting scrolls"); - cursedGoldReward = Config.Bind("Item config", "cursed_gold_reward", 150, "Sets the amount of gold commonly rewarded by the cursed enemies. Vanilla amount is 250"); - betterCursedRewardsInSanctuary = Config.Bind("Item config", "enable_better_cursed_rewards_in_Sanctuary", true, "Cursed enemies in Sanctuary drop better rewards like potions or rare items"); + startingLiftingAmountConf = Config.Bind("Item config", "starting_lifting_scroll_amount", 2, "Amount of starting lifting scrolls. Lifting scrolls are identified. Mind that 1-2 cursed fights no longer drop lifting scrolls."); + cursedGoldReward = Config.Bind("Item config", "cursed_gold_reward", 150, "Sets the amount of gold commonly rewarded by killing cursed enemies. Vanilla amount is 250."); + betterCursedRewardsInSanctuary = Config.Bind("Item config", "enable_better_cursed_rewards_in_Sanctuary", true, "Cursed enemies in Sanctuary drop better rewards like potions or rare items."); harmony.PatchAll(); } diff --git a/src/Remove-elemental-debuff-persistence/Properties/AssemblyInfo.cs b/src/Remove-elemental-debuff-persistence/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..123449e --- /dev/null +++ b/src/Remove-elemental-debuff-persistence/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Remove-elemental-debuff-persistence")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Remove-elemental-debuff-persistence")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("4f47122e-a054-4043-b8a6-e73feea8a5c8")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Remove-elemental-debuff-persistence/Remove-elemental-debuff-persistence.csproj b/src/Remove-elemental-debuff-persistence/Remove-elemental-debuff-persistence.csproj new file mode 100644 index 0000000..17a6b04 --- /dev/null +++ b/src/Remove-elemental-debuff-persistence/Remove-elemental-debuff-persistence.csproj @@ -0,0 +1,68 @@ + + + + + Debug + AnyCPU + {4F47122E-A054-4043-B8A6-E73FEEA8A5C8} + Library + Properties + Remove_elemental_debuff_persistence + Remove-elemental-debuff-persistence + v4.0 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\CAx64_libs\0Harmony.dll + + + ..\..\..\..\CAx64_libs\Assembly-CSharp.dll + + + ..\..\..\..\CAx64_libs\Assembly-CSharp-firstpass.dll + + + ..\..\..\..\CAx64_libs\BepInEx.dll + + + + + + + + + + ..\..\..\..\CAx64_libs\UnityEngine.dll + + + ..\..\..\..\CAx64_libs\UnityEngine.CoreModule.dll + + + + + + + + + copy /Y $(TargetPath) "C:\Program Files (x86)\Steam\steamapps\common\Chrono Ark\x64\Master\BepInEx\scripts" + + \ No newline at end of file diff --git a/src/Remove-elemental-debuff-persistence/RemoveElementalDebuffPersistencePlugin.cs b/src/Remove-elemental-debuff-persistence/RemoveElementalDebuffPersistencePlugin.cs new file mode 100644 index 0000000..d1256d6 --- /dev/null +++ b/src/Remove-elemental-debuff-persistence/RemoveElementalDebuffPersistencePlugin.cs @@ -0,0 +1,52 @@ +using BepInEx; +using GameDataEditor; +using HarmonyLib; +using System.Reflection; +using UnityEngine; + +namespace Remove_elemental_debuff_persistence +{ + [BepInPlugin(GUID, "No more elemental trio debuff persistence", version)] + [BepInProcess("ChronoArk.exe")] + public class RemoveElementalDebuffPersistencePlugin : BaseUnityPlugin + { + + public const string GUID = "org.neo.chronoark.qolmods.triodebuffnerfp"; + public const string version = "1.0.0"; + + + private static readonly Harmony harmony = new Harmony(GUID); + + private static BepInEx.Logging.ManualLogSource logger; + + void Awake() + { + logger = Logger; + harmony.PatchAll(); + } + void OnDestroy() + { + if (harmony != null) + harmony.UnpatchAll(GUID); + } + + [HarmonyPatch(typeof(B_S4_Guard_0_0_T), nameof(B_S4_Guard_0_0_T.Init))] + class ElectricShockNerfPatch + { + static void Postfix(B_S4_Guard_0_0_T __instance) + { + __instance.BuffData.IsFieldBuff = false; + } + } + + [HarmonyPatch(typeof(Buff), nameof(Buff.Init))] + class BurtNerfPatch + { + static void Postfix(Buff __instance) + { + if(__instance.BuffData.Key == GDEItemKeys.Buff_B_S4_Guard_1_0_T) + __instance.BuffData.IsFieldBuff = false; + } + } + } +}