PGRData/Script/matrix/xredpoint/xredpointconditions/XRedPointConditionRogueLikeMain.lua

24 lines
754 B
Lua
Raw Normal View History

----------------------------------------------------------------
--roguelike爬塔每日行动力不为零的红点检测
local XRedPointConditionRogueLikeMain = {}
local Events = nil
function XRedPointConditionRogueLikeMain.GetSubEvents()
Events = Events or
{
XRedPointEventElement.New(XEventId.EVENT_ROGUELIKE_ACTIONPOINT_CHARACTER_CHANGED),
}
return Events
end
function XRedPointConditionRogueLikeMain.Check()
local isOpen = XActivityBrieIsOpen.Get(XActivityBriefConfigs.ActivityGroupId.RougueLike)
if isOpen then
local actionPoint = XDataCenter.FubenRogueLikeManager.GetRogueLikeActionPoint()
return actionPoint > 0
else
return false
end
end
return XRedPointConditionRogueLikeMain