summaryrefslogtreecommitdiff
path: root/world/map/npc/magic/event-boss-powerup-tormenta.txt
blob: 52e6f42fbb63cef1840392db4f9bd03eaac009f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
-|script|powerup-tormenta|32767
{
    end;

OnCast:
    if(call("boss_powerup_checks")) end;
    bonus bMaxHP, 20000;
    set Hp, (Hp+20000), BL_ID;
    set Class, 1137, BL_ID;
    warp getmap(), POS_X, POS_Y;                // Refresh witch appearance
    addtimer 1500, strnpcinfo(0)+"::OnFix";
    message strcharinfo(0), "[boss-tormenta] : Tormenta impersonation started!";
    end;

OnFix:
    set @fix_count, @fix_count + 1;
    if (@fix_count > 1000) goto L_done;         // Timed out.
    if (get(Class, BL_ID) != 1137) goto L_done; // Caster attempted charclass?
    set Class, 1142, BL_ID;
    set Class, 1137, BL_ID;
    addtimer 1500, strnpcinfo(0)+"::OnFix";
    end;
L_done:
    message strcharinfo(0, BL_ID), "[boss-tormenta] : Tormenta impersonation ended!";
    set @fix_count, 0;
    set Class, 0, BL_ID;
    bonus bMaxHP, 0;
    set Hp, 100, BL_ID;
    end;

OnInit:
    set .school, SKILL_MAGIC;
    set .invocation$, chr(MAGIC_SYMBOL) + "tormenta"; // used in npcs that refer to this spell
    void call("magic_register", "OnCast");
    set .level, 0;
    set .exp_gain, 0;
    end;
}