summaryrefslogtreecommitdiff
path: root/Thronefall_1_57/Decompile/Thronefall/UpgradeAssassinsTraining.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Thronefall_1_57/Decompile/Thronefall/UpgradeAssassinsTraining.cs')
-rw-r--r--Thronefall_1_57/Decompile/Thronefall/UpgradeAssassinsTraining.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/Thronefall_1_57/Decompile/Thronefall/UpgradeAssassinsTraining.cs b/Thronefall_1_57/Decompile/Thronefall/UpgradeAssassinsTraining.cs
new file mode 100644
index 0000000..05ee892
--- /dev/null
+++ b/Thronefall_1_57/Decompile/Thronefall/UpgradeAssassinsTraining.cs
@@ -0,0 +1,36 @@
+using UnityEngine;
+
+public class UpgradeAssassinsTraining : MonoBehaviour
+{
+ public static UpgradeAssassinsTraining instance;
+
+ [BalancingParameter(BalancingParameter.EType.PercentageModifyer)]
+ public float autoAttackCooldownDurationMulti = 2f;
+
+ [BalancingParameter(BalancingParameter.EType.PercentageModifyer)]
+ public float manualAttackCooldownDurationMulti = 2f;
+
+ [BalancingParameter(BalancingParameter.EType.Default)]
+ public float activationWindow = 0.5f;
+
+ [BalancingParameter(BalancingParameter.EType.PercentageModifyer)]
+ public float cooldownMultiForPerfectlyTimedAttacks = 0.5f;
+
+ private void OnEnable()
+ {
+ instance = this;
+ PlayerUpgradeManager.instance.assassinsTraining = true;
+ ManualAttack[] componentsInChildren = PlayerMovement.instance.gameObject.GetComponentsInChildren<ManualAttack>(includeInactive: true);
+ foreach (ManualAttack manualAttack in componentsInChildren)
+ {
+ if (manualAttack.autoAttack)
+ {
+ manualAttack.cooldownTime *= autoAttackCooldownDurationMulti;
+ }
+ else
+ {
+ manualAttack.cooldownTime *= manualAttackCooldownDurationMulti;
+ }
+ }
+ }
+}