36 lines
		
	
	
		
			871 B
		
	
	
	
		
			Lua
		
	
			
		
		
	
	
			36 lines
		
	
	
		
			871 B
		
	
	
	
		
			Lua
		
	
 | 
						|
 | 
						|
local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
 | 
						|
 | 
						|
Condition_Prop_Type = {
 | 
						|
    LV_100 = 1,
 | 
						|
    ELE_TEAM_ADD = 2,
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
Condition_Prop_Func = {
 | 
						|
    [Condition_Prop_Type.LV_100] = function(ower, target, propList, args)
 | 
						|
        
 | 
						|
        local list = {}
 | 
						|
        if ower.tId == target.tId then  -- 只对自己生效
 | 
						|
            local forNum = target.lv - 100
 | 
						|
            if forNum > 0 then
 | 
						|
                for propId, value in pairs(propList) do
 | 
						|
                    list[propId] = value * forNum
 | 
						|
                end
 | 
						|
            end
 | 
						|
        end
 | 
						|
        return list
 | 
						|
    end,
 | 
						|
 | 
						|
    [Condition_Prop_Type.ELE_TEAM_ADD] = function(ower, target, propList, args)
 | 
						|
        -- 
 | 
						|
        local config = heroConfig[target.tId]
 | 
						|
        -- 判断元素是否符合条件
 | 
						|
        if config and args and config == args[4] then
 | 
						|
            return propList
 | 
						|
        end
 | 
						|
    end
 | 
						|
 | 
						|
 | 
						|
} |