2020-11-02 00:26:01 +00:00
|
|
|
use crate::{
|
|
|
|
combat::{Damages, GroupTarget},
|
|
|
|
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-02 00:26:01 +00:00
|
|
|
Entity(Option<GroupTarget>, Effect),
|
2020-10-30 20:41:21 +00:00
|
|
|
}
|