60 lines
2.1 KiB
Lua
60 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
|
|
local CARD_ID = 79
|
|
____exports.card_79 = __TS__Class()
|
|
local card_79 = ____exports.card_79
|
|
card_79.name = "card_79"
|
|
card_79.____file_path = "scripts/vscripts/cards/examples/card_79.lua"
|
|
__TS__ClassExtends(card_79, CardBase)
|
|
function card_79.prototype.GetModifierName(self)
|
|
return "modifier_card_79"
|
|
end
|
|
card_79 = __TS__Decorate(card_79, card_79, {RegisterCard}, {kind = "class", name = "card_79"})
|
|
____exports.card_79 = card_79
|
|
____exports.modifier_card_79 = __TS__Class()
|
|
local modifier_card_79 = ____exports.modifier_card_79
|
|
modifier_card_79.name = "modifier_card_79"
|
|
modifier_card_79.____file_path = "scripts/vscripts/cards/examples/card_79.lua"
|
|
__TS__ClassExtends(modifier_card_79, CardBaseModifier)
|
|
function modifier_card_79.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:ScheduleRepeatNextSelectedCardOnce()
|
|
return nil
|
|
end
|
|
)
|
|
end
|
|
function modifier_card_79.prototype.IsHidden(self)
|
|
return true
|
|
end
|
|
modifier_card_79 = __TS__Decorate(
|
|
modifier_card_79,
|
|
modifier_card_79,
|
|
{registerModifier(nil)},
|
|
{kind = "class", name = "modifier_card_79"}
|
|
)
|
|
____exports.modifier_card_79 = modifier_card_79
|
|
return ____exports
|