mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2026-03-24 13:33:26 +08:00
Compare commits
9 Commits
b36f20c0d7
...
10527e4480
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
10527e4480 | ||
|
|
25d1d4f4bc | ||
|
|
b8fcb7203d | ||
|
|
79e21a1156 | ||
|
|
70d0b4460a | ||
|
|
40b1ba3542 | ||
|
|
274290cc5b | ||
|
|
fa6aa9bc7d | ||
|
|
b18c41349d |
Binary file not shown.
Binary file not shown.
@@ -2298,6 +2298,22 @@
|
||||
"group": 2,
|
||||
"name": "星幻Larry"
|
||||
},
|
||||
{
|
||||
"group": 2,
|
||||
"name": "小狐狸"
|
||||
},
|
||||
{
|
||||
"group": 2,
|
||||
"name": "天门仙"
|
||||
},
|
||||
{
|
||||
"group": 2,
|
||||
"name": "椰叶"
|
||||
},
|
||||
{
|
||||
"group": 2,
|
||||
"name": "Oscar you"
|
||||
},
|
||||
{
|
||||
"group": 2,
|
||||
"name": "超级无敌暴龙战士"
|
||||
@@ -3992,5 +4008,21 @@
|
||||
{
|
||||
"group": 2,
|
||||
"name": "小狐狸"
|
||||
},
|
||||
{
|
||||
"group": 2,
|
||||
"name": "vacenia"
|
||||
},
|
||||
{
|
||||
"group": 2,
|
||||
"name": "天使是假的"
|
||||
},
|
||||
{
|
||||
"group": 2,
|
||||
"name": "巭孬乺嫑烎"
|
||||
},
|
||||
{
|
||||
"group": 2,
|
||||
"name": "椰叶"
|
||||
}
|
||||
]
|
||||
91
repl/app.js
91
repl/app.js
@@ -50,9 +50,9 @@ class App {
|
||||
grade1: ['\x1B[94m', '\x1B[39m'], // Bright Blue
|
||||
grade2: ['\x1B[95m', '\x1B[39m'], // Bright Magenta
|
||||
grade3: ['\x1B[93m', '\x1B[39m'], // Bright Yellow
|
||||
grade1b: ['\x1B[104m', '\x1B[49m'], // Bright Blue BG
|
||||
grade2b: ['\x1B[105m', '\x1B[49m'], // Bright Magenta BG
|
||||
grade3b: ['\x1B[103m', '\x1B[49m'], // Bright Yellow BG
|
||||
grade1b: ['\x1B[94m\x1B[7m', '\x1B[0m'], // Bright Blue BG
|
||||
grade2b: ['\x1B[95m\x1B[7m', '\x1B[0m'], // Bright Magenta BG
|
||||
grade3b: ['\x1B[93m\x1B[7m', '\x1B[0m'], // Bright Yellow BG
|
||||
};
|
||||
#randomTalents;
|
||||
|
||||
@@ -69,7 +69,9 @@ class App {
|
||||
this.output(`\rLoading Complete.
|
||||
人生重开模拟器
|
||||
这垃圾人生一秒也不想待了
|
||||
\n🎉键入 \x1B[4m/remake\x1B[24m 开始游戏`,
|
||||
|
||||
键入 \x1B[4m/remake\x1B[24m 开始游戏
|
||||
键入 \x1B[4m/help\x1B[24m 获取帮助`,
|
||||
true
|
||||
);
|
||||
$$on('achievement', ({name})=>this.output(`
|
||||
@@ -121,13 +123,18 @@ class App {
|
||||
|
||||
case 'n':
|
||||
case 'next':
|
||||
case '/next': return this.next(true);
|
||||
case '/next':
|
||||
case '': return this.next(true);
|
||||
|
||||
case 'a':
|
||||
case 'alloc':
|
||||
case 'allocation':
|
||||
case 'allocate':
|
||||
case 'attrib':
|
||||
case 'attribute':
|
||||
case '/alloc':
|
||||
case '/allocation': return this.alloc(...command);
|
||||
case '/allocate':
|
||||
case '/attrib':
|
||||
case '/attribute': return this.attrib(...command);
|
||||
|
||||
case 'rd':
|
||||
case 'random':
|
||||
@@ -197,17 +204,25 @@ class App {
|
||||
|
||||
case 'a':
|
||||
case 'alloc':
|
||||
case 'allocation':
|
||||
case 'allocate':
|
||||
case 'attrib':
|
||||
case 'attribute':
|
||||
case '/alloc':
|
||||
case '/allocation': return `分配属性点
|
||||
a, alloc, allocation
|
||||
/alloc, /allocation 命令同等效果
|
||||
case '/allocate':
|
||||
case '/attrib':
|
||||
case '/attribute': return `分配或查看属性点
|
||||
a, alloc, allocate, attrib, attribute
|
||||
/alloc, /allocate, /attrib, /attribute 命令同等效果
|
||||
|
||||
Example: /allocation STR 1
|
||||
/allocation INT -3
|
||||
/allocation CHR +5
|
||||
Example: /attribute
|
||||
/allocate STR 1
|
||||
/allocate INT -3
|
||||
/allocate CHR +5
|
||||
|
||||
参数解释 /allocation <TAG> <[+/-]value>
|
||||
效果 在属性分配时分配属性点
|
||||
在人生的过程中查看当前属性点
|
||||
|
||||
参数解释 /allocate <TAG> <[+/-]value>
|
||||
|
||||
<TAG> 表示要分配的属性标签
|
||||
可选有
|
||||
@@ -283,9 +298,13 @@ class App {
|
||||
|
||||
a
|
||||
alloc
|
||||
allocation
|
||||
allocate
|
||||
attrib
|
||||
attribute
|
||||
/alloc
|
||||
/allocation 分配属性点 /allocation <TAG> <[+/-]value>
|
||||
/allocate
|
||||
/attrib
|
||||
/attribute 分配或查看属性点 /allocate <TAG> <[+/-]value>
|
||||
|
||||
n
|
||||
next
|
||||
@@ -344,7 +363,7 @@ class App {
|
||||
if(!s) return warn(`${number} 为未知天赋`);
|
||||
if(this.#talentSelected.has(s)) continue;
|
||||
if(this.#talentSelected.size == 3)
|
||||
return warn('⚠只能选3个天赋');
|
||||
return warn('你只能选3个天赋。请使用 \x1B[4m/unselect\x1B[24m 取消选择你不想要的天赋');
|
||||
|
||||
const exclusive = this.#life.exclusive(
|
||||
Array.from(this.#talentSelected).map(({id})=>id),
|
||||
@@ -389,12 +408,12 @@ class App {
|
||||
let description, list, check;
|
||||
switch(this.#step) {
|
||||
case this.Steps.TALENT:
|
||||
description = '🎉 请选择3个天赋';
|
||||
description = '🎉 请选择(\x1B[4m/select\x1B[24m)3 个天赋';
|
||||
list = this.#randomTalents;
|
||||
check = talent=>this.#talentSelected.has(talent);
|
||||
break;
|
||||
case this.Steps.SUMMARY:
|
||||
description = '🎉 你可以选一个天赋继承';
|
||||
description = '🎉 你可以选(\x1B[4m/select\x1B[24m)一个天赋继承';
|
||||
list = Array.from(this.#talentSelected);
|
||||
check = ({id})=>this.#talentExtend == id;
|
||||
break;
|
||||
@@ -416,7 +435,7 @@ class App {
|
||||
const warn = (a, b) => `${a}\n${this.style('warn', this.style('warn', b))}`;
|
||||
switch(this.#step) {
|
||||
case this.Steps.TALENT:
|
||||
if(this.#talentSelected.size != 3) return warn(this.list(), `⚠请选择3个天赋`);
|
||||
if(this.#talentSelected.size != 3) return warn(this.list(), `请选择 3 个天赋`);
|
||||
this.#step = this.Steps.PROPERTY;
|
||||
this.#propertyAllocation.total = 20 + this.#life.getTalentAllocationAddition(
|
||||
Array.from(this.#talentSelected).map(({id})=>id)
|
||||
@@ -425,7 +444,7 @@ class App {
|
||||
return this.prop();
|
||||
case this.Steps.PROPERTY:
|
||||
const less = this.less();
|
||||
if(less > 0) return warn(this.prop(), `你还有${less}属性点没有分配完`);
|
||||
if(less > 0) return warn(this.prop(), `你还有 ${less} 属性点没有分配完`);
|
||||
this.#step = this.Steps.TRAJECTORY;
|
||||
delete this.#propertyAllocation.total;
|
||||
this.#life.restart(this.#propertyAllocation);
|
||||
@@ -484,7 +503,8 @@ class App {
|
||||
|
||||
prop() {
|
||||
const { CHR, INT, STR, MNY } = this.#propertyAllocation;
|
||||
return `🎉属性分配
|
||||
return `🎉 属性分配
|
||||
请使用 \x1B[4m/alloc\x1B[24m <TAG> <value> 分配属性
|
||||
剩余点数 ${this.less()}
|
||||
|
||||
属性(TAG) 当前值
|
||||
@@ -500,6 +520,31 @@ class App {
|
||||
return total - CHR - INT - STR - MNY;
|
||||
}
|
||||
|
||||
attrib(tag, value) {
|
||||
switch (this.#step) {
|
||||
case this.Steps.PROPERTY:
|
||||
return this.alloc(tag, value);
|
||||
|
||||
case this.Steps.TRAJECTORY:
|
||||
return this.showProperty();
|
||||
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
showProperty() {
|
||||
let property = this.#life.getLastRecord();
|
||||
return `当前属性
|
||||
|
||||
属性(TAG) 当前值
|
||||
颜值(CHR) ${property.CHR}
|
||||
智力(INT) ${property.INT}
|
||||
体质(STR) ${property.STR}
|
||||
家境(MNY) ${property.MNY}
|
||||
快乐(SPR) ${property.SPR}`
|
||||
}
|
||||
|
||||
alloc(tag, value) {
|
||||
const warn = str => `${this.prop()}\n${this.style('warn', str)}`
|
||||
if(!value) return warn('⚠ 分配的数值没有给定');
|
||||
|
||||
Reference in New Issue
Block a user