|
43 | 43 | END |
44 | 44 | */ |
45 | 45 |
|
46 | | -// Spell trigger emulation, branching on observed enemy level |
47 | | -if (See(NearestEnemyOf(Myself)) && Global(LVAR_castSpellTrigger, LOCALS, 0)) { |
48 | | - if (LevelLT(LastSeenBy(Myself), 3)) { |
49 | | - ReallyForceSpell(Myself, WIZARD_ARMOR); |
50 | | - ReallyForceSpell(Myself, WIZARD_SHIELD); |
51 | | - } |
52 | | - if (LevelLT(LastSeenBy(Myself), 8)) { |
53 | | - ReallyForceSpellRES("WM_LIGHT", Myself); |
54 | | - ReallyForceSpell(Myself, WIZARD_SHIELD); |
55 | | - } |
56 | | -} |
57 | | -/* Result: |
58 | | -IF |
59 | | - See(NearestEnemyOf(Myself)) |
60 | | - Global("castSpellTrigger", "LOCALS", 0) |
61 | | - LevelLT(LastSeenBy(Myself), 3) |
62 | | -THEN |
63 | | - RESPONSE #100 |
64 | | - ReallyForceSpell(Myself, WIZARD_ARMOR) |
65 | | - ReallyForceSpell(Myself, WIZARD_SHIELD) |
66 | | -END |
67 | | -IF |
68 | | - See(NearestEnemyOf(Myself)) |
69 | | - Global("castSpellTrigger", "LOCALS", 0) |
70 | | - LevelLT(LastSeenBy(Myself), 8) |
71 | | -THEN |
72 | | - RESPONSE #100 |
73 | | - ReallyForceSpellRES("WM_LIGHT", Myself) |
74 | | - ReallyForceSpell(Myself, WIZARD_SHIELD) |
75 | | -END |
76 | | -*/ |
77 | 46 | ``` |
78 | 47 |
|
79 | | -See [Getting Started](getting-started.md), [Type system](type-system.md), and [Examples](examples.md) for more. |
| 48 | +See [Getting Started](getting-started.md), [Examples](examples.md) and [Type system](type-system.md) for more. |
0 commit comments