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.7k stars 375 forks source link

Combat, Resurrect spells, it should be possible to select both hexes to resurrect creatures that occupy two hexagons when a corpse of another creature is positioned over the corpse of the target creature in the same hexagon #1699

Open LeHerosInconnu opened 4 years ago

LeHerosInconnu commented 4 years ago

In fheroes2, it is not possible to select both hexes to cast the Resurrect spell on creatures that occupy two hexagons when a corpse of another creature is positioned over the corpse of the target creature in the same hexagon.

In the example, the corpse of the attacking hero's Champion is positioned over the corpse of the defending hero's Peasant. The corpse of the defending Hero's Ranger is positioned over the corpse of the attacking Hero's Champion.

In fheroes2, only the hexagon where there are no other corpses over the Champion's corpse can be selected. In the example, there is also another bug reported here (https://github.com/ihhub/fheroes2/issues/1698) due to which the Champion corpse sprite is not displayed.

In the original game, the two hexagons where the Champion's corpse sprite is located can be selected.

In original game:

Resurrect spell H2 03

Resurrect spell H2 04

In fheroes2:

Resurrect spell fh2 03

Resurrect spell fh2 04

Branikolog commented 4 years ago

Correct me, if I'm wrong, in the OG we can resurrect our creature, no matter how many enemy corpses cover it, right?

LeHerosInconnu commented 4 years ago

@Branikolog.

Correct me, if I'm wrong, in the OG we can resurrect our creature, no matter how many enemy corpses cover it, right?

In the original game, for creatures that occupy two hexagons, as long as there are no corpses of other allied or enemy troops over the two hexagons where the corpse of the troop to be resurrected is located then it will be possible to resurrect it.

For example, there may be three corpses of troops on one of the hexes where the corpse of the troop to be resurrected is located, if there are no corpses over the other hex of the corpse of the troop, the troop can be resurrected.

For troops that occupy a single hexagon, 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.

See here: https://github.com/ihhub/fheroes2/issues/1636.

Branikolog commented 4 years ago

Thanks for a precise info, @LeHerosInconnu !

ihhub commented 3 years ago

Hi @LeHerosInconnu could you please verify this issue? Recently I've done changes to Ressurect position logic in another pull request.

LeHerosInconnu commented 3 years ago

Hello @ihhub,

Hi @LeHerosInconnu could you please verify this issue? Recently I've done changes to Ressurect position logic in another pull request.

Okay, I'll take a look at that later.

LeHerosInconnu commented 3 years ago

Hi @ihhub,

Hello @ihhub,

Hi @LeHerosInconnu could you please verify this issue? Recently I've done changes to Ressurect position logic in another pull request.

Okay, I'll take a look at that later.

I did some quick tests to check the operation.

For this issue, right here, https://github.com/ihhub/fheroes2/issues/1699, it seems to work fine. For this issue, https://github.com/ihhub/fheroes2/issues/1697, it also seems to work fine. For this issue, https://github.com/ihhub/fheroes2/issues/1698, there is a small problem:

The corpses of the creatures must be stacked in the order of elimination of the troops (and updated according to the cases). For example, in the order of elimination, first the Peasants' corps, then the Champions' corps, then the Rangers' corps. If the Champions are resurrected and then eliminated again, their corps should be on top of the Rangers' corps, and the Rangers' corps are now on top of the Peasants' corps.

In fheroes2, if the Champions are resurrected and then eliminated again, their corps is under the Rangers' corps, which is not correct.

felix642 commented 1 year ago

Hi @ihhub, @LeHerosInconnu latest comment leads me to think that we can close this issue.

For this issue, right here, https://github.com/ihhub/fheroes2/issues/1699, it seems to work fine.