summaryrefslogtreecommitdiff
path: root/npc/magic/level2-arrow-hail.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/magic/level2-arrow-hail.txt')
-rw-r--r--npc/magic/level2-arrow-hail.txt44
1 files changed, 44 insertions, 0 deletions
diff --git a/npc/magic/level2-arrow-hail.txt b/npc/magic/level2-arrow-hail.txt
new file mode 100644
index 00000000..217f7fb0
--- /dev/null
+++ b/npc/magic/level2-arrow-hail.txt
@@ -0,0 +1,44 @@
+// The Mana World script
+// Author: Jesusalva <jesusalva@themanaworld.org>
+//
+// Magic Script: SKILL_FRILLYAR (Level 1)
+// School: War 2
+
+function script SK_Frillyar {
+ // Additional check for ammo
+ .@it=getequipid(EQI_AMMO);
+ if (.@it < 1) {
+ dispbottom l("Please equip your ammo first!");
+ return;
+ }
+ if (countitem(.@it) < 15) {
+ dispbottom l("You need at least %d %s to use this spell!",
+ 15, getitemname(.@it));
+ return;
+ }
+ // Delete items
+ delitem(SulphurPowder, 1);
+ delitem(.@it, 15);
+ // Proccess attack power
+ .@RG=4+(@skillLv/2);
+ .@PW=90+(10*@skillLv);
+ .@PW+=getiteminfo(.@it, ITEMINFO_ATK);
+ // Weather modifiers
+ if ("#WeatherCore"::weather(MASK_RAIN))
+ .@PW-=10;
+ if ("#WeatherCore"::weather(MASK_SANDSTORM))
+ .@PW-=10;
+ if ("#WeatherCore"::weather(MASK_SNOW))
+ .@PW-=10;
+ // Effective magic code
+ .@dmg=AdjustSpellpower(.@PW);
+ .@dmg+=getiteminfo(.@it, ITEMINFO_ATK);
+ specialeffect(FX_MAGIC_AHAIL_CAST, AREA, @skillTarget);
+ areaharm(@skillTarget, .@RG, .@dmg, HARM_PHYS, Ele_Neutral);
+ harm(@skillTarget, .@dmg/20, HARM_MAGI, Ele_Holy);
+ specialeffect(FX_ARROW_HAIL, AREA, @skillTarget);
+ GetManaExp(@skillId, 2);
+ return;
+}
+
+