2015-03-08 09:52:19 -07:00
|
|
|
-- gimme gimme gimme
|
2015-05-25 19:22:47 -07:00
|
|
|
require "boilerplate"
|
2015-03-20 19:46:08 -07:00
|
|
|
local a = require "addrs.init"
|
2015-03-08 09:52:19 -07:00
|
|
|
|
2015-03-20 17:39:55 -07:00
|
|
|
local iv
|
2015-03-20 19:46:08 -07:00
|
|
|
if version == "M JP10" or version == "M JP11" then
|
2015-05-01 09:59:16 -07:00
|
|
|
iv = require "data.item values early"
|
2015-03-20 17:39:55 -07:00
|
|
|
elseif oot then
|
2015-05-01 09:59:16 -07:00
|
|
|
iv = require "data.item values oot"
|
2015-03-20 17:39:55 -07:00
|
|
|
else
|
2015-05-01 09:59:16 -07:00
|
|
|
iv = require "data.item values"
|
2015-03-20 17:39:55 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
local inv = a.inventory
|
|
|
|
local masks = a.masks
|
|
|
|
local quantities = a.quantities
|
|
|
|
|
|
|
|
local function set(f, v)
|
|
|
|
-- wrapper for addresses that *might* be undefined
|
|
|
|
if f then f(v) end
|
|
|
|
end
|
|
|
|
|
|
|
|
set(a.target_style, 1)
|
|
|
|
|
|
|
|
--set(buttons_enabled, 0)
|
2015-05-27 22:22:48 -07:00
|
|
|
--set(sword_active, 1)
|
2015-05-26 00:37:06 -07:00
|
|
|
set(a.owl_save, 0)
|
2015-03-20 17:39:55 -07:00
|
|
|
set(a.sot_count, 0)
|
|
|
|
|
|
|
|
set(a.target_style, 1)
|
|
|
|
set(a.bubble_timer, 0)
|
|
|
|
set(a.chateau_romani, 8)
|
|
|
|
|
|
|
|
a.hearts (16*20)
|
|
|
|
a.max_hearts (16*20)
|
|
|
|
a.doubled_hearts(20)
|
|
|
|
a.magic (0x60)
|
2015-03-26 06:56:27 -07:00
|
|
|
set(a.magic_max, 0x60)
|
2015-03-20 17:39:55 -07:00
|
|
|
a.rupees (500)
|
|
|
|
|
2015-03-23 01:54:35 -07:00
|
|
|
-- nuts, sticks, bombs, wallet, Scale, gauntlets, Bullets, quiver
|
|
|
|
-- ?????????nnnsssbbbwwSSSgggBBBqqq
|
|
|
|
a.upgrades(tonumber('00000000010101101110010011011011', 2))
|
|
|
|
|
2015-03-20 17:39:55 -07:00
|
|
|
if oot then
|
|
|
|
a.tunic_boots (0xFF) -- normally 0x77
|
|
|
|
a.sword_shield (0xF7) -- normally 0x77?
|
|
|
|
|
2016-01-08 04:45:40 -08:00
|
|
|
-- get epona
|
|
|
|
local addr = a.event_chk_inf.addr + 2
|
|
|
|
if bit then
|
|
|
|
W2(addr, bit.bor(R2(addr), 0x0100))
|
|
|
|
else
|
|
|
|
--FIXME
|
|
|
|
end
|
2015-03-20 17:39:55 -07:00
|
|
|
else
|
|
|
|
a.sword_shield (0x23)
|
|
|
|
a.owls_hit (0xFFFF)
|
|
|
|
a.map_visible (0xFFFF)
|
|
|
|
a.map_visited (0xFFFF)
|
2015-03-23 01:54:35 -07:00
|
|
|
a.banked_rupees (5000)
|
2015-03-20 17:39:55 -07:00
|
|
|
|
2015-12-03 02:50:31 -08:00
|
|
|
a.lottery_numbers[1][1](1)
|
|
|
|
a.lottery_numbers[1][2](2)
|
|
|
|
a.lottery_numbers[1][3](3)
|
|
|
|
a.lottery_numbers[2][1](4)
|
|
|
|
a.lottery_numbers[2][2](5)
|
|
|
|
a.lottery_numbers[2][3](6)
|
|
|
|
a.lottery_numbers[3][1](7)
|
|
|
|
a.lottery_numbers[3][2](8)
|
|
|
|
a.lottery_numbers[3][3](9)
|
2015-03-26 07:12:56 -07:00
|
|
|
a.spider_mask_order[1](0)
|
|
|
|
a.spider_mask_order[2](0)
|
|
|
|
a.spider_mask_order[3](0)
|
|
|
|
a.spider_mask_order[4](0)
|
|
|
|
a.spider_mask_order[5](0)
|
2015-03-26 07:16:11 -07:00
|
|
|
a.spider_mask_order[6](0)
|
2015-03-26 07:12:56 -07:00
|
|
|
a.bombers_code[1](1)
|
|
|
|
a.bombers_code[2](2)
|
|
|
|
a.bombers_code[3](3)
|
|
|
|
a.bombers_code[4](4)
|
|
|
|
a.bombers_code[5](5)
|
2015-03-20 17:39:55 -07:00
|
|
|
|
|
|
|
a.items_wft(7)
|
|
|
|
a.items_sht(7)
|
|
|
|
a.items_gbt(7)
|
|
|
|
a.items_stt(7)
|
|
|
|
a.keys_wft(69)
|
|
|
|
a.keys_sht(69)
|
|
|
|
a.keys_gbt(69)
|
|
|
|
a.keys_stt(69)
|
|
|
|
a.fairies_wft(69)
|
|
|
|
a.fairies_sht(69)
|
|
|
|
a.fairies_gbt(69)
|
|
|
|
a.fairies_stt(69)
|
2015-05-26 00:37:06 -07:00
|
|
|
|
|
|
|
-- great spin attack
|
|
|
|
-- this one's a bit odd; it goes off an event flag
|
|
|
|
local addr = a.week_event_reg.addr + 23
|
2015-12-03 02:06:18 -08:00
|
|
|
if bit then
|
|
|
|
W1(addr, bit.bor(R1(addr), 0x02))
|
|
|
|
else
|
2015-12-11 00:45:22 -08:00
|
|
|
--W1(addr, R1(addr) | 0x02) -- FIXME
|
2015-12-03 02:06:18 -08:00
|
|
|
end
|
2015-03-08 09:52:19 -07:00
|
|
|
end
|
|
|
|
|
2015-05-26 01:17:38 -07:00
|
|
|
set(a.magic_level, 2)
|
2015-03-20 17:39:55 -07:00
|
|
|
set(a.has_normal_magic, 1)
|
|
|
|
set(a.has_double_magic, 1)
|
|
|
|
a.quest_items (0x00FFFFFF)
|
|
|
|
|
|
|
|
--a.slulltula_count_wf(69)
|
|
|
|
--a.slulltula_count_gb(69)
|
|
|
|
|
|
|
|
--inv.b_button (0x4F) -- don't really need this
|
|
|
|
|
|
|
|
for k, f in pairs(inv) do
|
|
|
|
if iv[k] then f(iv[k]) end
|
|
|
|
end
|
|
|
|
|
|
|
|
if iv.longshot then
|
|
|
|
inv.hookshot(iv.longshot)
|
|
|
|
end
|
|
|
|
|
|
|
|
inv.bottle_1 (iv.bottle )
|
|
|
|
inv.bottle_2 (iv.fairy )
|
|
|
|
inv.bottle_3 (iv.bugs )
|
|
|
|
inv.bottle_4 (iv.fish )
|
|
|
|
set(inv.bottle_5, iv.milk )
|
|
|
|
set(inv.bottle_6, iv.chateau_romani)
|
|
|
|
|
|
|
|
--set(a.event_1, 0x05)
|
|
|
|
--set(a.event_2, 0x0B)
|
|
|
|
--set(a.event_3, 0x11)
|
|
|
|
|
|
|
|
if masks then
|
|
|
|
for k, f in pairs(masks) do
|
|
|
|
f(iv[k])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
for k, f in pairs(quantities) do
|
|
|
|
f(69)
|
|
|
|
end
|