manabrew_engine/ability/effects/choose_sector_effect.rs
1//! ChooseSector — choose a sector (Unfinity attraction board).
2//! Ported from Java's ChooseSectorEffect: stores chosen sector on host card.
3
4use super::EffectContext;
5
6/// Struct form of this effect so it can participate in the
7/// `SpellAbilityEffect` trait hierarchy — mirrors Java's
8/// `ChooseSectorEffect` class extending `SpellAbilityEffect`.
9#[manabrew_engine_macros::spell_effect(ChooseSectorEffect)]
10fn resolve(ctx: &mut EffectContext, sa: &crate::spellability::SpellAbility) {
11 if let Some(source) = sa.source {
12 // Auto-choose sector 1 (in full implementation, agent would choose)
13 let sector = ctx.rng.next_int(6) + 1;
14 ctx.game
15 .card_mut(source)
16 .set_s_var("ChosenSector", format!("Number${}", sector));
17 }
18}