fixed a missing parenthesis, added baseline non encrypted tables from tadb, added function for loading tables from file without kv or encryption
This commit is contained in:
@@ -112,6 +112,6 @@ function public:GetModifierOverrideAbilitySpecialValue( params )
|
||||
elseif abilityName == "thtd_minoriko_02" then
|
||||
-- local bonus = math.max(0, math.floor((self:GetParent():GetPhysicalArmorBaseValue() - 100)/50))
|
||||
-- return params.ability:GetLevelSpecialValueNoOverride(valueName, specialLevel) + power_bonus[abilityName][level][valueName] + bonus
|
||||
return math.floor(params.ability:GetLevelSpecialValueNoOverride(valueName, specialLevel) + power_bonus[abilityName][level][valueName]
|
||||
return math.floor(params.ability:GetLevelSpecialValueNoOverride(valueName, specialLevel) + power_bonus[abilityName][level][valueName])
|
||||
end
|
||||
end
|
||||
@@ -13,14 +13,12 @@ thtd_exp_star_table={1,2/3,1/3,1/5,1/15}
|
||||
|
||||
towerPlayerList = {[1] = {}, [2] = {}, [3] = {},[4] = {}}
|
||||
|
||||
towerNameList = table.loadkv("scripts/npc/tower.txt")
|
||||
|
||||
local thtd_power_table = table.loadkv("scripts/npc/power_table.txt")
|
||||
local thtd_attack_factor = table.loadkv("scripts/npc/attack_factor.txt")
|
||||
local thtd_ability_table = table.loadkv("scripts/npc/ability_table.txt")
|
||||
local thtd_combo_table = table.loadkv("scripts/npc/combo_table.txt")
|
||||
|
||||
towerNameList = table.fromfile("scripts/mpc/tower.txt")
|
||||
|
||||
local thtd_power_table = table.fromfile("scripts/npc/power_table.txt")
|
||||
local thtd_attack_factor = table.fromfile("scripts/npc/attack_factor.txt")
|
||||
local thtd_ability_table = table.fromfile("scripts/npc/ability_table.txt")
|
||||
local thtd_combo_table = table.fromfile("scripts/npc/combo_table.txt")
|
||||
|
||||
--------------------------------------------------
|
||||
|
||||
|
||||
@@ -422,6 +422,12 @@ end
|
||||
return table.fromstring(string.decode(string.loadkvfile(path), SERVER_KEY))
|
||||
end
|
||||
|
||||
-- Should read a lua table string from a file and return the table again, we'll see when it's tested
|
||||
function table.fromfile(path)
|
||||
local file = io.open(path, "r")
|
||||
return table.fromstring(file:read("a"))
|
||||
end
|
||||
|
||||
-- 获取表中值元素的长度,不计nil
|
||||
function table.count(t)
|
||||
if type(t) ~= "table" then
|
||||
|
||||
Reference in New Issue
Block a user