Skip to main content

Module attack_restriction

Module attack_restriction 

Source

Re-exports§

pub use super::attack_restriction_type::AttackRestrictionType;

Functions§

can_attack
Check if a creature can attack given its restrictions and the number of other attackers. Mirrors Java’s AttackRestriction.canAttack().
get_restrictions
Parse attack restrictions from a creature’s keywords. Mirrors Java’s AttackRestriction.setRestrictions() — matches exact keyword strings.
validate_attack_restrictions
Validate chosen attackers against attack restrictions. Returns a set of attacker IDs that are illegal and should be removed.