URL:
  <http://gna.org/bugs/?13024>

                 Summary: Conditional [allow_undo] doesn't always work right
                 Project: Battle for Wesnoth
            Submitted by: zookeeper
            Submitted on: Thursday 19/02/09 at 12:39
                Category: Bug
                Severity: 4 - Important
                Priority: 5 - Normal
              Item Group: WML
                  Status: None
                 Privacy: Public
             Assigned to: sapient
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: trunk r32820
        Operating System: win xp

    _______________________________________________________

Details:

A simple test case:


    [event]
        name=moveto
        first_time_only=no

        # if you move your leader, you can undo, but
        # if you move a non-leader, you can't
        
        [if]
            [have_unit]
                x,y=$x1,$y1
                canrecruit=yes
            [/have_unit]
            
            [then]
                [allow_undo]
                [/allow_undo]
            [/then]
            
            [else]
                # no undo
            [/else]
        [/if]
    [/event]


Everything works right as long as you just move a non-leader unit: those
moves are not undoable. However, whenever you move a leader unit (regardless
of whether you undo it or not) and then proceed to move a non-leader unit,
the move of that non-leader unit becomes undoable as well, whereas obviously
at that point undo should be invalidated.

In mainline, this causes a glitch with the PICKUPPABLE_ITEM core macro (used
for storm tridents and holy water in HttT, for instance), causing the player
to be able to undo the move even when he chooses to take the item.




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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