summaryrefslogtreecommitdiff
path: root/npc/006-7
diff options
context:
space:
mode:
Diffstat (limited to 'npc/006-7')
-rw-r--r--npc/006-7/ctrl.txt44
1 files changed, 23 insertions, 21 deletions
diff --git a/npc/006-7/ctrl.txt b/npc/006-7/ctrl.txt
index f7cec590d..d18513046 100644
--- a/npc/006-7/ctrl.txt
+++ b/npc/006-7/ctrl.txt
@@ -17,7 +17,7 @@ OnRw:
end;
}
-006-7,44,50,0 script Ice Lord NPC_YETIFLY,{
+006-7,44,35,0 script Ice Lord NPC_YETIFLY,{
if ($@ICICLE_CHALLENGE) end;
if (.ticks > gettimetick(2)) {
mesn;
@@ -96,8 +96,8 @@ OnRw:
close;
// Fail-safe Mechanism (will never happen)
+OnTimer25000:
OnTimer15000:
-OnTimer10000:
consolewarn("Warning, fail-safe mechanism triggered to Icicle.");
// This is the boss' core
OnTimer5000:
@@ -116,17 +116,17 @@ OnTimer5000:
}
/* Prepare some data */
- .@hp = getunitdata(.BOSS, UDT_HP) * 100 / getunitdata(.BOSS, UDT_MAXHP);
+ .@hp = getunitdata(.BOSS, UDT_HP) * 10 / getunitdata(.BOSS, UDT_MAXHP);
getmapxy(.@m$, .@x, .@y, UNITTYPE_MOB, .BOSS);
.@c=getunits(BL_PC, .@pcs, MAX_CYCLE_PC, .@m$);
- .@mvp=0;.@rnd=0;.@def=0;
+ .@mvp=0;.@rnd=0;.@def=-1;
for (.@i = 0; .@i < .@c; .@i++) {
if (!.@rnd || !rand2(.@c))
.@rnd=.@pcs[.@i];
- if (getunitdata(.@pcs[.@i], UDT_DEF) > .@def) {
- if (getunitdata(.@pcs[.@i], UDT_HP) < 1) continue;
+ if (readbattleparam(.@pcs[.@i], UDT_DEF) > .@def) {
+ if (readparam(Hp, .@pcs[.@i]) < 1) continue;
.@mvp=.@pcs[.@i];
- .@def=getunitdata(.@pcs[.@i], UDT_DEF);
+ .@def=readbattleparam(.@pcs[.@i], UDT_DEF);
}
}
.beats += 1;
@@ -138,6 +138,7 @@ OnTimer5000:
end;
}
+ //debugmes "----------- Skill Loop, beat is %d", .beats % 18;
/* Decide the skill to use based on ~5s beats over 3 minutes */
switch (.beats % 18) {
// (1/6) Summon Reinforcements (every 60s)
@@ -158,17 +159,17 @@ OnTimer5000:
case 16:
specialeffect(702, AREA, .BOSS);
sleep(1000);
- if (.@hp <= 3) {
+ if (.@hp < 3) {
// Third Attack Pattern: Judgment
- unittalk(.BOSS, "%s cannot stop me! ##BJudgment##b!", strcharinfo(0, "cursed player", .@mvp));
+ unittalk(.BOSS, sprintf("%s cannot stop me! ##BJudgment##b!", strcharinfo(0, "cursed player", .@mvp)));
.@PW=250; .@SPW=60; .@RG=3;
- } else if (.@hp <= 7) {
+ } else if (.@hp < 7) {
// Second Attack Pattern: Holy Light
- unittalk(.BOSS, "%s, I'll show you no mercy! ##BHoly Light##b!", strcharinfo(0, "cursed player", .@mvp));
+ unittalk(.BOSS, sprintf("%s, I'll show you no mercy! ##BHoly Light##b!", strcharinfo(0, "cursed player", .@mvp)));
.@PW=125; .@SPW=25; .@RG=1;
} else {
// First Attack Pattern: Napalm Beat
- unittalk(.BOSS, "This battle is over, %s! ##BNapalm Beat##b!", strcharinfo(0, "cursed player", .@mvp));
+ unittalk(.BOSS, sprintf("This battle is over, %s! ##BNapalm Beat##b!", strcharinfo(0, "cursed player", .@mvp)));
.@PW=35; .@SPW=5; .@RG=2;
}
.@mtk = calcdmg(.BOSS, .@mvp, HARM_MAGI) * 2;
@@ -187,15 +188,15 @@ OnTimer5000:
.@time=rand2(18000, 36000) + 10000 - (.@hp * 1000);
// Switch between curse and disable
if (any(true,false)) {
- unittalk(.BOSS, "I hereby ##Bcurse##b you, %s!", strcharinfo(0, "cursed player", .@rnd));
+ unittalk(.BOSS, sprintf("I hereby ##Bcurse##b you, %s!", strcharinfo(0, "cursed player", .@rnd)));
sc_start(SC_CURSE, .@time, 1, 10000, SCFLAG_FIXEDRATE, .@rnd);
} else {
- unittalk(.BOSS, "I shall ##Bdisable##b you, %s!", strcharinfo(0, "cursed player", .@rnd));
+ unittalk(.BOSS, sprintf("I shall ##Bdisable##b you, %s!", strcharinfo(0, "cursed player", .@rnd)));
sc_start(SC_BLIND, .@time / 2, 1, 10000, SCFLAG_FIXEDRATE, .@rnd);
sc_start(SC_SILENCE, .@time / 2, 1, 10000, SCFLAG_FIXEDRATE, .@rnd);
}
// Second pattern: Bleeding ON
- if (.@hp <= 7) {
+ if (.@hp < 7) {
sc_start(SC_BLOODING, 10000, 1, 9000-(.@hp*1000), SCFLAG_FIXEDRATE, .@rnd);
}
break;
@@ -212,7 +213,7 @@ OnTimer5000:
specialeffect(67, AREA, .@t2);
specialeffect(67, AREA, .@t3);
immortal(.@t1); immortal(.@t2); immortal(.@t3);
- if (.@hp < 5) {
+ if (.@hp < 5 || .hard) {
.@x4=rand2(31, 58); .@x5=rand2(31, 58); .@x6=rand2(31, 58);
.@y4=rand2(23, 49); .@y5=rand2(23, 49); .@y6=rand2(23, 49);
.@t4=monster("006-7", .@x1, .@y1, "", Dummy, 1);
@@ -227,7 +228,7 @@ OnTimer5000:
specialeffect(11, AREA, .@t1);
specialeffect(11, AREA, .@t2);
specialeffect(11, AREA, .@t3);
- if (.@hp < 5) {
+ if (.@hp < 5 || .hard) {
specialeffect(11, AREA, .@t4);
specialeffect(11, AREA, .@t5);
specialeffect(11, AREA, .@t6);
@@ -235,14 +236,15 @@ OnTimer5000:
areaharm(.@t1, 2, 450, HARM_MISC, Ele_Neutral, "filter_always", BL_PC|BL_MER|BL_HOM);
areaharm(.@t2, 2, 450, HARM_MISC, Ele_Neutral, "filter_always", BL_PC|BL_MER|BL_HOM);
areaharm(.@t3, 2, 450, HARM_MISC, Ele_Neutral, "filter_always", BL_PC|BL_MER|BL_HOM);
- if (.@hp < 5) {
+ if (.@hp < 5 || .hard) {
areaharm(.@t4, 2, 450, HARM_MISC, Ele_Neutral, "filter_always", BL_PC|BL_MER|BL_HOM);
areaharm(.@t5, 2, 450, HARM_MISC, Ele_Neutral, "filter_always", BL_PC|BL_MER|BL_HOM);
areaharm(.@t6, 2, 450, HARM_MISC, Ele_Neutral, "filter_always", BL_PC|BL_MER|BL_HOM);
}
sleep(1000);
+ // FIXME: M+ fails to remove them, need @refresh
unitkill(.@t1); unitkill(.@t2); unitkill(.@t3);
- if (.@hp < 5) {
+ if (.@hp < 5 || .hard) {
unitkill(.@t4); unitkill(.@t5); unitkill(.@t6);
}
break;
@@ -284,12 +286,12 @@ OnTimer5000:
unittalk(.BOSS, "You're no match for me, so...");
sleep((.hard ? 1000 : 1500));
specialeffect(700, AREA, .BOSS);
- if (.@hp <= 3) {
+ if (.@hp < 3) {
unittalk(.BOSS, "Perish! ##BSnowstorm##b!");
.@dmg=rand2(900, 1100);
areasc(3, 5000, SC_FREEZE, BL_PC|BL_HOM|BL_MER, 1, "filter_always", .BOSS, 2000);
areasc(6, 10000, SC_BLIND, BL_PC|BL_HOM|BL_MER, 1, "filter_always", .BOSS, 2000);
- } else if (.@hp <= 7) {
+ } else if (.@hp < 7) {
unittalk(.BOSS, "Perish! ##BBlizzard##b!");
.@dmg=rand2(650, 900);
areasc(3, 5000, SC_FREEZE, BL_PC|BL_HOM|BL_MER, 1, "filter_always", .BOSS, 1500);