Files
Dota-Zombie-Invasion/scripts/vscripts/cards/examples/card_57.lua
T
2026-05-29 15:11:31 +07:00

59 lines
2.1 KiB
Lua

local ____lualib = require("lualib_bundle")
local __TS__Class = ____lualib.__TS__Class
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
local __TS__Decorate = ____lualib.__TS__Decorate
local ____exports = {}
local ____CardSystem = require("cards.CardSystem")
local CardBase = ____CardSystem.CardBase
local RegisterCard = ____CardSystem.RegisterCard
local ____CardBaseModifier = require("cards.CardBaseModifier")
local CardBaseModifier = ____CardBaseModifier.CardBaseModifier
local ____dota_ts_adapter = require("lib.dota_ts_adapter")
local registerModifier = ____dota_ts_adapter.registerModifier
____exports.card_57 = __TS__Class()
local card_57 = ____exports.card_57
card_57.name = "card_57"
card_57.____file_path = "scripts/vscripts/cards/examples/card_57.lua"
__TS__ClassExtends(card_57, CardBase)
function card_57.prototype.GetModifierName(self)
return "modifier_card_57"
end
card_57 = __TS__Decorate(card_57, card_57, {RegisterCard}, {kind = "class", name = "card_57"})
____exports.card_57 = card_57
____exports.modifier_card_57 = __TS__Class()
local modifier_card_57 = ____exports.modifier_card_57
modifier_card_57.name = "modifier_card_57"
modifier_card_57.____file_path = "scripts/vscripts/cards/examples/card_57.lua"
__TS__ClassExtends(modifier_card_57, CardBaseModifier)
function modifier_card_57.prototype.OnCustomCreated(self, params)
if not IsServer() then
return
end
local hero = self:GetParent()
if not hero or not IsValidEntity(hero) or not hero:IsRealHero() then
return
end
Timers:CreateTimer(
0,
function()
local player = hero:GetPlayerOwner()
if not player or not player.cardSystem then
return nil
end
player.cardSystem:DuplicateCurrentPool()
return nil
end
)
end
function modifier_card_57.prototype.IsHidden(self)
return true
end
modifier_card_57 = __TS__Decorate(
modifier_card_57,
modifier_card_57,
{registerModifier(nil)},
{kind = "class", name = "modifier_card_57"}
)
____exports.modifier_card_57 = modifier_card_57
return ____exports