diff options
author | chai <215380520@qq.com> | 2023-10-27 11:05:14 +0800 |
---|---|---|
committer | chai <215380520@qq.com> | 2023-10-27 11:05:14 +0800 |
commit | 766cdff5ffa72b65d7f106658d1603f47739b2ba (patch) | |
tree | 34d7799a94dfa9be182825577583c0fa6dc935f7 /GameCode/ChillingTouch.cs |
+ init
Diffstat (limited to 'GameCode/ChillingTouch.cs')
-rw-r--r-- | GameCode/ChillingTouch.cs | 20 |
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)); + } +} |