summaryrefslogtreecommitdiff
path: root/npc/magic
diff options
context:
space:
mode:
Diffstat (limited to 'npc/magic')
-rw-r--r--npc/magic/config.txt2
-rw-r--r--npc/magic/final.txt152
-rw-r--r--npc/magic/level1-grow-plants.txt1
-rw-r--r--npc/magic/level2-summon-monsters.txt53
4 files changed, 64 insertions, 144 deletions
diff --git a/npc/magic/config.txt b/npc/magic/config.txt
index 89f9dd25..5a73317c 100644
--- a/npc/magic/config.txt
+++ b/npc/magic/config.txt
@@ -157,6 +157,8 @@ function script SK_summon {
.@mex=getarg(2, 1);
.@sum=getarg(3, true);
if ($@GM_OVERRIDE || debug) debugmes "Skill "+@skillId+" Lv "+@skillLv;
+ if (ispcdead())
+ return;
if (rand2(10) < abizit()) {
// Summon Magic (with magic level bonus)
diff --git a/npc/magic/final.txt b/npc/magic/final.txt
index 92fb65a4..e7d92da3 100644
--- a/npc/magic/final.txt
+++ b/npc/magic/final.txt
@@ -54,6 +54,14 @@ function script HUB_SkillInvoke {
// Level 2
case SKILL_INMA:
SK_Inma(); break;
+ case SKILL_KALAKARENK:
+ case SKILL_KALBOO:
+ case SKILL_KALGINA:
+ case SKILL_KALRENK:
+ SK_SummonLv2(); break;
+ case SKILL_HALHISS:
+ case SKILL_HELORP:
+ SK_SummonLv2(); break;
// Level 3
// Level 4
// Level 5
@@ -84,83 +92,6 @@ function script HUB_SkillInvoke {
GetManaExp(TMW2_FIREBALL, 3);
break;
////////////////////////////////
- // XXX: Holy Class
- // (Single DPS + AOE)
- case TMW2_NAPALMBEAT:
- .@PW=35+(5*@skillLv);
- .@dmg=AdjustSpellpower(.@PW);
- .@RG=2+(@skillLv/3);
- harm(@skillTarget, .@dmg/10, HARM_MAGI, Ele_Holy);
- areaharm(@skillTarget, .@RG, .@dmg, HARM_MAGI, Ele_Holy);
- GetManaExp(TMW2_HOLYLIGHT, 1);
- break;
- case TMW2_HOLYLIGHT:
- .@PW=125+(25*@skillLv);
- .@dmg=AdjustSpellpower(.@PW);
- harm(@skillTarget, .@dmg, HARM_MAGI, Ele_Holy);
- areaharm(@skillTarget, 1, .@dmg/5, HARM_MAGI, Ele_Holy);
- GetManaExp(TMW2_HOLYLIGHT, 2);
- break;
- case TMW2_JUDGMENT:
- .@PW=250+(50*@skillLv);
- .@SPW=60+(15*@skillLv);
- .@dmg=AdjustSpellpower(.@PW);
- .@dsub=AdjustSpellpower(.@SPW);
- .@RG=3+(@skillLv/5);
- harm(@skillTarget, .@dmg, HARM_MAGI, Ele_Holy);
- areaharm(@skillTarget, .@RG, .@dsub, HARM_MAGI, Ele_Holy);
- GetManaExp(TMW2_HOLYLIGHT, 3);
- break;
- ////////////////////////////////
- // XXX: Wind Class
- // (Smaller cooldown than others)
- case TMW2_MAGICSTRIKE:
- .@PW=125+(25*@skillLv);
- .@dmg=AdjustSpellpower(.@PW);
- harm(@skillTarget, .@dmg, HARM_MAGI, Ele_Wind);
- GetManaExp(TMW2_LIGHTNINGBOLT, 1);
- break;
- case TMW2_LIGHTNINGBOLT:
- .@PW=150+(50*@skillLv);
- .@dmg=AdjustSpellpower(.@PW);
- harm(@skillTarget, .@dmg, HARM_MAGI, Ele_Wind);
- GetManaExp(TMW2_LIGHTNINGBOLT, 2);
- break;
- case TMW2_TEMPEST:
- .@PW=125+(25*@skillLv);
- .@dmg=AdjustSpellpower(.@PW);
- .@RG=2+(@skillLv/5);
- areaharm(@skillTarget, .@RG, .@dmg, HARM_MAGI, Ele_Wind);
- GetManaExp(TMW2_LIGHTNINGBOLT, 3);
- break;
- ////////////////////////////////
- // XXX: Ice Class
- // (May freeze the targets)
- case TMW2_FROSTDIVER:
- .@PW=80+(10*@skillLv);
- // 22% chance, 2.5s
- harm(@skillTarget, AdjustSpellpower(.@PW), HARM_MAGI, Ele_Water);
- sc_start SC_FREEZE, 2500, 1, 2200, SCFLAG_NONE, @skillTarget;
- GetManaExp(TMW2_NILFHEIM, 1);
- break;
- case TMW2_FROSTNOVA:
- .@PW=80+(10*@skillLv);
- .@RG=2+(@skillLv/5);
- // 18% chance, 3s, 3x3 radius
- areaharm(@skillTarget, .@RG, AdjustSpellpower(.@PW), HARM_MAGI, Ele_Water);
- areasc(.@RG, 3000, SC_FREEZE, BL_MOB|BL_PC|BL_HOM|BL_MER, 1, "filter_hostile", @skillTarget, 1800);
- GetManaExp(TMW2_NILFHEIM, 2);
- break;
- case TMW2_NILFHEIM:
- // Nilfheim cast on self?
- .@PW=80+(10*@skillLv);
- .@RG=4+(@skillLv/5);
- areaharm(getcharid(3), .@RG*3/2, AdjustSpellpower(.@PW), HARM_MAGI, Ele_Water);
- areasc(.@RG, 15000, SC_FREEZE, BL_PC | BL_MOB | BL_MER | BL_HOM, 1, "filter_hostile");
- // Maybe filter_notme() would work better, indeed
- GetManaExp(TMW2_NILFHEIM, 3);
- break;
- ////////////////////////////////
// XXX: Earth Class
// DEF Effects at Gaia Break, more expensive
case TMW2_METEORSTRIKE:
@@ -230,73 +161,6 @@ function script HUB_SkillInvoke {
areaharm(@skillTarget, .@RG, .@dmg, HARM_PHYS, Ele_Neutral);
GetManaExp(@skillId, 1);
break;
- ////////////////////////////////
- // XXX: Brawling Class
- case TMW2_BRAWLING:
- // 75x3 = 225
- .@PW=70+(5*@skillLv);
- // Using a shield, so power is halved
- if (getequipid(EQI_HAND_L) > 0)
- .@PW=.@PW/2;
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Neutral);
- sleep2(10);
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Neutral);
- sleep2(10);
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Neutral);
- break;
- case TMW2_BEARSTRIKE:
- // 60x5 = 300
- .@PW=55+(5*@skillLv);
- // Using a shield, so power is halved
- if (getequipid(EQI_HAND_L) > 0)
- .@PW=.@PW/2;
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Neutral);
- sleep2(10);
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Neutral);
- sleep2(10);
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Neutral);
- sleep2(10);
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Neutral);
- sleep2(10);
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Neutral);
- break;
- case TMW2_ALLINONE:
- // 45x8 = 360
- .@PW=40+(5*@skillLv);
- // Using a shield, so power is halved
- if (getequipid(EQI_HAND_L) > 0)
- .@PW=.@PW/2;
- //harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Neutral);
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Fire);
- sleep2(10);
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Water);
- sleep2(10);
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Earth);
- sleep2(10);
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Wind);
- sleep2(10);
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Holy);
- sleep2(10);
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Shadow);
- sleep2(10);
- harm(@skillTarget, AdjustAttackpower(.@PW), HARM_PHYS, Ele_Ghost);
- sleep2(10);
- // The main elemental-less blast hits all in same square,
- // and also hits behind (and on your square)
- rectharm(@skillTarget, 0, 1, AdjustAttackpower(.@PW/2), HARM_PHYS, Ele_Neutral);
- break;
-
- ////////////////////////////////
- // CLASS_OTHER
- case TMW2_PARUM:
- SK_parum();
- break;
- case TMW2_DEMURE:
- SK_Demure();
- break;
- case TMW2_DRAGOKIN:
- SK_Dragokin();
- break;
// Summons which never fail
case TMW2_ZARKOR:
alignment_cansummon();
diff --git a/npc/magic/level1-grow-plants.txt b/npc/magic/level1-grow-plants.txt
index c3b21bad..d15f1276 100644
--- a/npc/magic/level1-grow-plants.txt
+++ b/npc/magic/level1-grow-plants.txt
@@ -15,6 +15,7 @@ function script SK_GrowPlants {
.@it = GambogeHerb; .@mobId = GambogePlant; break;
case SKILL_MODRILAX:
.@it = MauveHerb; .@mobId = MauvePlant; break;
+ default: return;
}
// Consume reagents
delitem Root, 1;
diff --git a/npc/magic/level2-summon-monsters.txt b/npc/magic/level2-summon-monsters.txt
new file mode 100644
index 00000000..9c28e639
--- /dev/null
+++ b/npc/magic/level2-summon-monsters.txt
@@ -0,0 +1,53 @@
+// The Mana World script
+// Author: Jesusalva <jesusalva@themanaworld.org>
+//
+// Magic Script: Multiple (Level 1)
+// School: Astral/Dark 2
+
+// SK_SummonLv2()
+function script SK_SummonLv2 {
+ // Setup
+ switch (@skillId) {
+ case SKILL_KALAKARENK:
+ .@it = WhiteFur; .@mobId = Fluffy; .@am = 3; .@cl = Root;
+ .@fx1 = FX_MAGIC_FLUFFY_CAST; .@fx2 = FX_MAGIC_FLUFFY_SPAWN; break;
+ case SKILL_KALBOO:
+ .@it = MoubooFigurine; .@mobId = Mouboo; .@am = 4; .@cl = Root;
+ .@fx1 = FX_MAGIC_MOUBOO_CAST; .@fx2 = FX_MAGIC_MOUBOO_SPAWN; break;
+ case SKILL_KALGINA:
+ .@it = PinkAntenna; .@mobId = Pinkie; .@am = 2; .@cl = Root;
+ .@fx1 = FX_MAGIC_PINKY_CAST; .@fx2 = FX_MAGIC_PINKY_SPAWN; break;
+ case SKILL_KALRENK:
+ .@it = HardSpike; .@mobId = SpikyMushroom; .@am = 2; .@cl = Root;
+ .@fx1 = FX_MAGIC_SPIKY_CAST; .@fx2 = FX_MAGIC_SPIKY_SPAWN; break;
+
+ // Should non-astral magic be here?
+ case SKILL_HALHISS:
+ .@it = SnakeEgg; .@mobId = Snake; .@am = 4; .@cl = DarkCrystal;
+ .@fx1 = FX_MAGIC_SNAKE_CAST; .@fx2 = FX_MAGIC_SNAKE_SPAWN; break;
+ case SKILL_HELORP:
+ .@it = SmallMushroom; .@am = 3; .@cl = DarkCrystal;
+ .@mobId = any(WickedMushroom, WickedMushroom, WickedMushroom,
+ WickedMushroom, WickedMushroom, WickedMushroom,
+ EvilMushroom, Moonshroom, Moonshroom, Moonshroom);
+ .@fx1 = FX_MAGIC_WICKED_CAST; .@fx2 = FX_MAGIC_WICKED_SPAWN; break;
+
+ default: return;
+ }
+ // Consume reagents
+ delitem .@cl, 1;
+ delitem .@it, 1;
+ // Estimate the cast time
+ if (.@cl == Root)
+ .@ct = 400+rand2(1001-getskilllv(MAGIC_SKILL_ASTRAL)*100);
+ else if (.@cl == DarkCrystal)
+ .@ct = 400+rand2(1001-getskilllv(MAGIC_SKILL_DARK)*100);
+ // Summon the monsters (or fail trying to)
+ specialeffect(.@fx1, AREA, getcharid(3));
+ sleep2(.@ct);
+ SK_summon(.@mobId, .@am, 2);
+ specialeffect(.@fx2, AREA, getcharid(3));
+ return;
+}
+
+