Setup: flip apworld list (#1882)
* Setup: flip apworld list * Update setup.py Co-authored-by: kindasneaki <ryandj67@hotmail.com> * Update setup.py Co-authored-by: Scipio Wright <scipiowright@gmail.com> * setup: make TLoZ an apworld This reverts commit fd026c5eb2fb667d239d61c7a2bcfc1586fd4e2b. --------- Co-authored-by: kindasneaki <ryandj67@hotmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com> Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
This commit is contained in:
		| @@ -1,10 +1,16 @@ | ||||
| from typing import Set | ||||
|  | ||||
| from .RulesData import location_rules | ||||
| from ..generic.Rules import set_rule | ||||
| from BaseClasses import Location | ||||
| from worlds.generic.Rules import set_rule | ||||
| from BaseClasses import Location, CollectionState | ||||
|  | ||||
|  | ||||
| # TODO: implement Mapstone counting, Open, OpenWorld, connection rules | ||||
|  | ||||
| def oribf_has_all(state: CollectionState, items: Set[str], player:int) -> bool: | ||||
|     return all(state.prog_items[item, player] if type(item) == str | ||||
|                else state.prog_items[item[0], player] >= item[1] for item in items) | ||||
|  | ||||
| def set_rules(world): | ||||
|     temp_base_rule(world.multiworld, world.player) | ||||
|     for logicset in world.logic_sets: | ||||
| @@ -22,7 +28,7 @@ def add_or_rule_check_first(world, location: str, player: int, conditionsets): | ||||
|             location.access_rule = tautology | ||||
|             return | ||||
|     rule = lambda state, conditionsets=conditionsets: any( | ||||
|         state._oribf_has_all(conditionset, player) for conditionset in conditionsets) | ||||
|         oribf_has_all(state, conditionset, player) for conditionset in conditionsets) | ||||
|     if location.access_rule is Location.access_rule: | ||||
|         location.access_rule = rule | ||||
|     else: | ||||
| @@ -31,7 +37,7 @@ def add_or_rule_check_first(world, location: str, player: int, conditionsets): | ||||
|  | ||||
|  | ||||
| def temp_base_rule(world, player): | ||||
|     world.completion_condition[player] = lambda state: state._oribf_has_all( | ||||
|     world.completion_condition[player] = lambda state: oribf_has_all(state, | ||||
|         {"Bash", "ChargeFlame", "ChargeJump", "Climb", "Dash", "DoubleJump", "Glide", "Grenade", "Stomp", "WallJump"}, | ||||
|         player) | ||||
|  | ||||
|   | ||||
| @@ -69,9 +69,3 @@ class OriBlindForest(World): | ||||
|         return Item(name, | ||||
|                     ItemClassification.progression if not name.startswith("EX") else ItemClassification.filler, | ||||
|                     item_table[name], self.player) | ||||
|  | ||||
|  | ||||
| class OriBlindForestLogic(LogicMixin): | ||||
|     def _oribf_has_all(self, items: Set[str], player:int): | ||||
|         return all(self.prog_items[item, player] if type(item) == str | ||||
|                    else self.prog_items[item[0], player] >= item[1] for item in items) | ||||
		Reference in New Issue
	
	Block a user
	 Fabian Dill
					Fabian Dill