Giter Club home page Giter Club logo

Comments (3)

oleg-derevenetz avatar oleg-derevenetz commented on July 21, 2024

Currently in fheroes2, both event and boat are "map objects", and there cannot be more than one object on the same tile at the same time (excluding the hero objects, because they are "special"). AI will not try to summon a boat here, because there is already an object on that tile. Logic for human players is a bit different (perhaps by mistake), and human players are allowed to summon a boat on that tile, but the result is that the boat object "overwrites" the event object, so there is no event object on that tile anymore after the boat summoning.

from fheroes2.

Killbrum avatar Killbrum commented on July 21, 2024

Ah, I see :( thanks for the explanation. Anyway, that is a good item to add to the "to-do" list since potentially it can break the logic of some old maps. Nowadays I'm not very familiar with fheroes2 code, but, perhaps, if the maps is a multidimensional array, then maybe we can convert that array to an array of lists or vectors and once the player steps into the tile - trigger everything that is under that tile

from fheroes2.

oleg-derevenetz avatar oleg-derevenetz commented on July 21, 2024

The fact that only one object can be placed on a tile at a time (even in the case of "invisible" objects, such as events) is the part of the core game mechanics. In the OG editor, you cannot place an event on a tile with the boat, and vice versa:

DOSBox.0.74-2.1.Cpu.speed_.max.100.cycles.Frameskip.0.Program_.EDITOR2.2024-06-14.19-04-27.mp4

Moreover, in the original game, the hero cannot disembark to a tile where an event object is located:

DOSBox.0.74-2.1.Cpu.speed_.max.100.cycles.Frameskip.0.Program_.HEROES2.2024-06-14.19-00-37.mp4

This is because the hero can only disembark on tiles where there is another "invisible" object called a "coast object", and you cannot have both the "event object" and "coast object" on the same tile at the same time. Therefore, I am inclined to believe that a human player simply should not be able to summon a boat to the tile on which the event object is located - just as AI cannot do it now.

from fheroes2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.