diff --git a/crates/game-service/src/bot.rs b/crates/game-service/src/bot.rs index 0802b6c..e496185 100644 --- a/crates/game-service/src/bot.rs +++ b/crates/game-service/src/bot.rs @@ -64,7 +64,16 @@ impl BotPlayer { avatar.name_change_state = -1; Self { avatar, deck } } + pub fn mirrors_deck() -> bool { + std::env::var("SCROLL_BOT_MIRRORS_DECK") + .map(|value| value == "1") + .unwrap_or(false) + } pub fn against(player: &LogicClientAvatar, fallback: &LogicSpellDeck) -> Self { + if Self::mirrors_deck() { + tracing::info!("the bot is playing the player's deck for this battle"); + return Self::matching(player.arena.clone(), player.score, fallback.clone()); + } let deck = predefined_deck() .filter(|deck| deck.filled_slot_count() == DECK_SLOT_COUNT) .unwrap_or_else(|| fallback.clone());