From 6f227e06e1ff2e972b78da0598ebd2a35054109c Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Fri, 31 Oct 2025 17:42:43 +0800 Subject: [PATCH] fix bug --- lua/app/config/buff.lua | 3 ++ lua/app/config/chapter_daily_challenge.lua | 32 +++++++++++----------- lua/app/global/global_func.lua | 4 ++- 3 files changed, 22 insertions(+), 17 deletions(-) diff --git a/lua/app/config/buff.lua b/lua/app/config/buff.lua index b1cf24ae..51b0769c 100644 --- a/lua/app/config/buff.lua +++ b/lua/app/config/buff.lua @@ -335,6 +335,7 @@ local buff = { ["decr"]=2, ["icon"]="normal_attack_dec", ["show_name"]=true, + ["is_percent"]=2, ["fx_get"]={ 32 } @@ -347,6 +348,7 @@ local buff = { ["decr"]=1, ["icon"]="normal_attack_add", ["show_name"]=true, + ["is_percent"]=2, ["fx_get"]={ 30 } @@ -1011,6 +1013,7 @@ local buff = { ["decr"]=3, ["icon"]="normal_attack_add", ["show_name"]=true, + ["is_percent"]=2, ["fx_get"]={ 30 } diff --git a/lua/app/config/chapter_daily_challenge.lua b/lua/app/config/chapter_daily_challenge.lua index 7e415340..cd87bdeb 100644 --- a/lua/app/config/chapter_daily_challenge.lua +++ b/lua/app/config/chapter_daily_challenge.lua @@ -1,6 +1,6 @@ local chapter_daily_challenge = { [1]={ - ["max_chapter"]=2, + ["max_chapter"]=11, ["icon"]="chapter_4", ["scene"]="bg_4", ["block_icon"]="battle_hinder_4", @@ -191,7 +191,7 @@ local chapter_daily_challenge = { } }, [2]={ - ["max_chapter"]=5, + ["max_chapter"]=15, ["icon"]="chapter_5", ["scene"]="bg_5", ["block_icon"]="battle_hinder_5", @@ -382,7 +382,7 @@ local chapter_daily_challenge = { } }, [3]={ - ["max_chapter"]=8, + ["max_chapter"]=19, ["icon"]="chapter_1", ["scene"]="bg_1", ["block_icon"]="battle_hinder_6", @@ -573,7 +573,7 @@ local chapter_daily_challenge = { } }, [4]={ - ["max_chapter"]=11, + ["max_chapter"]=23, ["icon"]="chapter_2", ["scene"]="bg_2", ["block_icon"]="battle_hinder_7", @@ -764,7 +764,7 @@ local chapter_daily_challenge = { } }, [5]={ - ["max_chapter"]=15, + ["max_chapter"]=27, ["icon"]="chapter_3", ["scene"]="bg_3", ["block_icon"]="battle_hinder_3", @@ -955,7 +955,7 @@ local chapter_daily_challenge = { } }, [6]={ - ["max_chapter"]=19, + ["max_chapter"]=32, ["icon"]="chapter_4", ["scene"]="bg_4", ["block_icon"]="battle_hinder_4", @@ -1146,7 +1146,7 @@ local chapter_daily_challenge = { } }, [7]={ - ["max_chapter"]=23, + ["max_chapter"]=42, ["icon"]="chapter_1", ["scene"]="bg_1", ["block_icon"]="battle_hinder_1", @@ -1337,7 +1337,7 @@ local chapter_daily_challenge = { } }, [8]={ - ["max_chapter"]=27, + ["max_chapter"]=47, ["icon"]="chapter_2", ["scene"]="bg_2", ["block_icon"]="battle_hinder_2", @@ -1528,7 +1528,7 @@ local chapter_daily_challenge = { } }, [9]={ - ["max_chapter"]=32, + ["max_chapter"]=52, ["icon"]="chapter_3", ["scene"]="bg_3", ["block_icon"]="battle_hinder_3", @@ -1719,7 +1719,7 @@ local chapter_daily_challenge = { } }, [10]={ - ["max_chapter"]=37, + ["max_chapter"]=67, ["icon"]="chapter_1", ["scene"]="bg_1", ["block_icon"]="battle_hinder_1", @@ -1910,7 +1910,7 @@ local chapter_daily_challenge = { } }, [11]={ - ["max_chapter"]=42, + ["max_chapter"]=37, ["icon"]="chapter_5", ["scene"]="bg_5", ["block_icon"]="battle_hinder_5", @@ -2101,7 +2101,7 @@ local chapter_daily_challenge = { } }, [12]={ - ["max_chapter"]=47, + ["max_chapter"]=62, ["icon"]="chapter_5", ["scene"]="bg_5", ["block_icon"]="battle_hinder_5", @@ -2292,7 +2292,7 @@ local chapter_daily_challenge = { } }, [13]={ - ["max_chapter"]=52, + ["max_chapter"]=72, ["icon"]="chapter_2", ["scene"]="bg_2", ["block_icon"]="battle_hinder_2", @@ -2483,7 +2483,7 @@ local chapter_daily_challenge = { } }, [14]={ - ["max_chapter"]=57, + ["max_chapter"]=77, ["icon"]="chapter_3", ["scene"]="bg_3", ["block_icon"]="battle_hinder_3", @@ -2674,7 +2674,7 @@ local chapter_daily_challenge = { } }, [15]={ - ["max_chapter"]=62, + ["max_chapter"]=82, ["icon"]="chapter_4", ["scene"]="bg_4", ["block_icon"]="battle_hinder_4", @@ -2865,7 +2865,7 @@ local chapter_daily_challenge = { } }, [16]={ - ["max_chapter"]=67, + ["max_chapter"]=87, ["icon"]="chapter_5", ["scene"]="bg_5", ["block_icon"]="battle_hinder_5", diff --git a/lua/app/global/global_func.lua b/lua/app/global/global_func.lua index 14fcc3bb..c20feaa2 100644 --- a/lua/app/global/global_func.lua +++ b/lua/app/global/global_func.lua @@ -2083,8 +2083,10 @@ end function GFunc.getFinalBuffValue(buffName, attrNum, decimal) local cfg = ConfigManager:getConfigWithOtherKey("buff", "name")[buffName] - if cfg and cfg.is_percent then + if cfg and cfg.is_percent and cfg.is_percent == 1 then return GFunc.num2Str(attrNum / 100, decimal) .. "%" + elseif cfg and cfg.is_percent and cfg.is_percent == 2 then + return attrNum else return attrNum // GConst.DEFAULT_FACTOR end