summaryrefslogtreecommitdiff
path: root/world/map/npc/magic/level2-magic-knuckles.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/level2-magic-knuckles.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/level2-magic-knuckles.txt')
-rw-r--r--world/map/npc/magic/level2-magic-knuckles.txt23
1 files changed, 18 insertions, 5 deletions
diff --git a/world/map/npc/magic/level2-magic-knuckles.txt b/world/map/npc/magic/level2-magic-knuckles.txt
index 3f4d4667..0984a7fd 100644
--- a/world/map/npc/magic/level2-magic-knuckles.txt
+++ b/world/map/npc/magic/level2-magic-knuckles.txt
@@ -12,14 +12,27 @@
callfunc "adjust_spellpower";
set Sp, Sp - 20;
misceffect FX_MAGIC_BLACK, strcharinfo(0);
- set .@delay, (((200 - Agi) * 1300) / 200);
- overrideattack (@spellpower/10)+10, .@delay, 1, ATTACK_ICON_GENERIC, 34, strnpcinfo(0)+"::OnAttack";
+ setarray @upmarmuspell[0],
+ @spellpower,
+ ((@spellpower/10) + 10), // charges
+ (((200 - Agi) * 1300) / 200), // delay
+ Str; // do not allow to equip light armor, cast, and then switch to heavy armor to get bonus str
callfunc "magic_exp";
- set @upmaru_str, Str; // do not allow to equip light armor, cast, and then switch to heavy armor to get bonus str
- end;
+ goto L_FreeRecast;
OnAttack:
- void call("melee_damage", @spellpower, @target_id, (30 + rand((@upmaru_str*2) + 5)));
+ if (target(BL_ID, @target_id, 22) != 22) goto L_FreeRecast; // 0x10 | 0x02 | 0x04
+ void call("melee_damage", @upmarmuspell[0], @target_id, (30 + rand((@upmarmuspell[3]*2) + 5)));
+ set @upmarmuspell[1], @upmarmuspell[1] - 1;
+ goto L_FreeRecast;
+
+L_FreeRecast:
+ if (@upmarmuspell[1] > 0)
+ addtimer 0, strnpcinfo(0) + "::OnSetRecast";
+ end;
+
+OnSetRecast:
+ overrideattack 1, @upmarmuspell[2], 1, ATTACK_ICON_GENERIC, 34, strnpcinfo(0)+"::OnAttack";
end;
OnInit: