diff --git a/Content/AcolyteAngelCharacter.cs b/Content/AcolyteAngelCharacter.cs index 6d40865..11a652c 100644 --- a/Content/AcolyteAngelCharacter.cs +++ b/Content/AcolyteAngelCharacter.cs @@ -1,4 +1,4 @@ -using BepInEx.Configuration; +using BepInEx.Configuration; using RoR2; using RoR2.Skills; using System; @@ -21,8 +21,6 @@ internal class AcolyteAngelCharacter : CharacterBase public override BodyInfo bodyInfo { get; set; } = new BodyInfo { - armor = 25f, - armorGrowth = 0f, bodyName = "AcolyteAngelBody", bodyNameToken = ACOLYTEANGEL_PREFIX + "NAME", subtitleNameToken = ShamanPlugin.DEVELOPER_PREFIX + "_ACOLYTEANGEL_SUBTITLE", @@ -32,11 +30,28 @@ internal class AcolyteAngelCharacter : CharacterBase crosshair = Modules.Assets.LoadCrosshair("TiltedBracket"), podPrefab = null, - maxHealth = 775f, - healthRegen = -10f, - damage = 18f, - moveSpeed = 8f, - jumpCount = 0, + maxHealth = Modules.Config.F_AcolyteAngelBMaxHealth.Value, //775 By default. + healthRegen = Modules.Config.F_AcolyteAngelBRegen.Value, //-10 + armor = Modules.Config.F_AcolyteAngelBArmor.Value, //0 + shield = Modules.Config.F_AcolyteAngelBShield.Value, //0 + jumpCount = 0, //0 + damage = Modules.Config.F_AcolyteAngelBDamage.Value, //18 + attackSpeed = Modules.Config.F_AcolyteAngelBAtkSpd.Value, //1 + crit = Modules.Config.F_AcolyteAngelBCrit.Value, //1 + moveSpeed = 8f, + //moveSpeed = Modules.Config.F_AcolyteAngelBSpeed.Value, //8 + //acceleration = Modules.Config.F_AcolyteAngelBAccel.Value, //80 + //jumpPower = Modules.Config.F_AcolyteAngelBJump.Value, //15 + + healthGrowth = Modules.Config.F_AcolyteAngelLMaxHealth.Value, //30 + regenGrowth = Modules.Config.F_AcolyteAngelLRegen.Value, //0.2 + armorGrowth = Modules.Config.F_AcolyteAngelLArmor.Value, //0 + shieldGrowth = Modules.Config.F_AcolyteAngelLShield.Value, //0 + damageGrowth = Modules.Config.F_AcolyteAngelLDamage.Value, //2.4 + attackSpeedGrowth = Modules.Config.F_AcolyteAngelLAtkSpd.Value, //0 + critGrowth = Modules.Config.F_AcolyteAngelLCrit.Value, //0 + //moveSpeedGrowth = Modules.Config.F_AcolyteAngelLSpeed.Value, //0 + //jumpPowerGrowth = Modules.Config.F_AcolyteAngelLJump.Value, //0 }; public override CustomRendererInfo[] customRendererInfos { get; set; } = new CustomRendererInfo[] @@ -319,4 +334,4 @@ public override void InitializeSkins() skinController.skins = skins.ToArray(); } } -} \ No newline at end of file +} diff --git a/Content/AcolyteBeastCharacter.cs b/Content/AcolyteBeastCharacter.cs index b8523fb..b710541 100644 --- a/Content/AcolyteBeastCharacter.cs +++ b/Content/AcolyteBeastCharacter.cs @@ -1,4 +1,4 @@ -using BepInEx.Configuration; +using BepInEx.Configuration; using RoR2; using RoR2.Skills; using System; @@ -21,8 +21,6 @@ internal class AcolyteBeastCharacter : CharacterBase public override BodyInfo bodyInfo { get; set; } = new BodyInfo { - armor = 0f, - armorGrowth = 0f, bodyName = "AcolyteBeastBody", bodyNameToken = ACOLYTE_PREFIX + "NAME", subtitleNameToken = ShamanPlugin.DEVELOPER_PREFIX + "_ACOLYTEBEAST_SUBTITLE", @@ -32,11 +30,27 @@ internal class AcolyteBeastCharacter : CharacterBase crosshair = Modules.Assets.LoadCrosshair("TiltedBracket"), podPrefab = null, - maxHealth = 325f, - healthRegen = 0.8f, - damage = 12f, - moveSpeed = 7f, - jumpCount = 1, + maxHealth = Modules.Config.F_AcolyteBeastBMaxHealth.Value, //325 By default. + healthRegen = Modules.Config.F_AcolyteBeastBRegen.Value, //0.8 + armor = Modules.Config.F_AcolyteBeastBArmor.Value, //0 + shield = Modules.Config.F_AcolyteBeastBShield.Value, //0 + jumpCount = 1, //1 + damage = Modules.Config.F_AcolyteBeastBDamage.Value, //14 + attackSpeed = Modules.Config.F_AcolyteBeastBAtkSpd.Value, //1 + crit = Modules.Config.F_AcolyteBeastBCrit.Value, //1 + moveSpeed = Modules.Config.F_AcolyteBeastBSpeed.Value, //7 + acceleration = Modules.Config.F_AcolyteBeastBAccel.Value, //80 + jumpPower = Modules.Config.F_AcolyteBeastBJump.Value, //15 + + healthGrowth = Modules.Config.F_AcolyteBeastLMaxHealth.Value, //30 + regenGrowth = Modules.Config.F_AcolyteBeastLRegen.Value, //0.2 + armorGrowth = Modules.Config.F_AcolyteBeastLArmor.Value, //0 + shieldGrowth = Modules.Config.F_AcolyteBeastLShield.Value, //0 + damageGrowth = Modules.Config.F_AcolyteBeastLDamage.Value, //2.4 + attackSpeedGrowth = Modules.Config.F_AcolyteBeastLAtkSpd.Value, //0 + critGrowth = Modules.Config.F_AcolyteBeastLCrit.Value, //0 + moveSpeedGrowth = Modules.Config.F_AcolyteBeastLSpeed.Value, //0 + jumpPowerGrowth = Modules.Config.F_AcolyteBeastLJump.Value, //0 }; public override CustomRendererInfo[] customRendererInfos { get; set; } = new CustomRendererInfo[] @@ -389,4 +403,4 @@ public override void InitializeSkins() skinController.skins = skins.ToArray(); } } -} \ No newline at end of file +} diff --git a/Content/AcolyteCharacter.cs b/Content/AcolyteCharacter.cs index 6a37814..2781e48 100644 --- a/Content/AcolyteCharacter.cs +++ b/Content/AcolyteCharacter.cs @@ -1,4 +1,4 @@ -using BepInEx.Configuration; +using BepInEx.Configuration; using RoR2; using RoR2.Skills; using System; @@ -19,8 +19,6 @@ internal class AcolyteCharacter : CharacterBase public override BodyInfo bodyInfo { get; set; } = new BodyInfo { - armor = 0f, - armorGrowth = 0f, bodyName = "AcolyteBody", bodyNameToken = ACOLYTE_PREFIX + "NAME", subtitleNameToken = ShamanPlugin.DEVELOPER_PREFIX + "_ACOLYTE_SUBTITLE", @@ -30,11 +28,27 @@ internal class AcolyteCharacter : CharacterBase crosshair = Modules.Assets.LoadCrosshair("TiltedBracket"), podPrefab = null, - maxHealth = 160f, - healthRegen = 1.2f, - damage = 14f, - moveSpeed = 7f, - jumpCount = 1, + maxHealth = Modules.Config.F_AcolyteBMaxHealth.Value,//160 By default. + healthRegen = Modules.Config.F_AcolyteBRegen.Value, //1.2 + armor = Modules.Config.F_AcolyteBArmor.Value, //0 + shield = Modules.Config.F_AcolyteBShield.Value, //0 + jumpCount = 1, //1 + damage = Modules.Config.F_AcolyteBDamage.Value, //14 + attackSpeed = Modules.Config.F_AcolyteBAtkSpd.Value, //1 + crit = Modules.Config.F_AcolyteBCrit.Value, //1 + moveSpeed = Modules.Config.F_AcolyteBSpeed.Value, //7 + acceleration = Modules.Config.F_AcolyteBAccel.Value, //80 + jumpPower = Modules.Config.F_AcolyteBJump.Value, //15 + + healthGrowth = Modules.Config.F_AcolyteLMaxHealth.Value, //30 + regenGrowth = Modules.Config.F_AcolyteLRegen.Value, //0.2 + armorGrowth = Modules.Config.F_AcolyteLArmor.Value, //0 + shieldGrowth = Modules.Config.F_AcolyteLShield.Value, //0 + damageGrowth = Modules.Config.F_AcolyteLDamage.Value, //2.4 + attackSpeedGrowth = Modules.Config.F_AcolyteLAtkSpd.Value, //0 + critGrowth = Modules.Config.F_AcolyteLCrit.Value, //0 + moveSpeedGrowth = Modules.Config.F_AcolyteLSpeed.Value, //0 + jumpPowerGrowth = Modules.Config.F_AcolyteLJump.Value, //0 }; public override CustomRendererInfo[] customRendererInfos { get; set; } = new CustomRendererInfo[] @@ -310,4 +324,4 @@ public override void InitializeSkins() skinController.skins = skins.ToArray(); } } -} \ No newline at end of file +} diff --git a/Content/ShamanSurvivor.cs b/Content/ShamanSurvivor.cs index 7603fc7..bbb1739 100644 --- a/Content/ShamanSurvivor.cs +++ b/Content/ShamanSurvivor.cs @@ -1,4 +1,4 @@ -using BepInEx.Configuration; +using BepInEx.Configuration; using ShamanMod.Modules.Characters; using RoR2; using R2API; @@ -33,11 +33,27 @@ internal class ShamanSurvivor : SurvivorBase //podPrefab = RoR2.LegacyResourcesAPI.Load("Prefabs/NetworkedObjects/SurvivorPod"), podPrefab = null, - maxHealth = 80f, - healthRegen = 0.9f, - armor = 0f, - - jumpCount = 2, + maxHealth = Modules.Config.F_ShamanBMaxHealth.Value,//80 By default. + healthRegen = Modules.Config.F_ShamanBRegen.Value, //0.9 + armor = Modules.Config.F_ShamanBArmor.Value, //0 + shield = Modules.Config.F_ShamanBShield.Value, //0 + jumpCount = Modules.Config.I_ShamanJumpCount.Value, //2 + damage = Modules.Config.F_ShamanBDamage.Value, //12 + attackSpeed = Modules.Config.F_ShamanBAtkSpd.Value, //1 + crit = Modules.Config.F_ShamanBCrit.Value, //1 + moveSpeed = Modules.Config.F_ShamanBSpeed.Value, //7 + acceleration = Modules.Config.F_ShamanBAccel.Value, //80 + jumpPower = Modules.Config.F_ShamanBJump.Value, //15 + + healthGrowth = Modules.Config.F_ShamanLMaxHealth.Value, //30 + regenGrowth = Modules.Config.F_ShamanLRegen.Value, //0.2 + armorGrowth = Modules.Config.F_ShamanLArmor.Value, //0 + shieldGrowth = Modules.Config.F_ShamanLShield.Value, //0 + damageGrowth = Modules.Config.F_ShamanLDamage.Value, //2.4 + attackSpeedGrowth = Modules.Config.F_ShamanLAtkSpd.Value, //0 + critGrowth = Modules.Config.F_ShamanLCrit.Value, //0 + moveSpeedGrowth = Modules.Config.F_ShamanLSpeed.Value, //0 + jumpPowerGrowth = Modules.Config.F_ShamanLJump.Value, //0 }; public override CustomRendererInfo[] customRendererInfos { get; set; } = new CustomRendererInfo[] @@ -404,4 +420,4 @@ public override void InitializeSkins() skinController.skins = skins.ToArray(); } } -} \ No newline at end of file +} diff --git a/Modules/Config.cs b/Modules/Config.cs index d94c463..c002c35 100644 --- a/Modules/Config.cs +++ b/Modules/Config.cs @@ -1,22 +1,593 @@ -using BepInEx.Configuration; +using BepInEx.Configuration; using UnityEngine; namespace ShamanMod.Modules { public static class Config { + public static ConfigEntry F_ShamanBMaxHealth { get; set; } + public static ConfigEntry F_ShamanBRegen { get; set; } + public static ConfigEntry F_ShamanBArmor { get; set; } + public static ConfigEntry F_ShamanBShield { get; set; } + public static ConfigEntry I_ShamanJumpCount { get; set; } + public static ConfigEntry F_ShamanBDamage { get; set; } + public static ConfigEntry F_ShamanBAtkSpd { get; set; } + public static ConfigEntry F_ShamanBCrit { get; set; } + public static ConfigEntry F_ShamanBSpeed { get; set; } + public static ConfigEntry F_ShamanBAccel { get; set; } + public static ConfigEntry F_ShamanBJump { get; set; } + + public static ConfigEntry F_ShamanLMaxHealth { get; set; } + public static ConfigEntry F_ShamanLRegen { get; set; } + public static ConfigEntry F_ShamanLArmor { get; set; } + public static ConfigEntry F_ShamanLShield { get; set; } + public static ConfigEntry F_ShamanLDamage { get; set; } + public static ConfigEntry F_ShamanLAtkSpd { get; set; } + public static ConfigEntry F_ShamanLCrit { get; set; } + public static ConfigEntry F_ShamanLSpeed { get; set; } + public static ConfigEntry F_ShamanLJump { get; set; } + + public static ConfigEntry F_DefSpawnTime { get; set; } + public static ConfigEntry F_MinSpawnTime { get; set; } + public static ConfigEntry F_MaxSpawnTime { get; set; } + + //Acolyte + public static ConfigEntry F_AcolyteBMaxHealth { get; set; } + public static ConfigEntry F_AcolyteBRegen { get; set; } + public static ConfigEntry F_AcolyteBArmor { get; set; } + public static ConfigEntry F_AcolyteBShield { get; set; } + public static ConfigEntry F_AcolyteBDamage { get; set; } + public static ConfigEntry F_AcolyteBAtkSpd { get; set; } + public static ConfigEntry F_AcolyteBCrit { get; set; } + public static ConfigEntry F_AcolyteBSpeed { get; set; } + public static ConfigEntry F_AcolyteBAccel { get; set; } + public static ConfigEntry F_AcolyteBJump { get; set; } + + public static ConfigEntry F_AcolyteLMaxHealth { get; set; } + public static ConfigEntry F_AcolyteLRegen { get; set; } + public static ConfigEntry F_AcolyteLArmor { get; set; } + public static ConfigEntry F_AcolyteLShield { get; set; } + public static ConfigEntry F_AcolyteLDamage { get; set; } + public static ConfigEntry F_AcolyteLAtkSpd { get; set; } + public static ConfigEntry F_AcolyteLCrit { get; set; } + public static ConfigEntry F_AcolyteLSpeed { get; set; } + public static ConfigEntry F_AcolyteLJump { get; set; } + + //Shamanic Compound + public static ConfigEntry F_AcolyteBeastBMaxHealth { get; set; } + public static ConfigEntry F_AcolyteBeastBRegen { get; set; } + public static ConfigEntry F_AcolyteBeastBArmor { get; set; } + public static ConfigEntry F_AcolyteBeastBShield { get; set; } + public static ConfigEntry F_AcolyteBeastBDamage { get; set; } + public static ConfigEntry F_AcolyteBeastBAtkSpd { get; set; } + public static ConfigEntry F_AcolyteBeastBCrit { get; set; } + public static ConfigEntry F_AcolyteBeastBSpeed { get; set; } + public static ConfigEntry F_AcolyteBeastBAccel { get; set; } + public static ConfigEntry F_AcolyteBeastBJump { get; set; } + + public static ConfigEntry F_AcolyteBeastLMaxHealth { get; set; } + public static ConfigEntry F_AcolyteBeastLRegen { get; set; } + public static ConfigEntry F_AcolyteBeastLArmor { get; set; } + public static ConfigEntry F_AcolyteBeastLShield { get; set; } + public static ConfigEntry F_AcolyteBeastLDamage { get; set; } + public static ConfigEntry F_AcolyteBeastLAtkSpd { get; set; } + public static ConfigEntry F_AcolyteBeastLCrit { get; set; } + public static ConfigEntry F_AcolyteBeastLSpeed { get; set; } + public static ConfigEntry F_AcolyteBeastLJump { get; set; } + + //Acolytic Preeminence + + public static ConfigEntry F_AcolyteAngelBMaxHealth { get; set; } + public static ConfigEntry F_AcolyteAngelBRegen { get; set; } + public static ConfigEntry F_AcolyteAngelBArmor { get; set; } + public static ConfigEntry F_AcolyteAngelBShield { get; set; } + public static ConfigEntry F_AcolyteAngelBDamage { get; set; } + public static ConfigEntry F_AcolyteAngelBAtkSpd { get; set; } + public static ConfigEntry F_AcolyteAngelBCrit { get; set; } + //public static ConfigEntry F_AcolyteAngelBSpeed { get; set; } + //public static ConfigEntry F_AcolyteAngelBAccel { get; set; } + //public static ConfigEntry F_AcolyteAngelBJump { get; set; } + + public static ConfigEntry F_AcolyteAngelLMaxHealth { get; set; } + public static ConfigEntry F_AcolyteAngelLRegen { get; set; } + public static ConfigEntry F_AcolyteAngelLArmor { get; set; } + public static ConfigEntry F_AcolyteAngelLShield { get; set; } + public static ConfigEntry F_AcolyteAngelLDamage { get; set; } + public static ConfigEntry F_AcolyteAngelLAtkSpd { get; set; } + public static ConfigEntry F_AcolyteAngelLCrit { get; set; } + //public static ConfigEntry F_AcolyteAngelLSpeed { get; set; } + //public static ConfigEntry F_AcolyteAngelLJump { get; set; } + public static void ReadConfig() { + F_ShamanBMaxHealth = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman base max health", + 80f, + "Shaman base max health" + ); + F_ShamanBRegen = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman base regen", + 0.9f, + "Shaman base regen" + ); + F_ShamanBArmor = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman base armor", + 0f, + "Shaman base armor" + ); + F_ShamanBShield = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman base shield", + 0f, + "Shaman base shield" + ); + I_ShamanJumpCount = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman jump count", + 2, + "Shaman jump count" + ); + F_ShamanBDamage = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman base damage", + 12f, + "Shaman base damage" + ); + F_ShamanBAtkSpd = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman base attack speed", + 1f, + "Shaman base attack speed" + ); + F_ShamanBCrit = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman base crit chance", + 1f, + "Shaman base crit chance" + ); + F_ShamanBSpeed = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman base movement speed", + 7f, + "Shaman base movement speed" + ); + F_ShamanBAccel = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman base acceleration", + 80f, + "Shaman base acceleration" + ); + F_ShamanBJump = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman base jump power", + 15f, + "Shaman base jump power" + ); - } + F_ShamanLMaxHealth = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman max health growth", + 30f, + "Shaman max health growth" + ); + F_ShamanLRegen = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman health regen growth", + 0.2f, + "Shaman health regen growth" + ); + F_ShamanLArmor = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman armor growth", + 0f, + "Shaman armor growth" + ); + F_ShamanLShield = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman shield growth", + 0f, + "Shaman shield growth" + ); + F_ShamanLDamage = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman damage growth", + 2.4f, + "Shaman damage growth" + ); + F_ShamanLAtkSpd = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman attack speed growth", + 0f, + "Shaman attack speed growth" + ); + F_ShamanLCrit = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman crit chance growth", + 0f, + "Shaman crit chance growth" + ); + F_ShamanLSpeed = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman move speed growth", + 0f, + "Shaman move speed growth" + ); + F_ShamanLJump = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Shaman jump power growth", + 0f, + "Shaman jump power growth" + ); + + F_DefSpawnTime = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Default Acolyte spawn rate", + 45f, + "Seconds until an Acolyte is spawned, before Attack speed calculations." + ); + F_MinSpawnTime = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Minimum Acolyte spawn rate", + 15f, + "Minimum seconds until an Acolyte is spawned." + ); + F_MaxSpawnTime = ShamanPlugin.instance.Config.Bind( + "Shaman Stats", + "Maximum Acolyte spawn rate", + 60f, + "Maximum seconds until an Acolyte is spawned." + ); + //Acolyte + F_AcolyteBMaxHealth = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte base max health", + 160f, + "Acolyte base max health" + ); + F_AcolyteBRegen = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte base regen", + 1.2f, + "Acolyte base regen" + ); + F_AcolyteBArmor = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte base armor", + 0f, + "Acolyte base armor" + ); + F_AcolyteBShield = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte base shield", + 0f, + "Acolyte base shield" + ); + F_AcolyteBDamage = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte base damage", + 14f, + "Acolyte base damage" + ); + F_AcolyteBAtkSpd = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte base attack speed", + 1f, + "Acolyte base attack speed" + ); + F_AcolyteBCrit = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte base crit chance", + 1f, + "Acolyte base crit chance" + ); + F_AcolyteBSpeed = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte base movement speed", + 7f, + "Acolyte base movement speed" + ); + F_AcolyteBAccel = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte base acceleration", + 80f, + "Acolyte base acceleration" + ); + F_AcolyteBJump = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte base jump power", + 15f, + "Acolyte base jump power" + ); + + F_AcolyteLMaxHealth = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte max health growth", + 30f, + "Acolyte max health growth" + ); + F_AcolyteLRegen = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte health regen growth", + 0.2f, + "Acolyte health regen growth" + ); + F_AcolyteLArmor = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte armor growth", + 0f, + "Acolyte armor growth" + ); + F_AcolyteLShield = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte shield growth", + 0f, + "Acolyte shield growth" + ); + F_AcolyteLDamage = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte damage growth", + 2.4f, + "Acolyte damage growth" + ); + F_AcolyteLAtkSpd = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte attack speed growth", + 0f, + "Acolyte attack speed growth" + ); + F_AcolyteLCrit = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte crit chance growth", + 0f, + "Acolyte crit chance growth" + ); + F_AcolyteLSpeed = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte move speed growth", + 0f, + "Acolyte move speed growth" + ); + F_AcolyteLJump = ShamanPlugin.instance.Config.Bind( + "Acolyte Stats", + "Acolyte jump power growth", + 0f, + "Acolyte jump power growth" + ); + //Shamanic Compound + F_AcolyteBeastBMaxHealth = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound base max health", + 325f, + "Shamanic Compound base max health" + ); + F_AcolyteBeastBRegen = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound base regen", + 0.8f, + "Shamanic Compound base regen" + ); + F_AcolyteBeastBArmor = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound base armor", + 0f, + "Shamanic Compound base armor" + ); + F_AcolyteBeastBShield = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound base shield", + 0f, + "Shamanic Compound base shield" + ); + F_AcolyteBeastBDamage = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound base damage", + 12f, + "Shamanic Compound base damage" + ); + F_AcolyteBeastBAtkSpd = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound base attack speed", + 1f, + "Shamanic Compound base attack speed" + ); + F_AcolyteBeastBCrit = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound base crit chance", + 1f, + "Shamanic Compound base crit chance" + ); + F_AcolyteBeastBSpeed = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound base movement speed", + 7f, + "Shamanic Compound base movement speed" + ); + F_AcolyteBeastBAccel = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound base acceleration", + 80f, + "Shamanic Compound base acceleration" + ); + F_AcolyteBeastBJump = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound base jump power", + 15f, + "Shamanic Compound base jump power" + ); - // this helper automatically makes config entries for disabling survivors - public static ConfigEntry CharacterEnableConfig(string characterName, string description = "Set to false to disable this character", bool enabledDefault = true) { + F_AcolyteBeastLMaxHealth = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound max health growth", + 30f, + "Shamanic Compound max health growth" + ); + F_AcolyteBeastLRegen = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound health regen growth", + 0.2f, + "Shamanic Compound health regen growth" + ); + F_AcolyteBeastLArmor = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound armor growth", + 0f, + "Shamanic Compound armor growth" + ); + F_AcolyteBeastLShield = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound shield growth", + 0f, + "Shamanic Compound shield growth" + ); + F_AcolyteBeastLDamage = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound damage growth", + 2.4f, + "Shamanic Compound damage growth" + ); + F_AcolyteBeastLAtkSpd = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound attack speed growth", + 0f, + "Shamanic Compound attack speed growth" + ); + F_AcolyteBeastLCrit = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound crit chance growth", + 0f, + "Shamanic Compound crit chance growth" + ); + F_AcolyteBeastLSpeed = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound move speed growth", + 0f, + "Shamanic Compound move speed growth" + ); + F_AcolyteBeastLJump = ShamanPlugin.instance.Config.Bind( + "Shamanic Compound Stats", + "Shamanic Compound jump power growth", + 0f, + "Shamanic Compound jump power growth" + ); + //Acolytic Preeminence + F_AcolyteAngelBMaxHealth = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence base max health", + 775f, + "Acolytic Preeminence base max health" + ); + F_AcolyteAngelBRegen = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence base regen", + -10f, + "Acolytic Preeminence base regen" + ); + F_AcolyteAngelBArmor = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence base armor", + 25f, + "Acolytic Preeminence base armor" + ); + F_AcolyteAngelBShield = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence base shield", + 0f, + "Acolytic Preeminence base shield" + ); + F_AcolyteAngelBDamage = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence base damage", + 18f, + "Acolytic Preeminence base damage" + ); + F_AcolyteAngelBAtkSpd = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence base attack speed", + 1f, + "Acolytic Preeminence base attack speed" + ); + F_AcolyteAngelBCrit = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence base crit chance", + 1f, + "Acolytic Preeminence base crit chance" + ); + /*F_AcolyteAngelBSpeed = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence base movement speed", + 8f, + "Acolytic Preeminence base movement speed" + ); + F_AcolyteAngelBAccel = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence base acceleration", + 80f, + "Acolytic Preeminence base acceleration" + ); + F_AcolyteAngelBJump = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence base jump power", + 15f, + "Acolytic Preeminence base jump power" + );*/ - return ShamanPlugin.instance.Config.Bind("General", - "Enable " + characterName, - enabledDefault, - description); + F_AcolyteAngelLMaxHealth = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence max health growth", + 30f, + "Acolytic Preeminence max health growth" + ); + F_AcolyteAngelLRegen = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence health regen growth", + 0.2f, + "Acolytic Preeminence health regen growth" + ); + F_AcolyteAngelLArmor = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence armor growth", + 0f, + "Acolytic Preeminence armor growth" + ); + F_AcolyteAngelLShield = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence shield growth", + 0f, + "Acolytic Preeminence shield growth" + ); + F_AcolyteAngelLDamage = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence damage growth", + 2.4f, + "Acolytic Preeminence damage growth" + ); + F_AcolyteAngelLAtkSpd = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence attack speed growth", + 0f, + "Acolytic Preeminence attack speed growth" + ); + F_AcolyteAngelLCrit = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence crit chance growth", + 0f, + "Acolytic Preeminence crit chance growth" + ); + /*F_AcolyteAngelLSpeed = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence move speed growth", + 0f, + "Acolytic Preeminence move speed growth" + ); + F_AcolyteAngelLJump = ShamanPlugin.instance.Config.Bind( + "Acolytic Preeminence Stats", + "Acolytic Preeminence jump power growth", + 0f, + "Acolytic Preeminence jump power growth" + );*/ } } -} \ No newline at end of file +} diff --git a/ShamanPlugin.cs b/ShamanPlugin.cs index 075ec2a..b684bf3 100644 --- a/ShamanPlugin.cs +++ b/ShamanPlugin.cs @@ -1,4 +1,5 @@ -using BepInEx; +using BepInEx; +using BepInEx.Configuration; using ShamanMod.Modules.Survivors; using R2API.Utils; using RoR2; @@ -32,11 +33,12 @@ public class ShamanPlugin : BaseUnityPlugin // this shouldn't even have to be said public const string MODUID = "com.manti.ShamanMod"; public const string MODNAME = "ShamanMod"; - public const string MODVERSION = "1.1.1"; + public const string MODVERSION = "1.1.2"; // a prefix for name tokens to prevent conflicts- please capitalize all name tokens for convention public const string DEVELOPER_PREFIX = "MANTI"; + public static ConfigFile ShamanConfigFile = new ConfigFile ("ShamanMod.cfg", true); public static ShamanPlugin instance; private void Awake() @@ -105,7 +107,7 @@ private void CharacterBody_FixedUpdate(On.RoR2.CharacterBody.orig_FixedUpdate or // summon the acolytes if (self) { - if (self.baseNameToken != DEVELOPER_PREFIX + "_SHAMAN_BODY_NAME") + if (self.name != "ShamanBody(Clone)") return; if (!self.HasBuff(Modules.Buffs.summonCooldownDebuff)) @@ -130,7 +132,8 @@ private void CharacterBody_FixedUpdate(On.RoR2.CharacterBody.orig_FixedUpdate or manner.position = spawn_pos; manner.Perform(); - float timeneeded = Mathf.Clamp(45f - ((self.attackSpeed - 1f) * 10f), 15f, 60f); + float timeneeded = Mathf.Clamp(Modules.Config.F_DefSpawnTime.Value - ((self.attackSpeed - 1f) * 10f), Modules.Config.F_MinSpawnTime.Value, Modules.Config.F_MaxSpawnTime.Value); + //float timeneeded = Mathf.Clamp(45 - ((self.attackSpeed - 1f) * 10f), 15, 60); self.AddTimedBuff(Modules.Buffs.summonCooldownDebuff, timeneeded); } } @@ -144,7 +147,7 @@ private void CharacterBody_Start(On.RoR2.CharacterBody.orig_Start orig, Characte { if (NetworkServer.active) { - if (self.baseNameToken != DEVELOPER_PREFIX + "_SHAMAN_BODY_NAME") + if (self.name != "ShamanBody(Clone)") return; //float timeneeded = Mathf.Clamp(45f - ( ( self.attackSpeed - 1f ) * 10f), 15f, 60f); @@ -153,4 +156,4 @@ private void CharacterBody_Start(On.RoR2.CharacterBody.orig_Start orig, Characte } } } -} \ No newline at end of file +} diff --git a/SkillStates/Skills/DistortedFusion.cs b/SkillStates/Skills/DistortedFusion.cs index 64fdf1e..96e5984 100644 --- a/SkillStates/Skills/DistortedFusion.cs +++ b/SkillStates/Skills/DistortedFusion.cs @@ -45,7 +45,7 @@ public override void OnEnter() if (cb.master.minionOwnership == null) continue; if (cb.master.minionOwnership.ownerMaster == null) continue; - if (cb.baseNameToken == "MANTI_ACOLYTE_BODY_NAME" && cb.gameObject.GetComponent().teamIndex == base.gameObject.GetComponent().teamIndex) + if (cb.name == "AcolyteBody(Clone)" && cb.gameObject.GetComponent().teamIndex == base.gameObject.GetComponent().teamIndex) { if (cb.master && cb.master.minionOwnership.ownerMaster.GetBody() == base.characterBody) { @@ -96,7 +96,7 @@ private void Fire() if (cb.master.minionOwnership == null) continue; if (cb.master.minionOwnership.ownerMaster == null) continue; - if (cb.baseNameToken == "MANTI_ACOLYTE_BODY_NAME" && cb.gameObject.GetComponent().teamIndex == base.gameObject.GetComponent().teamIndex) + if (cb.name == "AcolyteBody(Clone)" && cb.gameObject.GetComponent().teamIndex == base.gameObject.GetComponent().teamIndex) { if (cb.gameObject.GetComponent() && cb.master && cb.master.minionOwnership.ownerMaster.GetBody() == base.characterBody) { @@ -134,7 +134,7 @@ public override void OnExit() if (cb.master.minionOwnership == null) continue; if (cb.master.minionOwnership.ownerMaster == null) continue; - if (cb.baseNameToken == "MANTI_ACOLYTEBEAST_BODY_NAME" && cb.gameObject.GetComponent().teamIndex == base.gameObject.GetComponent().teamIndex) + if (cb.name == "AcolyteBeastBody(Clone)" && cb.gameObject.GetComponent().teamIndex == base.gameObject.GetComponent().teamIndex) { if (NetworkServer.active && cb.master && cb.master.minionOwnership.ownerMaster.GetBody() == base.characterBody) { @@ -177,4 +177,4 @@ public override InterruptPriority GetMinimumInterruptPriority() return InterruptPriority.Skill; } } -} \ No newline at end of file +} diff --git a/SkillStates/Skills/DistortedFusionScepter.cs b/SkillStates/Skills/DistortedFusionScepter.cs index e1483a0..3f07985 100644 --- a/SkillStates/Skills/DistortedFusionScepter.cs +++ b/SkillStates/Skills/DistortedFusionScepter.cs @@ -45,7 +45,7 @@ public override void OnEnter() if (cb.master.minionOwnership == null) continue; if (cb.master.minionOwnership.ownerMaster == null) continue; - if (cb.baseNameToken == "MANTI_ACOLYTE_BODY_NAME" && cb.gameObject.GetComponent().teamIndex == base.gameObject.GetComponent().teamIndex) + if (cb.name == "AcolyteBody(Clone)" && cb.gameObject.GetComponent().teamIndex == base.gameObject.GetComponent().teamIndex) { if (cb.master && cb.master.minionOwnership.ownerMaster.GetBody() == base.characterBody) { @@ -96,7 +96,7 @@ private void Fire() if (cb.master.minionOwnership == null) continue; if (cb.master.minionOwnership.ownerMaster == null) continue; - if (cb.baseNameToken == "MANTI_ACOLYTE_BODY_NAME" && cb.gameObject.GetComponent().teamIndex == base.gameObject.GetComponent().teamIndex) + if (cb.name == "AcolyteBody(Clone)" && cb.gameObject.GetComponent().teamIndex == base.gameObject.GetComponent().teamIndex) { if (cb.gameObject.GetComponent() && cb.master && cb.master.minionOwnership.ownerMaster.GetBody() == base.characterBody) { @@ -135,7 +135,7 @@ public override void OnExit() if (cb.master.minionOwnership == null) continue; if (cb.master.minionOwnership.ownerMaster == null) continue; - if (cb.baseNameToken == "MANTI_ACOLYTEANGEL_BODY_NAME" && cb.gameObject.GetComponent().teamIndex == base.gameObject.GetComponent().teamIndex) + if (cb.name == "AcolyteAngelBody(Clone)" && cb.gameObject.GetComponent().teamIndex == base.gameObject.GetComponent().teamIndex) { if (NetworkServer.active && cb.master && cb.master.minionOwnership.ownerMaster.GetBody() == base.characterBody) { @@ -178,4 +178,4 @@ public override InterruptPriority GetMinimumInterruptPriority() return InterruptPriority.Skill; } } -} \ No newline at end of file +} diff --git a/SkillStates/Skills/FeralCall.cs b/SkillStates/Skills/FeralCall.cs index c3e2f12..0c557ae 100644 --- a/SkillStates/Skills/FeralCall.cs +++ b/SkillStates/Skills/FeralCall.cs @@ -30,7 +30,7 @@ public override void OnEnter() if (cb.gameObject.GetComponent().teamIndex == base.gameObject.GetComponent().teamIndex && cb != base.characterBody) { - if (cb.master && cb.master.minionOwnership.ownerMaster.GetBody() == base.characterBody && cb.baseNameToken == "MANTI_ACOLYTE_BODY_NAME" ) + if (cb.master && cb.master.minionOwnership.ownerMaster.GetBody() == base.characterBody && cb.name == "AcolyteBody(Clone)" ) { if (NetworkServer.active) { @@ -81,4 +81,4 @@ public override InterruptPriority GetMinimumInterruptPriority() return InterruptPriority.Skill; } } -} \ No newline at end of file +} diff --git a/bin/Debug/netstandard2.0/ShamanMod.dll b/bin/Debug/netstandard2.0/ShamanMod.dll index bb36e13..18ba2f3 100644 Binary files a/bin/Debug/netstandard2.0/ShamanMod.dll and b/bin/Debug/netstandard2.0/ShamanMod.dll differ diff --git a/bin/Debug/netstandard2.0/ShamanMod.pdb b/bin/Debug/netstandard2.0/ShamanMod.pdb index ce6ad63..5f72d57 100644 Binary files a/bin/Debug/netstandard2.0/ShamanMod.pdb and b/bin/Debug/netstandard2.0/ShamanMod.pdb differ