Skip to main content

Module combat

Module combat 

Source

Re-exports§

pub use combat_lki::CombatLki;

Modules§

attack_constraints
attack_cost
Attack cost computation (Propaganda, Ghostly Prison, etc.).
attack_requirement
attack_restriction
attack_restriction_type
attacking_band
block_cost
Block cost computation (War Cadence, etc.).
combat_lki
combat_util
Static utility methods related to combat.
global_attack_restrictions
selector_domain

Structs§

CombatDamageEvent
A combat damage event returned from resolve_damage_step. Used to fire DamageDone and LifeGained triggers from game_loop.rs.
CombatState
Tracks combat state for the current combat phase.

Enums§

DefenderId
Identifies the target of an attack: a player or a permanent (planeswalker/battle).
LureType
What kind of lure effect an attacker has.

Functions§

can_creature_block
Check if a specific blocker can legally block a specific attacker.
compute_must_block_targets
Get attackers that blocker_id MUST block (if able).
filter_legal_blockers
Filter blockers to only those that can legally block at least one attacker.
get_available_attackers
Get available attackers: untapped creatures that can attack.
get_available_blockers
Get available blockers: untapped creatures that can block.
get_lure_type
Determine the lure type of an attacker based on its keywords.
get_possible_defenders
Get all possible defenders for the attacking player.
validate_blocks
Validate blocker assignments and return invalid (blocker, attacker) pairs.