From 40b1ba3542e1f143e90d51caeb21673eca6ca817 Mon Sep 17 00:00:00 2001 From: Nathan Du Date: Tue, 21 Sep 2021 21:46:45 +0800 Subject: [PATCH] change aliases for /alloc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除 allocation 指令,增加效果相同的 allocate,attrib 和 attribute 指令 使用动词替换名词作为指令的称呼我认为理所当然 把 attrib 和 attribute 定义为 alloc 的同义词是因为我想要添加在人生当中 知道自己现在属性的功能(web 版有的功能居然没有在命令行版中) --- repl/app.js | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/repl/app.js b/repl/app.js index 8388a8e..2c1726e 100644 --- a/repl/app.js +++ b/repl/app.js @@ -128,9 +128,13 @@ class App { 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.alloc(...command); case 'rd': case 'random': @@ -200,17 +204,21 @@ 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: /allocate STR 1 + /allocate INT -3 + /allocate CHR +5 - 参数解释 /allocation <[+/-]value> + 参数解释 /allocate <[+/-]value> 表示要分配的属性标签 可选有 @@ -286,9 +294,13 @@ class App { a alloc - allocation + allocate + attrib + attribute /alloc - /allocation 分配属性点 /allocation <[+/-]value> + /allocate + /attrib + /attribute 分配属性点 /allocate <[+/-]value> n next