mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-22 05:26:45 +02:00
Collision-check the remaining single-tile player refusal shoves
CLOSES #1548
This commit is contained in:
@@ -111,7 +111,7 @@ local function joinPrompt(game, ow, done)
|
|||||||
local t = game.data.text
|
local t = game.data.text
|
||||||
local back = function(text)
|
local back = function(text)
|
||||||
game.stack:push(TextBox.new(game, text, function()
|
game.stack:push(TextBox.new(game, text, function()
|
||||||
ow:scriptMove(ow.player, "down", 1, done)
|
ow:scriptMove(ow.player, "down", 1, done, { collide = true })
|
||||||
end))
|
end))
|
||||||
end
|
end
|
||||||
game.stack:push(TextBox.new(game,
|
game.stack:push(TextBox.new(game,
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ M.VIRIDIAN_CITY = {
|
|||||||
game.stack:push(TextBox.new(game,
|
game.stack:push(TextBox.new(game,
|
||||||
game.data.text._ViridianCityOldManSleepyPrivatePropertyText
|
game.data.text._ViridianCityOldManSleepyPrivatePropertyText
|
||||||
or "You can't go\nthrough here!\fThis is private\nproperty!",
|
or "You can't go\nthrough here!\fThis is private\nproperty!",
|
||||||
function() ow:scriptMove(ow.player, "down", 1) end))
|
function() ow:scriptMove(ow.player, "down", 1, nil, { collide = true }) end))
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
@@ -356,7 +356,7 @@ M.VERMILION_CITY = {
|
|||||||
if shipLeft then
|
if shipLeft then
|
||||||
game.stack:push(TextBox.new(game,
|
game.stack:push(TextBox.new(game,
|
||||||
t._VermilionCitySailor1ShipSetSailText or "The ship set sail.",
|
t._VermilionCitySailor1ShipSetSailText or "The ship set sail.",
|
||||||
function() ow:scriptMove(ow.player, "up", 1) end))
|
function() ow:scriptMove(ow.player, "up", 1, nil, { collide = true }) end))
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
-- Walk-past is never facing-right / inFrontOfOrBehindGuardCoords, so
|
-- Walk-past is never facing-right / inFrontOfOrBehindGuardCoords, so
|
||||||
@@ -377,7 +377,7 @@ M.VERMILION_CITY = {
|
|||||||
ask .. "\f"
|
ask .. "\f"
|
||||||
.. (t._VermilionCitySailor1YouNeedATicketText
|
.. (t._VermilionCitySailor1YouNeedATicketText
|
||||||
or "You need a ticket\nto get aboard."),
|
or "You need a ticket\nto get aboard."),
|
||||||
function() ow:scriptMove(ow.player, "up", 1) end))
|
function() ow:scriptMove(ow.player, "up", 1, nil, { collide = true }) end))
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
talk = {
|
talk = {
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ local function saffronGate(guardText, triggers, horizontal)
|
|||||||
game.stack:push(TextBox.new(game,
|
game.stack:push(TextBox.new(game,
|
||||||
t._SaffronGateGuardGeeImThirstyText or "Gee, I'm thirsty\nthough!\nThe road's closed.",
|
t._SaffronGateGuardGeeImThirstyText or "Gee, I'm thirsty\nthough!\nThe road's closed.",
|
||||||
function()
|
function()
|
||||||
ow:scriptMove(ow.player, back, 1)
|
ow:scriptMove(ow.player, back, 1, nil, { collide = true })
|
||||||
end))
|
end))
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
@@ -769,7 +769,7 @@ M.MUSEUM_1F = {
|
|||||||
if y == 4 and (x == 9 or x == 10)
|
if y == 4 and (x == 9 or x == 10)
|
||||||
and not game.save.flags.EVENT_BOUGHT_MUSEUM_TICKET then
|
and not game.save.flags.EVENT_BOUGHT_MUSEUM_TICKET then
|
||||||
museumClerk(game, ow, nil, function()
|
museumClerk(game, ow, nil, function()
|
||||||
ow:scriptMove(ow.player, "down", 1)
|
ow:scriptMove(ow.player, "down", 1, nil, { collide = true })
|
||||||
end)
|
end)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ M.POKEMON_TOWER_6F = {
|
|||||||
-- .did_not_defeat: one simulated step right, off the trigger,
|
-- .did_not_defeat: one simulated step right, off the trigger,
|
||||||
-- so fleeing does not leave you standing on a cell that
|
-- so fleeing does not leave you standing on a cell that
|
||||||
-- immediately re-fires.
|
-- immediately re-fires.
|
||||||
ow:scriptMove(ow.player, "right", 1)
|
ow:scriptMove(ow.player, "right", 1, nil, { collide = true })
|
||||||
end
|
end
|
||||||
ow:afterBattle(result, battle)
|
ow:afterBattle(result, battle)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -734,7 +734,7 @@ local function e4ExitSeal(flag, closedBlock, openBlock, dontRunText, autoFlag)
|
|||||||
local TextBox = require("src.render.TextBox")
|
local TextBox = require("src.render.TextBox")
|
||||||
game.stack:push(TextBox.new(game,
|
game.stack:push(TextBox.new(game,
|
||||||
game.data.text[dontRunText] or "Don't run away!", function()
|
game.data.text[dontRunText] or "Don't run away!", function()
|
||||||
ow:scriptMove(ow.player, "up", 1)
|
ow:scriptMove(ow.player, "up", 1, nil, { collide = true })
|
||||||
end))
|
end))
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
|
|||||||
Reference in New Issue
Block a user