From 59b3492a0aaed3f1d39f2a6d5e3486b30b81a029 Mon Sep 17 00:00:00 2001
From: Ny Bruker <robinhs@stud.ntnu.no>
Date: Tue, 4 Oct 2022 11:53:02 +0200
Subject: [PATCH] Added damage variance stat to attack.

---
 MrBigsock/Assets/Code/Core/AttackStats.cs  | 5 +++++
 MrBigsock/Assets/Code/Core/IAttackStats.cs | 7 ++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/MrBigsock/Assets/Code/Core/AttackStats.cs b/MrBigsock/Assets/Code/Core/AttackStats.cs
index d3aeae50..d2e844c4 100644
--- a/MrBigsock/Assets/Code/Core/AttackStats.cs
+++ b/MrBigsock/Assets/Code/Core/AttackStats.cs
@@ -55,6 +55,11 @@ namespace BigSock {
 			The how much to modify damage by when critting.
 		*/
 		public float CritDamageModifier { get; set; } = 1;
+		
+		/*
+			How much the damage can vary in percent.
+		*/
+		public float DamageVariance { get; set; } = 0.2;
 
 	}
 }
\ No newline at end of file
diff --git a/MrBigsock/Assets/Code/Core/IAttackStats.cs b/MrBigsock/Assets/Code/Core/IAttackStats.cs
index 6eb78fbf..1105c021 100644
--- a/MrBigsock/Assets/Code/Core/IAttackStats.cs
+++ b/MrBigsock/Assets/Code/Core/IAttackStats.cs
@@ -55,6 +55,11 @@ namespace BigSock {
 			The how much to modify damage by when critting.
 		*/
 		float CritDamageModifier { get; }
+		
+		/*
+			How much the damage can vary in percent.
+		*/
+		float DamageVariance { get; }
 	}
 
 
@@ -78,7 +83,7 @@ namespace BigSock {
 				Actor = a.Actor,
 				CritChance = a.CritChance * b.CritChance,
 				CritDamageModifier = a.CritDamageModifier * b.CritDamageModifier,
-
+				DamageVariance = a.DamageVariance,
 			};
 		}
 	}
-- 
GitLab