34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
![]() |
--> Services
|
||
|
local ReplicatedStorage = game:GetService("ReplicatedStorage")
|
||
|
local ServerStorage = game:GetService("ServerStorage")
|
||
|
|
||
|
--> Dependencies
|
||
|
local Utils = require(ReplicatedStorage.Tools.Utils)
|
||
|
local TypeList = require(ServerStorage.Base.TypeList)
|
||
|
local Rune = require(ServerStorage.Base.Rune)
|
||
|
|
||
|
local RuneShadowDamage = {}
|
||
|
RuneShadowDamage.__index = RuneShadowDamage
|
||
|
setmetatable(RuneShadowDamage, {__index = Rune})
|
||
|
|
||
|
|
||
|
function RuneShadowDamage:Init(PlayerAI, Character: TypeList.Character)
|
||
|
local self = Rune:Init(PlayerAI, Character, script.Name)
|
||
|
setmetatable(self, RuneShadowDamage)
|
||
|
|
||
|
return self
|
||
|
end
|
||
|
|
||
|
function RuneShadowDamage:Check(index: number, AttributesData: table, BehaviorNameList: table)
|
||
|
return true
|
||
|
end
|
||
|
|
||
|
function RuneShadowDamage:OnExecute(index: number, AttributesData: table, BehaviorNameList: table)
|
||
|
local baseAttribute = AttributesData.shadowAtk or 100
|
||
|
local addAttribute = math.floor(baseAttribute * 50 / 100)
|
||
|
Utils:TableSafeAddValue(AttributesData, "shadowAtk", addAttribute)
|
||
|
return nil
|
||
|
end
|
||
|
|
||
|
|
||
|
return RuneShadowDamage
|