Explorar o código

add RoE and AB cheats

Laserlicht hai 5 meses
pai
achega
4a1d8efb7b
Modificáronse 2 ficheiros con 55 adicións e 30 borrados
  1. 15 15
      docs/players/Cheat_Codes.md
  2. 40 15
      server/processors/PlayerMessageProcessor.cpp

+ 15 - 15
docs/players/Cheat_Codes.md

@@ -8,12 +8,12 @@ To use cheat code, press `Tab` key or click/tap on status bar to open game chat
 
 ### Spells
 
-`nwcthereisnospoon` or `vcmiistari` or `vcmispells` - give a spell book, all spells and 999 mana to currently selected hero
+`nwcthereisnospoon`, `nwcmidichlorians`, `nwctim`, `vcmiistari` or `vcmispells` - give a spell book, all spells and 999 mana to currently selected hero
 
 ### Army
 
-`nwctrinity` or `vcmiainur` or `vcmiarchangel` - give 5 Archangels in every empty slot (to currently selected hero)  
-`nwcagents` or `vcmiangband` or `vcmiblackknight` - give 10 black knight in every empty slot  
+`nwctrinity`, `nwcpadme`, `nwcavertingoureyes`, `vcmiainur` or `vcmiarchangel` - give 5 Archangels in every empty slot (to currently selected hero)  
+`nwcagents`, `nwcdarthmaul`, `nwcfleshwound` or `vcmiangband` or `vcmiblackknight` - give 10 black knight in every empty slot  
 `vcmiglaurung` or `vcmicrystal` - give 5000 crystal dragons in every empty slot  
 `vcmiazure` - give 5000 azure dragons in every empty slot  
 `vcmifaerie` - give 5000 faerie dragons in every empty slot  
@@ -25,32 +25,32 @@ Gives specific creature in every slot, with optional amount. Examples:
 
 ### Town buildings
 
-`nwczion` or `vcmiarmenelos` or `vcmibuild` - build all buildings in currently selected town
+`nwczion`, `nwccoruscant`, `nwconlyamodel`, `vcmiarmenelos` or `vcmibuild` - build all buildings in currently selected town
 
 ### Artifacts
 
-`nwclotsofguns` or `vcminoldor` or `vcmimachines` - give ballista, ammo cart and first aid tent  
+`nwclotsofguns`, `nwcr2d2`, `nwcantioch`, `vcminoldor` or `vcmimachines` - give ballista, ammo cart and first aid tent  
 `vcmiforgeofnoldorking` or `vcmiartifacts` - give all artifacts, except spell book, spell scrolls and war machines. Artifacts added via mods included  
 `vcmiscrolls` - give spell scrolls for every possible spells
 
 ### Movement points
 
-`nwcnebuchadnezzar` or `vcminahar` or `vcmimove` - give unlimited (or specified amount of) movement points and free ship boarding
+`nwcnebuchadnezzar`, `nwcpodracer`, `nwccoconuts`, `vcminahar` or `vcmimove` - give unlimited (or specified amount of) movement points and free ship boarding
 Alternative usage: `vcmimove <amount>` - gives specified amount of movement points
 
 ### Resources
 
-`nwctheconstruct` or `vcmiformenos` or `vcmiresources` - give resources (100000 gold, 100 of wood, ore and rare resources)  
+`nwctheconstruct`, `nwcwatto`, `nwcshrubbery`, `vcmiformenos` or `vcmiresources` - give resources (100000 gold, 100 of wood, ore and rare resources)  
 Alternative usage: `vcmiresources <amount>` - gives specified amount of all resources and x1000 of gold
 
 ### Fog of War
 
-`nwcwhatisthematrix` or `vcmieagles` or `vcmimap` - reveal Fog of War  
-`nwcignoranceisbliss` or `vcmiungoliant` or `vcmihidemap` - conceal Fog of War  
+`nwcwhatisthematrix`, `nwcrevealourselves`, `nwcgeneraldirection`, `vcmieagles` or `vcmimap` - reveal Fog of War  
+`nwcignoranceisbliss`,  `vcmiungoliant` or `vcmihidemap` - conceal Fog of War  
 
 ### Experience
 
-`nwcneo` or `vcmiglorfindel` or `vcmilevel` - advances currently selected hero to the next level
+`nwcneo`, `nwcquigon`, `nwcigotbetter`, `vcmiglorfindel` or `vcmilevel` - advances currently selected hero to the next level
 Alternative usage: `vcmilevel <amount>` - advances hero by specified number of levels
 
 - `vcmiolorin` or `vcmiexp` - gives selected hero 10000 experience
@@ -58,17 +58,17 @@ Alternative usage: `vcmiexp <amount>` - gives selected hero specified amount of
 
 ### Luck and morale
 
-`nwcfollowthewhiterabbit` or `vcmiluck` - the currently selected hero permanently gains maximum luck
-`nwcmorpheus` or `vcmimorale` - the currently selected hero permanently gains maximum morale
+`nwcfollowthewhiterabbit`, `nwccastleanthrax` or `vcmiluck` - the currently selected hero permanently gains maximum luck
+`nwcmorpheus`, `nwcmuchrejoicing` or `vcmimorale` - the currently selected hero permanently gains maximum morale
 
 ### Puzzle map
 
-`nwcoracle` or `vcmiobelisk` - reveals the puzzle map
+`nwcoracle`, `nwcprophecy`, `nwcalreadygotone` or `vcmiobelisk` - reveals the puzzle map
 
 ### Finishing the game
 
-`nwcredpill` or `vcmisilmaril` or `vcmiwin` - player wins
-`nwcbluepill` or `vcmimelkor` or `vcmilose` - player loses
+`nwcredpill`, `nwctrojanrabbit`, `vcmisilmaril` or `vcmiwin` - player wins
+`nwcbluepill`, `nwcsirrobin`, `vcmimelkor` or `vcmilose` - player loses
 
 ### Misc
 

+ 40 - 15
server/processors/PlayerMessageProcessor.cpp

@@ -697,28 +697,31 @@ bool PlayerMessageProcessor::handleCheatCode(const std::string & cheat, PlayerCo
 	std::string cheatName = boost::to_lower_copy(words[0]);
 	words.erase(words.begin());
 
-	std::vector<std::string> townTargetedCheats = { "vcmiarmenelos", "vcmibuild", "nwczion" };
+	//  VCMI                       VCMI simple        SoD/HotA                   AB                    RoE
+	std::vector<std::string> townTargetedCheats = {
+		"vcmiarmenelos",           "vcmibuild",       "nwczion",                 "nwccoruscant",       "nwconlyamodel"
+	};
 	std::vector<std::string> playerTargetedCheats = {
-		"vcmiformenos",  "vcmiresources", "nwctheconstruct",
-		"vcmimelkor",    "vcmilose",      "nwcbluepill",
-		"vcmisilmaril",  "vcmiwin",       "nwcredpill",
-		"vcmieagles",    "vcmimap",       "nwcwhatisthematrix",
-		"vcmiungoliant", "vcmihidemap",   "nwcignoranceisbliss",
-		"vcmiobelisk",                    "nwcoracle"
+		"vcmiformenos",            "vcmiresources",   "nwctheconstruct",         "nwcwatto",           "nwcshrubbery",
+		"vcmimelkor",              "vcmilose",        "nwcbluepill",                                   "nwcsirrobin",
+		"vcmisilmaril",            "vcmiwin",         "nwcredpill",                                    "nwctrojanrabbit",
+		"vcmieagles",              "vcmimap",         "nwcwhatisthematrix",      "nwcrevealourselves", "nwcgeneraldirection",
+		"vcmiungoliant",           "vcmihidemap",     "nwcignoranceisbliss",
+		"vcmiobelisk",                                "nwcoracle",               "nwcprophecy",        "nwcalreadygotone"
 	};
 	std::vector<std::string> heroTargetedCheats = {
-		"vcmiainur",               "vcmiarchangel",   "nwctrinity",
-		"vcmiangband",             "vcmiblackknight", "nwcagents",
+		"vcmiainur",               "vcmiarchangel",   "nwctrinity",              "nwcpadme",           "nwcavertingoureyes",
+		"vcmiangband",             "vcmiblackknight", "nwcagents",               "nwcdarthmaul",       "nwcfleshwound"
 		"vcmiglaurung",            "vcmicrystal",     "vcmiazure",
 		"vcmifaerie",              "vcmiarmy",        "vcminissi",
-		"vcmiistari",              "vcmispells",      "nwcthereisnospoon",
-		"vcminoldor",              "vcmimachines",    "nwclotsofguns",
-		"vcmiglorfindel",          "vcmilevel",       "nwcneo",
-		"vcminahar",               "vcmimove",        "nwcnebuchadnezzar",
+		"vcmiistari",              "vcmispells",      "nwcthereisnospoon",       "nwcmidichlorians",   "nwctim",
+		"vcminoldor",              "vcmimachines",    "nwclotsofguns",           "nwcr2d2",            "nwcantioch",
+		"vcmiglorfindel",          "vcmilevel",       "nwcneo",                  "nwcquigon",          "nwcigotbetter",
+		"vcminahar",               "vcmimove",        "nwcnebuchadnezzar",       "nwcpodracer",        "nwccoconuts",
 		"vcmiforgeofnoldorking",   "vcmiartifacts",
 		"vcmiolorin",              "vcmiexp",
-		"vcmiluck",                                   "nwcfollowthewhiterabbit", 
-		"vcmimorale",                                 "nwcmorpheus",
+		"vcmiluck",                                   "nwcfollowthewhiterabbit",                       "nwccastleanthrax",
+		"vcmimorale",                                 "nwcmorpheus",                                   "nwcmuchrejoicing",
 		"vcmigod",                                    "nwctheone",
 		"vcmiscrolls"
 	};
@@ -814,10 +817,14 @@ void PlayerMessageProcessor::executeCheatCode(const std::string & cheatName, Pla
 	std::map<std::string, std::function<void()>> callbacks = {
 		{"vcmiainur",              [&] () {doCheatGiveArmyFixed({ "archangel", "5" });} },
 		{"nwctrinity",             [&] () {doCheatGiveArmyFixed({ "archangel", "5" });} },
+		{"nwcpadme",               [&] () {doCheatGiveArmyFixed({ "archangel", "5" });} },
+		{"nwcavertingoureyes",     [&] () {doCheatGiveArmyFixed({ "archangel", "5" });} },
 		{"vcmiangband",            [&] () {doCheatGiveArmyFixed({ "blackKnight", "10" });} },
 		{"vcmiglaurung",           [&] () {doCheatGiveArmyFixed({ "crystalDragon", "5000" });} },
 		{"vcmiarchangel",          [&] () {doCheatGiveArmyFixed({ "archangel", "5" });} },
 		{"nwcagents",              [&] () {doCheatGiveArmyFixed({ "blackKnight", "10" });} },
+		{"nwcdarthmaul",           [&] () {doCheatGiveArmyFixed({ "blackKnight", "10" });} },
+		{"nwcfleshwound",          [&] () {doCheatGiveArmyFixed({ "blackKnight", "10" });} },
 		{"vcmiblackknight",        [&] () {doCheatGiveArmyFixed({ "blackKnight", "10" });} },
 		{"vcmicrystal",            [&] () {doCheatGiveArmyFixed({ "crystalDragon", "5000" });} },
 		{"vcmiazure",              [&] () {doCheatGiveArmyFixed({ "azureDragon", "5000" });} },
@@ -827,12 +834,18 @@ void PlayerMessageProcessor::executeCheatCode(const std::string & cheatName, Pla
 		{"vcmiistari",              doCheatGiveSpells     },
 		{"vcmispells",              doCheatGiveSpells     },
 		{"nwcthereisnospoon",       doCheatGiveSpells     },
+		{"nwcmidichlorians",        doCheatGiveSpells     },
+		{"nwctim",                  doCheatGiveSpells     },
 		{"vcmiarmenelos",           doCheatBuildTown      },
 		{"vcmibuild",               doCheatBuildTown      },
 		{"nwczion",                 doCheatBuildTown      },
+		{"nwccoruscant",            doCheatBuildTown      },
+		{"nwconlyamodel",           doCheatBuildTown      },
 		{"vcminoldor",              doCheatGiveMachines   },
 		{"vcmimachines",            doCheatGiveMachines   },
 		{"nwclotsofguns",           doCheatGiveMachines   },
+		{"nwcr2d2",                 doCheatGiveMachines   },
+		{"nwcantioch",              doCheatGiveMachines   },
 		{"vcmiforgeofnoldorking",   doCheatGiveArtifacts  },
 		{"vcmiartifacts",           doCheatGiveArtifacts  },
 		{"vcmiglorfindel",          doCheatLevelup        },
@@ -843,16 +856,24 @@ void PlayerMessageProcessor::executeCheatCode(const std::string & cheatName, Pla
 		{"vcminahar",               doCheatMovement       },
 		{"vcmimove",                doCheatMovement       },
 		{"nwcnebuchadnezzar",       doCheatMovement       },
+		{"nwcpodracer",             doCheatMovement       },
+		{"nwccoconuts",             doCheatMovement       },
 		{"vcmiformenos",            doCheatResources      },
 		{"vcmiresources",           doCheatResources      },
 		{"nwctheconstruct",         doCheatResources      },
+		{"nwcwatto",                doCheatResources      },
+		{"nwcshrubbery",            doCheatResources      },
 		{"nwcbluepill",             doCheatDefeat         },
+		{"nwcsirrobin",             doCheatDefeat         },
 		{"vcmimelkor",              doCheatDefeat         },
 		{"vcmilose",                doCheatDefeat         },
 		{"nwcredpill",              doCheatVictory        },
+		{"nwctrojanrabbit",         doCheatVictory        },
 		{"vcmisilmaril",            doCheatVictory        },
 		{"vcmiwin",                 doCheatVictory        },
 		{"nwcwhatisthematrix",      doCheatMapReveal      },
+		{"nwcrevealourselves",      doCheatMapReveal      },
+		{"nwcgeneraldirection",     doCheatMapReveal      },
 		{"vcmieagles",              doCheatMapReveal      },
 		{"vcmimap",                 doCheatMapReveal      },
 		{"vcmiungoliant",           doCheatMapHide        },
@@ -860,10 +881,14 @@ void PlayerMessageProcessor::executeCheatCode(const std::string & cheatName, Pla
 		{"nwcignoranceisbliss",     doCheatMapHide        },
 		{"vcmiobelisk",             doCheatRevealPuzzle   },
 		{"nwcoracle",               doCheatRevealPuzzle   },
+		{"nwcprophecy",             doCheatRevealPuzzle   },
+		{"nwcalreadygotone",        doCheatRevealPuzzle   },
 		{"vcmiluck",                doCheatMaxLuck        },
 		{"nwcfollowthewhiterabbit", doCheatMaxLuck        },
+		{"nwccastleanthrax",        doCheatMaxLuck        },
 		{"vcmimorale",              doCheatMaxMorale      },
 		{"nwcmorpheus",             doCheatMaxMorale      },
+		{"nwcmuchrejoicing",        doCheatMaxMorale      },
 		{"vcmigod",                 doCheatTheOne         },
 		{"nwctheone",               doCheatTheOne         },
 		{"vcmiscrolls",             doCheatGiveScrolls    },