pub struct GameState {Show 25 fields
pub cards: Vec<Card>,
pub players: Vec<PlayerState>,
pub stack: MagicStack,
pub cost_payment_stack: CostPaymentStack,
pub is_night: bool,
pub day_night_started: bool,
pub turn: TurnState,
pub player_order: Vec<PlayerId>,
pub game_over: bool,
pub winner: Option<PlayerId>,
pub extra_turns: VecDeque<ExtraTurn>,
pub prevent_all_combat_damage: bool,
pub monarch: Option<PlayerId>,
pub initiative_holder: Option<PlayerId>,
pub end_turn_requested: bool,
pub end_combat_requested: bool,
pub extra_combat_phases: u32,
pub pending_damage_map: Option<CardDamageMap>,
pub pending_prevent_map: Option<CardDamageMap>,
pub pending_change_zone_table: Option<CardZoneTable>,
pub synced_token_scripts: BTreeSet<String>,
pub last_state_battlefield: Vec<CardSnapshot>,
pub pre_sba_battlefield: Vec<CardId>,
pub last_sacrificed_card: Option<CardId>,
pub counter_added_this_turn: BTreeMap<(GameEntity, Option<u64>, CounterType), i32>,
/* private fields */
}Expand description
The complete, serializable game state. All game entities live here — nothing holds references, everything uses IDs.
Fields§
§cards: Vec<Card>§players: Vec<PlayerState>§stack: MagicStack§cost_payment_stack: CostPaymentStackCost payment tracking stack — used by triggers to inspect cost payments.
Mirrors Java’s Game.costPaymentStack.
is_night: bool§day_night_started: bool§turn: TurnState§player_order: Vec<PlayerId>§game_over: bool§winner: Option<PlayerId>§extra_turns: VecDeque<ExtraTurn>§prevent_all_combat_damage: bool§monarch: Option<PlayerId>§initiative_holder: Option<PlayerId>§end_turn_requested: bool§end_combat_requested: bool§extra_combat_phases: u32§pending_damage_map: Option<CardDamageMap>Shared damage aggregation map for Java-style DamageMap flows.
Used across sub-ability chains and consumed by DamageResolve.
pending_prevent_map: Option<CardDamageMap>Shared prevention map paired with pending_damage_map.
pending_change_zone_table: Option<CardZoneTable>Shared zone-change aggregation table for Java-style ChangeZoneTable flows.
Used across sub-ability chains and consumed by ChangeZoneResolve.
synced_token_scripts: BTreeSet<String>Token scripts that have already consumed game-RNG for art selection.
Java’s TokenDb caches prototypes globally, consuming RNG only on
first creation. Subsequent creations of the same token type reuse the
cached prototype without RNG. This set mirrors that behavior.
last_state_battlefield: Vec<CardSnapshot>Periodic LKI snapshot of battlefield cards.
Mirrors Java’s Game.lastStateBattlefield.
Updated by copy_last_state() at key game checkpoints.
pre_sba_battlefield: Vec<CardId>Snapshot of cards on the battlefield at the start of the current SBA check.
Used by DisableTriggers (Hushbringer) to check LKI — a creature that dies
in the same batch as another creature still suppresses the other’s death trigger.
Mirrors Java’s LastStateBattlefield passed through RunParams.
Set at the start of check_state_based_actions_with_triggers, cleared after.
last_sacrificed_card: Option<CardId>Last card sacrificed as a cost (for Sacrificed$CardPower SVar resolution).
Mirrors Java’s sa.getPaidList("SacrificedCards").
counter_added_this_turn: BTreeMap<(GameEntity, Option<u64>, CounterType), i32>Implementations§
Source§impl GameState
Game state mutation methods — moving cards, dealing damage, state-based actions.
impl GameState
Game state mutation methods — moving cards, dealing damage, state-based actions.
pub fn record_player_damage_assignment( &mut self, source: Option<CardId>, target_player: Option<PlayerId>, amount: i32, is_combat: bool, )
Sourcepub fn move_card(
&mut self,
card_id: CardId,
dest_zone: ZoneType,
dest_owner: PlayerId,
)
pub fn move_card( &mut self, card_id: CardId, dest_zone: ZoneType, dest_owner: PlayerId, )
Move a card from its current zone to a new zone.
Move a card to a new zone. For Graveyard destinations, checks for zone-redirect
replacement effects (Rest in Peace, Leyline of the Void) and redirects to the
correct zone. Use move_card_final to skip the replacement check.
pub fn move_card_with_agents( &mut self, card_id: CardId, dest_zone: ZoneType, dest_owner: PlayerId, agents: &mut [Box<dyn PlayerAgent>], )
pub fn move_card_with_agents_and_replacement_runtime( &mut self, card_id: CardId, dest_zone: ZoneType, dest_owner: PlayerId, agents: &mut [Box<dyn PlayerAgent>], runtime: &mut ReplacementRuntime<'_>, )
Sourcepub fn discard_card(
&mut self,
card_id: CardId,
discard_player: PlayerId,
sa: Option<&SpellAbility>,
agents: Option<&mut [Box<dyn PlayerAgent>]>,
trigger_handler: &mut TriggerHandler,
)
pub fn discard_card( &mut self, card_id: CardId, discard_player: PlayerId, sa: Option<&SpellAbility>, agents: Option<&mut [Box<dyn PlayerAgent>]>, trigger_handler: &mut TriggerHandler, )
Discard a card. Mirrors Java’s Player.discard().
Records the discard, marks the card, and moves it to graveyard through the normal zone-change machinery (which runs replacement effects like Madness automatically). Fires Discarded triggers afterwards.
Sourcepub fn deal_damage_to_card(&mut self, target: CardId, amount: i32)
pub fn deal_damage_to_card(&mut self, target: CardId, amount: i32)
Deal damage to a card (creature).
Runs replacement effects (e.g. damage prevention) before applying.
Mirrors Java GameAction.addDamage() calling ReplacementHandler.run().
Sourcepub fn deal_damage_to_card_from(
&mut self,
target: CardId,
amount: i32,
source: Option<CardId>,
is_combat: bool,
)
pub fn deal_damage_to_card_from( &mut self, target: CardId, amount: i32, source: Option<CardId>, is_combat: bool, )
Deal damage to a card with source tracking for replacement effects.
Sourcepub fn deal_damage_to_card_from_with_agents(
&mut self,
target: CardId,
amount: i32,
source: Option<CardId>,
is_combat: bool,
agents: Option<&mut [Box<dyn PlayerAgent>]>,
)
pub fn deal_damage_to_card_from_with_agents( &mut self, target: CardId, amount: i32, source: Option<CardId>, is_combat: bool, agents: Option<&mut [Box<dyn PlayerAgent>]>, )
Deal damage to a card with source tracking and optional agents for RNG parity.
Sourcepub fn deal_damage_to_player(&mut self, target: PlayerId, amount: i32) -> i32
pub fn deal_damage_to_player(&mut self, target: PlayerId, amount: i32) -> i32
Deal damage to a player.
Runs replacement effects (e.g. damage prevention) before applying.
Mirrors Java GameAction.addDamage() calling ReplacementHandler.run().
Sourcepub fn deal_damage_to_player_from(
&mut self,
target: PlayerId,
amount: i32,
source: Option<CardId>,
is_combat: bool,
) -> i32
pub fn deal_damage_to_player_from( &mut self, target: PlayerId, amount: i32, source: Option<CardId>, is_combat: bool, ) -> i32
Deal damage to a player with source tracking for replacement effects.
Sourcepub fn deal_damage_to_player_from_with_agents(
&mut self,
target: PlayerId,
amount: i32,
source: Option<CardId>,
is_combat: bool,
agents: Option<&mut [Box<dyn PlayerAgent>]>,
) -> i32
pub fn deal_damage_to_player_from_with_agents( &mut self, target: PlayerId, amount: i32, source: Option<CardId>, is_combat: bool, agents: Option<&mut [Box<dyn PlayerAgent>]>, ) -> i32
Deal damage to a player with source tracking and optional agents for RNG parity. Used by combat damage and spell damage to pass the source card and combat flag so replacement effects like Torbran and Furnace of Rath can check ValidSource$ and IsCombat$.
Sourcepub fn check_state_based_actions(&mut self) -> bool
pub fn check_state_based_actions(&mut self) -> bool
Check and apply state-based actions. Returns true if any were applied.
Sourcepub fn check_state_based_actions_with_triggers(
&mut self,
trigger_handler: Option<&mut TriggerHandler>,
legend_keep_fn: Option<&mut dyn FnMut(PlayerId, &[CardId]) -> CardId>,
) -> bool
pub fn check_state_based_actions_with_triggers( &mut self, trigger_handler: Option<&mut TriggerHandler>, legend_keep_fn: Option<&mut dyn FnMut(PlayerId, &[CardId]) -> CardId>, ) -> bool
Check and apply state-based actions. Returns true if any were applied.
If provided, emits ChangesZone triggers for SBA zone moves.
legend_keep_fn — optional callback for legend rule: given (player, duplicates),
returns the CardId to keep. Mirrors Java’s chooseSingleEntityForEffect.
pub fn check_state_based_actions_with_trigger_agents( &mut self, trigger_handler: Option<&mut TriggerHandler>, agents: &mut [Box<dyn PlayerAgent>], ) -> bool
Sourcepub fn untap_all(&mut self, player: PlayerId)
pub fn untap_all(&mut self, player: PlayerId)
Untap all permanents controlled by a player. Runs Untap replacement effects for each permanent.
Sourcepub fn draw_card(&mut self, player: PlayerId) -> Option<CardId>
pub fn draw_card(&mut self, player: PlayerId) -> Option<CardId>
Draw a card for a player. Returns the drawn card ID, or None if the draw was skipped or the library is empty.
Runs Draw replacement effects before drawing. If the draw is replaced
(e.g. “skip your draw step”), returns None.
Mirrors Java GameAction.draw() calling ReplacementHandler.run(Draw, …).
Sourcepub fn draw_card_with_agents(
&mut self,
player: PlayerId,
agents: &mut [Box<dyn PlayerAgent>],
) -> Option<CardId>
pub fn draw_card_with_agents( &mut self, player: PlayerId, agents: &mut [Box<dyn PlayerAgent>], ) -> Option<CardId>
Draw a card with agent access for Optional replacement effects (Dredge).
Sourcepub fn draw_cards(&mut self, player: PlayerId, n: usize) -> Vec<CardId>
pub fn draw_cards(&mut self, player: PlayerId, n: usize) -> Vec<CardId>
Draw N cards for a player. Returns drawn card IDs.
Sourcepub fn shuffle_library(&mut self, player: PlayerId, rng: &mut impl Rng)
pub fn shuffle_library(&mut self, player: PlayerId, rng: &mut impl Rng)
Shuffle a player’s library using the provided RNG.
Sourcepub fn new_turn_for_player(&mut self, player: PlayerId)
pub fn new_turn_for_player(&mut self, player: PlayerId)
Reset per-turn state for all cards and players of a given player.
Sourcepub fn tap(&mut self, card_id: CardId) -> bool
pub fn tap(&mut self, card_id: CardId) -> bool
Tap a card. Returns true if it was untapped. Runs Tap replacement effects before tapping.
Sourcepub fn untap(&mut self, card_id: CardId) -> bool
pub fn untap(&mut self, card_id: CardId) -> bool
Untap a card. Returns true if it was tapped. Runs Untap replacement effects before untapping.
pub fn untap_during_untap_step( &mut self, card_id: CardId, player: PlayerId, ) -> bool
Sourcepub fn change_controller(&mut self, card_id: CardId, new_controller: PlayerId)
pub fn change_controller(&mut self, card_id: CardId, new_controller: PlayerId)
Change the controller of a permanent to new_controller.
Mirrors Java’s GameAction.controllerChangeZoneCorrection() — moves the
card between per-player zone lists and updates the controller field.
Sourcepub fn attach_to(&mut self, aura_id: CardId, target_id: CardId)
pub fn attach_to(&mut self, aura_id: CardId, target_id: CardId)
Attach aura_id to target_id.
If aura_id was already attached elsewhere, detach it first.
Mirrors Java’s Card.enchantEntity() / Card.equip().
pub fn attach_to_player(&mut self, aura_id: CardId, player_id: PlayerId)
Sourcepub fn detach(&mut self, aura_id: CardId)
pub fn detach(&mut self, aura_id: CardId)
Detach aura_id from whatever it is currently attached to.
Mirrors Java’s Card.unattachFromEntity().
Sourcepub fn put_on_bottom_of_library(&mut self, card_id: CardId, owner: PlayerId)
pub fn put_on_bottom_of_library(&mut self, card_id: CardId, owner: PlayerId)
Move a card from its current zone to the bottom of a player’s library.
Unlike move_card, this places the card at the bottom rather than the top.
Sourcepub fn remove_from_stack(&mut self, entry_id: u32) -> bool
pub fn remove_from_stack(&mut self, entry_id: u32) -> bool
Remove a spell from the stack by its entry ID (used by Counter).
Mirrors Java’s Game.getStack().remove(sa).
Source§impl GameState
impl GameState
pub fn new(player_names: &[&str], starting_life: i32) -> Self
Sourcepub fn create_card(&mut self, card: Card) -> CardId
pub fn create_card(&mut self, card: Card) -> CardId
Create a new card instance and return its ID. Does NOT place it in a zone.
pub fn card(&self, id: CardId) -> &Card
pub fn card_mut(&mut self, id: CardId) -> &mut Card
pub fn player(&self, id: PlayerId) -> &PlayerState
pub fn player_mut(&mut self, id: PlayerId) -> &mut PlayerState
pub fn zone(&self, zone_type: ZoneType, owner: PlayerId) -> &Zone
pub fn zone_mut(&mut self, zone_type: ZoneType, owner: PlayerId) -> &mut Zone
pub fn zone_store_snapshot(&self) -> ZoneStore
pub fn replace_zone_store(&mut self, zones: ZoneStore)
pub fn iter_zones(&self) -> impl Iterator<Item = (ZoneKey, &Zone)>
pub fn cards_in_all_zones( &self, zone_type: ZoneType, ) -> impl Iterator<Item = CardId> + '_
pub fn card_zone_location(&self, card: CardId) -> Option<ZoneKey>
pub fn card_zone(&self, card: CardId) -> Option<ZoneType>
pub fn card_current_zone(&self, card: CardId) -> ZoneType
pub fn card_is_in_zone(&self, card: CardId, zone: ZoneType) -> bool
pub fn card_zone_owner(&self, card: CardId) -> Option<PlayerId>
pub fn card_zone_location_matches_card(&self, card: CardId) -> bool
pub fn reset_zone_turn_tracking(&mut self)
pub fn reset_card_turn_tracking(&mut self)
pub fn counter_added_this_turn( &self, entity: GameEntity, counter_type: Option<&CounterType>, ) -> i32
pub fn record_counter_added( &mut self, entity: GameEntity, counter_type: &CounterType, amount: i32, )
pub fn take_top_card_from_zone( &mut self, zone_type: ZoneType, owner: PlayerId, ) -> Option<CardId>
pub fn take_top_cards_from_zone( &mut self, zone_type: ZoneType, owner: PlayerId, count: usize, ) -> Vec<CardId>
pub fn reorder_card_in_zone( &mut self, zone_type: ZoneType, owner: PlayerId, card: CardId, index: usize, )
pub fn move_cards_to_zone_top( &mut self, zone_type: ZoneType, owner: PlayerId, cards: &[CardId], )
pub fn move_cards_to_zone_bottom( &mut self, zone_type: ZoneType, owner: PlayerId, cards: &[CardId], )
pub fn replace_zone_cards( &mut self, zone_type: ZoneType, owner: PlayerId, cards: Vec<CardId>, )
pub fn shuffle_zone_cards( &mut self, zone_type: ZoneType, owner: PlayerId, rng: &mut dyn GameRng, )
pub fn shuffle_zone_cards_with_rand<R: Rng + ?Sized>( &mut self, zone_type: ZoneType, owner: PlayerId, rng: &mut R, )
pub fn active_player(&self) -> PlayerId
pub fn is_day(&self) -> bool
pub fn is_neither_day_nor_night(&self) -> bool
pub fn next_player(&self, player: PlayerId) -> PlayerId
Sourcepub fn last_combat_turn_of(&self, player: PlayerId) -> Option<i32>
pub fn last_combat_turn_of(&self, player: PlayerId) -> Option<i32>
Return the turn number of player’s most recent combat phase, if
known. Used by Charm$ ChoiceRestriction$ YourLastCombat.
The Rust engine doesn’t yet persist last-combat timestamps per player,
so this is a best-effort: it returns the current turn number iff that
turn’s active player is player and we’re past the combat phase.
Cards that rely on cross-turn last-combat tracking will treat the
restriction as always satisfied (safer than never).
pub fn opponent_of(&self, player: PlayerId) -> PlayerId
pub fn alive_players(&self) -> Vec<PlayerId>
Sourcepub fn cards_in_zone(&self, zone_type: ZoneType, owner: PlayerId) -> &[CardId]
pub fn cards_in_zone(&self, zone_type: ZoneType, owner: PlayerId) -> &[CardId]
Get all cards in a specific zone for a player.
Sourcepub fn creatures_on_battlefield(&self, player: PlayerId) -> Vec<CardId>
pub fn creatures_on_battlefield(&self, player: PlayerId) -> Vec<CardId>
Get all creatures on the battlefield for a player.
Sourcepub fn assign_zone_timestamp(&mut self, card_id: CardId) -> u64
pub fn assign_zone_timestamp(&mut self, card_id: CardId) -> u64
Assign the next zone timestamp to a card, returning the value. Called whenever a card enters a new zone to track insertion order.
Sourcepub fn next_effect_timestamp(&mut self) -> i64
pub fn next_effect_timestamp(&mut self) -> i64
Return the next monotonic effect timestamp.
Sourcepub fn ensure_pending_damage_maps(&mut self)
pub fn ensure_pending_damage_maps(&mut self)
Ensure shared damage/prevent maps exist for this resolution scope.
Sourcepub fn clear_pending_damage_maps(&mut self)
pub fn clear_pending_damage_maps(&mut self)
Clear shared damage/prevent maps.
Sourcepub fn ensure_pending_change_zone_table(&mut self)
pub fn ensure_pending_change_zone_table(&mut self)
Ensure a shared zone-change table exists for this resolution scope.
Sourcepub fn clear_pending_change_zone_table(&mut self)
pub fn clear_pending_change_zone_table(&mut self)
Clear the shared zone-change table.
Sourcepub fn lands_on_battlefield(&self, player: PlayerId) -> Vec<CardId>
pub fn lands_on_battlefield(&self, player: PlayerId) -> Vec<CardId>
Get all lands on the battlefield for a player.
Source§impl GameState
LKI methods for GameState.
Implemented in this module to keep all LKI logic centralized.
impl GameState
LKI methods for GameState.
Implemented in this module to keep all LKI logic centralized.
Sourcepub fn copy_last_state(&mut self)
pub fn copy_last_state(&mut self)
Snapshot all battlefield cards for LKI.
Mirrors Java’s Game.copyLastState().
Called at phase transitions, before SBAs, before combat.
Sourcepub fn get_lki_snapshot(&self, card_id: CardId) -> Option<&CardSnapshot>
pub fn get_lki_snapshot(&self, card_id: CardId) -> Option<&CardSnapshot>
Look up a card’s LKI snapshot from the last battlefield state. Returns None if the card wasn’t on the battlefield at the last checkpoint.
Sourcepub fn update_lki_snapshot(&mut self, card_id: CardId)
pub fn update_lki_snapshot(&mut self, card_id: CardId)
Update the LKI snapshot for a specific card on the battlefield. If the card is already in the snapshot, update it. Otherwise, add it. Called when a card enters the battlefield or its state changes significantly. Mirrors Java’s incremental LKI updates between full copyLastState() calls.
Source§impl GameState
impl GameState
pub fn player_register_commander(&mut self, player: PlayerId, commander: CardId)
pub fn player_remove_commander(&mut self, player: PlayerId, commander: CardId)
pub fn player_reset_commander_state(&mut self, player: PlayerId)
pub fn player_registered_commanders(&self, player: PlayerId) -> &[CardId]
pub fn player_is_commander(&self, player: PlayerId, card: CardId) -> bool
pub fn player_commander_cast_count( &self, player: PlayerId, commander: CardId, ) -> u32
pub fn player_commander_tax(&self, player: PlayerId, commander: CardId) -> i32
pub fn player_total_commander_casts(&self, player: PlayerId) -> u32
pub fn player_increment_commander_cast( &mut self, player: PlayerId, commander: CardId, )
pub fn player_commander_color_identity(&self, player: PlayerId) -> Vec<String>
pub fn player_create_commander_effect( &mut self, player: PlayerId, _trigger_handler: Option<&mut TriggerHandler>, ) -> Option<CardId>
pub fn player_set_commander_replacement_suppressed( &mut self, player: PlayerId, suppressed: bool, )
pub fn player_remove_commander_effect(&mut self, player: PlayerId)
pub fn initialize_player_commanders_from_registered( &mut self, player: PlayerId, registered: &RegisteredPlayer, trigger_handler: Option<&mut TriggerHandler>, )
Source§impl GameState
impl GameState
pub fn new_from_registered_players(players: &[RegisteredPlayer]) -> Self
pub fn initialize_registered_player_cards( &mut self, player: PlayerId, registered: &RegisteredPlayer, cards: Vec<(CardInstance, ZoneType)>, trigger_handler: Option<&mut TriggerHandler>, )
pub fn player_register_radiation_effect( &mut self, player: PlayerId, trigger_handler: &mut TriggerHandler, )
pub fn player_cleanup_turn_state(&mut self, player: PlayerId)
pub fn player_mark_lost(&mut self, player: PlayerId, reason: GameLossReason)
pub fn player_mark_won(&mut self, player: PlayerId)
pub fn player_alt_win_by_spell_effect( &mut self, player: PlayerId, source_name: Option<String>, )
pub fn player_concede(&mut self, player: PlayerId)
pub fn player_clear_outcome(&mut self, player: PlayerId)
pub fn player_reset_for_restart(&mut self, player: PlayerId)
pub fn player_set_controlled_by( &mut self, player: PlayerId, controller: Option<PlayerId>, )
pub fn player_add_skip_turns(&mut self, player: PlayerId, amount: i32)
pub fn player_decrement_skip_turns(&mut self, player: PlayerId)
pub fn player_set_monarch( &mut self, player: PlayerId, trigger_handler: Option<&mut TriggerHandler>, )
pub fn player_take_initiative( &mut self, player: PlayerId, trigger_handler: Option<&mut TriggerHandler>, )
pub fn player_set_ring_bearer( &mut self, player: PlayerId, bearer: Option<CardId>, )
pub fn player_set_blessing(&mut self, player: PlayerId, value: bool)
pub fn player_ring_tempt(&mut self, player: PlayerId)
pub fn player_add_poison(&mut self, player: PlayerId, amount: i32)
pub fn player_remove_poison(&mut self, player: PlayerId, amount: i32)
pub fn player_add_energy(&mut self, player: PlayerId, amount: i32)
pub fn player_can_pay_energy(&self, player: PlayerId, amount: i32) -> bool
pub fn player_lose_energy(&mut self, player: PlayerId, amount: i32) -> i32
pub fn player_pay_energy(&mut self, player: PlayerId, amount: i32) -> bool
pub fn player_add_shards(&mut self, player: PlayerId, amount: i32)
pub fn player_can_pay_shards(&self, player: PlayerId, amount: i32) -> bool
pub fn player_lose_shards(&mut self, player: PlayerId, amount: i32) -> i32
pub fn player_pay_shards(&mut self, player: PlayerId, amount: i32) -> bool
pub fn player_add_radiation(&mut self, player: PlayerId, amount: i32)
pub fn player_remove_radiation(&mut self, player: PlayerId, amount: i32)
pub fn player_set_radiation(&mut self, player: PlayerId, amount: i32)
pub fn player_gain_life(&mut self, player: PlayerId, amount: i32) -> i32
pub fn player_can_gain_life(&self, player: PlayerId) -> bool
pub fn player_lose_life(&mut self, player: PlayerId, amount: i32) -> i32
pub fn player_deal_damage(&mut self, player: PlayerId, amount: i32) -> i32
pub fn player_can_lose_life(&self, player: PlayerId) -> bool
pub fn player_can_pay_life(&self, player: PlayerId, amount: i32) -> bool
pub fn player_pay_life(&mut self, player: PlayerId, amount: i32) -> bool
pub fn player_set_life(&mut self, player: PlayerId, amount: i32) -> i32
pub fn player_exchange_life_totals(&mut self, a: PlayerId, b: PlayerId)
pub fn player_add_damage_prevention(&mut self, player: PlayerId, amount: i32)
pub fn player_clear_damage_prevention(&mut self, player: PlayerId)
pub fn player_record_land_play(&mut self, player: PlayerId)
pub fn player_add_team_life_gained(&mut self, player: PlayerId, amount: i32)
pub fn player_record_permanent_left_battlefield(&mut self, player: PlayerId)
pub fn player_record_landfall(&mut self, player: PlayerId)
pub fn player_record_permanent_put_into_graveyard(&mut self, player: PlayerId)
pub fn player_add_mana_expended(&mut self, player: PlayerId, amount: i32)
pub fn player_set_mana_expended(&mut self, player: PlayerId, amount: i32)
pub fn player_record_discard(&mut self, player: PlayerId, amount: i32)
pub fn player_record_explore(&mut self, player: PlayerId, amount: i32)
pub fn player_record_roll(&mut self, player: PlayerId, result: Option<i32>)
pub fn player_record_attraction_visit(&mut self, player: PlayerId, amount: i32)
pub fn player_clear_skip_untap(&mut self, player: PlayerId)
pub fn player_clear_skip_draw(&mut self, player: PlayerId)
pub fn player_clear_skip_combat(&mut self, player: PlayerId)
pub fn player_set_skip_untap(&mut self, player: PlayerId)
pub fn player_set_skip_draw(&mut self, player: PlayerId)
pub fn player_set_skip_combat(&mut self, player: PlayerId)
pub fn player_attack_combat_reset(&mut self, player: PlayerId)
pub fn player_record_attacked_player( &mut self, player: PlayerId, defender: PlayerId, )
pub fn player_apply_mana_burn(&mut self, player: PlayerId, amount: i32)
pub fn player_set_speed_effect( &mut self, player: PlayerId, effect_id: Option<CardId>, )
pub fn player_set_speed( &mut self, player: PlayerId, speed: i32, trigger_handler: Option<&mut TriggerHandler>, )
pub fn increase_player_speed( &mut self, player: PlayerId, trigger_handler: Option<&mut TriggerHandler>, )
pub fn decrease_player_speed( &mut self, player: PlayerId, trigger_handler: Option<&mut TriggerHandler>, )
pub fn player_add_commander_damage( &mut self, player: PlayerId, commander: CardId, amount: i32, )
pub fn player_record_damage_assignment( &mut self, source: Option<CardId>, target_player: Option<PlayerId>, amount: i32, is_combat: bool, )
pub fn player_draw_one(&mut self, player: PlayerId) -> Option<CardId>
Sourcepub fn player_draw_one_for_turn(&mut self, player: PlayerId) -> Option<CardId>
pub fn player_draw_one_for_turn(&mut self, player: PlayerId) -> Option<CardId>
Draw a card for the draw step (sets is_first_in_draw_step: true).
Sourcepub fn player_draw_one_for_turn_with_agents(
&mut self,
player: PlayerId,
agents: &mut [Box<dyn PlayerAgent>],
) -> Option<CardId>
pub fn player_draw_one_for_turn_with_agents( &mut self, player: PlayerId, agents: &mut [Box<dyn PlayerAgent>], ) -> Option<CardId>
Draw a card for the draw step with agent access for Optional replacement
effects (Dredge). Mirrors Java’s draw path which calls
confirmReplacementEffect through the replacement handler.