diff --git a/assets/1x/Basic Series/AtlasStickersBasic.png b/assets/1x/Basic Series/AtlasStickersBasic.png index dc1227dc8..707d24b5b 100644 Binary files a/assets/1x/Basic Series/AtlasStickersBasic.png and b/assets/1x/Basic Series/AtlasStickersBasic.png differ diff --git a/assets/2x/Basic Series/AtlasStickersBasic.png b/assets/2x/Basic Series/AtlasStickersBasic.png index 07d7d1ed9..4e8c33a8b 100644 Binary files a/assets/2x/Basic Series/AtlasStickersBasic.png and b/assets/2x/Basic Series/AtlasStickersBasic.png differ diff --git a/assets/sounds/pokerus_sound.wav b/assets/sounds/pokerus_sound.wav new file mode 100644 index 000000000..79a63f443 Binary files /dev/null and b/assets/sounds/pokerus_sound.wav differ diff --git a/functions/pokefunctions.lua b/functions/pokefunctions.lua index 25aa72135..59b0f5fa6 100644 --- a/functions/pokefunctions.lua +++ b/functions/pokefunctions.lua @@ -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 diff --git a/localization/en-us.lua b/localization/en-us.lua index bdf480045..cf229a286 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -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", diff --git a/pokesprites.lua b/pokesprites.lua index 177ba5000..f7fc62385 100644 --- a/pokesprites.lua +++ b/pokesprites.lua @@ -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) diff --git a/stickers/stickers.lua b/stickers/stickers.lua index 799ed437d..277bcb17c 100644 --- a/stickers/stickers.lua +++ b/stickers/stickers.lua @@ -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",