ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.74k stars 377 forks source link

Combat, allow to choose which troop will be resurrected when several corpses are located in the same hexagon #1636

Open LeHerosInconnu opened 4 years ago

LeHerosInconnu commented 4 years ago

A big flaw in Heroes 2 is that it is not possible to choose which troop will be resurrected when several corpses are located in the same hexagon. It is the last troop decimated which is resurrected. The one that is therefore "on top" of the other corpses.

There is also a bug which allows the AI player to not follow this rule as he can resurrect one of his decimated troops even when it is located under the corpse of one of the human player's troops. The human player cannot do this.

In fheroes2, it would be nice to remove this big flaw.

Here is a screen I used for the previous fheroes2 project to explain how it works. This screen is for explanatory purposes only.

1 - In original Heroes 2, only the last decimated troop located on a hexagon can be resurrected. In this case, a troop of rangers is decimated, and a troop of master swordsmen is decimated just over it. So, the player have no choice, only the troop of master swordsmen can be resurrected.

2 - A way to remedy this is to separate hexagons in several areas in order to choose which troop to resurrect (areas are not shown to the player).

3 - In the presented case, there are 2 troops, thus the hexagon is divided in 2 areas. Now, the player can move the mouse cursor (Resurrect True sprite) over each area and select to resurrect the troop of rangers or the troop of master swordsmen. The info box (https://github.com/ihhub/fheroes2/issues/1624) and the info bar at the bottom of the screen are updated for each area. In addition, it may be also possible to use the mouse wheel to make the choice.

Heroes 2 Screen 80

LeHerosInconnu commented 1 year ago

Another way of doing this. Taking touch screen devices into account, when there are several decimated troops that can be resurrected located on the same hexagon, and the player clicks on the hexagon to cast the spell, a window is displayed inviting the player to select the troop he wishes to resurrect. The yellow title of the window indicates the name of the spell, in the example "Resurrect True". Troop graphics are displayed, in the example ogre lords and orc chiefs. The number of creatures that can be resurrected and the total number of decimated creatures are displayed, in the example "4/8". An "OKAY" button allows to validate the action after selection. A "CANCEL" button allows to cancel the action. Image is for explanation only.

Hill Fort 01 recadré réduite 03