2021-02-16 05:18:05 +00:00
|
|
|
use crate::{combat::Attack, effect::Effect, comp::item::Reagent};
|
2020-10-15 00:43:53 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
|
2021-01-30 22:35:00 +00:00
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
2020-10-15 00:43:53 +00:00
|
|
|
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,
|
2021-02-16 05:18:05 +00:00
|
|
|
pub reagent: Option<Reagent>,
|
2020-10-15 00:43:53 +00:00
|
|
|
}
|
2020-10-30 20:41:21 +00:00
|
|
|
|
2021-01-30 22:35:00 +00:00
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
2020-10-30 20:41:21 +00:00
|
|
|
pub enum RadiusEffect {
|
|
|
|
TerrainDestruction(f32),
|
2021-01-30 22:35:00 +00:00
|
|
|
Entity(Effect),
|
|
|
|
Attack(Attack),
|
2020-10-30 20:41:21 +00:00
|
|
|
}
|