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
Binary file modified assets/1x/Basic Series/AtlasStickersBasic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/Basic Series/AtlasStickersBasic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/sounds/pokerus_sound.wav
Binary file not shown.
2 changes: 1 addition & 1 deletion functions/pokefunctions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ poke_backend_evolve = function(card, to_key, energize_amount)
if values_to_keep["form"] and type(new_card.set_ability) == 'function' then
new_card:set_ability(card)
end
if card.ability.extra.energy_count or card.ability.extra.c_energy_count then
if card.ability.extra.energy_count or card.ability.extra.c_energy_count and not card.ability.poke_pokerus then
energize(card, nil, true, true)
end
end
Expand Down
10 changes: 10 additions & 0 deletions localization/en-us.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6431,6 +6431,16 @@ return {
"{X:bird,C:white}Bird{}",
}
},
poke_pokerus = {
name = "Pokérus",
text = {
"This Joker is always",
"fully {C:pink}energized{}",
"{br:3}ERROR - CONTACT STEAK",
"{C:green}25%{} to spread",
"at end of round"
}
},
--infoqueue used for things like kabuto and omanyte
ancient = {
name = "Ancient",
Expand Down
5 changes: 5 additions & 0 deletions pokesprites.lua
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,11 @@ for i = 1, 5 do
})
end

SMODS.Sound({
key = "pokerus_sound",
path = "pokerus_sound.wav"
})

--Custom colors for Types (humplydinkle wuz here)
local pokecolors = loc_colour
function loc_colour(_c, _default)
Expand Down
52 changes: 52 additions & 0 deletions stickers/stickers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,58 @@ local bird_sticker = {

table.insert(type_stickers, bird_sticker)

local pokerus = {
key = 'pokerus',
badge_colour = HEX('d67bff'),
atlas = "AtlasStickersBasic",
pos = { x = 6, y = 1 },
should_apply = function(self, card, center, area, bypass_roll)
return (not (pokermon_config.unlimited_energy or card.config.center.no_energy_limit)) and card.ability.set == "Joker" and pseudorandom("poke_pokerus") < 1/4096
end,
apply = function(self, card, val)
card.ability[self.key] = val
G.E_MANAGER:add_event(Event({
trigger = "after",
time = 0.2,
func = function()
energy_increase(card, get_type(card), (energy_max + (G.GAME.energy_plus or 0) +
(type(card.ability.extra) == "table" and card.ability.extra.e_limit_up or 0)) - get_total_energy(card), true)
play_sound('poke_pokerus_sound', 1, 0.2)
card:juice_up(1, 0.5)
return true
end
}))
end,
calculate = function(self, card, context)
-- at any time, energize to max
if get_total_energy(card) < (energy_max + (G.GAME.energy_plus or 0) + (type(card.ability.extra) == "table" and card.ability.extra.e_limit_up or 0)) then
energy_increase(card, get_type(card), energy_max + (G.GAME.energy_plus or 0) +
(type(card.ability.extra) == "table" and card.ability.extra.e_limit_up or 0) - get_total_energy(card), true)
end

-- spread
if not context.repetition and not context.individual and context.end_of_round and not context.blueprint and pseudorandom("poke_spread_pokerus") < 1/4 then
local valid = {}
for i = 1, #G.jokers.cards do
if G.jokers.cards[i].ability and G.jokers.cards[i].ability.set == "Joker" and not (G.jokers.cards[i].ability.maelmc_pokerus) then
table.insert(valid,G.jokers.cards[i])
end
end
local to_rus = pseudorandom_element(valid,"poke_joker_to_pokerus")
if to_rus then
to_rus.ability.maelmc_pokerus = true
to_rus.ability.just_rus = true
end
end

if context.setting_blind and card.ability.just_rus then
card.ability.just_rus = nil
end
end
}

table.insert(type_stickers, pokerus)

return
{
name = "Stickers",
Expand Down