Follow-up Comment #16, patch #2851 (project wesnoth):

Since there seemed to have been a bit of confusion about, so I'll just try to
clarify the whole issue a bit:

The problem with feeding doubling is that both the Ghast and Necrophage
implement feeding using an identical event. The event dictates that whenever a
unit with feeding kills another, it gains 1HP. However, if both a Ghast and a
Necrophage appear in the same scenario, then both events are active (even
though they're identical), leading to any feeder who kills another unit to
gain 1HP from the first event and then another 1HP from the other event. This
could be fixed using an event filter, so that the feeding event for
Necrophages would only trigger when a Necrophage kills a unit, and the feeding
event for Ghast would only trigger when a Ghast kills a unit: the only reason
that's not an ideal fix is because it forces one to specify the unit type
whenever and wherever the feeding ability macro is called.

So, being able to give an event an id solves the problem by allowing both the
Necrophage and Ghast keep an identical copy of of the feeding event without
the game triggering both events when a feeder kills a unit, because the id
tells the game that they're the same event and that it shouldn't be duplicated
no matter how many times it appears in different places. Also, duplicate
events have legitimate uses, so making the game automatically detect identical
events and treat them in a special way would be a bad idea, and that's why we
need an explicit id attribute.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?2851>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to