Death Link during a crystal/pendant cutscene no longer softlocks while connected.
This commit is contained in:
parent
d701a7b04e
commit
c2be70b61d
13
SNIClient.py
13
SNIClient.py
|
@ -173,8 +173,17 @@ async def deathlink_kill_player(ctx: Context):
|
||||||
while ctx.death_state == DeathState.killing_player and \
|
while ctx.death_state == DeathState.killing_player and \
|
||||||
ctx.snes_state == SNESState.SNES_ATTACHED:
|
ctx.snes_state == SNESState.SNES_ATTACHED:
|
||||||
if ctx.game == GAME_ALTTP:
|
if ctx.game == GAME_ALTTP:
|
||||||
snes_buffered_write(ctx, WRAM_START + 0xF36D, bytes([0])) # set current health to 0
|
invincible = await snes_read(ctx, WRAM_START + 0x037B, 1)
|
||||||
snes_buffered_write(ctx, WRAM_START + 0x0373, bytes([8])) # deal 1 full heart of damage at next opportunity
|
last_health = await snes_read(ctx, WRAM_START + 0xF36D, 1)
|
||||||
|
await asyncio.sleep(0.25)
|
||||||
|
health = await snes_read(ctx, WRAM_START + 0xF36D, 1)
|
||||||
|
if not invincible or not last_health or not health:
|
||||||
|
ctx.death_state = DeathState.dead
|
||||||
|
ctx.last_death_link = time.time()
|
||||||
|
continue
|
||||||
|
if not invincible[0] and last_health[0] == health[0]:
|
||||||
|
snes_buffered_write(ctx, WRAM_START + 0xF36D, bytes([0])) # set current health to 0
|
||||||
|
snes_buffered_write(ctx, WRAM_START + 0x0373, bytes([8])) # deal 1 full heart of damage at next opportunity
|
||||||
elif ctx.game == GAME_SM:
|
elif ctx.game == GAME_SM:
|
||||||
snes_buffered_write(ctx, WRAM_START + 0x09C2, bytes([0, 0])) # set current health to 0
|
snes_buffered_write(ctx, WRAM_START + 0x09C2, bytes([0, 0])) # set current health to 0
|
||||||
if not ctx.death_link_allow_survive:
|
if not ctx.death_link_allow_survive:
|
||||||
|
|
Loading…
Reference in New Issue