//! Per-tick damage for an acid pool — applied to enemies standing in it via `cmd`.
use crate::{
behavior::pool::PoolBehavior, context::TickContext, pool::GroundPool, registry::DamageID,
};
#[derive(Clone)]
pub struct AcidTick {
pub potency: f32,
pub damage_type: DamageID,
}
impl AcidTick {
pub fn create(tier: u32, damage_type: DamageID) -> Box<dyn PoolBehavior> {
Box::new(Self {
potency: tier as f32 * 1.5,
damage_type,
})
}
}
impl PoolBehavior for AcidTick {
fn on_tick(&mut self, pool: &mut GroundPool, c: &mut TickContext) {
let q = c.query;
let _dmg = self.potency * c.dt;
let _source = c.source;
for _e in q.enemies_in_radius(pool.pos, pool.radius) {}
}
}