Wargus / wargus

Importer and scripts for Warcraft II: Tides of Darkness, the expansion Beyond the Dark Portal, and Aleonas Tales
GNU General Public License v2.0
357 stars 55 forks source link

[BDP] Wrong objectives for Human missions 3, 6 and 7. #357

Closed elrandira closed 3 years ago

elrandira commented 3 years ago

Describe the bug Wrong objectives coded for Human expension missions 3, 6 and 7.

In mission 3, you have to destroy all stronghold and fortresses and have the hero in the circle of power but currently you have to destroy everything and have the hero in the circle of power

From Documents\Stratagus\data.Wargus\campaigns\human-exp\levelx03h_c.sms

AddTrigger(
  function() return GetNumOpponents(GetThisPlayer()) == 0 and
    GetPlayerData(GetThisPlayer(), "UnitTypesCount", "unit-knight-rider") == 1 end,
  function() return ActionVictory() end)

In mission 6, you have to destroy Orange and have the 2 heroes in the circle power but the mission currently completed by destroying all shipyards as shown in the code:

From Documents\Stratagus\data.Wargus\campaigns\human-exp\levelx06h_c.sms

AddTrigger(
  function() return GetPlayerData(0, "UnitTypesCount", "unit-orc-shipyard") == 0 and
    GetPlayerData(2, "UnitTypesCount", "unit-orc-shipyard") == 0 and
    GetPlayerData(4, "UnitTypesCount", "unit-orc-shipyard") == 0 and
    GetPlayerData(5, "UnitTypesCount", "unit-orc-shipyard") == 0 and
    IfRescuedNearUnit("this", "==", 1, "unit-arthor-literios", "unit-circle-of-power") and
    IfRescuedNearUnit("this", "==", 1, "unit-knight-rider", "unit-circle-of-power") end,
  function() return ActionVictory() end)

In mission 7, you have to destroy deathwing, the hero dragon, and its nest but the mission currently is completed by killing everyone on the map (which is almost impossible with the ressources available).

From Documents\Stratagus\data.Wargus\campaigns\human-exp\levelx07h_c.sms

AddTrigger(
  function() return GetPlayerData(0, "TotalNumUnits") == 0 and
    GetPlayerData(2, "TotalNumUnits") == 0 and
    GetPlayerData(5, "TotalNumUnits") == 0 and
    GetPlayerData(6, "TotalNumUnits") == 0 end,
  function() return ActionVictory() end)

To Reproduce Play these missions human campaign of Beyond the dark portal with wargus v3.0.0.

Expected behavior Missions should complete has stated, The following video of the legacy version of the game confirms these:

Screenshots and Logs N/A

Desktop (please complete the following information):

elrandira commented 3 years ago

Just speaking for mission 7, what is rather strange is that nobody noticed this and, by looking at the history of levelx07h_c.sms, it was correctly implemented the first time in 2002: https://github.com/Wargus/wargus/commit/2a4c600848aace8bb4947b4aba969731efdfd6c8#diff-812cf152f8502b31a1d008f012ee6dba8b632ede603990641088918b74123dac

and then buggued since the following commit in 2003. https://github.com/Wargus/wargus/commit/0303842a3b3965d976e75381403eb070736ef62d#diff-812cf152f8502b31a1d008f012ee6dba8b632ede603990641088918b74123dac