diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-04-18 15:26:33 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-04-18 15:26:33 -0400 |
commit | 91fe3711fcacdfe83794b4347595e56e90e9d3a7 (patch) | |
tree | 771e06363fe2e7609847a0a63a2e499632d3d7a2 /world/map/npc/magic/level2-toxic-dart.txt | |
parent | a895a9fb39002e18487a9c19d7c7ea5215a6afb8 (diff) | |
download | serverdata-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/level2-toxic-dart.txt')
-rw-r--r-- | world/map/npc/magic/level2-toxic-dart.txt | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/world/map/npc/magic/level2-toxic-dart.txt b/world/map/npc/magic/level2-toxic-dart.txt index a14710d6..357ae32b 100644 --- a/world/map/npc/magic/level2-toxic-dart.txt +++ b/world/map/npc/magic/level2-toxic-dart.txt @@ -12,18 +12,33 @@ callfunc "adjust_spellpower"; set Sp, Sp - 15; misceffect FX_MAGIC_DARKRED, strcharinfo(0); - setarray @phlex_damage[0], (sqrt(@spellpower) * 5), ((BaseLevel/3) + 5); - set .@delay, (((200 - Agi) * 1200) / 200); - overrideattack (@spellpower/75)+3, .@delay, 4, ATTACK_ICON_GENERIC, 31, strnpcinfo(0)+"::OnAttack"; + setarray @phlexspell[0], + (sqrt(@spellpower) * 5), // elt damage + ((BaseLevel/3) + 5), // elt damage bonus + (((200 - Agi) * 1200) / 200), // delay + ((@spellpower/75) + 3), // charges + (5000+(@spellpower*1200)), // poison duration + (max(15,@spellpower/15)+5); // poison strength + 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_DARKRED, strcharinfo(0); - if (target(BL_ID, @target_id, 50) != 50) end; // 0x20 | 0x02 | 0x10 - void call("elt_damage", @phlex_damage[0], @phlex_damage[1], ELT_NEUTRAL, ELT_POISON, FX_FIRE_BURST); + void call("elt_damage", @phlexspell[0], @phlexspell[1], ELT_NEUTRAL, ELT_POISON, FX_FIRE_BURST); if(@target_id != BL_ID && isloggedin(@target_id)) // this is a dirty trick to check if the target is a player - sc_start sc_poison, 5000+(@spellpower*1200), max(15,@spellpower/15)+5, @target_id; + sc_start sc_poison, @phlexspell[4], @phlexspell[5], @target_id; + set @phlexspell[3], @phlexspell[3] - 1; + goto L_FreeRecast; + +L_FreeRecast: + if (@phlexspell[3] > 0) + addtimer 0, strnpcinfo(0) + "::OnSetRecast"; + end; + +OnSetRecast: + overrideattack 1, @phlexspell[2], 4, ATTACK_ICON_GENERIC, 31, strnpcinfo(0)+"::OnAttack"; end; OnInit: |