55 lines
2.2 KiB
Lua
55 lines
2.2 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 ____hero_rage = require("abilities.system.hero_rage")
|
|
local heroRageGetModifier = ____hero_rage.heroRageGetModifier
|
|
local CARD_ID = 72
|
|
____exports.card_72 = __TS__Class()
|
|
local card_72 = ____exports.card_72
|
|
card_72.name = "card_72"
|
|
card_72.____file_path = "scripts/vscripts/cards/examples/card_72.lua"
|
|
__TS__ClassExtends(card_72, CardBase)
|
|
function card_72.prototype.GetModifierName(self)
|
|
return "modifier_card_72"
|
|
end
|
|
card_72 = __TS__Decorate(card_72, card_72, {RegisterCard}, {kind = "class", name = "card_72"})
|
|
____exports.card_72 = card_72
|
|
____exports.modifier_card_72 = __TS__Class()
|
|
local modifier_card_72 = ____exports.modifier_card_72
|
|
modifier_card_72.name = "modifier_card_72"
|
|
modifier_card_72.____file_path = "scripts/vscripts/cards/examples/card_72.lua"
|
|
__TS__ClassExtends(modifier_card_72, CardBaseModifier)
|
|
function modifier_card_72.prototype.DeclareFunctions(self)
|
|
return {MODIFIER_PROPERTY_COOLDOWN_PERCENTAGE, MODIFIER_PROPERTY_TOOLTIP}
|
|
end
|
|
function modifier_card_72.prototype.GetModifierPercentageCooldown(self)
|
|
if not IsServer() then
|
|
return 0
|
|
end
|
|
local hero = self:GetParent()
|
|
if not hero or not IsValidEntity(hero) or not hero:IsRealHero() then
|
|
return 0
|
|
end
|
|
if not heroRageGetModifier(nil, hero) then
|
|
return 0
|
|
end
|
|
return self:getScaledCardValue("cooldown_reduction_pct", 15, CARD_ID)
|
|
end
|
|
modifier_card_72 = __TS__Decorate(
|
|
modifier_card_72,
|
|
modifier_card_72,
|
|
{registerModifier(nil)},
|
|
{kind = "class", name = "modifier_card_72"}
|
|
)
|
|
____exports.modifier_card_72 = modifier_card_72
|
|
return ____exports
|