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

[Scenario Editor] Prohibit the positioning of the ultimate artifact near an edge of the adventure map with the 9 squares rule of the original game #8896

Open LeHerosInconnu opened 6 days ago

LeHerosInconnu commented 6 days ago

Preliminary checks

Platform

Windows

Describe the bug

In fheroes2, positioning the ultimate artifact near an edge of the adventure map should not be allowed.

In original game:

9 squares rule 01

In fheroes2:

9 squares rule 10 001

9 squares rule 10 002

9 squares rule 10 003

Also, it shouldn't be possible to save a scenario if there isn't a location available where to automatically place the ultimate artifact (in case the scenario creator doesn't manually position the ultimate artifact). A message should be displayed to indicate this to the scenario creator.

Save file

Here is the test scenario file: Ultitop.zip

Additional info

Related closed issues: https://github.com/ihhub/fheroes2/issues/1944, https://github.com/ihhub/fheroes2/issues/1536.