Rules Helpers¶
- worlds.generic.Rules.add_item_rule(location: BaseClasses.Location, rule: Callable[[object], bool], combine: str = 'and')¶
- worlds.generic.Rules.add_rule(spot: BaseClasses.Location | BaseClasses.Entrance, rule: Callable[[object], bool], combine='and')¶
- worlds.generic.Rules.allow_self_locking_items(spot: Location | Region, *item_names: str) None ¶
This function sets rules on the supplied spot, such that the supplied item_name(s) can possibly be placed there.
spot: Location or Region that the item(s) are allowed to be placed in item_names: item name or names that are allowed to be placed in the Location or Region
- worlds.generic.Rules.exclusion_rules(multiworld: MultiWorld, player: int, exclude_locations: Set[str]) None ¶
- worlds.generic.Rules.forbid_item(location: BaseClasses.Location, item: str, player: int)¶
- worlds.generic.Rules.forbid_items(location: BaseClasses.Location, items: Set[str])¶
unused, but kept as a debugging tool.
- worlds.generic.Rules.forbid_items_for_player(location: BaseClasses.Location, items: Set[str], player: int)¶
- worlds.generic.Rules.item_name_in_location_names(state: BaseClasses.CollectionState, item: str, player: int, location_name_player_pairs: Sequence[Tuple[str, int]]) bool ¶
- worlds.generic.Rules.item_name_in_locations(item: str, player: int, locations: Sequence[BaseClasses.Location]) bool ¶
- worlds.generic.Rules.locality_needed(multiworld: MultiWorld) bool ¶
- worlds.generic.Rules.locality_rules(multiworld: MultiWorld)¶
- worlds.generic.Rules.location_item_name(state: BaseClasses.CollectionState, location: str, player: int) Tuple[str, int] | None ¶
- worlds.generic.Rules.set_rule(spot: BaseClasses.Location | BaseClasses.Entrance, rule: Callable[[object], bool])¶