Skip to content

Commit 5f79865

Browse files
Make Monster less scuffed internally
wtf was I on geez
1 parent 445c300 commit 5f79865

File tree

4 files changed

+13
-24
lines changed

4 files changed

+13
-24
lines changed

items/joker_display.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1806,7 +1806,7 @@ if JokerDisplay then
18061806
{
18071807
border_nodes = {
18081808
{ text = "X" },
1809-
{ ref_table = "card.ability.extra", ref_value = "mult", retrigger_type = "exp" },
1809+
{ ref_table = "card.ability.extra", ref_value = "monster", retrigger_type = "exp" },
18101810
},
18111811
},
18121812
},

items/m.lua

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,29 +1403,25 @@ local longboi = {
14031403
name = "cry-longboi",
14041404
key = "longboi",
14051405
pos = { x = 5, y = 4 },
1406-
config = { extra = { mult = nil, bonus = 0.75 } },
1406+
config = { extra = { monster = 1, bonus = 0.75 } },
14071407
rarity = 1,
14081408
cost = 5,
14091409
order = 261,
14101410
pools = { ["M"] = true },
1411-
no_dbl = true,
14121411
blueprint_compat = true,
14131412
eternal_compat = false,
14141413
loc_vars = function(self, info_queue, center)
14151414
return {
14161415
vars = {
1417-
math.max(0.75, math.floor(center.ability.extra.bonus)),
1418-
(center.ability.extra.mult ~= nil and center.ability.extra.mult or (G.GAME.monstermult or 1)),
1416+
math.max(0.75, center.ability.extra.bonus),
1417+
center.ability.extra.monster,
14191418
},
14201419
}
14211420
end,
14221421
atlas = "atlasthree",
14231422
calculate = function(self, card, context)
14241423
if context.end_of_round and not context.individual and not context.repetition then
1425-
if not G.GAME.monstermult then
1426-
G.GAME.monstermult = 1
1427-
end
1428-
G.GAME.monstermult = G.GAME.monstermult + math.max(0.75, math.floor(card.ability.extra.bonus))
1424+
G.GAME.monstermult = G.GAME.monstermult + math.max(0.75, card.ability.extra.bonus)
14291425
if not context.retrigger_joker then
14301426
return {
14311427
card_eval_status_text(context.blueprint_card or card, "extra", nil, nil, nil, {
@@ -1434,22 +1430,15 @@ local longboi = {
14341430
}),
14351431
}
14361432
end
1437-
elseif context.joker_main and ((card.ability.extra.mult or 1) > 1) then
1433+
elseif context.joker_main and card.ability.extra.monster > 1 then
14381434
return {
1439-
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.mult } }),
1440-
Xmult_mod = card.ability.extra.mult,
1435+
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.monster } }),
1436+
Xmult_mod = card.ability.extra.monster,
14411437
}
14421438
end
14431439
end,
1444-
add_to_deck = function(self, card, from_debuff)
1445-
if (not from_debuff and card.ability.extra.mult == nil) or card.checkmonster then
1446-
--Stops Things like Gemini from updating mult when it isn't supposed to
1447-
if card.checkmonster then
1448-
card.checkmonster = nil
1449-
end
1450-
1451-
card.ability.extra.mult = G.GAME.monstermult or 1
1452-
end
1440+
set_ability = function(self, card, from_debuff)
1441+
card.ability.extra.monster = G.GAME and G.GAME.monstermult or 1
14531442
end,
14541443
cry_credits = {
14551444
idea = {

lib/overrides.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ function Game:init_game_object()
169169
-- Add initial dropshot and number blocks card
170170
g.current_round.cry_nb_card = { rank = "Ace" }
171171
g.current_round.cry_dropshot_card = { suit = "Spades" }
172+
g.monstermult = 1
172173
-- Create G.GAME.events when starting a run, so there's no errors
173174
g.events = {}
174175
return g

lovely/misc.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ new_card.from_copy = true
2323
'''
2424
match_indent = true
2525

26-
# Used to check for Monster from copy_card and update values
27-
# more or less the same patch above but this also applies if strip_edition is true
26+
# Update value of Monsters created via copy_card
2827
[[patches]]
2928
[patches.pattern]
3029
target = 'functions/common_events.lua'
3130
pattern = "if not strip_edition then"
3231
position = 'before'
3332
payload = '''
34-
new_card.checkmonster = true
33+
if new_card.ability.extra.monster then new_card.ability.extra.monster = G.GAME.monstermult end
3534
'''
3635
match_indent = true
3736

0 commit comments

Comments
 (0)