#do you mind sending your code in a
1 messages · Page 1 of 1 (latest)
function Transform(card, context)
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.15,
func = function()
card:flip()
return true
end,
}))
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.15,
func = function()
card:set_ability(G.P_CENTERS["j_hpfx_ijiraq"])
play_sound("card1")
card:juice_up(0.3, 0.3)
return true
end,
}))
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.15,
func = function()
card:flip()
return true
end,
}))
return true
end
^
G.C.IjiGray = HEX('BFD7D5')
SMODS.Joker{ --Misprint?
key = 'reprint',
pos = {x = 6, y = 2},
no_mod_badges = true,
unlocked = true,
discovered = true,
--no_collection = true,
config = {
extra = {max = 23, min = 0}
},
loc_vars = function (self, info_queue, card)
local random_mult = {}
for i = card.ability.extra.min, card.ability.extra.max do
random_mult[#random_mult+1] = tostring(i)
end
local local_mult = ' '..(localize('k_mult'))..' '
main_start = {
{n=G.UIT.T, config={text = ' +',colour = G.C.MULT, scale = 0.32}},
{n=G.UIT.O, config={object = DynaText(
{string = random_mult, colours = {G.C.RED}, pop_in_rate = 9999999, silent = true, random_element = true, pop_delay = 0.5, scale = 0.32, min_cycle_time = 0})}},
{n=G.UIT.O, config={object = DynaText({string = {
{string = 'toma()', colour = G.C.JOKER_GREY},
{string = "#@"..(G.deck and G.deck.cards[1] and G.deck.cards[#G.deck.cards].base.id or 11)..(G.deck and G.deck.cards[1] and G.deck.cards[#G.deck.cards].base.suit:sub(1,1) or 'D'), colour = G.C.RED},
local_mult, local_mult, local_mult, local_mult, local_mult, local_mult, local_mult, local_mult, local_mult, local_mult, local_mult, local_mult, local_mult},
colours = {G.C.UI.TEXT_DARK}, pop_in_rate = 9999999, silent = true, random_element = true, pop_delay = 0.2011, scale = 0.32, min_cycle_time = 0})}},
card.area == G.jokers and {n=G.UIT.T, config={text = '...?', colour = G.C.IjiGray, scale = 0.32}} or nil,
}
return {main_start = main_start}
end,
generate_ui = function(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
full_UI_table.name = localize { type = 'name', set = "Joker", key = card.ability and card.ability.extra.new_key or "j_hpfx_reprint", nodes = {} }
SMODS.Center.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table)
end,
add_to_deck = function(self, card, from_debuff)
card.ability.extra.new_key = "j_hpfx_reprint_alt"
end,
rarity = 1,
cost = 4,
atlas = 'IjiraqJokers',
blueprint_compat = true,
calculate = function(self, card, context)
if context.joker_main then
Transform(card, context)
end
end
}
ok, so I've been trying to run it and running into issues because this is not my mod and I need to change a bunch of stuff to make it recognize it as part of my mod
but basically, I'm getting a couple crashes and slowly narrowing it down
oh awesome
ok
so I'm not sure what I changed
but it works now
wait what
is this working how you want it to?
so my thoughts are
the only thing I actually changed about the code itself is commenting out this set_ability
so maybe set_ability flips already
strange
maybe smods update added flips to set ability?
i have a slow laptop (i3)
no worries
that took way too long there's finally a pause
testing
ok no the set_ability needs the flips
could be
sounds good
so flip event
set ability
that's it
let's see if it flips back over on its own
THAT'S the one
so it isnt a toggle?
function Transform(card, context)
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.15,
func = function()
card:flip()
return true
end,
}))
G.E_MANAGER:add_event(Event({
trigger = "after",
delay = 0.15,
func = function()
card:set_ability(G.P_CENTERS["j_hpfx_ijiraq"])
play_sound("card1")
card:juice_up(0.3, 0.3)
return true
end,
}))
return true
end
working code
What 😭
Wacky and wild
But the func is literally just checking “if right side up, flip upside down. Else, flip right side up”
That’s crazy
Oh wait
whuh
Nah, that’s not it
whuh
my thoughts exactly