Fix Amber Acorn and wii phone regression
This commit is contained in:
parent
8a82494674
commit
44b99156b7
3 changed files with 34 additions and 9 deletions
|
|
@ -3,7 +3,7 @@
|
|||
"id": "Roland",
|
||||
"name": "Roland",
|
||||
"prefix": "Roland",
|
||||
"version": "2.8.13",
|
||||
"version": "2.8.14",
|
||||
"badge_colour": "8BE9FD",
|
||||
"display_name": "Roland",
|
||||
"main_file": "src/main.lua",
|
||||
|
|
|
|||
|
|
@ -33,15 +33,28 @@ local charm = (function()
|
|||
end
|
||||
end)()
|
||||
|
||||
local function can_discard_zero()
|
||||
return G.GAME.current_round.discards_left > 0 and
|
||||
not next(G.hand.highlighted) and
|
||||
G.hand.config.card_limit > 0 and
|
||||
G.GAME.Bakery_charm == "BakeryCharm_Roland_cocacola"
|
||||
end
|
||||
|
||||
charm {
|
||||
key = "wii",
|
||||
pronouns = "they_them",
|
||||
attributes = {"skip"},
|
||||
config = {extra = {active = true}},
|
||||
calculate = function(_, card, context)
|
||||
if context.prevent_tag_trigger and card.ability.extra.active then
|
||||
return {prevent_trigger = true}
|
||||
end
|
||||
|
||||
if not context.skip_blind then
|
||||
return
|
||||
end
|
||||
|
||||
card.ability.extra.active = true
|
||||
local message = localize {type = "variable", key = "b_Roland_entering_shop"}
|
||||
SMODS.calculate_effect({card = card, message = message, sound = "whoosh1"}, card)
|
||||
|
||||
|
|
@ -50,21 +63,33 @@ charm {
|
|||
G.blind_select = G.blind_select and G.blind_select:remove()
|
||||
G.round_eval = G.round_eval and G.round_eval:remove()
|
||||
G.GAME.current_round.jokers_purchased = 0
|
||||
G.STATE = G.STATES.SHOP
|
||||
G.GAME.shop_free = nil
|
||||
G.GAME.shop_d6ed = nil
|
||||
G.STATE_COMPLETE = true
|
||||
play_sound("whoosh1", 1.33333, 0.8)
|
||||
play_sound("whoosh1", 0.66666, 0.8)
|
||||
|
||||
q(function()
|
||||
G.STATE = G.STATES.SHOP
|
||||
G.STATE_COMPLETE = false
|
||||
delay(1)
|
||||
|
||||
q(function()
|
||||
card.ability.extra.active = false
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
end,
|
||||
}
|
||||
|
||||
local function can_discard_zero()
|
||||
return G.GAME.current_round.discards_left > 0 and
|
||||
not next(G.hand.highlighted) and
|
||||
G.hand.config.card_limit > 0 and
|
||||
G.GAME.Bakery_charm == "BakeryCharm_Roland_cocacola"
|
||||
local orig_apply_to_run = Tag.apply_to_run
|
||||
|
||||
function Tag:apply_to_run(...)
|
||||
if G.GAME.Bakery_charm == "BakeryCharm_Roland_wii" and
|
||||
G.Bakery_charm_area.cards[1].config.center.ability.extra.active then
|
||||
return
|
||||
end
|
||||
|
||||
return orig_apply_to_run(self, ...)
|
||||
end
|
||||
|
||||
charm {
|
||||
|
|
|
|||
|
|
@ -679,7 +679,7 @@ joker {
|
|||
return
|
||||
end
|
||||
|
||||
card.Roland_amber_waiting = false
|
||||
card.Roland_amber_waiting = true
|
||||
local cards = card.area.cards
|
||||
local keys = f(cards):where(f().nq(card)):keys():table()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue