diff --git a/quests/exceptions.yml b/quests/exceptions.yml index 6ffe5f5..f972be3 100644 --- a/quests/exceptions.yml +++ b/quests/exceptions.yml @@ -1,6 +1,67 @@ exceptions: - condition: command: - - '`' - hints: - - '!! 不需要輸入上下引號 !!' + - '[\uff21-\uff3a\uff41-\uff5a]' + responses: + - type: narrative + content: + - '!! 請使用半形英文字母 !!' + + - condition: + command: + - ' ' + responses: + - type: narrative + content: + - '!! 請使用半形空格 !!' + + - condition: + or: + - command: + - '`' + - command: + - \' + responses: + - type: narrative + content: + - '!! 不需要輸入上下引號 !!' + + - condition: + command: + - ^echo\S*$ + responses: + - type: narrative + content: + - '!! `echo` 後面要加空格 !!' + + - condition: + command: + - ^cd\S*$ + responses: + - type: narrative + content: + - '!! `cd` 後面要加空格 !!' + + - condition: + command: + - ^ls\S*$ + responses: + - type: narrative + content: + - '!! `ls` 後面要加空格 !!' + + - condition: + command: + - ^[Ii]s$ + responses: + - type: narrative + content: + - '!! `ls` 的首字母是小寫的 `L`,不是 `I` !!' + + - condition: + command: + - 嗨 + responses: + - type: narrative + content: + - '嗨~' diff --git a/quests/explore/game.yml b/quests/explore/game.yml index 5aa292e..cc65698 100644 --- a/quests/explore/game.yml +++ b/quests/explore/game.yml @@ -42,13 +42,6 @@ stages: content: - 請先回到 `/home/commander/` 資料夾 - 輸入 `cd ~` 來返回 `/home/commander/` 資料夾 - - condition: - command: - - ^[Ii]s$ - responses: - - type: narrative - content: - - '!! `ls` 的首字母是小寫的 `L`,不是 `I` !!' responses: - content: - 你應該能看到資料夾中的內容了。 diff --git a/quests/get-started/game.yml b/quests/get-started/game.yml index 9fd00fb..ba3e277 100644 --- a/quests/get-started/game.yml +++ b/quests/get-started/game.yml @@ -7,6 +7,7 @@ instruction: | 在畫面的中間可以看到終端機和提示兩個區塊。 請你在終端機中的 `commander:~ $` 後面輸入 `echo start` 並按下 Enter 來開始教程。 + !! 注意:不需要輸入上下引號 !! stages: - id: start @@ -65,6 +66,7 @@ stages: hints: - ➤ 按下 `Ctrl + C` 能夠中斷指令 - ➤ 劇情進行時可以按下 `Enter` 來快速跳過 + - ➤ 輸入 `echo finish` 來結束這一關 - id: END task: 結束關卡 diff --git a/quests/helloworld/game.yml b/quests/helloworld/game.yml index 05e382a..259dac5 100644 --- a/quests/helloworld/game.yml +++ b/quests/helloworld/game.yml @@ -12,9 +12,9 @@ stages: task: 輸入 `echo help` 來朗誦咒語 condition: pwd: - - '^/home/commander$' + - ^/home/commander$ command: - - echo [Hh]elp + - ^echo [Hh]elp$ responses: - type: narrative content: @@ -39,9 +39,9 @@ stages: - help condition: pwd: - - '^/home/commander$' + - ^/home/commander$ command: - - ls + - ^ls$ responses: - type: narrative content: @@ -65,9 +65,9 @@ stages: - find-scroll condition: pwd: - - '^/home/commander$' + - ^/home/commander$ command: - - cat forgotten_scroll.txt + - ^cat forgotten_scroll.txt$ responses: - type: dialogue speaker: Unix 精靈 @@ -83,9 +83,9 @@ stages: - read-forgotten-scroll condition: pwd: - - '^/home/commander$' + - ^/home/commander$ command: - - echo [Hh]ello\s*[Ww]orld + - ^echo [Hh]ello\s*[Ww]orld$ responses: - type: narrative content: