Skip to content

Commit

Permalink
Bug Fixes and New Output
Browse files Browse the repository at this point in the history
Fixed bug where starting deck card count was incorrect
LUA Console now outputs what cards you open
  • Loading branch information
gaithern committed Nov 13, 2023
1 parent c7ae81e commit 8e3ad14
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions data/lua/connector_khcom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ check_count_address = 0x02039D22
highest_warp_floor_address = 0x0203C590
moogle_points_address = 0x02039D24
deck_cp_cost_address = 0x02039EBA
deck_card_count_address = 0x02039EBC
deck_card_pointers_addresses = {0x02039DE0, 0x02039EC0, 0x02039FA0}
world_card_addresses = {0x02039D30, 0x02039D31}
world_card_values = {{0x00,0x02}, {0x08,0x00}, {0x04,0x00}, {0x10,0x00}, {0x01,0x00}, {0x20,0x00}
Expand Down Expand Up @@ -563,6 +564,7 @@ end

function set_starting_deck()
memory.write_u16_le(deck_cp_cost_address, 0x0053)
memory.write_u16_le(deck_card_count_address, 0x04)

memory.write_u16_le(battle_cards_address, 0x1008) --Kingdom Key 8
set_deck_pointer(1, 0, 0x0000)
Expand Down Expand Up @@ -841,12 +843,14 @@ function add_battle_card(battle_card)
card_value = math.random(0,v[2]-v[1])
end
memory.write_u16_le(battle_cards_address + (2 * offset), v[1]+card_value)
print("Got Card: " .. battle_card .. " " .. tostring(card_value))
return
end
end
end

function open_card_pack(card_pack)
print("Opening " .. card_pack)
if card_pack == "Bronze Card Pack" then
i = 0
while i < pack_size do
Expand Down

0 comments on commit 8e3ad14

Please sign in to comment.