From 4b4bbdc08009cad27b124f1a0508f0d445f883db Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Sat, 18 Jan 2025 19:05:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E9=80=BB=E8=BE=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/game/mod/order/OrderFunc.go | 42 +++++++++++++++++--------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/src/server/game/mod/order/OrderFunc.go b/src/server/game/mod/order/OrderFunc.go index ccf49c71..12b35f6d 100644 --- a/src/server/game/mod/order/OrderFunc.go +++ b/src/server/game/mod/order/OrderFunc.go @@ -56,8 +56,8 @@ func getChessDiff(ChessNum, OrderDiff, OrderN int) map[int]int { switch OrderDiff { case diff_low: rand := map[int]int{ - diff_low: 99, - diff_mid: 1, + diff_low: 99 - OrderN, + diff_mid: 1 + OrderN, } secondDiff := GoUtil.RandMap(rand) rs = map[int]int{ @@ -66,8 +66,8 @@ func getChessDiff(ChessNum, OrderDiff, OrderN int) map[int]int { } case diff_mid: rand := map[int]int{ - diff_low: 5, - diff_mid: 95, + diff_low: 5 + OrderN, + diff_mid: 95 - OrderN, } secondDiff := GoUtil.RandMap(rand) rs = map[int]int{ @@ -90,37 +90,51 @@ func getChessDiff(ChessNum, OrderDiff, OrderN int) map[int]int { switch OrderDiff { case diff_low: rand := map[int]int{ - diff_low: 99, - diff_mid: 1, + diff_low: 95 - OrderN, + diff_mid: 5 + OrderN, } secondDiff := GoUtil.RandMap(rand) + rand = map[int]int{ + diff_low: 60 - 4*OrderN, + diff_mid: 40 + 4*OrderN, + } + thirdDiff := GoUtil.RandMap(rand) rs = map[int]int{ 1: diff_low, 2: secondDiff, - 3: secondDiff, + 3: thirdDiff, } case diff_mid: rand := map[int]int{ - diff_low: 5, - diff_mid: 95, + diff_low: 50 - 3*OrderN, + diff_mid: 50 + 3*OrderN, } secondDiff := GoUtil.RandMap(rand) + rand = map[int]int{ + diff_mid: 95 - 4*OrderN, + diff_high: 5 + 4*OrderN, + } + thirdDiff := GoUtil.RandMap(rand) rs = map[int]int{ 1: diff_low, 2: secondDiff, - 3: secondDiff, + 3: thirdDiff, } case diff_high: rand := map[int]int{ - diff_low: int(95 - 10*OrderN), - diff_mid: int(4 + 6*OrderN), - diff_high: int(1 + 4*OrderN), + diff_low: int(95 - 10*OrderN), + diff_mid: int(5 + 10*OrderN), } secondDiff := GoUtil.RandMap(rand) + rand = map[int]int{ + diff_mid: int(95 - 8*OrderN), + diff_high: int(5 + 8*OrderN), + } + thirdDiff := GoUtil.RandMap(rand) rs = map[int]int{ 1: diff_low, 2: secondDiff, - 3: secondDiff, + 3: thirdDiff, } } }