57 lines
2.0 KiB
Lua
57 lines
2.0 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 AddCardToPlayerPool = ____CardSystem.AddCardToPlayerPool
|
|
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_data = require("cards.card_data")
|
|
local CARD_DATABASE = ____card_data.CARD_DATABASE
|
|
____exports.card_4 = __TS__Class()
|
|
local card_4 = ____exports.card_4
|
|
card_4.name = "card_4"
|
|
card_4.____file_path = "scripts/vscripts/cards/examples/card_new.lua"
|
|
__TS__ClassExtends(card_4, CardBase)
|
|
function card_4.prototype.GetModifierName(self)
|
|
return "modifier_card_4"
|
|
end
|
|
card_4 = __TS__Decorate(card_4, card_4, {RegisterCard}, {kind = "class", name = "card_4"})
|
|
____exports.card_4 = card_4
|
|
____exports.modifier_card_4 = __TS__Class()
|
|
local modifier_card_4 = ____exports.modifier_card_4
|
|
modifier_card_4.name = "modifier_card_4"
|
|
modifier_card_4.____file_path = "scripts/vscripts/cards/examples/card_new.lua"
|
|
__TS__ClassExtends(modifier_card_4, CardBaseModifier)
|
|
function modifier_card_4.prototype.OnCreated(self, params)
|
|
self:Destroy()
|
|
end
|
|
function modifier_card_4.prototype.OnDestroy(self)
|
|
if IsClient() then
|
|
return
|
|
end
|
|
local cardData = CARD_DATABASE[4]
|
|
local player = self:GetParent():GetPlayerOwner()
|
|
local ____ = cardData.values.damage_pct
|
|
AddCardToPlayerPool(
|
|
nil,
|
|
player:GetPlayerID(),
|
|
3,
|
|
1,
|
|
10
|
|
)
|
|
end
|
|
modifier_card_4 = __TS__Decorate(
|
|
modifier_card_4,
|
|
modifier_card_4,
|
|
{registerModifier(nil)},
|
|
{kind = "class", name = "modifier_card_4"}
|
|
)
|
|
____exports.modifier_card_4 = modifier_card_4
|
|
return ____exports
|