summaryrefslogtreecommitdiff
path: root/world/map/npc/magic/level1-flare-dart.txt
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-04-18 15:26:33 -0400
committermekolat <mekolat@users.noreply.github.com>2016-04-18 15:26:33 -0400
commit91fe3711fcacdfe83794b4347595e56e90e9d3a7 (patch)
tree771e06363fe2e7609847a0a63a2e499632d3d7a2 /world/map/npc/magic/level1-flare-dart.txt
parenta895a9fb39002e18487a9c19d7c7ea5215a6afb8 (diff)
downloadserverdata-91fe3711fcacdfe83794b4347595e56e90e9d3a7.tar.gz
serverdata-91fe3711fcacdfe83794b4347595e56e90e9d3a7.tar.bz2
serverdata-91fe3711fcacdfe83794b4347595e56e90e9d3a7.tar.xz
serverdata-91fe3711fcacdfe83794b4347595e56e90e9d3a7.zip
give a free recast when spell attack conditions fails
Diffstat (limited to 'world/map/npc/magic/level1-flare-dart.txt')
-rw-r--r--world/map/npc/magic/level1-flare-dart.txt25
1 files changed, 18 insertions, 7 deletions
diff --git a/world/map/npc/magic/level1-flare-dart.txt b/world/map/npc/magic/level1-flare-dart.txt
index 2f17c499..6c0ef303 100644
--- a/world/map/npc/magic/level1-flare-dart.txt
+++ b/world/map/npc/magic/level1-flare-dart.txt
@@ -11,17 +11,28 @@
callfunc "adjust_spellpower";
set Sp, Sp - 10;
misceffect FX_MAGIC_BLACK, strcharinfo(0);
- set @flar_damage, sqrt(@spellpower) * 5;
- set @flar_dmg_bonus, (BaseLevel/3) + 5;
- set .@delay, (((200 - Agi) * 1200) / 200);
- overrideattack (@spellpower/50)+3, .@delay, 4, ATTACK_ICON_GENERIC, 34, strnpcinfo(0)+"::OnAttack";
+ setarray @flarspell[0],
+ sqrt(@spellpower) * 5, //dmg
+ (BaseLevel/3) + 5, // dmg bonus
+ (@spellpower/50) + 3, // charges
+ (((200 - Agi) * 1200) / 200); // delay
callfunc "magic_exp";
- end;
+ goto L_FreeRecast;
OnAttack:
+ if (target(BL_ID, @target_id, 50) != 50) goto L_FreeRecast; // 0x20 | 0x02 | 0x10
misceffect FX_MAGIC_BLACK, strcharinfo(0);
- if (target(BL_ID, @target_id, 50) != 50) end; // 0x20 | 0x02 | 0x10
- void call("elt_damage", @flar_damage, @flar_dmg_bonus, ELT_WATER, ELT_FIRE, FX_MAGIC_BLACK);
+ void call("elt_damage", @flarspell[0], @flarspell[1], ELT_WATER, ELT_FIRE, FX_MAGIC_BLACK);
+ set @flarspell[2], @flarspell[2] - 1;
+ goto L_FreeRecast;
+
+L_FreeRecast:
+ if (@flarspell[2] > 0)
+ addtimer 0, strnpcinfo(0) + "::OnSetRecast";
+ end;
+
+OnSetRecast:
+ overrideattack 1, @flarspell[3], 4, ATTACK_ICON_GENERIC, 34, strnpcinfo(0)+"::OnAttack";
end;
OnInit: