mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Donkey Kong Country 3 Implementation (#798)
* Baseline patching and logic for DKC3 * Client can send, but not yet receive * Alpha Test Baseline * Bug Fixes and Starting Lives Option * Finish BBH, add world hints * Add music shuffle * Boomer Costs Text * Stubbed in Collect behaviour * Adjust Gyrocopter option * Add Bonus Coin junk replacement and tracker support * Delete bad logs * Undo host.yaml change * Refactored SNIClient * Make Swanky Free * Fix Typo * Undo SNIClient run_game hack * Fix Typo * Remove Bosses from Level Shuffle * Remove duplicate kivy Data * Add DKC3 Docs and increment Data version * Remove dead code * Fix mislabeled region * Add Dark Souls 3 to README * Always force Cog on Rocket Rush Flag * Fix Single Ski lock and too many DK Coins * Update Retroarch version number * Don't send DKC3 through LttP Adjuster * Comment Location ROM Table * Change ROM Hash prefix to D3 * Remove redundant constructor * Add ROM Change Safeguards * Properly mark WRAM accesses * Remove outdated region connect * Fix syntax error * Fix Game description * Fix SNES Bank Access * Add isso_setup for DKC3 * Double Quote strings * Escape single quotes I guess
This commit is contained in:
32
worlds/dkc3/Rules.py
Normal file
32
worlds/dkc3/Rules.py
Normal file
@@ -0,0 +1,32 @@
|
||||
import math
|
||||
|
||||
from BaseClasses import MultiWorld
|
||||
from .Names import LocationName, ItemName
|
||||
from ..AutoWorld import LogicMixin
|
||||
from ..generic.Rules import add_rule, set_rule
|
||||
|
||||
|
||||
def set_rules(world: MultiWorld, player: int):
|
||||
|
||||
if False:#world.include_trade_sequence[player]:
|
||||
add_rule(world.get_location(LocationName.barnacles_island, player),
|
||||
lambda state: state.has(ItemName.shell, player))
|
||||
|
||||
add_rule(world.get_location(LocationName.blues_beach_hut, player),
|
||||
lambda state: state.has(ItemName.present, player))
|
||||
|
||||
add_rule(world.get_location(LocationName.brambles_bungalow, player),
|
||||
lambda state: state.has(ItemName.flower, player))
|
||||
|
||||
add_rule(world.get_location(LocationName.barters_swap_shop, player),
|
||||
lambda state: state.has(ItemName.mirror, player))
|
||||
|
||||
|
||||
if world.goal[player] != "knautilus":
|
||||
required_banana_birds = math.floor(
|
||||
world.number_of_banana_birds[player].value * (world.percentage_of_banana_birds[player].value / 100.0))
|
||||
|
||||
add_rule(world.get_location(LocationName.banana_bird_mother, player),
|
||||
lambda state: state.has(ItemName.banana_bird, player, required_banana_birds))
|
||||
|
||||
world.completion_condition[player] = lambda state: state.has(ItemName.victory, player)
|
Reference in New Issue
Block a user