diff --git a/MrBigsock/Assets/Code/Core/AttackStats.cs b/MrBigsock/Assets/Code/Core/AttackStats.cs index 6eac3a66344a0e6096c2d907d505c9bbc5cc2327..1be139202c5ac6703c1234baef021a7487df232a 100644 --- a/MrBigsock/Assets/Code/Core/AttackStats.cs +++ b/MrBigsock/Assets/Code/Core/AttackStats.cs @@ -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. */ diff --git a/MrBigsock/Assets/Code/Core/IAttackStats.cs b/MrBigsock/Assets/Code/Core/IAttackStats.cs index ea103727f1cb17a22798b4392db54908a0772484..7b601071f61bd03241c074645bc7d521aa305268 100644 --- a/MrBigsock/Assets/Code/Core/IAttackStats.cs +++ b/MrBigsock/Assets/Code/Core/IAttackStats.cs @@ -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