소스 검색

add alias

Laserlicht 1 년 전
부모
커밋
22a6eff28f
2개의 변경된 파일22개의 추가작업 그리고 18개의 파일을 삭제
  1. 4 4
      docs/players/Cheat_Codes.md
  2. 18 14
      server/processors/PlayerMessageProcessor.cpp

+ 4 - 4
docs/players/Cheat_Codes.md

@@ -59,12 +59,12 @@ Alternative usage: `vcmiexp <amount>` - gives selected hero specified amount of
 
 ### Luck and morale
 
-`nwcfollowthewhiterabbit` - the currently selected hero permanently gains maximum luck
-`nwcmorpheus` - the currently selected hero permanently gains maximum morale
+`nwcfollowthewhiterabbit` or `vcmiluck` - the currently selected hero permanently gains maximum luck
+`nwcmorpheus` or `vcmimorale` - the currently selected hero permanently gains maximum morale
 
 ### Puzzle map
 
-`nwcoracle` - reveals the puzzle map
+`nwcoracle` or `vcmiobelisk` - reveals the puzzle map
 
 ### Finishing the game
 
@@ -72,7 +72,7 @@ Alternative usage: `vcmiexp <amount>` - gives selected hero specified amount of
 `nwcbluepill` or `vcmimelkor` or `vcmilose` - player loses
 
 ### Misc
-`nwctheone` - reveals the whole map, gives 5 archangels in each empty slot, unlimited movement points and permanent flight
+`nwctheone` or `vcmigod` - reveals the whole map, gives 5 archangels in each empty slot, unlimited movement points and permanent flight
 
 ## Using cheat codes on other players
 By default, all cheat codes apply to current player. Alternatively, it is possible to specify player that you want to target:

+ 18 - 14
server/processors/PlayerMessageProcessor.cpp

@@ -454,22 +454,22 @@ bool PlayerMessageProcessor::handleCheatCode(const std::string & cheat, PlayerCo
 		"vcmisilmaril",  "vcmiwin",       "nwcredpill",
 		"vcmieagles",    "vcmimap",       "nwcwhatisthematrix",
 		"vcmiungoliant", "vcmihidemap",   "nwcignoranceisbliss",
-		"nwcoracle"
+		"vcmiobelisk",                    "nwcoracle"
 	};
 	std::vector<std::string> heroTargetedCheats = {
-		"vcmiainur",             "vcmiarchangel",   "nwctrinity",
-		"vcmiangband",           "vcmiblackknight", "nwcagents",
-		"vcmiglaurung",          "vcmicrystal",     "vcmiazure",
-		"vcmifaerie",            "vcmiarmy",        "vcminissi",
-		"vcmiistari",            "vcmispells",      "nwcthereisnospoon",
-		"vcminoldor",            "vcmimachines",     "nwclotsofguns",
-		"vcmiglorfindel",        "vcmilevel",       "nwcneo",
-		"vcminahar",             "vcmimove",        "nwcnebuchadnezzar",
-		"vcmiforgeofnoldorking", "vcmiartifacts",
-		"vcmiolorin",            "vcmiexp",
-		"nwcfollowthewhiterabbit",
-		"nwcmorpheus",
-		"nwctheone"
+		"vcmiainur",               "vcmiarchangel",   "nwctrinity",
+		"vcmiangband",             "vcmiblackknight", "nwcagents",
+		"vcmiglaurung",            "vcmicrystal",     "vcmiazure",
+		"vcmifaerie",              "vcmiarmy",        "vcminissi",
+		"vcmiistari",              "vcmispells",      "nwcthereisnospoon",
+		"vcminoldor",              "vcmimachines",    "nwclotsofguns",
+		"vcmiglorfindel",          "vcmilevel",       "nwcneo",
+		"vcminahar",               "vcmimove",        "nwcnebuchadnezzar",
+		"vcmiforgeofnoldorking",   "vcmiartifacts",
+		"vcmiolorin",              "vcmiexp",
+		"vcmiluck",                                   "nwcfollowthewhiterabbit", 
+		"vcmimorale",                                 "nwcmorpheus",
+		"vcmigod",                                    "nwctheone"
 	};
 
 	if (!vstd::contains(townTargetedCheats, cheatName) && !vstd::contains(playerTargetedCheats, cheatName) && !vstd::contains(heroTargetedCheats, cheatName))
@@ -606,9 +606,13 @@ void PlayerMessageProcessor::executeCheatCode(const std::string & cheatName, Pla
 		{"vcmiungoliant",           doCheatMapHide        },
 		{"vcmihidemap",             doCheatMapHide        },
 		{"nwcignoranceisbliss",     doCheatMapHide        },
+		{"vcmiobelisk",             doCheatRevealPuzzle   },
 		{"nwcoracle",               doCheatRevealPuzzle   },
+		{"vcmiluck",                doCheatMaxLuck        },
 		{"nwcfollowthewhiterabbit", doCheatMaxLuck        },
+		{"vcmimorale",              doCheatMaxMorale      },
 		{"nwcmorpheus",             doCheatMaxMorale      },
+		{"vcmigod",                 doCheatTheOne         },
 		{"nwctheone",               doCheatTheOne         },
 	};