diff --git a/src/monster_ai_system.rs b/src/monster_ai_system.rs index da745ad..4a66562 100644 --- a/src/monster_ai_system.rs +++ b/src/monster_ai_system.rs @@ -1,7 +1,6 @@ use crate::components::{Confusion, Monster, Position, Viewshed, WantsToMelee}; -use crate::{Map, RunState}; - -use rltk::Point; +use crate::{particle_system::ParticleBuilder, Map, RunState}; +use rltk::{Point, RGB}; use specs::prelude::*; pub struct MonsterAI {} @@ -19,6 +18,7 @@ impl<'a> System<'a> for MonsterAI { WriteStorage<'a, Position>, WriteStorage<'a, WantsToMelee>, WriteStorage<'a, Confusion>, + WriteExpect<'a, ParticleBuilder>, ); fn run(&mut self, data: Self::SystemData) { @@ -33,6 +33,7 @@ impl<'a> System<'a> for MonsterAI { mut position, mut wants_to_melee, mut confused, + mut particle_builder, ) = data; if *runstate != RunState::MonsterTurn { @@ -52,6 +53,15 @@ impl<'a> System<'a> for MonsterAI { } can_act = false; + + particle_builder.request( + pos.x, + pos.y, + RGB::named(rltk::MAGENTA), + RGB::named(rltk::BLACK), + rltk::to_cp437('?'), + 200.0, + ); } if can_act {