summaryrefslogtreecommitdiff
path: root/world/map/npc/magic
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-05-12 16:56:39 -0400
committermekolat <mekolat@users.noreply.github.com>2016-05-12 16:56:39 -0400
commite1d76e52990b2a305c203981b16cce4905dc1aaa (patch)
treee4cf88481448f73aca01773c8a81736fb3fda0b0 /world/map/npc/magic
parent91419026978c5244d6389f91552ba066ddd146f1 (diff)
downloadserverdata-e1d76e52990b2a305c203981b16cce4905dc1aaa.tar.gz
serverdata-e1d76e52990b2a305c203981b16cce4905dc1aaa.tar.bz2
serverdata-e1d76e52990b2a305c203981b16cce4905dc1aaa.tar.xz
serverdata-e1d76e52990b2a305c203981b16cce4905dc1aaa.zip
turn detsanc into a non-magic spell
Diffstat (limited to 'world/map/npc/magic')
-rw-r--r--world/map/npc/magic/_procedures.txt5
-rw-r--r--world/map/npc/magic/level0-antiprotect.txt7
2 files changed, 6 insertions, 6 deletions
diff --git a/world/map/npc/magic/_procedures.txt b/world/map/npc/magic/_procedures.txt
index 95b5cd93..5d7e5c8a 100644
--- a/world/map/npc/magic/_procedures.txt
+++ b/world/map/npc/magic/_procedures.txt
@@ -26,11 +26,14 @@ OnClear:
// this function is call()-only
function|script|magic_checks
{
+ set .@flags, getarg(0);
+ set .@nonmagic, .@flags & (1<<0);
+
if(HIDDEN) goto L_Hidden; // can not cast with @hide
if(@_M_BLOCK == 2) goto L_Login; // login warmup
if(@_M_BLOCK) goto L_Blocked; // check if last debuff ended
if(Hp < 1) goto L_Dead; // can not cast when dead
- if (MATK1 < 1) goto L_Greybar; // can not cast with a grey mana bar
+ if (MATK1 < 1 && .@nonmagic < 1) goto L_Greybar; // can not cast with a grey mana bar
return 0;
L_Hidden:
diff --git a/world/map/npc/magic/level0-antiprotect.txt b/world/map/npc/magic/level0-antiprotect.txt
index 8e9b700c..129d3c62 100644
--- a/world/map/npc/magic/level0-antiprotect.txt
+++ b/world/map/npc/magic/level0-antiprotect.txt
@@ -1,6 +1,6 @@
-|script|antiprotect|32767
{
- if(call("magic_checks")) end;
+ if(call("magic_checks", 1)) end;
callfunc "magic_exp";
if (@antiprotect)
@@ -17,10 +17,7 @@ L_Disable:
end;
OnInit:
- set .school, SKILL_MAGIC_NATURE;
set .invocation$, chr(MAGIC_SYMBOL) + "detsanc"; // used in npcs that refer to this spell
- void call("magic_register");
- set .level, 0;
- set .exp_gain, 0;
+ registercmd .invocation$, strnpcinfo(0);
end;
}