mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-03-25 08:34:16 +08:00
Compare commits
4 Commits
7766ceb607
...
32d7d4b824
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32d7d4b824 | ||
|
|
3b83c7b9e3 | ||
|
|
e3f93818d6 | ||
|
|
598601cbf2 |
31
.github/workflows/node.js.yml
vendored
Normal file
31
.github/workflows/node.js.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x, 16.x]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
- run: npm install
|
||||
- run: npm run build --if-present
|
||||
- run: npm test
|
||||
1214
data/age.json
1214
data/age.json
File diff suppressed because it is too large
Load Diff
BIN
data/age.xlsx
BIN
data/age.xlsx
Binary file not shown.
169
data/events.json
169
data/events.json
@@ -1782,7 +1782,7 @@
|
||||
"SPR": 1
|
||||
},
|
||||
"include": "(EVT?[10009])&((EVT?[10002,10110,10111])|(TLT?[1026]))",
|
||||
"exclude": "(EVT?[10211,10198,10025,10156,10155])|(TLT?[1027])"
|
||||
"exclude": "(EVT?[10211,10198,10025,10156,10155])|(TLT?[1027])|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"10212": {
|
||||
"id": 10212,
|
||||
@@ -1791,7 +1791,7 @@
|
||||
"SPR": 1
|
||||
},
|
||||
"include": "(EVT?[10009])&((EVT?[10001,10110,10111])|(TLT?[1026]))",
|
||||
"exclude": "(EVT?[10212,10198,10025,10156,10155])|(TLT?[1027])"
|
||||
"exclude": "(EVT?[10212,10198,10025,10156,10155])|(TLT?[1027])|((EVT?[10001])&(TLT?[1026]))"
|
||||
},
|
||||
"10213": {
|
||||
"id": 10213,
|
||||
@@ -2072,7 +2072,7 @@
|
||||
"SPR": 1
|
||||
},
|
||||
"include": "(EVT?[10237,10238,10239])&((EVT?[10001,10110,10111])|(TLT?[1026]))",
|
||||
"exclude": "(EVT?[10245])|(TLT?[1027])"
|
||||
"exclude": "(EVT?[10245])|(TLT?[1027])|((EVT?[10001])&(TLT?[1026]))"
|
||||
},
|
||||
"10246": {
|
||||
"id": 10246,
|
||||
@@ -2081,7 +2081,7 @@
|
||||
"SPR": 1
|
||||
},
|
||||
"include": "(EVT?[10237,10238,10239])&((EVT?[10002,10110,10111])|(TLT?[1026]))",
|
||||
"exclude": "(EVT?[10246])|(TLT?[1027])"
|
||||
"exclude": "(EVT?[10246])|(TLT?[1027])|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"10247": {
|
||||
"id": 10247,
|
||||
@@ -2366,7 +2366,7 @@
|
||||
"SPR": -1
|
||||
},
|
||||
"include": "EVT?[10279,10280]",
|
||||
"exclude": "EVT?[10281,20076]"
|
||||
"exclude": "EVT?[10281,20076,11295]"
|
||||
},
|
||||
"10282": {
|
||||
"id": 10282,
|
||||
@@ -3327,8 +3327,8 @@
|
||||
"id": 10388,
|
||||
"event": "你悟出了混沌大道。",
|
||||
"effect": {
|
||||
"INT": 50,
|
||||
"STR": 50
|
||||
"INT": 100,
|
||||
"STR": 100
|
||||
},
|
||||
"include": "(EVT?[10365])&(INT>300)&(TLT?[1048])",
|
||||
"exclude": "EVT?[10388]"
|
||||
@@ -3337,8 +3337,8 @@
|
||||
"id": 10389,
|
||||
"event": "你悟出了生命大道。",
|
||||
"effect": {
|
||||
"INT": 50,
|
||||
"STR": 50
|
||||
"INT": 75,
|
||||
"STR": 75
|
||||
},
|
||||
"include": "(EVT?[10365])&(INT>300)&(TLT?[1048])",
|
||||
"exclude": "EVT?[10389]"
|
||||
@@ -3347,8 +3347,8 @@
|
||||
"id": 10390,
|
||||
"event": "你悟出了毁灭大道。",
|
||||
"effect": {
|
||||
"INT": 50,
|
||||
"STR": 50
|
||||
"INT": 75,
|
||||
"STR": 75
|
||||
},
|
||||
"include": "(EVT?[10365])&(INT>300)&(TLT?[1048])",
|
||||
"exclude": "EVT?[10390]"
|
||||
@@ -3446,7 +3446,7 @@
|
||||
"event": "第九重雷劫落下。",
|
||||
"NoRandom": 1,
|
||||
"branch": [
|
||||
"STR>2000:10401",
|
||||
"(STR>2000)|(EVT?[20381]):10401",
|
||||
"(STR<2001)&(TLT?[1134]):20409",
|
||||
"STR<2001:10000"
|
||||
]
|
||||
@@ -4634,7 +4634,7 @@
|
||||
"SPR": 1
|
||||
},
|
||||
"include": "(EVT?[10011])&((EVT?[10001,10110,10111])|(TLT?[1026]))",
|
||||
"exclude": "(EVT?[10561])|(TLT?[1027])"
|
||||
"exclude": "(EVT?[10561])|(TLT?[1027])|((EVT?[10001])&(TLT?[1026]))"
|
||||
},
|
||||
"10562": {
|
||||
"id": 10562,
|
||||
@@ -4643,7 +4643,7 @@
|
||||
"SPR": 1
|
||||
},
|
||||
"include": "(EVT?[10011])&((EVT?[10002,10110,10111])|(TLT?[1026]))",
|
||||
"exclude": "(EVT?[10562])|(TLT?[1027])"
|
||||
"exclude": "(EVT?[10562])|(TLT?[1027])|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"10563": {
|
||||
"id": 10563,
|
||||
@@ -4745,7 +4745,7 @@
|
||||
"include": "EVT?[10542]",
|
||||
"exclude": "EVT?[10575]",
|
||||
"branch": [
|
||||
"TLT?[1108]:20575"
|
||||
"TLT?[1108]:20573"
|
||||
]
|
||||
},
|
||||
"10576": {
|
||||
@@ -4877,7 +4877,7 @@
|
||||
"event": "你在舞会上结识了一个漂亮的女生。",
|
||||
"postEvent": "你们谈了一阵子恋爱后分手了。",
|
||||
"include": "(EVT?[10579,10580,10581,10582,10583,10584,10586,10587])&((EVT?[10001,10110,10111])|(TLT?[1026]))",
|
||||
"exclude": "(EVT?[10595,10596])|(TLT?[1027])",
|
||||
"exclude": "(EVT?[10595,10596])|(TLT?[1027])|((EVT?[10001])&(TLT?[1026]))",
|
||||
"branch": [
|
||||
"CHR>7:20596"
|
||||
]
|
||||
@@ -4887,7 +4887,7 @@
|
||||
"event": "你在舞会上结识了一个帅气的男生。",
|
||||
"postEvent": "你们谈了一阵子恋爱后分手了。",
|
||||
"include": "(EVT?[10579,10580,10581,10582,10583,10584,10586,10587])&((EVT?[10002,10110,10111])|(TLT?[1026]))",
|
||||
"exclude": "(EVT?[10596,10595])|(TLT?[1027])",
|
||||
"exclude": "(EVT?[10596,10595])|(TLT?[1027])|((EVT?[10002])&(TLT?[1026]))",
|
||||
"branch": [
|
||||
"CHR>7:20596"
|
||||
]
|
||||
@@ -7439,7 +7439,7 @@
|
||||
"SPR": 1
|
||||
},
|
||||
"include": "(EVT?[10945])&((EVT?[10001,10110,10111])|(TLT?[1026]))",
|
||||
"exclude": "(EVT?[10974])|(TLT?[1027])"
|
||||
"exclude": "(EVT?[10974])|(TLT?[1027])|((EVT?[10001])&(TLT?[1026]))"
|
||||
},
|
||||
"10975": {
|
||||
"id": 10975,
|
||||
@@ -7448,7 +7448,7 @@
|
||||
"SPR": 1
|
||||
},
|
||||
"include": "(EVT?[10945])&((EVT?[10002,10110,10111])|(TLT?[1026]))",
|
||||
"exclude": "(EVT?[10975])|(TLT?[1027])"
|
||||
"exclude": "(EVT?[10975])|(TLT?[1027])|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"10976": {
|
||||
"id": 10976,
|
||||
@@ -8330,7 +8330,7 @@
|
||||
"effect": {
|
||||
"CHR": 1
|
||||
},
|
||||
"include": "(EVT?[11077,11075,11076,11071,11072,11073,11074,11069.11070])&(TLT?[1028])",
|
||||
"include": "(EVT?[11077,11075,11076,11071,11072,11073,11074,11069,11070])&(TLT?[1028])",
|
||||
"exclude": "(EVT?[11111,11112,11113])|(TLT?[1027])"
|
||||
},
|
||||
"11112": {
|
||||
@@ -9545,7 +9545,7 @@
|
||||
"id": 11295,
|
||||
"event": "你的爱人去世了。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[11295,11294]"
|
||||
"exclude": "EVT?[11295,11294,10281]"
|
||||
},
|
||||
"11296": {
|
||||
"id": 11296,
|
||||
@@ -9969,25 +9969,25 @@
|
||||
"id": 11350,
|
||||
"event": "婚后你的丈夫没有之前对你那么好了。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10001,11294,11350,11357,11358,11359,11360,11361,11362,11363,11295]"
|
||||
"exclude": "EVT?[10001,11294,11350,11357,11358,11359,11360,11361,11362,11363,11295]|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"11351": {
|
||||
"id": 11351,
|
||||
"event": "家务几乎全是你在干。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10001,11294,11351,11357,11358,11359,11360,11361,11362,11363,11295]"
|
||||
"exclude": "EVT?[10001,11294,11351,11357,11358,11359,11360,11361,11362,11363,11295]|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"11352": {
|
||||
"id": 11352,
|
||||
"event": "丈夫和你见面的时间越来越少。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10001,11294,11352,11357,11358,11359,11360,11361,11362,11363,11295]"
|
||||
"exclude": "EVT?[10001,11294,11352,11357,11358,11359,11360,11361,11362,11363,11295]|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"11353": {
|
||||
"id": 11353,
|
||||
"event": "结婚周年纪念日,丈夫给了你一个红包,没有准备礼物。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10001,11294,11353,11357,11358,11359,11360,11361,11362,11363,11295]"
|
||||
"exclude": "EVT?[10001,11294,11353,11357,11358,11359,11360,11361,11362,11363,11295]|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"11354": {
|
||||
"id": 11354,
|
||||
@@ -9996,7 +9996,7 @@
|
||||
"SPR": -1
|
||||
},
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10001,11294,11354,11357,11358,11359,11360,11361,11295,11362,11363]"
|
||||
"exclude": "EVT?[10001,11294,11354,11357,11358,11359,11360,11361,11295,11362,11363]|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"11355": {
|
||||
"id": 11355,
|
||||
@@ -10005,19 +10005,19 @@
|
||||
"SPR": -1
|
||||
},
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10001,11294,11355,11357,11358,11359,11360,11361,11295,11362,11363]"
|
||||
"exclude": "EVT?[10001,11294,11355,11357,11358,11359,11360,11361,11295,11362,11363]|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"11356": {
|
||||
"id": 11356,
|
||||
"event": "你经常在一个群里和大家一起吐槽婚后生活。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10001,11294,11356,11357,11358,11359,11360,11295,11361,11362,11363]"
|
||||
"exclude": "EVT?[10001,11294,11356,11357,11358,11359,11360,11295,11361,11362,11363]|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"11357": {
|
||||
"id": 11357,
|
||||
"event": "你的丈夫对你始终如一。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10001,11294,11357,11350,11351,11352,11353,11295,11354,11355,11356]"
|
||||
"exclude": "EVT?[10001,11294,11357,11350,11351,11352,11353,11295,11354,11355,11356]|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"11358": {
|
||||
"id": 11358,
|
||||
@@ -10029,7 +10029,7 @@
|
||||
"id": 11359,
|
||||
"event": "丈夫的父母通情达理,和你关系如同朋友。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10001,11294,11359,11350,11351,11352,11353,11295,11354,11355,11356]"
|
||||
"exclude": "EVT?[10001,11294,11359,11350,11351,11352,11353,11295,11354,11355,11356]|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"11360": {
|
||||
"id": 11360,
|
||||
@@ -10044,13 +10044,13 @@
|
||||
"SPR": 1
|
||||
},
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10001,11294,11361,11350,11351,11352,11353,11295,11354,11355,11356]"
|
||||
"exclude": "EVT?[10001,11294,11361,11350,11351,11352,11353,11295,11354,11355,11356]|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"11362": {
|
||||
"id": 11362,
|
||||
"event": "丈夫特别尊重你的意见,大多数家事都请你做决定。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10001,11294,11362,11350,11351,11352,11353,11295,11354,11355,11356]"
|
||||
"exclude": "EVT?[10001,11294,11362,11350,11351,11352,11353,11295,11354,11355,11356]|((EVT?[10002])&(TLT?[1026]))"
|
||||
},
|
||||
"11363": {
|
||||
"id": 11363,
|
||||
@@ -10071,13 +10071,13 @@
|
||||
"id": 11365,
|
||||
"event": "你的妻子把行动不便的父母接到你们家里住。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10002,11294,11295,11365]"
|
||||
"exclude": "EVT?[10002,11294,11295,11365]|((EVT?[10001])&(TLT?[1026]))"
|
||||
},
|
||||
"11366": {
|
||||
"id": 11366,
|
||||
"event": "你每月都上缴工资给妻子。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10002,11294,11295,11366,11367]"
|
||||
"exclude": "EVT?[10002,11294,11295,11366,11367]|((EVT?[10001])&(TLT?[1026]))"
|
||||
},
|
||||
"11367": {
|
||||
"id": 11367,
|
||||
@@ -10095,19 +10095,19 @@
|
||||
"id": 11369,
|
||||
"event": "你无微不至地照顾照顾妻子。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10002,11294,11295,11369]"
|
||||
"exclude": "EVT?[10002,11294,11295,11369]|((EVT?[10001])&(TLT?[1026]))"
|
||||
},
|
||||
"11370": {
|
||||
"id": 11370,
|
||||
"event": "你和妻子之间更像是朋友。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10002,11294,11370,11295]"
|
||||
"exclude": "EVT?[10002,11294,11370,11295]|((EVT?[10001])&(TLT?[1026]))"
|
||||
},
|
||||
"11371": {
|
||||
"id": 11371,
|
||||
"event": "妻子的一个亲戚沉迷赌博,骗了她娘家不少钱。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10002,11294,11371,11295]"
|
||||
"exclude": "EVT?[10002,11294,11371,11295]|((EVT?[10001])&(TLT?[1026]))"
|
||||
},
|
||||
"11372": {
|
||||
"id": 11372,
|
||||
@@ -10116,13 +10116,13 @@
|
||||
"MNY": 1
|
||||
},
|
||||
"include": "EVT?[11365]",
|
||||
"exclude": "EVT?[10002,11294,11372,11295]"
|
||||
"exclude": "EVT?[10002,11294,11372,11295]|((EVT?[10001])&(TLT?[1026]))"
|
||||
},
|
||||
"11373": {
|
||||
"id": 11373,
|
||||
"event": "婚前的彩礼全部用于运营你们的小家。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10002,11294,11373,11295]"
|
||||
"exclude": "EVT?[10002,11294,11373,11295]|((EVT?[10001])&(TLT?[1026]))"
|
||||
},
|
||||
"11374": {
|
||||
"id": 11374,
|
||||
@@ -10134,13 +10134,13 @@
|
||||
"id": 11375,
|
||||
"event": "妻子经常和你一起看动画。",
|
||||
"include": "(EVT?[11171])&(EVT?[10007,10008])",
|
||||
"exclude": "EVT?[10002,11294,11375,11295]"
|
||||
"exclude": "EVT?[10002,11294,11375,11295]|((EVT?[10001])&(TLT?[1026]))"
|
||||
},
|
||||
"11376": {
|
||||
"id": 11376,
|
||||
"event": "你经常和妻子一起看综艺和电视剧。",
|
||||
"include": "EVT?[11171]",
|
||||
"exclude": "EVT?[10002,11294,11376,11295]"
|
||||
"exclude": "EVT?[10002,11294,11376,11295]|((EVT?[10001])&(TLT?[1026]))"
|
||||
},
|
||||
"11377": {
|
||||
"id": 11377,
|
||||
@@ -10902,6 +10902,16 @@
|
||||
"event": "为了能和年轻人有共同语言,你开始了解潮流。",
|
||||
"NoRandom": 1
|
||||
},
|
||||
"20323": {
|
||||
"id": 20323,
|
||||
"event": "祖传的小盒子中散出了奇怪的气体。",
|
||||
"postEvent": "你感觉自己体质提升了。",
|
||||
"effect": {
|
||||
"STR": 10
|
||||
},
|
||||
"include": "TLT?[1048]",
|
||||
"exclude": "EVT?[20323]"
|
||||
},
|
||||
"20332": {
|
||||
"id": 20332,
|
||||
"event": "你遭到了一个恶堕的魔法少女,并展开战斗。",
|
||||
@@ -11069,7 +11079,66 @@
|
||||
"STR": 1000,
|
||||
"SPR": 10
|
||||
},
|
||||
"include": "(EVT?[10365])&(INT>520)&(TLT?[1048])"
|
||||
"include": "(EVT?[10365])&(TLT?[1048])&(TLT?[1033,1122])"
|
||||
},
|
||||
"20369": {
|
||||
"id": 20369,
|
||||
"event": "你截杀一个金丹修士,不料被其越级反杀。",
|
||||
"include": "(EVT?[10365])&(STR<1100)&(TLT?[1048])",
|
||||
"branch": [
|
||||
"TLT?[1048]:10000"
|
||||
]
|
||||
},
|
||||
"20380": {
|
||||
"id": 20380,
|
||||
"event": "你悟出了剑道。",
|
||||
"postEvent": "体质提升。",
|
||||
"effect": {
|
||||
"STR": 50
|
||||
},
|
||||
"include": "(EVT?[10365])&(INT>100)&(TLT?[1048])",
|
||||
"exclude": "EVT?[20380]"
|
||||
},
|
||||
"20381": {
|
||||
"id": 20381,
|
||||
"event": "你悟出了雷电大道。",
|
||||
"postEvent": "可以抵消第九重雷劫。",
|
||||
"effect": {
|
||||
"INT": 20,
|
||||
"STR": 20
|
||||
},
|
||||
"include": "(EVT?[10365])&(INT>100)&(TLT?[1048])",
|
||||
"exclude": "EVT?[20381]"
|
||||
},
|
||||
"20382": {
|
||||
"id": 20382,
|
||||
"event": "你悟出了人道。",
|
||||
"postEvent": "你悟透了伟大的马克思主义。",
|
||||
"effect": {
|
||||
"INT": 20,
|
||||
"STR": 20,
|
||||
"SPR": 2
|
||||
},
|
||||
"include": "(EVT?[10365])&(INT>100)&(TLT?[1048])",
|
||||
"exclude": "EVT?[20382]"
|
||||
},
|
||||
"20383": {
|
||||
"id": 20383,
|
||||
"event": "你悟出了风之大道。",
|
||||
"postEvent": "你可以使用风元素力飞行了。但你本来就可以飞。",
|
||||
"effect": {
|
||||
"INT": 20,
|
||||
"STR": 20
|
||||
},
|
||||
"include": "(EVT?[10365])&(INT>100)&(TLT?[1048])",
|
||||
"exclude": "EVT?[20383]"
|
||||
},
|
||||
"20384": {
|
||||
"id": 20384,
|
||||
"event": "你悟出了空手道。",
|
||||
"postEvent": "好像没什么用。",
|
||||
"include": "(EVT?[10365])&(INT>100)&(TLT?[1048])",
|
||||
"exclude": "EVT?[20384]"
|
||||
},
|
||||
"20409": {
|
||||
"id": 20409,
|
||||
@@ -11281,6 +11350,15 @@
|
||||
},
|
||||
"NoRandom": 1
|
||||
},
|
||||
"20567": {
|
||||
"id": 20567,
|
||||
"event": "你遭到了枪击。",
|
||||
"include": "EVT?[10011]",
|
||||
"exclude": "EVT?[10578,10682]",
|
||||
"branch": [
|
||||
"EVT?[10011]:10000"
|
||||
]
|
||||
},
|
||||
"20568": {
|
||||
"id": 20568,
|
||||
"event": "你考得很差。",
|
||||
@@ -11299,6 +11377,11 @@
|
||||
"event": "你父母忍痛给你买了一个。",
|
||||
"NoRandom": 1
|
||||
},
|
||||
"20573": {
|
||||
"id": 20573,
|
||||
"event": "好奇心使你试探着寻找凶手,但一无所获。",
|
||||
"NoRandom": 1
|
||||
},
|
||||
"20574": {
|
||||
"id": 20574,
|
||||
"event": "你感觉非常难。",
|
||||
@@ -11306,7 +11389,7 @@
|
||||
},
|
||||
"20575": {
|
||||
"id": 20575,
|
||||
"event": "好奇心使你试探着寻找凶手,但一无所获。",
|
||||
"event": "虽然比平时做的难,但还是都做出来了。",
|
||||
"NoRandom": 1
|
||||
},
|
||||
"20576": {
|
||||
|
||||
BIN
data/events.xlsx
BIN
data/events.xlsx
Binary file not shown.
@@ -1156,18 +1156,18 @@
|
||||
"id": 1132,
|
||||
"name": "返老还童",
|
||||
"description": "可能会回到年轻的时候",
|
||||
"grade": 2
|
||||
"grade": 1
|
||||
},
|
||||
"1133": {
|
||||
"id": 1133,
|
||||
"name": "时光倒流",
|
||||
"description": "或许时间会倒流",
|
||||
"grade": 1
|
||||
"grade": 0
|
||||
},
|
||||
"1134": {
|
||||
"id": 1134,
|
||||
"name": "转世重修",
|
||||
"description": "渡劫失败重生",
|
||||
"grade": 3
|
||||
"grade": 2
|
||||
}
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -113,4 +113,17 @@ function checkProp(property, condition) {
|
||||
}
|
||||
}
|
||||
|
||||
export { checkCondition };
|
||||
function extractMaxTriggers(condition) {
|
||||
// Assuming only age related talents can be triggered multiple times.
|
||||
const RE_AGE_CONDITION = /AGE\?\[([0-9\,]+)\]/;
|
||||
const match_object = RE_AGE_CONDITION.exec(condition);
|
||||
if (match_object == null) {
|
||||
// Not age related, single trigger.
|
||||
return 1;
|
||||
}
|
||||
|
||||
const age_list = match_object[1].split(",");
|
||||
return age_list.length;
|
||||
}
|
||||
|
||||
export { checkCondition, extractMaxTriggers };
|
||||
10
src/life.js
10
src/life.js
@@ -26,7 +26,7 @@ class Life {
|
||||
}
|
||||
|
||||
restart(allocation) {
|
||||
this.#triggerTalents = new Set();
|
||||
this.#triggerTalents = {};
|
||||
this.#property.restart(allocation);
|
||||
this.doTalent();
|
||||
this.#property.record();
|
||||
@@ -36,6 +36,10 @@ class Life {
|
||||
return this.#talent.allocationAddition(talents);
|
||||
}
|
||||
|
||||
getTalentCurrentTriggerCount(talentId) {
|
||||
return this.#triggerTalents[talentId] || 0;
|
||||
}
|
||||
|
||||
next() {
|
||||
const {age, event, talent} = this.#property.ageNext();
|
||||
|
||||
@@ -52,13 +56,13 @@ class Life {
|
||||
doTalent(talents) {
|
||||
if(talents) this.#property.change(this.#property.TYPES.TLT, talents);
|
||||
talents = this.#property.get(this.#property.TYPES.TLT)
|
||||
.filter(talentId=>!this.#triggerTalents.has(talentId));
|
||||
.filter(talentId => this.getTalentCurrentTriggerCount(talentId) < this.#talent.get(talentId).max_triggers);
|
||||
|
||||
const contents = [];
|
||||
for(const talentId of talents) {
|
||||
const result = this.#talent.do(talentId, this.#property);
|
||||
if(!result) continue;
|
||||
this.#triggerTalents.add(talentId);
|
||||
this.#triggerTalents[talentId] = this.getTalentCurrentTriggerCount(talentId) + 1;
|
||||
const { effect, name, description, grade } = result;
|
||||
contents.push({
|
||||
type: this.#property.TYPES.TLT,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { clone } from './functions/util.js';
|
||||
import { checkCondition } from './functions/condition.js';
|
||||
import { checkCondition, extractMaxTriggers } from './functions/condition.js';
|
||||
|
||||
class Talent {
|
||||
constructor() {}
|
||||
@@ -12,6 +12,7 @@ class Talent {
|
||||
const talent = talents[id];
|
||||
talent.id= Number(id);
|
||||
talent.grade = Number(talent.grade);
|
||||
talent.max_triggers = extractMaxTriggers(talent.condition);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,10 @@ module.exports = {
|
||||
directory: path.join(__dirname, 'view'),
|
||||
publicPath: '/view',
|
||||
},
|
||||
{
|
||||
directory: path.join(__dirname, 'src'),
|
||||
publicPath: '/src',
|
||||
},
|
||||
],
|
||||
},
|
||||
output: {
|
||||
|
||||
Reference in New Issue
Block a user