diff options
Diffstat (limited to 'server/bot/src/algos/customer.rs')
| -rw-r--r-- | server/bot/src/algos/customer.rs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/server/bot/src/algos/customer.rs b/server/bot/src/algos/customer.rs index 81a813e7..cc9f9c60 100644 --- a/server/bot/src/algos/customer.rs +++ b/server/bot/src/algos/customer.rs @@ -22,7 +22,8 @@ use crate::{ }; use hurrycurry_game_core::Game; use hurrycurry_protocol::{ - DemandIndex, Hand, ItemLocation, Message, PacketS, PlayerClass, PlayerID, Score, TileIndex, + DemandIndex, Effect, Hand, ItemLocation, Message, PacketS, PlayerClass, PlayerID, Score, + TileIndex, glam::{IVec2, Vec2}, }; use log::debug; @@ -213,14 +214,19 @@ impl CustomerState { player: me, pin: Some(false), }); + let points = -1; out.push(PacketS::ApplyScore(Score { - points: -1, + points, demands_failed: 1, ..Default::default() })); out.push(PacketS::Effect { - name: "angry".to_string(), - player: me, + effect: Effect::Angry, + location: ItemLocation::Player(me, Hand(0)), + }); + out.push(PacketS::Effect { + effect: Effect::Points { amount: points }, + location: ItemLocation::Player(me, Hand(0)), }); *self = CustomerState::Exiting { path }; return; @@ -309,8 +315,12 @@ impl CustomerState { pin: Some(true), }); out.push(PacketS::Effect { - name: "satisfied".to_string(), - player: me, + effect: Effect::Satisfied, + location: ItemLocation::Player(me, Hand(0)), + }); + out.push(PacketS::Effect { + effect: Effect::Points { amount: points }, + location: ItemLocation::Player(me, Hand(0)), }); out.push(PacketS::Interact { target: Some(ItemLocation::Tile(table)), |