Skip to main contentModule attack_restriction
Source pub use super::attack_restriction_type::AttackRestrictionType;
- 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.