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

projectile speed & applying char stats to attack.

parent 10f451ef
No related branches found
No related tags found
1 merge request!25Ability rework.
......@@ -26,6 +26,11 @@ namespace BigSock {
*/
public float Range { get; set; }
/*
The projectile speed of the attack.
*/
public float ProjectileSpeed { get; set; }
/*
The attack speed of the attack.
*/
......
......@@ -26,6 +26,11 @@ namespace BigSock {
*/
float Range { get; }
/*
The projectile speed of the attack.
*/
float ProjectileSpeed { get; }
/*
The attack speed of the attack.
*/
......@@ -41,4 +46,27 @@ namespace BigSock {
*/
Character Actor { get; }
}
/*
Holds extension methods for attack stat objects.
*/
public static class AttackStatsExtension {
/*
Applies the character's stats to the attack.
*/
public static IAttackStats Apply(this IAttackStats a, ICharacterStats b) {
return new AttackStats{
Damage = a.Damage * b.Damage,
Knockback = a.Knockback * b.Knockback,
Range = a.Range * b.Range,
ProjectileSpeed = a.ProjectileSpeed,
AttackSpeed = a.AttackSpeed * b.AttackSpeed,
Source = a.Source,
Actor = a.Actor,
};
}
}
}
\ No newline at end of file
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