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, add an indiquative window for ghosts incorporated after a combat #6777

Open LeHerosInconnu opened 1 year ago

LeHerosInconnu commented 1 year ago

Preliminary checks

Describe the problem requiring a solution

Just as there is a specific window for the necromancy skill, I think there should be a specific window for the ghost's ability to incorporate ghosts into the hero's army. This would inform the player about what happened, and directly indicate the number of ghosts incorporated.

In fheroes2 ("Necromancy!" window):

Necromancy window 01

Describe the possible solution

The "Soul Eater!" window is displayed after the "Necromancy!" window (if there is one).

This coud be done this way: Window elements: Yellow title:

"Soul Eater!"

Something like this for the text:

More than one ghost at the beginning of the combat, several ghosts incorporated: "Through their special "Soul Eater" ability, the Ghosts in your army were able to incorporate XX souls of the enemy's dead to return to your service as Ghosts."

One ghost at the beginning of the combat, several ghosts incorporated: "Through his special "Soul Eater" ability, the Ghost in your army was able to incorporate XX souls of the enemy's dead to return to your service as Ghosts."

More than one ghost at the beginning of the combat, only one ghost incorporated : "Through their special "Soul Eater" ability, the Ghosts in your army were able to incorporate 1 soul of the enemy's dead to return to your service as Ghost."

One ghost at the beginning of the combat,only one ghost incorporated : "Through his special "Soul Eater" ability, the Ghost in your army was able to incorporate 1 soul of the enemy's dead to return to your service as Ghost."

Additional info

Related issue: https://github.com/ihhub/fheroes2/issues/6776.

zenseii commented 1 year ago

Personally I see the necromancy ability and soul eater as different things. The soul eating you can see the number of in combat, while necromancy isn't shown during combat. I'm very cautious about adding more dialogs to click through after a combat. It quickly becomes like having to click past ads.

ihhub commented 1 year ago

Necromancy needs to be shown as skeletons are added after the battle, while Ghosts accumulate their numbers during the battle. In this case showing accumulated Ghosts after the battle just duplicates the information. We need to be careful to avoid showing too much info for users.

LeHerosInconnu commented 1 year ago

The goal is to avoid the player having to do the math to find out how many extra ghosts have been gained. The computer, in its great computing power, can do this for him, all in a fraction of a second, and present the result in a pleasant and appealing way to the eye thus increasing the satisfaction of the user who just wants to play and have a good time without having to do mathematics. 🍰 👓

Branikolog commented 1 year ago

Hi, @LeHerosInconnu I personally agree with @ihhub . Showing a separate window similar to necromancy one would confuse players. They'd think, that the number of ghosts would appear after the battle, which is not the case. As a possible solution, we can show in battle casualties window each sprite of ghosts, which was increased with "+x" under.

LeHerosInconnu commented 1 year ago

Hello @Branikolog,

As a possible solution, we can show in battle casualties window each sprite of ghosts, which was increased with "+x" under.

But if no ghosts are decimated, there is no ghost sprite displayed in the casualties window in the "Attacker" part. And they should not be displayed if there are no losses.

Necromancy instant combat 001

Or else, it could have been be possible to insert the explanatory sentence with the ghost sprite and the number of ghosts incorporated somewhere in this window, above the "Battlefied Casualties" part, but well, the window is already overloaded.

The information sentences can also indicate that it happens during the combat: "During the combat, through their special "Soul Eater" ability, the Ghosts in your army were able to incorporate XX souls of the enemy's dead to return to your service as Ghosts." The "Soul Eater!" window is also displayed before the "Necromancy!" window, the necromancy taking place after the combat.

If no one wants it, move the issue to discussion and I'll change the title to incorporate it into my mod. :)

vlk-charles commented 1 year ago

As a possible solution, we can show in battle casualties window each sprite of ghosts, which was increased with "+x" under.

I agree this would be better in the casualties window as it happened during the battle, not after it (like necromancy). I would prefer a minus sign instead of the suggested plus sign as it would be more "mathematically correct". Typically this window shows (implicitly) positive numbers that represent lost units. A gained unit is a "negative casualty".

But if no ghosts are decimated, there is no ghost sprite displayed in the casualties window in the "Attacker" part. And they should not be displayed if there are no losses.

I think the sprite should be displayed if there are either losses or gains (or both). If there are only gains, it could be displayed as either 0-x or simply just -x, where x is the number of gained units.

Right now (1.0.2) the casualties for ghosts are calculated from the highest number of ghosts at any point during the battle. So if you go into battle with 10 ghosts, kill 20 peasant with them (30 ghosts total), lose 5 ghosts (25 ghosts total), then kill 4 more peasants (29 ghosts total) and win the battle, your casualties will be listed as 1 ghost, even though you really gained 19.

start = 10
max   = 30
end   = 29

If this logic is to be preserved, I think it would make the most sense to show the gained units as 1-20. If lost units are calculated from the maximum (max - end), so should gained units (max - start). The alternative would be to show just one number start - end, which could be either positive (implicitly, as with other units) or negative (with a minus sign).