Make "Faster Planets" really really really fast

This commit is contained in:
Emik 2026-05-23 18:59:24 +02:00
parent f611e700dc
commit a004206e5d
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
2 changed files with 20 additions and 2 deletions

View file

@ -6,7 +6,7 @@
"author": [ "author": [
"Emik" "Emik"
], ],
"version": "2.5.9", "version": "2.5.10",
"badge_colour": "8BE9FD", "badge_colour": "8BE9FD",
"main_file": "src/main.lua", "main_file": "src/main.lua",
"badge_text_colour": "44475A", "badge_text_colour": "44475A",

View file

@ -17,7 +17,6 @@ function Card:use_consumeable(area, copier, ...)
if SMODS.Mods.Roland.config.faster_planets and self.ability.consumeable.hand_type then if SMODS.Mods.Roland.config.faster_planets and self.ability.consumeable.hand_type then
set_consumeable_usage(self) set_consumeable_usage(self)
level_up_hand(copier or self, self.ability.consumeable.hand_type, true) level_up_hand(copier or self, self.ability.consumeable.hand_type, true)
self:remove()
return return
end end
@ -52,6 +51,25 @@ function Card:use_consumeable(area, copier, ...)
} }
end end
local orig_use_card = G.FUNCS.use_card
function G.FUNCS.use_card(e, ...)
if not SMODS.Mods.Roland.config.faster_planets or
not (((e.config.ref_table or {}).ability or {}).consumeable or {}).hand_type then
return orig_use_card(e, ...)
end
e.config.ref_table:use_consumeable(e.config.ref_table.area)
SMODS.calculate_context {
using_consumeable = true,
consumeable = e.config.ref_table,
area = e.config.ref_table.from_area,
}
e.config.ref_table:remove()
end
local orig_create_card_for_shop = create_card_for_shop local orig_create_card_for_shop = create_card_for_shop
function create_card_for_shop(...) function create_card_for_shop(...)