aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/ability.rs
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-24 14:32:01 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-24 14:34:41 +0100
commitf7428e317d282856d05ffc37b6ba474c5e9973ce (patch)
treecf016b07c1145ad4b62c210eb739085c0639f407 /src/shared/ability.rs
parent1751960338fc7a08fec438a9b53c78118a35063a (diff)
feat: damage types
Diffstat (limited to 'src/shared/ability.rs')
-rw-r--r--src/shared/ability.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/shared/ability.rs b/src/shared/ability.rs
index 4723e59..a9387f3 100644
--- a/src/shared/ability.rs
+++ b/src/shared/ability.rs
@@ -1,6 +1,7 @@
use crate::server::entity_map::*;
use crate::shared::area_of_effect::*;
use crate::shared::buffs::*;
+use crate::shared::damage::*;
use crate::shared::player::*;
use crate::shared::projectile::*;
use crate::shared::shape::*;
@@ -24,12 +25,12 @@ pub enum TargetedAbility {
#[derive(Copy, Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct MeeleAttack {
- pub damage: f32,
+ pub damage: Damage,
}
#[derive(Copy, Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct RangedAttack {
- pub damage: f32,
+ pub damage: Damage,
}
impl TargetedAbility {
@@ -189,7 +190,7 @@ pub enum DirectionalAbility {
#[derive(Copy, Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct Dash {
pub max_distance: f32,
- pub damage: f32,
+ pub damage: Damage,
}
#[derive(Copy, Clone, PartialEq, Debug, Deserialize, Serialize)]
@@ -200,13 +201,13 @@ pub struct Flash {
#[derive(Copy, Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct Pull {
pub max_distance: f32,
- pub damage: f32,
+ pub damage: Damage,
}
#[derive(Copy, Clone, PartialEq, Debug, Deserialize, Serialize)]
pub struct Spear {
pub max_distance: f32,
- pub damage: f32,
+ pub damage: Damage,
}
// `direction: Vec2` is NOT normalized (cf. `Flash`)!