Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions functions/pokefamily.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ local default_family_list = {
{ "zorua", "zoroark" },
{ "deino", "zweilous", "hydreigon" },
{ "litleo", "pyroar" },
{"inkay", "malamar", "mega_malamar"},
{ { key = "pumpkaboo", form = 0 }, { key = "pumpkaboo", form = 1 }, { key = "pumpkaboo", form = 2 }, { key = "pumpkaboo", form = 3 },
{ key = "gourgeist", form = 0 }, { key = "gourgeist", form = 1 }, { key = "gourgeist", form = 2 }, { key = "gourgeist", form = 3 },
},
Expand Down
11 changes: 11 additions & 0 deletions functions/pokefunctions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1432,3 +1432,14 @@ poke_drain_chips = function(card, amount)

return base_drain + bonus_drain
end

-- Multiple Mega Malamar hooks
local cscui = create_shop_card_ui
create_shop_card_ui = function(card, type, area)
local ret = cscui(card, type, area)
if #find_joker("mega_malamar") > 0 and not (card.facing == 'back') then
card.facing = 'back'
card.sprite_facing = 'back'
end
return ret
end
32 changes: 32 additions & 0 deletions localization/en-us.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5106,6 +5106,38 @@ return {
"also contains a {C:attention}King{} or {C:attention}Queen{}"
}
},
j_poke_inkay = {
name = "Inkay",
text = {
"Cards have a {C:green}#1# in #2#{} chance to",
"be drawn {C:attention}face down{}",
"{br:3}ERROR - CONTACT STEAK",
"Played face down cards give",
"{C:red}+#3#{} Mult when scored",
"{C:inactive,s:0.8}(Evolves after triggering face down cards {C:attention,s:0.8}#4#{C:inactive,s:0.8} times)"
}
},
j_poke_malamar = {
name = "Malamar",
text = {
"All cards are drawn {C:attention}face down{}",
"{br:3}ERROR - CONTACT STEAK",
"Played face down cards give",
"{X:red,C:white}X#1#{} Mult when scored",
}
},
j_poke_mega_malamar = {
name = "Mega Malamar",
text = {
"Most cards besides this Joker,",
"its {C:attention}Mega Stone{} and",
"{C:attention}playing cards{} held in hand",
"are {C:attention}face down{}",
"{br:2}ERROR - CONTACT STEAK",
"Played cards give",
"{X:red,C:white}X#1#{} Mult when scored",
}
},
j_poke_sylveon = {
name = 'Sylveon',
text = {
Expand Down
36 changes: 36 additions & 0 deletions lovely/poke_utils.toml
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,39 @@ pattern = "if area == G.consumeables then"
position = "at"
payload = "if area == G.consumeables or area == G.jokers then"
match_indent = true

## Mega Malamar
# flip cards or keep them flipped
[[patches]]
[patches.pattern]
target = "blind.lua"
pattern = '''for k, v in ipairs(G.jokers.cards) do
if v.facing == 'back' then v:flip() end
end'''
position = "at"
payload = '''if #SMODS.find_card("j_poke_mega_malamar") == 0 then
for k, v in ipairs(G.jokers.cards) do
if v.facing == 'back' then v:flip() end
end
end'''
match_indent = true

[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = '''return card'''
position = "before"
match_indent = true
payload = '''if #SMODS.find_card("j_poke_mega_malamar") > 0 and not (card.facing == 'back') then
card.facing = 'back'
card.sprite_facing = 'back'
end
'''

[[patches]]
[patches.pattern]
target = "cardarea.lua"
pattern = '''function CardArea:emplace(card, location, stay_flipped)'''
position = "after"
match_indent = true
payload = '''stay_flipped = stay_flipped or (self ~= G.hand and #SMODS.find_card("j_poke_mega_malamar") > 0)'''
Loading