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

Castle siege, Earthquake spell operation issues #7489

Open Branikolog opened 11 months ago

Branikolog commented 11 months ago

Preliminary checks

Platform

Windows

Describe the bug

Earthquake spell has differences from the original game:

  1. in fheroes2 the spell doesn't affect castle bridge, while in the OG it could be destroyed by the spell too. It happens not really often. Like 1/4 of cases.
  2. in fheroes2 the spell seem to be affected by hero spell power: Low SP:

https://github.com/ihhub/fheroes2/assets/55348946/7bead655-c524-4578-b60f-3e153bd5d45d

https://github.com/ihhub/fheroes2/assets/55348946/75b206d2-7835-4aaa-9c20-143f7be01d73

High SP:

https://github.com/ihhub/fheroes2/assets/55348946/d638cf86-a0b5-49c0-99db-4b1b9ee13629

https://github.com/ihhub/fheroes2/assets/55348946/a6ff2f16-fda4-47ce-a1f4-8d7deb25e90a

https://github.com/ihhub/fheroes2/assets/55348946/0dfd44ce-2153-4ae2-8afc-b184755ea229

In the OG there's no difference how much spell power has casting hero.

  1. in fheroes2 the spell can completely destroy castle wall of the knight castle with fortifications, while in the OG this is not the case.

Fheroes2: https://github.com/ihhub/fheroes2/assets/55348946/014b981c-cc4e-447d-b923-15657e92b331

  1. in fheroes2 all castle walls are covered with blasts during earthquake, even there was no damage, while in the OG blast animation is shown only above walls and towers that were damaged by the spell.

fheroes2:

https://github.com/ihhub/fheroes2/assets/55348946/0ca576b4-98f8-4e80-99a2-3a47fa6f2210

  1. Towers near the castle bridge are also could be damaged by the spell (blast animation appears over them and they could be destroyed.

https://github.com/ihhub/fheroes2/assets/55348946/3e441033-eb11-4cd6-8878-5f78af1eaa62

Nevertheless this affects nothing. Also, these towers couldn't be destroyed by catapult. Only with the spell. This has no benefit rather than visual aesthetic. That's why I proposed in #7478 to show them destroyed once the bridge gets broken. But this could be debatable.

Save file

Earthquake castles.zip

Additional info

No response

oleg-derevenetz commented 11 months ago

in fheroes2 the spell seem to be affected by hero spell power

There was a specific issue with the corresponding proposal about four years ago - #117, that's why it works this way.

in fheroes2 the spell can completely destroy castle wall of the knight castle with fortifications, while in the OG this is not the case

Also due to #117, because proposed max damage is 3, thus, the fortifications will not protect the walls by 100%.

Branikolog commented 11 months ago

Hi, @oleg-derevenetz Thanks for pointing on that old PR. I completely forgot about that issue. In my personal point of view (the current one 🙂 ) that PR changed game logic too far away from the OG. There exist spells that are not affected by spell power, like teleport. Changing that brings benefit to magic heroes (which are really powerful), giving them advantage over knight heroes, who can destroy castle quite fast only with a special skill. On the other hand might heroes having low SP can't destroy walls so fast. In the original game you cannot destroy the whole knight castle with fortifications so fast, which greatly affects on siege speed. Currently, a relatively strong wizard can make a hole in walls even on the first turn. So I'm proposing to roll back to the original behaviour here. What do you think?

oleg-derevenetz commented 11 months ago

Hi @Branikolog I have some concern about changes of game logic back and forth :)

LeHerosInconnu commented 11 months ago

Hello @Branikolog and @oleg-derevenetz,

Can anyone tell me about the current number of hit points for walls, etc. depending on the catapult. And are these values also used for the Earthquake spell (they seem to be)?

Are these the values currently used:

Ballista appears to be unaffected by the Earthquake spell. Neither in fheroes2, nor in Heroes 2 I think. Is this the case?

I think these are the values currently used with the Earthquake spell and the hero's spell power:

There is one thing that shoud have been clarified earlier: i made an assumption that u32 HeroBase::GetSpellPoints( void ) const returns percents, and not a absolute value. Is it correct?

Original issue wasn't well defined. Spellpoints is a wrong thing to get, it's a hero's "mana" and it's value can be from 0 to anything (300+), depending on Knowledge stat.

You have to use int Heroes::GetPower( void ) const to get spell power and then we have to define the damage ranges. There's no similar logic in original game (it's all random) but this is a nice enhancement that I agree should be added. Again, there's no "max" value to a spell power, but I think we should set a limit ourselves.

We don't want to make spell completely worthless on low power. 1 damage wouldn't break a wall. My suggestion is: 1-2 power range is 0...1 3-5 power range is 0...2 6-9 power range is 0...3 10+ power range is 1..3

Originally posted by @idshibanov in https://github.com/ihhub/fheroes2/issues/2061#issuecomment-714576635

In my personal point of view (the current one 🙂 ) that PR changed game logic too far away from the OG. There exist spells that are not affected by spell power, like teleport. Changing that brings benefit to magic heroes (which are really powerful), giving them advantage over knight heroes, who can destroy castle quite fast only with a special skill. On the other hand might heroes having low SP can't destroy walls so fast. In the original game you cannot destroy the whole knight castle with fortifications so fast, which greatly affects on siege speed. Currently, a relatively strong wizard can make a hole in walls even on the first turn. So I'm proposing to roll back to the original behaviour here. What do you think?

The problem is that in the original game, the Earthquake spell is too random in its effects. As a result, the spell is only really usable in very specific cases for the human player. The AI uses it sometimes, and generally with significant results.

As far as I'm concerned, the Earthquake spell should have effects that are fully known when it's cast (in terms of amount of damage), and that also depend on the hero's spell power, as is the case with direct damage spells such as Lightning. Frankly, in the original game, it's more interesting to cast another spell in the vast majority of cases.

I think the spell could work according to the hero's spell power (and therefore be predictable in its power, like damage spells) without it being too powerful for a magic hero. I'll refine an idea I've already had on this subject, once I've had answers to my questions, earlier in this post, about hit point values. :)

oleg-derevenetz commented 11 months ago

2 hit points per wall section (four wall sections, total of eight hit points)

Yes.

2 hit points for each turret (two turrets, total of four hit points)

No, each turret has just 1 hp (in fact, turrets have just two states - "not destroyed" and "destroyed"). AFAIK there is no such a thing as a "damaged turret" in HoMM2.

1 hit point for the drawbridge (destroyed if one hit by the catapult)

Yes.

1 additional hit point per wall section when fortifications are built in the Knight's castle (four wall sections, total of four additional hit points)

Yes.

1 hit point for the Ballista, but only used by the catapult and not by the Earthquake spell (destroyed if one hit by the catapult)

Yes.

1 hit point for each tower near the drawbridge (two towers, total of two hit points), but only used by the Earthquake spell and not by the catapult

Currently, these towers are not destroyed by either the Earthquake spell or the catapult.

LeHerosInconnu commented 11 months ago

Hello @Branikolog and @oleg-derevenetz,

So, here: https://github.com/ihhub/fheroes2/discussions/7493 are a few suggestions on the functioning of the Earthquake spell, taking into account the hero's spell power.