summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/re/skill_db.conf5
-rw-r--r--npc/config/magic.txt3
-rw-r--r--npc/functions/hub.txt2
-rw-r--r--npc/magic/study.txt12
4 files changed, 18 insertions, 4 deletions
diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf
index d501d4c6c..563be3184 100644
--- a/db/re/skill_db.conf
+++ b/db/re/skill_db.conf
@@ -38607,6 +38607,11 @@ skill_db: (
SkillType: {
Enemy: true
}
+ Hit: "BDT_SKILL"
+ AttackType: "Magic"
+ DamageType: {
+ NoDamage: true
+ }
CoolDown: {
Lv1: 10000
Lv2: 9000
diff --git a/npc/config/magic.txt b/npc/config/magic.txt
index 80f5a61dd..f8d5423b6 100644
--- a/npc/config/magic.txt
+++ b/npc/config/magic.txt
@@ -467,6 +467,9 @@ OnInit:
// Charged Shot
RegisterMagic(0, AC_CHARGEARROW, 1, NPCEyes, 1,
CLASS_OTHER, 100);
+ // Study
+ RegisterMagic(0, TMW2_STUDY, 1, Manapple, 1,
+ CLASS_OTHER, 1000);
end;
}
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 2b8da7908..126d30706 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -253,7 +253,7 @@ function script HUB_SkillInvoke {
SK_mpregen();
break;
case TMW2_STUDY:
- SK_study();
+ SK_study(@skillTarget);
break;
case EVOL_AREA_PROVOKE:
if (@skillTargetX && @skillTargetY)
diff --git a/npc/magic/study.txt b/npc/magic/study.txt
index 71beded64..418ac0f47 100644
--- a/npc/magic/study.txt
+++ b/npc/magic/study.txt
@@ -8,6 +8,10 @@
function script SK_study {
.@mobGD=getarg(0);
+ if (.@mobGD <= 0)
+ return;
+
+ // We want monsters
if (getunittype(.@mobGD) != UNITTYPE_MOB) {
dispbottom l("This skill can only be used on monsters!");
return;
@@ -16,7 +20,8 @@ function script SK_study {
// Research Points
if (array_rfind(@study, @mobGD) < 0) {
- .@rp=getmonsterinfo(MOB_LV)/10+1;
+ .@mult=max(1, 11-getskilllv(TMW2_STUDY));
+ .@rp=getmonsterinfo(MOB_LV)/.@mult+1;
array_push(@study, @mobGD);
dispbottom l("Research Points +%d", .@rp);
}
@@ -29,9 +34,10 @@ function script SK_study {
fnum(getunitdata(.@mobGD, UDT_SP)),
fnum(getunitdata(.@mobGD, UDT_MAXSP)));
- // Truncate
+ // Truncate.
+ // We're saving the GID so it must be "big enough"
+ // But not too big so rfind() is not expensive
if (getarraysize(@study) > 99) {
- //array_shift(@study);
deletearray(@study, 30);
}
return;