Skip to content

Commit

Permalink
Fix #843
Browse files Browse the repository at this point in the history
  • Loading branch information
Dugy committed Dec 21, 2024
1 parent 7f057e1 commit 6f0c53f
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions utils/global_events.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,47 @@ Do you want to change it for something else?"
[option]
label=_"Yes"
[command]
{VARIABLE is_legacy no}
[if]
[variable]
name=worked_on.modifications.advancement[$last_advancement_index].id
equals=awareness_dummy
[/variable]
[then]
{VARIABLE is_legacy yes}
[/then]
[/if]
{CLEAR_VARIABLE worked_on.modifications.advancement[$last_advancement_index]}
[if]
[variable]
name=is_legacy
equals=yes
[/variable]
[then]
{VARIABLE i 0}
[while]
[variable]
name=i
less_than=$worked_on.modifications.advancement.length
[/variable]
[do]
[if]
[variable]
name=worked_on.modifications.advancement[$i].id
equals=awareness
[/variable]
[then]
{CLEAR_VARIABLE worked_on.modifications.advancement[$i]}
{VARIABLE_OP i sub 1}
[/then]
[/if]
{VARIABLE_OP i add 1}
[/do]
[/while]
{CLEAR_VARIABLE i}
[/then]
[/if]
{CLEAR_VARIABLE is_legacy}
{CLEAR_VARIABLE worked_on.variables.achieved_amla}
{VARIABLE experience_to_give $worked_on.experience}
{VARIABLE_OP experience_to_give add $worked_on.max_experience}
Expand Down

0 comments on commit 6f0c53f

Please sign in to comment.