diff --git a/Extensions.cs b/Extensions.cs index 67ceb62..5179e06 100644 --- a/Extensions.cs +++ b/Extensions.cs @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2020 ashakoor This program is free software: you can redistribute it and/or modify @@ -40,12 +40,12 @@ public static bool IsThisCharacterInPlayerClan(this CharacterObject character) public static bool IsThisCharacterInPlayerArmy(this CharacterObject character) { - return character?.HeroObject?.PartyBelongedTo?.Army?.IsPlayerInThisArmy() == true; + return character?.HeroObject?.IsThisHeroInPlayerArmy() == true; } public static bool IsThisCharacterInPlayerKingdom(this CharacterObject character) { - return character?.HeroObject?.Clan?.Kingdom?.IsPlayerInThisKingdom() == true; + return character?.HeroObject?.Clan?.IsThisClanInPlayerKingdom() == true; } } @@ -54,7 +54,7 @@ internal static partial class Extensions { public static bool IsThisHeroPlayerHero(this Hero hero) { - return hero?.CharacterObject?.IsThisCharacterPlayerCharacter() == true; + return hero?.IsHumanPlayerCharacter == true; } public static bool IsThisHeroPlayerCompanion(this Hero hero) @@ -69,7 +69,7 @@ public static bool IsThisHeroInPlayerClan(this Hero hero) public static bool IsThisHeroInPlayerArmy(this Hero hero) { - return hero?.PartyBelongedTo?.Army?.IsPlayerInThisArmy() == true; + return hero?.PartyBelongedTo?.IsThisPartyInPlayerArmy() == true; } public static bool IsThisHeroInPlayerKingdom(this Hero hero) @@ -83,12 +83,12 @@ internal static partial class Extensions { public static bool IsPlayerLeadingThisParty(this PartyBase partyBase) { - return partyBase?.LeaderHero?.IsThisHeroPlayerHero() == true; + return partyBase?.MobileParty?.IsPlayerLeadingThisParty() == true; } public static bool IsThisPartyInPlayerClan(this PartyBase partyBase) { - return partyBase?.LeaderHero?.Clan?.IsPlayerLeadingThisClan() == true; + return partyBase?.Owner?.IsThisHeroPlayerHero() == true; } public static bool IsThisPartyInPlayerArmy(this PartyBase partyBase) @@ -98,12 +98,12 @@ public static bool IsThisPartyInPlayerArmy(this PartyBase partyBase) public static bool IsThisPartyInPlayerKingdom(this PartyBase partyBase) { - return partyBase?.LeaderHero?.Clan?.Kingdom?.IsPlayerInThisKingdom() == true; + return partyBase?.Owner?.IsThisHeroInPlayerKingdom() == true; } public static bool IsThisPartyGarrison(this PartyBase party) { - return party?.MobileParty?.IsGarrison() == true; + return party?.MobileParty?.IsThisPartyGarrison() == true; } public static bool IsPartyOwnedByPlayer(this PartyBase party) @@ -132,7 +132,7 @@ public static bool IsPlayerLeadingThisParty(this MobileParty mobileParty) public static bool IsThisPartyInPlayerClan(this MobileParty mobileParty) { - return mobileParty?.LeaderHero?.Clan?.IsPlayerLeadingThisClan() == true; + return mobileParty?.LeaderHero?.IsThisHeroInPlayerClan() == true; } public static bool IsThisPartyInPlayerArmy(this MobileParty mobileParty) @@ -142,10 +142,10 @@ public static bool IsThisPartyInPlayerArmy(this MobileParty mobileParty) public static bool IsThisPartyInPlayerKingdom(this MobileParty mobileParty) { - return mobileParty?.LeaderHero?.Clan?.Kingdom?.IsPlayerInThisKingdom() == true; + return mobileParty?.Party?.IsThisPartyInPlayerKingdom() == true; } - public static bool IsGarrison(this MobileParty party) + public static bool IsThisPartyGarrison(this MobileParty party) { return party?.IsGarrison == true; } @@ -190,7 +190,7 @@ public static bool IsPlayerInThisArmy(this Army army) public static bool IsPlayerLeadingThisArmy(this Army army) { - return army?.LeaderParty?.LeaderHero?.IsThisHeroPlayerHero() == true; + return army?.LeaderParty?.IsPlayerLeadingThisParty() == true; } public static bool IsThisArmyInPlayerKingdom(this Army army) diff --git a/PatchAppliesTo.cs b/PatchAppliesTo.cs index 7351162..c24fec8 100644 --- a/PatchAppliesTo.cs +++ b/PatchAppliesTo.cs @@ -22,48 +22,6 @@ namespace UnlimitLord { public class PatchAppliesTo { - private readonly AppliesToEnum _applyEnum; - - public PatchAppliesTo(AppliesToEnum applyEnum) - { - _applyEnum = applyEnum; - } - - public AppliesToEnum GetWho() - { - return _applyEnum; - } - - public override string ToString() - { - switch (_applyEnum) - { - case AppliesToEnum.PlayerOnly: - return "Player only"; - - case AppliesToEnum.PlayerCompanions: - return "Player and companions"; - - case AppliesToEnum.PlayerParty: - return "Player's party"; - - case AppliesToEnum.PlayerClan: - return "Player's clan"; - - case AppliesToEnum.PlayerArmy: - return "Player's army"; - - case AppliesToEnum.PlayerKingdom: - return "Player's kingdom"; - - case AppliesToEnum.Everyone: - return "Everyone"; - - default: - throw new NotSupportedException(); - } - } - public static bool DoesPatchApply(AppliesToEnum @enum, CharacterObject character) { switch (@enum) diff --git a/Patches/CraftingCampaignBehaviorPatch.cs b/Patches/CraftingCampaignBehaviorPatch.cs index 8d4e821..98a947c 100644 --- a/Patches/CraftingCampaignBehaviorPatch.cs +++ b/Patches/CraftingCampaignBehaviorPatch.cs @@ -24,7 +24,7 @@ namespace UnlimitLord.Patches internal static class CraftingCampaignBehaviorPatch { private static Settings Setting => Settings.Instance; - private static AppliesToEnum AppliesTo => Setting.CraftingStaminaAppliesTo.SelectedValue.GetWho(); + private static AppliesToEnum AppliesTo => Setting.CraftingStaminaAppliesTo.SelectedValue; [HarmonyPatch(typeof(CraftingCampaignBehavior), "GetMaxHeroCraftingStamina")] internal static class MaximumStamina diff --git a/Patches/DefaultCharacterStatsModelPatch.cs b/Patches/DefaultCharacterStatsModelPatch.cs index f6c7fba..8ae2259 100644 --- a/Patches/DefaultCharacterStatsModelPatch.cs +++ b/Patches/DefaultCharacterStatsModelPatch.cs @@ -26,7 +26,7 @@ internal static class DefaultCharacterStatsModelPatch { private static Settings Setting => Settings.Instance; private static bool Enabled => Setting.HeroHealthAmountEnabled; - private static AppliesToEnum AppliesTo => Setting.HeroHealthAmountAppliesTo.SelectedValue.GetWho(); + private static AppliesToEnum AppliesTo => Setting.HeroHealthAmountAppliesTo.SelectedValue; private static float Multiplier => Setting.HeroHealthAmountMultiplier; private static int Minimum => Setting.MinimumHeroHealthAmount; private static int Maximum => Setting.MaximumHeroHealthAmount; diff --git a/Patches/DefaultClanFinanceModelPatch.cs b/Patches/DefaultClanFinanceModelPatch.cs index 9b27f0f..95a809b 100644 --- a/Patches/DefaultClanFinanceModelPatch.cs +++ b/Patches/DefaultClanFinanceModelPatch.cs @@ -26,14 +26,14 @@ internal static class DefaultClanFinanceModelPatch { private static Settings Setting => Settings.Instance; private static bool Enabled => Setting.GarrisonWageEnabled; - private static AppliesToEnum AppliesTo => Setting.GarrisonWageAppliesTo.SelectedValue.GetWho(); + private static AppliesToEnum AppliesTo => Setting.GarrisonWageAppliesTo.SelectedValue; private static float Multiplier => Setting.GarrisonWageMultiplier; private static int Minimum => Setting.MinimumGarrisonWage; private static int Maximum => Setting.MaximumGarrisonWage; internal static int Postfix(int result, MobileParty mobileParty) { - if (!mobileParty.IsGarrison() || !PatchAppliesTo.DoesPatchApply(AppliesTo, mobileParty)) + if (!mobileParty.IsThisPartyGarrison() || !PatchAppliesTo.DoesPatchApply(AppliesTo, mobileParty)) return result; return Math.ClampInt((int)(result * Multiplier), Minimum, Maximum); diff --git a/Patches/DefaultClanTierModelPatch.cs b/Patches/DefaultClanTierModelPatch.cs index 08b3ca4..e3e3789 100644 --- a/Patches/DefaultClanTierModelPatch.cs +++ b/Patches/DefaultClanTierModelPatch.cs @@ -29,7 +29,7 @@ internal static class DefaultClanTierModelPatch internal static class Party { private static bool Enabled => Setting.PartyAmountEnabled; - private static AppliesToEnum AppliesTo => Setting.PartyAmountAppliesTo.SelectedValue.GetWho(); + private static AppliesToEnum AppliesTo => Setting.PartyAmountAppliesTo.SelectedValue; private static float Multiplier => Setting.PartyAmountMultiplier; private static int Minimum => Setting.MinimumPartyAmount; private static int Maximum => Setting.MaximumPartyAmount; diff --git a/Patches/DefaultMobilePartyFoodConsumptionModelPatch.cs b/Patches/DefaultMobilePartyFoodConsumptionModelPatch.cs index 8c36b1e..3d91a77 100644 --- a/Patches/DefaultMobilePartyFoodConsumptionModelPatch.cs +++ b/Patches/DefaultMobilePartyFoodConsumptionModelPatch.cs @@ -28,7 +28,7 @@ internal static class Party { private static Settings Setting => Settings.Instance; private static bool Enabled => Setting.PartyFoodConsumptionEnabled; - private static AppliesToEnum AppliesTo => Setting.PartyFoodConsumptionAppliesTo.SelectedValue.GetWho(); + private static AppliesToEnum AppliesTo => Setting.PartyFoodConsumptionAppliesTo.SelectedValue; private static float Multiplier => Setting.PartyFoodConsumptionMultiplier; private static float Minimum => Setting.MinimumPartyFoodConsumption; private static float Maximum => Setting.MaximumPartyFoodConsumption; diff --git a/Patches/DefaultPartyHealingModelPatch.cs b/Patches/DefaultPartyHealingModelPatch.cs index eb400bf..7eb650d 100644 --- a/Patches/DefaultPartyHealingModelPatch.cs +++ b/Patches/DefaultPartyHealingModelPatch.cs @@ -29,7 +29,7 @@ internal static class DefaultPartyHealingModelPatch internal static class Troops { private static bool Enabled => Setting.TroopHealingRateEnabled; - private static AppliesToEnum AppliesTo => Setting.TroopHealingRateAppliesTo.SelectedValue.GetWho(); + private static AppliesToEnum AppliesTo => Setting.TroopHealingRateAppliesTo.SelectedValue; private static float Multiplier => Setting.TroopHealingRateMultiplier; private static float Minimum => Setting.MinimumTroopHealingRate; private static float Maximum => Setting.MaximumTroopHealingRate; @@ -52,7 +52,7 @@ internal static bool Prepare() internal static class Heroes { private static bool Enabled => Setting.HeroHealingRateEnabled; - private static AppliesToEnum AppliesTo => Setting.HeroHealingRateAppliesTo.SelectedValue.GetWho(); + private static AppliesToEnum AppliesTo => Setting.HeroHealingRateAppliesTo.SelectedValue; private static float Multiplier => Setting.HeroHealingRateMultiplier; private static float Minimum => Setting.MinimumHeroHealingRate; private static float Maximum => Setting.MaximumHeroHealingRate; diff --git a/Patches/DefaultPartyMoraleModelPatch.cs b/Patches/DefaultPartyMoraleModelPatch.cs index 2b281f4..880eb95 100644 --- a/Patches/DefaultPartyMoraleModelPatch.cs +++ b/Patches/DefaultPartyMoraleModelPatch.cs @@ -26,7 +26,7 @@ internal static class DefaultPartyMoraleModelPatch { private static Settings Setting => Settings.Instance; private static bool Enabled => Setting.MoraleEnabled; - private static AppliesToEnum AppliesTo => Setting.MoraleAppliesTo.SelectedValue.GetWho(); + private static AppliesToEnum AppliesTo => Setting.MoraleAppliesTo.SelectedValue; private static float Multiplier => Setting.MoraleMultiplier; private static float Minimum => Setting.MinimumMorale; private static float Maximum => Setting.MaximumMorale; diff --git a/Patches/DefaultPartySizeLimitModelPatch.cs b/Patches/DefaultPartySizeLimitModelPatch.cs index 341a963..3e2884f 100644 --- a/Patches/DefaultPartySizeLimitModelPatch.cs +++ b/Patches/DefaultPartySizeLimitModelPatch.cs @@ -29,7 +29,7 @@ internal static class DefaultPartySizeLimitModelPatch internal static class Castle { private static bool Enabled => Setting.CastleGarrisonSizeEnabled; - private static AppliesToEnum AppliesTo => Setting.CastleGarrisonSizeAppliesTo.SelectedValue.GetWho(); + private static AppliesToEnum AppliesTo => Setting.CastleGarrisonSizeAppliesTo.SelectedValue; private static float Multiplier => Setting.CastleGarrisonSizeMultiplier; private static int Minimum => Setting.MinimumCastleGarrisonSize; private static int Maximum => Setting.MaximumCastleGarrisonSize; @@ -55,7 +55,7 @@ internal static bool Prepare() internal static class Town { private static bool Enabled => Setting.TownGarrisonSizeEnabled; - private static AppliesToEnum AppliesTo => Setting.TownGarrisonSizeAppliesTo.SelectedValue.GetWho(); + private static AppliesToEnum AppliesTo => Setting.TownGarrisonSizeAppliesTo.SelectedValue; private static float Multiplier => Setting.TownGarrisonSizeMultiplier; private static int Minimum => Setting.MinimumTownGarrisonSize; private static int Maximum => Setting.MaximumTownGarrisonSize; @@ -81,7 +81,7 @@ internal static bool Prepare() internal static class Troops { private static bool Enabled => Setting.PartyTroopAmountEnabled; - private static AppliesToEnum AppliesTo => Setting.PartyTroopAmountAppliesTo.SelectedValue.GetWho(); + private static AppliesToEnum AppliesTo => Setting.PartyTroopAmountAppliesTo.SelectedValue; private static float Multiplier => Setting.PartyTroopAmountMultiplier; private static int Minimum => Setting.MinimumPartyTroopAmount; private static int Maximum => Setting.MaximumPartyTroopAmount; @@ -91,6 +91,9 @@ internal static int Postfix(int result, PartyBase party, StatExplainer explanati if (!PatchAppliesTo.DoesPatchApply(AppliesTo, party)) return result; + if (party.IsThisPartyGarrison()) + return result; + return Math.ClampAndExplainInt((int)(result * Multiplier), explanation, Minimum, Maximum); } @@ -104,7 +107,7 @@ internal static bool Prepare() internal static class Prisoners { private static bool Enabled => Setting.PartyPrisonerAmountEnabled; - private static AppliesToEnum AppliesTo => Setting.PartyPrisonerAmountAppliesTo.SelectedValue.GetWho(); + private static AppliesToEnum AppliesTo => Setting.PartyPrisonerAmountAppliesTo.SelectedValue; private static float Multiplier => Setting.PartyPrisonerAmountMultiplier; private static int Minimum => Setting.MinimumPartyPrisonerAmount; private static int Maximum => Setting.MaximumPartyPrisonerAmount; @@ -114,6 +117,9 @@ internal static int Postfix(int result, PartyBase party, StatExplainer explanati if (!PatchAppliesTo.DoesPatchApply(AppliesTo, party)) return result; + if (party.IsThisPartyGarrison()) + return result; + return Math.ClampAndExplainInt((int)(result * Multiplier), explanation, Minimum, Maximum); } diff --git a/Patches/DefaultPartySpeedCalculatingModelPatch.cs b/Patches/DefaultPartySpeedCalculatingModelPatch.cs index 09b48df..cc050f2 100644 --- a/Patches/DefaultPartySpeedCalculatingModelPatch.cs +++ b/Patches/DefaultPartySpeedCalculatingModelPatch.cs @@ -26,7 +26,7 @@ internal static class DefaultPartySpeedCalculatingModelPatch { private static Settings Setting => Settings.Instance; private static bool Enabled => Setting.MovementSpeedEnabled; - private static AppliesToEnum AppliesTo => Setting.MovementSpeedAppliesTo.SelectedValue.GetWho(); + private static AppliesToEnum AppliesTo => Setting.MovementSpeedAppliesTo.SelectedValue; private static float Multiplier => Setting.MovementSpeedMultiplier; private static float Minimum => Setting.MinimumMovementSpeed; private static float Maximum => Setting.MaximumMovementSpeed; diff --git a/Settings.cs b/Settings.cs index 81f4f3c..bbf5034 100644 --- a/Settings.cs +++ b/Settings.cs @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License using MCM.Abstractions.Attributes.v2; using MCM.Abstractions.Data; using MCM.Abstractions.Settings.Base.Global; +using UnlimitLord; namespace UnlimitLord { @@ -39,13 +40,13 @@ internal sealed partial class Settings [SettingPropertyGroup("{=D78DVfmutxZX}Movement Speed")] [SettingPropertyDropdown("{=Jn6KV7vNzCVC}Who is affected", Order = 0, RequireRestart = false)] - public DefaultDropdown MovementSpeedAppliesTo { get; set; } = new DefaultDropdown(new[] + public DefaultDropdown MovementSpeedAppliesTo { get; set; } = new DefaultDropdown(new[] { - new PatchAppliesTo(AppliesToEnum.PlayerParty), - new PatchAppliesTo(AppliesToEnum.PlayerClan), - new PatchAppliesTo(AppliesToEnum.PlayerArmy), - new PatchAppliesTo(AppliesToEnum.PlayerKingdom), - new PatchAppliesTo(AppliesToEnum.Everyone) + AppliesToEnum.PlayerParty, + AppliesToEnum.PlayerClan, + AppliesToEnum.PlayerArmy, + AppliesToEnum.PlayerKingdom, + AppliesToEnum.Everyone }, 0); [SettingPropertyGroup("{=D78DVfmutxZX}Movement Speed")] @@ -71,13 +72,13 @@ internal sealed partial class Settings [SettingPropertyGroup("{=hHROV0BkMDfG}Troop Healing Rate")] [SettingPropertyDropdown("{=Jn6KV7vNzCVC}Who is affected", Order = 0, RequireRestart = false)] - public DefaultDropdown TroopHealingRateAppliesTo { get; set; } = new DefaultDropdown(new[] + public DefaultDropdown TroopHealingRateAppliesTo { get; set; } = new DefaultDropdown(new[] { - new PatchAppliesTo(AppliesToEnum.PlayerParty), - new PatchAppliesTo(AppliesToEnum.PlayerClan), - new PatchAppliesTo(AppliesToEnum.PlayerArmy), - new PatchAppliesTo(AppliesToEnum.PlayerKingdom), - new PatchAppliesTo(AppliesToEnum.Everyone) + AppliesToEnum.PlayerParty, + AppliesToEnum.PlayerClan, + AppliesToEnum.PlayerArmy, + AppliesToEnum.PlayerKingdom, + AppliesToEnum.Everyone }, 0); [SettingPropertyGroup("{=hHROV0BkMDfG}Troop Healing Rate")] @@ -102,13 +103,13 @@ internal sealed partial class Settings [SettingPropertyGroup("{=uvIPiQqsx5Qb}Hero Healing Rate")] [SettingPropertyDropdown("{=Jn6KV7vNzCVC}Who is affected", Order = 0, RequireRestart = false)] - public DefaultDropdown HeroHealingRateAppliesTo { get; set; } = new DefaultDropdown(new[] + public DefaultDropdown HeroHealingRateAppliesTo { get; set; } = new DefaultDropdown(new[] { - new PatchAppliesTo(AppliesToEnum.PlayerParty), - new PatchAppliesTo(AppliesToEnum.PlayerClan), - new PatchAppliesTo(AppliesToEnum.PlayerArmy), - new PatchAppliesTo(AppliesToEnum.PlayerKingdom), - new PatchAppliesTo(AppliesToEnum.Everyone) + AppliesToEnum.PlayerParty, + AppliesToEnum.PlayerClan, + AppliesToEnum.PlayerArmy, + AppliesToEnum.PlayerKingdom, + AppliesToEnum.Everyone }, 0); [SettingPropertyGroup("{=uvIPiQqsx5Qb}Hero Healing Rate")] @@ -133,13 +134,13 @@ internal sealed partial class Settings [SettingPropertyGroup("{=DB1kpsmAAIky}Morale")] [SettingPropertyDropdown("{=Jn6KV7vNzCVC}Who is affected", Order = 0, RequireRestart = false)] - public DefaultDropdown MoraleAppliesTo { get; set; } = new DefaultDropdown(new[] + public DefaultDropdown MoraleAppliesTo { get; set; } = new DefaultDropdown(new[] { - new PatchAppliesTo(AppliesToEnum.PlayerParty), - new PatchAppliesTo(AppliesToEnum.PlayerClan), - new PatchAppliesTo(AppliesToEnum.PlayerArmy), - new PatchAppliesTo(AppliesToEnum.PlayerKingdom), - new PatchAppliesTo(AppliesToEnum.Everyone) + AppliesToEnum.PlayerParty, + AppliesToEnum.PlayerClan, + AppliesToEnum.PlayerArmy, + AppliesToEnum.PlayerKingdom, + AppliesToEnum.Everyone }, 0); [SettingPropertyGroup("{=DB1kpsmAAIky}Morale")] @@ -164,11 +165,11 @@ internal sealed partial class Settings [SettingPropertyGroup("{=SrBxpWv16oRJ}Castle Garrison Size")] [SettingPropertyDropdown("{=Jn6KV7vNzCVC}Who is affected", Order = 0, RequireRestart = false)] - public DefaultDropdown CastleGarrisonSizeAppliesTo { get; set; } = new DefaultDropdown(new[] + public DefaultDropdown CastleGarrisonSizeAppliesTo { get; set; } = new DefaultDropdown(new[] { - new PatchAppliesTo(AppliesToEnum.PlayerClan), - new PatchAppliesTo(AppliesToEnum.PlayerKingdom), - new PatchAppliesTo(AppliesToEnum.Everyone) + AppliesToEnum.PlayerClan, + AppliesToEnum.PlayerKingdom, + AppliesToEnum.Everyone }, 0); [SettingPropertyGroup("{=SrBxpWv16oRJ}Castle Garrison Size")] @@ -181,7 +182,7 @@ internal sealed partial class Settings [SettingPropertyGroup("{=SrBxpWv16oRJ}Castle Garrison Size")] [SettingPropertyInteger("{=3YOggkouIghy}Maximum", 0, 100000, Order = 3, RequireRestart = false)] - public int MaximumCastleGarrisonSize { get; set; } = 1000000000; + public int MaximumCastleGarrisonSize { get; set; } = 100000; } // Town garrison size settings @@ -193,11 +194,11 @@ internal sealed partial class Settings [SettingPropertyGroup("{=9hYB9kzrN9Qs}Town Garrison Size")] [SettingPropertyDropdown("{=Jn6KV7vNzCVC}Who is affected", Order = 0, RequireRestart = false)] - public DefaultDropdown TownGarrisonSizeAppliesTo { get; set; } = new DefaultDropdown(new[] + public DefaultDropdown TownGarrisonSizeAppliesTo { get; set; } = new DefaultDropdown(new[] { - new PatchAppliesTo(AppliesToEnum.PlayerClan), - new PatchAppliesTo(AppliesToEnum.PlayerKingdom), - new PatchAppliesTo(AppliesToEnum.Everyone) + AppliesToEnum.PlayerClan, + AppliesToEnum.PlayerKingdom, + AppliesToEnum.Everyone }, 0); [SettingPropertyGroup("{=9hYB9kzrN9Qs}Town Garrison Size")] @@ -222,11 +223,11 @@ internal sealed partial class Settings [SettingPropertyGroup("{=tVYKb9VGO56w}Garrison Wages")] [SettingPropertyDropdown("{=Jn6KV7vNzCVC}Who is affected", Order = 0, RequireRestart = false)] - public DefaultDropdown GarrisonWageAppliesTo { get; set; } = new DefaultDropdown(new[] + public DefaultDropdown GarrisonWageAppliesTo { get; set; } = new DefaultDropdown(new[] { - new PatchAppliesTo(AppliesToEnum.PlayerClan), - new PatchAppliesTo(AppliesToEnum.PlayerKingdom), - new PatchAppliesTo(AppliesToEnum.Everyone) + AppliesToEnum.PlayerClan, + AppliesToEnum.PlayerKingdom, + AppliesToEnum.Everyone }, 0); [SettingPropertyGroup("{=tVYKb9VGO56w}Garrison Wages")] @@ -251,11 +252,11 @@ internal sealed partial class Settings [SettingPropertyGroup("{=oP25rddkklhH}Number of Parties")] [SettingPropertyDropdown("{=Jn6KV7vNzCVC}Who is affected", Order = 0, RequireRestart = false)] - public DefaultDropdown PartyAmountAppliesTo { get; set; } = new DefaultDropdown(new[] + public DefaultDropdown PartyAmountAppliesTo { get; set; } = new DefaultDropdown(new[] { - new PatchAppliesTo(AppliesToEnum.PlayerClan), - new PatchAppliesTo(AppliesToEnum.PlayerKingdom), - new PatchAppliesTo(AppliesToEnum.Everyone) + AppliesToEnum.PlayerClan, + AppliesToEnum.PlayerKingdom, + AppliesToEnum.Everyone }, 0); [SettingPropertyGroup("{=oP25rddkklhH}Number of Parties")] @@ -296,10 +297,10 @@ internal sealed partial class Settings { [SettingPropertyGroup("{=pQH0InUHZa2K}Crafting Stamina")] [SettingPropertyDropdown("{=Jn6KV7vNzCVC}Who is affected", Order = 0, RequireRestart = false)] - public DefaultDropdown CraftingStaminaAppliesTo { get; set; } = new DefaultDropdown(new[] + public DefaultDropdown CraftingStaminaAppliesTo { get; set; } = new DefaultDropdown(new[] { - new PatchAppliesTo(AppliesToEnum.PlayerOnly), - new PatchAppliesTo(AppliesToEnum.PlayerCompanions) + AppliesToEnum.PlayerOnly, + AppliesToEnum.PlayerCompanions }, 0); [SettingPropertyGroup("{=pQH0InUHZa2K}Crafting Stamina")] @@ -352,14 +353,14 @@ internal sealed partial class Settings [SettingPropertyGroup("{=k7zNutD2MZWa}Hero Health Amount")] [SettingPropertyDropdown("{=Jn6KV7vNzCVC}Who is affected", Order = 0, RequireRestart = false)] - public DefaultDropdown HeroHealthAmountAppliesTo { get; set; } = new DefaultDropdown(new[] + public DefaultDropdown HeroHealthAmountAppliesTo { get; set; } = new DefaultDropdown(new[] { - new PatchAppliesTo(AppliesToEnum.PlayerOnly), - new PatchAppliesTo(AppliesToEnum.PlayerCompanions), - new PatchAppliesTo(AppliesToEnum.PlayerClan), - new PatchAppliesTo(AppliesToEnum.PlayerArmy), - new PatchAppliesTo(AppliesToEnum.PlayerKingdom), - new PatchAppliesTo(AppliesToEnum.Everyone) + AppliesToEnum.PlayerOnly, + AppliesToEnum.PlayerCompanions, + AppliesToEnum.PlayerClan, + AppliesToEnum.PlayerArmy, + AppliesToEnum.PlayerKingdom, + AppliesToEnum.Everyone }, 0); [SettingPropertyGroup("{=k7zNutD2MZWa}Hero Health Amount")] @@ -384,13 +385,13 @@ internal sealed partial class Settings [SettingPropertyGroup("{=MBgE3OOCyUw0}Party Food Consumption")] [SettingPropertyDropdown("{=Jn6KV7vNzCVC}Who is affected", Order = 0, RequireRestart = false)] - public DefaultDropdown PartyFoodConsumptionAppliesTo { get; set; } = new DefaultDropdown(new[] + public DefaultDropdown PartyFoodConsumptionAppliesTo { get; set; } = new DefaultDropdown(new[] { - new PatchAppliesTo(AppliesToEnum.PlayerParty), - new PatchAppliesTo(AppliesToEnum.PlayerClan), - new PatchAppliesTo(AppliesToEnum.PlayerArmy), - new PatchAppliesTo(AppliesToEnum.PlayerKingdom), - new PatchAppliesTo(AppliesToEnum.Everyone) + AppliesToEnum.PlayerParty, + AppliesToEnum.PlayerClan, + AppliesToEnum.PlayerArmy, + AppliesToEnum.PlayerKingdom, + AppliesToEnum.Everyone }, 0); [SettingPropertyGroup("{=MBgE3OOCyUw0}Party Food Consumption")] @@ -415,13 +416,13 @@ internal sealed partial class Settings [SettingPropertyGroup("{=hBEXh7AijM7I}Maximum Party Troops")] [SettingPropertyDropdown("{=Jn6KV7vNzCVC}Who is affected", Order = 0, RequireRestart = false)] - public DefaultDropdown PartyTroopAmountAppliesTo { get; set; } = new DefaultDropdown(new[] + public DefaultDropdown PartyTroopAmountAppliesTo { get; set; } = new DefaultDropdown(new[] { - new PatchAppliesTo(AppliesToEnum.PlayerParty), - new PatchAppliesTo(AppliesToEnum.PlayerClan), - new PatchAppliesTo(AppliesToEnum.PlayerArmy), - new PatchAppliesTo(AppliesToEnum.PlayerKingdom), - new PatchAppliesTo(AppliesToEnum.Everyone) + AppliesToEnum.PlayerParty, + AppliesToEnum.PlayerClan, + AppliesToEnum.PlayerArmy, + AppliesToEnum.PlayerKingdom, + AppliesToEnum.Everyone }, 0); [SettingPropertyGroup("{=hBEXh7AijM7I}Maximum Party Troops")] @@ -446,13 +447,13 @@ internal sealed partial class Settings [SettingPropertyGroup("{=PTj8sDnBew21}Maximum Party Prisoners")] [SettingPropertyDropdown("{=Jn6KV7vNzCVC}Who is affected", Order = 0, RequireRestart = false)] - public DefaultDropdown PartyPrisonerAmountAppliesTo { get; set; } = new DefaultDropdown(new[] + public DefaultDropdown PartyPrisonerAmountAppliesTo { get; set; } = new DefaultDropdown(new[] { - new PatchAppliesTo(AppliesToEnum.PlayerParty), - new PatchAppliesTo(AppliesToEnum.PlayerClan), - new PatchAppliesTo(AppliesToEnum.PlayerArmy), - new PatchAppliesTo(AppliesToEnum.PlayerKingdom), - new PatchAppliesTo(AppliesToEnum.Everyone) + AppliesToEnum.PlayerParty, + AppliesToEnum.PlayerClan, + AppliesToEnum.PlayerArmy, + AppliesToEnum.PlayerKingdom, + AppliesToEnum.Everyone }, 0); [SettingPropertyGroup("{=PTj8sDnBew21}Maximum Party Prisoners")] @@ -460,12 +461,12 @@ internal sealed partial class Settings public float PartyPrisonerAmountMultiplier { get; set; } = 1f; [SettingPropertyGroup("{=PTj8sDnBew21}Maximum Party Prisoners")] - [SettingPropertyInteger("{=RkptUH9teOPo}Minimum", 0, 500000, Order = 2, RequireRestart = false)] + [SettingPropertyInteger("{=RkptUH9teOPo}Minimum", 0, 50000, Order = 2, RequireRestart = false)] public int MinimumPartyPrisonerAmount { get; set; } = 5; [SettingPropertyGroup("{=PTj8sDnBew21}Maximum Party Prisoners")] - [SettingPropertyInteger("{=3YOggkouIghy}Maximum", 0, 500000, Order = 3, RequireRestart = false)] - public int MaximumPartyPrisonerAmount { get; set; } = 100000; + [SettingPropertyInteger("{=3YOggkouIghy}Maximum", 0, 50000, Order = 3, RequireRestart = false)] + public int MaximumPartyPrisonerAmount { get; set; } = 50000; } // Persuasion chance settings diff --git a/SubModule.xml b/SubModule.xml index fdce809..8031a42 100644 --- a/SubModule.xml +++ b/SubModule.xml @@ -1,7 +1,7 @@ - + diff --git a/UnlimitLord.csproj b/UnlimitLord.csproj index 3d2e543..f143736 100644 --- a/UnlimitLord.csproj +++ b/UnlimitLord.csproj @@ -3,7 +3,7 @@ net472 x64 - 0.4.1 + 0.4.2 ashakoor Copyright (C) 2020 ashakoor COPYING.md