diff --git a/data/campaigns/Dead_Water/scenarios/12_Revenge.cfg b/data/campaigns/Dead_Water/scenarios/12_Revenge.cfg index a026a7c76d52..27d57106e231 100644 --- a/data/campaigns/Dead_Water/scenarios/12_Revenge.cfg +++ b/data/campaigns/Dead_Water/scenarios/12_Revenge.cfg @@ -802,6 +802,7 @@ [event] name=moveto + id=bat_necklace_is_bad [filter] x,y=14,11 @@ -878,83 +879,69 @@ [option] label= _ "That sounds great! I’ll take it." [command] + {ANKH_NECKLACE 14 11 necklace1} [set_variable] name=get_necklace - value=yes + value=done [/set_variable] [/command] [/option] [option] label= _ "It doesn’t seem to have helped its previous owner. I don’t want it." + [command] + [allow_undo][/allow_undo] + + # Insert event to obtain the necklace later. + # This is not replay / MP safe, because of the combination with [allow_undo] + + # In case you do not choose the necklace and undo the event afterwards, + # you will have the possibility to choose the necklace with the event below. + # However, in the replay (same happens for MP btw) [allow_undo] means that + # this all never happened, and the moment the replay shows the scene where you + # move the second time onto the necklace, it's the first time in the replay. + # And thus fires the event above, not the one below. + + # Because the code does the same (and the options are in the same order, too), + # it may or may not cause replay / MP issues + + [event] + name=moveto + first_time_only=no + + [filter] + x=14 + y=11 + side=1 + [/filter] + [filter_condition] + [variable] + name=get_necklace + not_equals=done + [/variable] + [/filter_condition] + + [message] + speaker=unit + [option] + label= _ "I would like my life force protected." + [command] + {ANKH_NECKLACE 14 11 necklace1} + [set_variable] + name=get_necklace + value=done + [/set_variable] + [/command] + [/option] + [option] + label= _ "My life force feels fine as it is." + [command] + [allow_undo][/allow_undo] + [/command] + [/option] + [/message] + [/event] + [/command] [/option] [/message] - - [if] - [variable] - name=get_necklace - equals=yes - [/variable] - [then] - {ANKH_NECKLACE 14 11 necklace1} - [set_variable] - name=get_necklace - value=done - [/set_variable] - [/then] - [else] - [allow_undo][/allow_undo] - [event] - name=moveto - first_time_only=no - - [filter] - x=14 - y=11 - side=1 - [/filter] - - [if] - [variable] - name=get_necklace - not_equals=done - [/variable] - [then] - [message] - speaker=unit - [option] - label= _ "I would like my life force protected." - [command] - [set_variable] - name=get_necklace - value=yes - [/set_variable] - [/command] - [/option] - [option] - label= _ "My life force feels fine as it is." - [/option] - [/message] - [/then] - [/if] - - [if] - [variable] - name=get_necklace - equals=yes - [/variable] - [then] - {ANKH_NECKLACE 14 11 necklace1} - [set_variable] - name=get_necklace - value=done - [/set_variable] - [/then] - [else] - [allow_undo][/allow_undo] - [/else] - [/if] - [/event] - [/else] - [/if] [/event] [/scenario]