25 lines
912 B
Lua
Raw Permalink Normal View History

2025-01-04 23:00:19 +08:00
local BuffAction_AddHealth = {
BuffColor = {R = 0.4, G = 1., B = 0.1, A = 1.};
--BuffIconPath = UGCGameSystem.GetUGCResourcesFullPath('Asset/Texture/BUFFIcon/T_AddHealth.T_AddHealth');
--BuffParticlePath = UGCGameSystem.GetUGCResourcesFullPath('Asset/FX/P_AddHealth.P_AddHealth');
BuffDesc = "玩家回复一定的生命值";
bEnableTick = true;
bRunOnce = true; -- 是否是只执行一次
PlayerKey = {};
}
function BuffAction_AddHealth:ApplyBuff(BuffTag, ValidPawn, AddHealth)
print(string.format('[BuffAction_AddHealth:ApplyBuff] 执行AddHealth = %s', tostring(AddHealth)));
UGCPawnAttrSystem.SetHealth(ValidPawn, UGCPawnAttrSystem.GetHealth(ValidPawn) + AddHealth);
self.PlayerKey = {
[1] = ValidPawn.PlayerKey;
}
return true;
end
function BuffAction_AddHealth:GetBenefitPlayer()
return self.PlayerKey;
end
return BuffAction_AddHealth;