summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/constants.conf8
-rw-r--r--npc/config/magic.txt29
2 files changed, 27 insertions, 10 deletions
diff --git a/db/constants.conf b/db/constants.conf
index 184f5e545..b1d071d67 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -4556,5 +4556,13 @@ constants_db: {
FY_MAGIC: 6
FY_GIFT: 7
+ comment__: "Magic v3 constants"
+ CLASS_OTHER: 0
+ CLASS_SUMMON: 1
+ CLASS_PHYSICAL: 2
+ CLASS_DESTRUCTION: 3
+ CLASS_TRICKS: 4
+ CLASS_SCHOLARSHIP: 5
+
@include "conf/import/constants.conf"
}
diff --git a/npc/config/magic.txt b/npc/config/magic.txt
index d8339622c..7598becff 100644
--- a/npc/config/magic.txt
+++ b/npc/config/magic.txt
@@ -164,16 +164,17 @@ function script SK_summon {
}
/////////////////////////////////////////
-// RegisterMagic(MSP, Skill, MaxLv, Item, Amount, Cost, {PreReq, PostReq})
+// RegisterMagic(MSP, Skill, MaxLv, Item, Amount, Class, Cost, {PreReq, PostReq})
function script RegisterMagic {
.@msp=getarg(0);
.@ski=getarg(1);
.@max=getarg(2);
.@ite=getarg(3);
.@amo=getarg(4);
- .@cos=getarg(5);
- .@pre=getarg(6, false);
- .@pos=getarg(7, false);
+ .@cla=getarg(5);
+ .@cos=getarg(6);
+ .@pre=getarg(7, false);
+ .@pos=getarg(8, false);
$@MSK_MSPCOST[.@ski]=.@msp;
$@MSK_MAXLV[.@ski]=.@max;
@@ -184,32 +185,40 @@ function script RegisterMagic {
$@MSK_PREREQ[.@ski]=.@pre;
$@MSK_POSTREQ[.@ski]=.@pos;
+
+ array_push($@MSK_CLASS[.@cla], .@ski);
return;
}
- script Magic Load NPC_HIDDEN,{
OnInit:
- /* RegisterMagic(MSP, Skill, MaxLv, Item, Amount, Cost, {PreReq, PostReq}) */
+ /* RegisterMagic(MSP, Skill, MaxLv, Item, Amount,
+ Class, Cost, {PreReq, PostReq}) */
//////////////////////// Scholarship
// Last Standing Man
- RegisterMagic(3, CR_TRUST, 2, SpellBookPage, 1, 0);
+ RegisterMagic(3, CR_TRUST, 2, SpellBookPage, 1,
+ CLASS_SCHOLARSHIP, 0);
//////////////////////// Physical Sciences
// Falkon Punch
- RegisterMagic(1, SM_BASH, 10, FluoPowder, 3, 0, false, MC_MAMMONITE);
+ RegisterMagic(1, SM_BASH, 10, FluoPowder, 3,
+ CLASS_PHYSICAL, 0, false, MC_MAMMONITE);
// Supreme Attack
- RegisterMagic(1, MC_MAMMONITE, 10, FluoPowder, 3, 0, SM_BASH, KN_AUTOCOUNTER);
+ RegisterMagic(1, MC_MAMMONITE, 10, FluoPowder, 3,
+ CLASS_PHYSICAL, 0, SM_BASH, KN_AUTOCOUNTER);
// Counter Attack
- RegisterMagic(2, KN_AUTOCOUNTER, 5, FluoPowder, 3, 0, MC_MAMMONITE, false);
+ RegisterMagic(2, KN_AUTOCOUNTER, 5, FluoPowder, 3,
+ CLASS_PHYSICAL, 0, MC_MAMMONITE, false);
//////////////////////// Destructive Magic
//////////////////////// Trickmaster
//////////////////////// Other: Summonning
//////////////////////// Other: Misc
// Chargd Shot
- RegisterMagic(0, AC_CHARGEARROW, 1, NPCEyes, 1, 0);
+ RegisterMagic(0, AC_CHARGEARROW, 1,
+ CLASS_OTHER, NPCEyes, 1, 0);
end;
}