Follow-up Comment #9, bug #21882 (project wesnoth):

SlowThinker: 

This function is more or less the entire victory conditions, actually. It's
true that you can run out of time, but I believe this is implemented using an
event trigger. It's true that WML can end the level, but this works by
essentially the same mechanism that check_victory ends the level, they
ultimately raise an end level exception that breaks out of the game loop.

Besides those two possibilities afaik check_victory is the only other way, and
rather, the main way that the level ends. 

check_victory is pretty simple, it just looks at the board and says "is
anything happening? is there any conflict possible?" if yes, then ofc it
doesnt end. If no... then it checks if "victory_when_enemies_defeated" = no,
i.e. we are in a cutscene of some kind.

Setting aside the concerns of major UMC, from the perspective of KISS I think
it's pretty reasonable to have conditions like this that we check regularly to
end the level. A beginner WML programmer will expect that if after some event
he killed the enemy leader, victory should be declared. If it doesn't happen,
it could reasonably be considered a bug.

Our approach (more or less the same as always I think) is to check the
conditions as frequently as necessary, but allow extra flags and options so
that custom scenarios can get the behavior they want. I expect that our final
solution will be along these lines. 

I don't like the idea (mentioned elsewhere) to try to remember whether leaders
were killed by WML or attacks... I have no idea where we would even put that
info in the engine, it seems potentially burdensome / impractical. I think
it's usually better if WML has the upperhand over the engine and the engine is
not "aware" of what the WML is trying to do at any time.

We are continuing to discuss this and we'll push some kind of fix for this
soon, that most likely will allow you to kill all the units for as long as you
like. 

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?21882>

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


_______________________________________________
Wesnoth-bugs mailing list
Wesnoth-bugs@gna.org
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to