File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ enabled: false
7676源码构建后,MatrixShop 当前会输出带重定位 bStats 的运行产物:
7777
7878` ` ` text
79- build/libs/MatrixShop-1.3 .0-all.jar
79+ build/libs/MatrixShop-1.4 .0-all.jar
8080```
8181
8282` org.bstats ` 已被重定位到插件私有包名下,避免和其他同样使用 bStats 的插件产生类冲突。
Original file line number Diff line number Diff line change @@ -77,6 +77,77 @@ name: '&f铁剑'
7777- ` lore`
7878- ` currency`
7979
80+ ` price` 当前支持两种写法:
81+
82+ ` ` ` yaml
83+ price: 120
84+ ` ` `
85+
86+ ` ` ` yaml
87+ price:
88+ base: 120
89+ discounts:
90+ - id: vip
91+ percent: 10
92+ condition:
93+ - "perm 'group.vip'"
94+ - id: event
95+ amount-off: 5
96+ - id: night-surge
97+ surcharge: 8
98+ ` ` `
99+
100+ 折扣规则说明:
101+
102+ - ` percent`
103+ - 百分比折扣,多个命中规则按百分比相加
104+ - ` amount-off`
105+ - 固定减免
106+ - ` surcharge`
107+ - 固定加价
108+ - ` condition`
109+ - Kether 条件列表,不写则视为始终命中
110+ - ` whitelist`
111+ - 指定当前规则只允许与哪些折扣 id 叠加
112+ - ` blacklist`
113+ - 指定当前规则不能与哪些折扣 id 叠加
114+
115+ 当前行为:
116+
117+ - 百分比折扣总和上限为 `100`
118+ - 最终成交价不会低于一个最小正价
119+ - 商品页、确认页和实际扣费都使用折后最终价
120+
121+ 叠加控制示例:
122+
123+ ` ` ` yaml
124+ price:
125+ base: 420
126+ discounts:
127+ - id: vip
128+ percent: 10
129+ condition:
130+ - "perm 'group.vip'"
131+ - id: svip
132+ percent: 15
133+ blacklist:
134+ - vip
135+ condition:
136+ - "perm 'group.svip'"
137+ - id: mvp
138+ percent: 20
139+ blacklist:
140+ - svip
141+ condition:
142+ - "perm 'group.mvp'"
143+ ` ` `
144+
145+ 按上面这个例子:
146+
147+ - ` SVIP` 命中时不会再叠加 `VIP`
148+ - ` MVP` 命中时不会再叠加 `SVIP`
149+ - 如果你希望某条规则只允许和特定折扣共存,可以改用 `whitelist`
150+
80151` goods` 目录当前还支持两种可复用资源:
81152
82153- 商品组
@@ -171,6 +242,8 @@ icons:
171242- ` groups.<id>.goods`
172243 - 非随机模式下直接引用静态商品或商品组
173244
245+ 刷新池条目的 `price` 同样支持对象结构,并会与商品本体中的 `discounts` 合并结算。
246+
174247默认资源里已经带了一个关闭状态的注释示例:
175248
176249- ` SystemShop/shops/weapon.yml`
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ sidebar_position: 1
2121
2222如果你正在从 ` 1.0.0 ` 升级,请先阅读:
2323
24+ - [ 1.4.0 发布说明] ( ./release-notes-1-4-0 )
2425- [ 1.3.0 发布说明] ( ./release-notes-1-3-0 )
2526- [ 1.2.0 发布说明] ( ./release-notes-1-2-0 )
2627- [ 1.1.1 发布说明] ( ./release-notes-1-1-1 )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ MatrixShop 是面向生存、经济和市场场景的模块化交易插件。当
1010
1111当前最新版本入口:
1212
13- - [ 1.3 .0 发布说明] ( ./release-notes-1-3 -0 )
13+ - [ 1.4 .0 发布说明] ( ./release-notes-1-4 -0 )
1414- [ 更新日志总览] ( ./release-notes )
1515
1616## 当前版本状态
@@ -69,7 +69,7 @@ MatrixShop 是面向生存、经济和市场场景的模块化交易插件。当
6969如果你第一次接触 MatrixShop,推荐顺序是:
7070
71711 . [ 快速开始] ( ./quick-start )
72- 2 . [ 1.3 .0 发布说明] ( ./release-notes-1-3 -0 )
72+ 2 . [ 1.4 .0 发布说明] ( ./release-notes-1-4 -0 )
73733 . [ 配置结构] ( ./configuration-structure )
74744 . [ 经济模块] ( ./economy )
75755 . [ 命令与权限] ( ./commands-and-permissions )
@@ -105,6 +105,7 @@ MatrixShop 是面向生存、经济和市场场景的模块化交易插件。当
105105
106106### 更新日志
107107
108+ - [ 1.4.0 发布说明] ( ./release-notes-1-4-0 )
108109- [ 1.3.0 发布说明] ( ./release-notes-1-3-0 )
109110- [ 1.2.0 发布说明] ( ./release-notes-1-2-0 )
110111- [ 1.1.1 发布说明] ( ./release-notes-1-1-1 )
@@ -120,6 +121,7 @@ MatrixShop 是面向生存、经济和市场场景的模块化交易插件。当
120121
121122如果你是从 ` 1.0.0 ` 升级,请先看:
122123
124+ - [ 1.4.0 发布说明] ( ./release-notes-1-4-0 )
123125- [ 1.3.0 发布说明] ( ./release-notes-1-3-0 )
124126- [ 1.2.0 发布说明] ( ./release-notes-1-2-0 )
125127- [ 1.1.1 发布说明] ( ./release-notes-1-1-1 )
Original file line number Diff line number Diff line change @@ -11,13 +11,14 @@ sidebar_position: 0
1111
1212如果你准备升级,建议按从新到旧的顺序阅读:
1313
14- 1 . [ 1.3.0 发布说明] ( ./release-notes-1-3-0 )
15- 2 . [ 1.2.0 发布说明] ( ./release-notes-1-2-0 )
16- 3 . [ 1.1.1 发布说明] ( ./release-notes-1-1-1 )
17- 4 . [ 1.1.0 发布说明] ( ./release-notes-1-1-0 )
14+ 1 . [ 1.4.0 发布说明] ( ./release-notes-1-4-0 )
15+ 2 . [ 1.3.0 发布说明] ( ./release-notes-1-3-0 )
16+ 3 . [ 1.2.0 发布说明] ( ./release-notes-1-2-0 )
17+ 4 . [ 1.1.1 发布说明] ( ./release-notes-1-1-1 )
18+ 5 . [ 1.1.0 发布说明] ( ./release-notes-1-1-0 )
1819
1920## 阅读建议
2021
21- - 想看当前最新功能和验证结果:先看 [ 1.3 .0 发布说明] ( ./release-notes-1-3 -0 )
22- - 想看管理员商品维护流历史变化:继续看 [ 1.2 .0 发布说明] ( ./release-notes-1-2 -0 )
22+ - 想看当前最新功能和验证结果:先看 [ 1.4 .0 发布说明] ( ./release-notes-1-4 -0 )
23+ - 想看 ` SystemShop ` 折扣系统、价格对象和购物车锁价行为:看 [ 1.4 .0 发布说明] ( ./release-notes-1-4 -0 )
2324- 想回看 ` 1.1.x ` 的收口和修复:看 [ 1.1.1] ( ./release-notes-1-1-1 ) 与 [ 1.1.0] ( ./release-notes-1-1-0 )
Original file line number Diff line number Diff line change 1+ ---
2+ title : 1.4.0 发布说明
3+ description : MatrixShop 1.4.0 的 SystemShop 折扣系统、价格对象、测试结果与升级说明。
4+ slug : /matrixshop/release-notes-1-4-0
5+ sidebar_position : 1
6+ ---
7+
8+ # MatrixShop 1.4.0 发布说明
9+
10+ 发布时间:` 2026-04-03 `
11+
12+ ## 版本定位
13+
14+ ` 1.4.0 ` 是围绕 ` SystemShop ` 价格模型的一次功能版本更新。
15+
16+ 这一版的重点不是继续扩模块,而是把系统商店的价格从“固定数值”扩展成“可按玩家条件结算的价格对象”。
17+
18+ ## 本版本重点
19+
20+ ### ` price ` 键支持对象结构
21+
22+ ` SystemShop ` 商品和刷新池条目现在都支持:
23+
24+ ``` yaml
25+ price :
26+ base : 420
27+ discounts :
28+ - id : vip
29+ percent : 10
30+ condition :
31+ - " perm 'group.vip'"
32+ - id : holiday
33+ amount-off : 20
34+ - id : night-surge
35+ surcharge : 8
36+ ` ` `
37+
38+ 同时保持旧写法兼容:
39+
40+ ` ` ` yaml
41+ price : 420
42+ ` ` `
43+
44+ ### 支持折扣重叠与 Kether 条件
45+
46+ 当前折扣规则支持:
47+
48+ - ` percent`
49+ - ` amount-off`
50+ - ` surcharge`
51+ - ` condition`
52+ - ` whitelist`
53+ - ` blacklist`
54+
55+ 行为规则:
56+
57+ - 多条命中的百分比折扣按相加计算
58+ - 折扣率总和上限为 `100`
59+ - 最终成交价不会低于最小正价
60+ - Kether 条件失败时只跳过对应规则,不影响插件启动
61+
62+ # ## 刷新池价格对象会合并商品本体折扣
63+
64+ 刷新池条目中的 `price` 如果写成对象结构:
65+
66+ - ` base` 会覆盖商品本体基础价
67+ - ` discounts` 会与商品本体规则合并
68+
69+ 这意味着同一个 goods 可以保留通用折扣规则,而刷新池只额外附加某一批次的活动规则。
70+
71+ # ## 购物车现在锁定系统商店折后价
72+
73+ 系统商店商品加入购物车时:
74+
75+ - ` snapshotPrice` 记录的是入车时折后价
76+ - 后续折扣规则变化不会改写该条目的成交价
77+
78+ 这使购物车行为和系统商店确认页展示保持一致。
79+
80+ # # 升级说明
81+
82+ 如果你不需要折扣系统,可以完全不改现有配置。
83+
84+ 当前兼容策略:
85+
86+ - `price : 420` 继续可用
87+ - 旧 inline `goods.<id>` 结构继续可读
88+ - 新写法只是在 `price` 键下新增对象结构
89+
90+ # # 验证
91+
92+ 本版本发布前已完成:
93+
94+ - ` ./gradlew build`
95+ - docs site `npm run build`
96+ - ` paper-1.21.8` smoke boot
97+ - ` paper-1.21.11` smoke boot
98+ - 在 `paper-1.21.11` 测试服中,将 inline `SystemShop` 商品的 `price` 改成对象结构,并同时使用:
99+ - ` percent`
100+ - ` amount-off`
101+ - ` surcharge`
102+ - Kether `condition`
103+ - ` blacklist`
104+
105+ 该配置已验证可正常启动,未出现新的 `price-config-invalid` 或 `discount-condition-failed` 启动告警。
106+
107+ # # 相关链接
108+
109+ - [GitHub Releases](https://github.com/54895y/MatrixShop/releases)
110+ - [1.4.0 GitHub Release](https://github.com/54895y/MatrixShop/releases/tag/v1.4.0)
111+ - [CHANGELOG](https://github.com/54895y/MatrixShop/blob/main/CHANGELOG.md)
112+ - [1.3.0 发布说明](./release-notes-1-3-0)
Original file line number Diff line number Diff line change @@ -221,6 +221,61 @@ lore:
221221| `lore` | 商品说明。 |
222222| `currency` | 商品级货币 key。可选;只有你想覆盖默认货币时才需要写。 |
223223
224+ ` price` 也可以写成对象:
225+
226+ ` ` ` yaml
227+ price:
228+ base: 420
229+ discounts:
230+ - id: vip
231+ percent: 10
232+ condition:
233+ - "perm 'group.vip'"
234+ - id: weekend
235+ amount-off: 20
236+ - id: night-surge
237+ surcharge: 8
238+ ` ` `
239+
240+ 当前折扣规则:
241+
242+ - 支持 `percent`、`amount-off`、`surcharge`
243+ - ` condition` 使用 Kether 条件判断
244+ - 支持 `whitelist`、`blacklist` 控制折扣叠加
245+ - 多条命中的 `percent` 会相加
246+ - 最终成交价不会低于最小正价
247+ - ` {price}` 显示最终价;`{base-price}`、`{discount-count}`、`{discount-summary}` 可用于自定义 UI
248+
249+ 黑名单示例:
250+
251+ ` ` ` yaml
252+ price:
253+ base: 420
254+ discounts:
255+ - id: vip
256+ percent: 10
257+ condition:
258+ - "perm 'group.vip'"
259+ - id: svip
260+ percent: 15
261+ blacklist:
262+ - vip
263+ condition:
264+ - "perm 'group.svip'"
265+ - id: mvp
266+ percent: 20
267+ blacklist:
268+ - svip
269+ condition:
270+ - "perm 'group.mvp'"
271+ ` ` `
272+
273+ 这个例子里:
274+
275+ - ` SVIP` 命中后会排斥 `VIP`
276+ - ` MVP` 命中后会排斥 `SVIP`
277+ - ` whitelist` 则用于反向定义“只允许与哪些折扣叠加”
278+
224279> 兼容说明:旧版 `SystemShop/shops/*.yml` 中直接内联 `goods.<id>` 的写法仍然可读取,但新配置应优先拆到 `SystemShop/goods/*.yml`。
225280
226281# # `SystemShop/goods/starter_weapons.yml`
@@ -259,6 +314,8 @@ entries:
259314 buy-max: 3
260315` ` `
261316
317+ 刷新池条目的 `price` 同样支持对象结构,并会与商品本体的折扣规则合并。
318+
262319# # 刷新区域
263320
264321当前已经有 SystemShop 刷新基础能力,配置位置在 `icons.<char>.refresh`。
Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ const sidebars: SidebarsConfig = {
110110 id : 'matrixshop/release-notes/index' ,
111111 } ,
112112 items : [
113+ 'matrixshop/release-notes/release-notes-1-4-0' ,
113114 'matrixshop/release-notes/release-notes-1-3-0' ,
114115 'matrixshop/release-notes/release-notes-1-2-0' ,
115116 'matrixshop/release-notes/release-notes-1-1-1' ,
You can’t perform that action at this time.
0 commit comments