Skip to content
Snippets Groups Projects
Commit f0bb8746 authored by Robin Halseth Sandvik's avatar Robin Halseth Sandvik
Browse files

Added crit stats.

parent 22094180
No related branches found
No related tags found
1 merge request!30Improvements to attacks.
......@@ -46,5 +46,15 @@ namespace BigSock {
*/
public Character Actor { get; set; }
/*
The crit chance of the character.
*/
public float CritChance { get; set; }
/*
The how much to modify damage by when critting.
*/
public float CritDamageModifier { get; set; }
}
}
\ No newline at end of file
......@@ -41,5 +41,14 @@ namespace BigSock {
*/
public float AttackSpeed { get; set; }
/*
The crit chance of the character.
*/
public float CritChance { get; set; }
/*
The how much to modify damage by when critting.
*/
public float CritDamageModifier { get; set; }
}
}
\ No newline at end of file
......@@ -45,6 +45,16 @@ namespace BigSock {
The character that activated the attack.
*/
Character Actor { get; }
/*
The crit chance of the character.
*/
float CritChance { get; }
/*
The how much to modify damage by when critting.
*/
float CritDamageModifier { get; }
}
......@@ -66,6 +76,9 @@ namespace BigSock {
AttackSpeed = a.AttackSpeed * b.AttackSpeed,
Source = a.Source,
Actor = a.Actor,
CritChance = a.CritChance * b.CritChance,
CritDamageModifier = a.CritDamageModifier * b.CritDamageModifier,
};
}
}
......
......@@ -41,6 +41,16 @@ namespace BigSock {
*/
float AttackSpeed { get; }
/*
The crit chance of the character.
*/
float CritChance { get; }
/*
The how much to modify damage by when critting.
*/
float CritDamageModifier { get; }
}
/*
......@@ -57,6 +67,8 @@ namespace BigSock {
Knockback = 1,
Range = 1,
AttackSpeed = 1,
CritChance = 1,
CritDamageModifier = 1,
};
/*
......@@ -70,6 +82,8 @@ namespace BigSock {
Knockback = a.Knockback + b.Knockback,
Range = a.Range + b.Range,
AttackSpeed = a.AttackSpeed + b.AttackSpeed,
CritChance = a.CritChance + b.CritChance,
CritDamageModifier = a.CritDamageModifier + b.CritDamageModifier,
};
}
......@@ -85,6 +99,8 @@ namespace BigSock {
Knockback = a.Knockback - b.Knockback,
Range = a.Range - b.Range,
AttackSpeed = a.AttackSpeed - b.AttackSpeed,
CritChance = a.CritChance - b.CritChance,
CritDamageModifier = a.CritDamageModifier - b.CritDamageModifier,
};
}
......@@ -99,6 +115,8 @@ namespace BigSock {
Knockback = a.Knockback * b.Knockback,
Range = a.Range * b.Range,
AttackSpeed = a.AttackSpeed * b.AttackSpeed,
CritChance = a.CritChance * b.CritChance,
CritDamageModifier = a.CritDamageModifier * b.CritDamageModifier,
};
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment