HttT Li'Sar's Initiative ability not triggering

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
Chekhovs_Cannon
Posts: 1
Joined: May 19th, 2020, 10:22 pm

HttT Li'Sar's Initiative ability not triggering

Post by Chekhovs_Cannon »

Wesnoth 1.14.13 from Steam. Windows Version 10.0.18363 Build 18363


I noticed today during a play-through of HttT that Li'Sar's ability "Initiative" which is supposed to give adjacent allies first-strike did not. In the attached save file, you should only need to end the turn to see this happen. The green knight should charge the southernmost red horseman. If I understand Initiative properly, the red horseman should attack first, however, instead, the green knight hits first.

I have attached the two log files for the two different times this happened to me.
Attachments
wesnoth-20200624-225918-15864.log
(550 Bytes) Downloaded 66 times
Li'Sar Test.gz
(83.09 KiB) Downloaded 68 times
wesnoth-20200624-191331-24644.log
(1.76 KiB) Downloaded 67 times
newfrenchy83
Code Contributor
Posts: 81
Joined: October 6th, 2017, 12:57 pm

Re: HttT Li'Sar's Initiative ability not triggering

Post by newfrenchy83 »

the [event] code

Code: Select all

[event]
        id=initiative_1
        name=prerecruit,prerecall
        first_time_only=no

        [filter]
            {LACKS_INITIATIVE_FILTER}
        [/filter]
        [allow_undo]
        [/allow_undo]
        [on_undo]
            [modify_unit]
                [filter]
                    id=$unit.id
                [/filter]
                [effect]
                    apply_to=attack
                    range=melee
                    remove_specials=initiative
                [/effect]
            [/modify_unit]
        [/on_undo]

        {INITIATIVE_OBJECT x,y=$x1,$y1}
    [/event]

    [event]
        id=initiative_2
        name=side 1 turn, side 2 turn
        first_time_only=no

        [store_unit]
            [filter]
                {LACKS_INITIATIVE_FILTER}
            [/filter]

            kill=no
            variable=units_lacking_initiative
        [/store_unit]

        [foreach]
            array=units_lacking_initiative
            [do]
                {INITIATIVE_OBJECT x,y=$this_item.x,$this_item.y}
            [/do]
        [/foreach]

        {CLEAR_VARIABLE units_lacking_initiative}
    [/event]

    [event]
        id=initiative_3
        name=attack
        first_time_only=no

        [filter_second]
            {LACKS_INITIATIVE_FILTER}
        [/filter_second]

        {INITIATIVE_OBJECT x,y=$x2,$y2}
    [/event]
are not implemented in Li'sar test but i cannot said why. this code is in Heir_To_The_Throne/utils/abilities.cfg the new uit recruited or don't have fistrike initiative
newfrenchy83
Code Contributor
Posts: 81
Joined: October 6th, 2017, 12:57 pm

Re: HttT Li'Sar's Initiative ability not triggering

Post by newfrenchy83 »

in Battle Princess and Princess unit_type, you must add {WEAPON_SPECIAL_INITIATIVE_EVENTS} inside variation tags for macro was used when Li'sar have the Scepter of Fire.
Post Reply