2020-11-01 17:15:46 +00:00
|
|
|
use crate::{combat::Damages, effect::Effect};
|
2020-10-15 00:43:53 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
|
|
|
pub struct Explosion {
|
2020-10-30 20:41:21 +00:00
|
|
|
pub effects: Vec<RadiusEffect>,
|
2020-10-15 00:43:53 +00:00
|
|
|
pub radius: f32,
|
|
|
|
pub energy_regen: u32,
|
|
|
|
}
|
2020-10-30 20:41:21 +00:00
|
|
|
|
|
|
|
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
|
|
|
pub enum RadiusEffect {
|
|
|
|
Damages(Damages),
|
|
|
|
TerrainDestruction(f32),
|
2020-11-01 17:15:46 +00:00
|
|
|
EntityEffect(Effect),
|
2020-10-30 20:41:21 +00:00
|
|
|
}
|