Skip to main content

Module combat_util

Module combat_util 

Source
Expand description

Static utility methods related to combat.

Functions§

can_attack
Check if a creature can attack any legal defender.
can_attack_defender
can_attack_next_turn
Check if a creature could attack next turn (ignores tap/summoning sickness).
can_attack_player
can_attacker_be_blocked_with_amount
Check if a creature can be blocked with a given number of blockers.
can_be_blocked
Check if an attacker can be blocked by the given set of potential blockers.
can_block
Check if a creature can block (basic check: untapped creature).
can_block_at_least_one
Check if a blocker can block at least one attacker from a list.
can_block_more_creatures
Check if blocker can block more creatures than it currently is.
can_creature_block
check_declared_attacker
Declared-attacker trigger helper.
check_propaganda_effects
Check propaganda-style effects that require paying a cost to attack.
compute_must_block_targets
Get attackers that blocker_id MUST block (if able).
could_attack_but_not_attacking
Check if a creature could attack but is not currently attacking.
filter_legal_blockers
Filter blockers to only those that can legally block at least one attacker.
find_free_blockers
Find blockers that are not yet assigned to block anything.
get_all_requirements
Get attack constraints for a combat.
get_available_attackers
get_available_blockers
get_lure_type
Determine the lure type of an attacker.
get_min_num_blockers_for_attacker
Get the minimum number of blockers required to block an attacker.
get_possible_defenders
must_block_an_attacker
Check if a blocker must block an attacker this combat.
pay_required_block_costs
Pay required block costs for a blocker.
validate_attackers
validate_blocks