Fix faster planets erroneously spawning hand area early
This commit is contained in:
parent
2132afb1e8
commit
9226b0192b
2 changed files with 11 additions and 12 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
"id": "Roland",
|
"id": "Roland",
|
||||||
"name": "Roland",
|
"name": "Roland",
|
||||||
"prefix": "Roland",
|
"prefix": "Roland",
|
||||||
"version": "2.8.20",
|
"version": "2.8.21",
|
||||||
"badge_colour": "8BE9FD",
|
"badge_colour": "8BE9FD",
|
||||||
"display_name": "Roland",
|
"display_name": "Roland",
|
||||||
"main_file": "src/main.lua",
|
"main_file": "src/main.lua",
|
||||||
|
|
|
||||||
|
|
@ -54,22 +54,21 @@ end
|
||||||
local orig_use_card = G.FUNCS.use_card
|
local orig_use_card = G.FUNCS.use_card
|
||||||
|
|
||||||
function G.FUNCS.use_card(e, ...)
|
function G.FUNCS.use_card(e, ...)
|
||||||
|
local ref = e.config.ref_table or {}
|
||||||
|
local consumeable = (ref.ability or {}).consumeable or {}
|
||||||
|
|
||||||
if not SMODS.Mods.Roland.config.faster_planets or
|
if not SMODS.Mods.Roland.config.faster_planets or
|
||||||
not (((e.config.ref_table or {}).ability or {}).consumeable or {}).hand_type then
|
(not consumeable.hand_type and not consumeable.hand_types) then
|
||||||
return orig_use_card(e, ...)
|
return orig_use_card(e, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local normal = ref.area ~= G.pack_cards or not G.GAME.pack_choices or G.GAME.pack_choices <= 0
|
||||||
|
ref.from_area = ref.from_area or ref.area
|
||||||
play_sound("tarot1", percent, 0.6)
|
play_sound("tarot1", percent, 0.6)
|
||||||
e.config.ref_table:use_consumeable(e.config.ref_table.area)
|
discover_card(ref.config.center)
|
||||||
|
ref:use_consumeable(ref.area)
|
||||||
SMODS.calculate_context {
|
SMODS.calculate_context {area = ref.area, consumeable = ref, using_consumeable = true}
|
||||||
using_consumeable = true,
|
ref:remove()
|
||||||
consumeable = e.config.ref_table,
|
|
||||||
area = e.config.ref_table.from_area,
|
|
||||||
}
|
|
||||||
|
|
||||||
local normal = G.GAME.pack_choices and e.config.ref_table.area ~= G.pack_cards
|
|
||||||
e.config.ref_table:remove()
|
|
||||||
|
|
||||||
if normal then
|
if normal then
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue