Skip to content

Commit 8e3ad14

Browse files
committed
Bug Fixes and New Output
Fixed bug where starting deck card count was incorrect LUA Console now outputs what cards you open
1 parent c7ae81e commit 8e3ad14

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

data/lua/connector_khcom.lua

+4
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ check_count_address = 0x02039D22
423423
highest_warp_floor_address = 0x0203C590
424424
moogle_points_address = 0x02039D24
425425
deck_cp_cost_address = 0x02039EBA
426+
deck_card_count_address = 0x02039EBC
426427
deck_card_pointers_addresses = {0x02039DE0, 0x02039EC0, 0x02039FA0}
427428
world_card_addresses = {0x02039D30, 0x02039D31}
428429
world_card_values = {{0x00,0x02}, {0x08,0x00}, {0x04,0x00}, {0x10,0x00}, {0x01,0x00}, {0x20,0x00}
@@ -563,6 +564,7 @@ end
563564

564565
function set_starting_deck()
565566
memory.write_u16_le(deck_cp_cost_address, 0x0053)
567+
memory.write_u16_le(deck_card_count_address, 0x04)
566568

567569
memory.write_u16_le(battle_cards_address, 0x1008) --Kingdom Key 8
568570
set_deck_pointer(1, 0, 0x0000)
@@ -841,12 +843,14 @@ function add_battle_card(battle_card)
841843
card_value = math.random(0,v[2]-v[1])
842844
end
843845
memory.write_u16_le(battle_cards_address + (2 * offset), v[1]+card_value)
846+
print("Got Card: " .. battle_card .. " " .. tostring(card_value))
844847
return
845848
end
846849
end
847850
end
848851

849852
function open_card_pack(card_pack)
853+
print("Opening " .. card_pack)
850854
if card_pack == "Bronze Card Pack" then
851855
i = 0
852856
while i < pack_size do

0 commit comments

Comments
 (0)