diff --git a/_server/MotaAction.g4 b/_server/MotaAction.g4 index 8b824a50..f9d8374e 100644 --- a/_server/MotaAction.g4 +++ b/_server/MotaAction.g4 @@ -4062,7 +4062,7 @@ Direction_List /*Direction_List ['up','down','left','right']*/; DirectionEx_List - : '不变'|'朝上'|'朝下'|'朝左'|'朝右'|'左转'|'右转'|'背对'|'面对角色'|'背对角色' + : '不变'|'朝上'|'朝下'|'朝左'|'朝右'|'左转'|'右转'|'背对'|'角色同向'|'角色反向' /*DirectionEx_List ['null','up','down','left','right',':left',':right',':back',':hero',':backhero']*/; StepString diff --git a/libs/utils.js b/libs/utils.js index 89428532..0aafd4fd 100644 --- a/libs/utils.js +++ b/libs/utils.js @@ -864,8 +864,8 @@ utils.prototype.turnDirection = function (turn, direction) { direction = direction || core.getHeroLoc('direction'); var directionList = ["left", "leftup", "up", "rightup", "right", "rightdown", "down", "leftdown"]; if (directionList.indexOf(turn) >= 0) return turn; - if (turn == ':hero') return this.turnDirection(':back', core.getHeroLoc('direction')); - if (turn == ':backhero') return core.getHeroLoc('direction'); + if (turn == ':hero') return core.getHeroLoc('direction'); + if (turn == ':backhero') return this.turnDirection(':back', core.getHeroLoc('direction')); if (typeof turn === 'number' && turn % 45 == 0) turn /= 45; else { switch (turn) {