summaryrefslogtreecommitdiff
path: root/GameCode/ChillingTouch.cs
diff options
context:
space:
mode:
Diffstat (limited to 'GameCode/ChillingTouch.cs')
-rw-r--r--GameCode/ChillingTouch.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/GameCode/ChillingTouch.cs b/GameCode/ChillingTouch.cs
new file mode 100644
index 0000000..487ab51
--- /dev/null
+++ b/GameCode/ChillingTouch.cs
@@ -0,0 +1,20 @@
+using UnityEngine;
+
+public class ChillingTouch : DamageEffect
+{
+ public float baseSlow = 0.2f;
+
+ public float scalingSlow = 0.01f;
+
+ private AttackLevel level;
+
+ private void Start()
+ {
+ level = GetComponent<AttackLevel>();
+ }
+
+ public override void DoDamageEffect(Vector2 dmg, bool selfDmg, Player damagedPlayer = null)
+ {
+ damagedPlayer.data.stats.RPCA_AddSlow((baseSlow + dmg.magnitude * scalingSlow) * (1f + ((float)level.attackLevel - 1f) * 0.3f));
+ }
+}