summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-01-02 09:25:30 -0300
committerJesusaves <cpntb1@ymail.com>2022-01-02 09:25:30 -0300
commitcd2fa3a4842c4f0fbd6f970485fdbfc5850fb3ea (patch)
treed62422c3f248bbad311aca8d33f068f93f2624d8
parent8433d2049acdb8b3e7a649d22e9247d7021ba111 (diff)
downloadserverdata-cd2fa3a4842c4f0fbd6f970485fdbfc5850fb3ea.tar.gz
serverdata-cd2fa3a4842c4f0fbd6f970485fdbfc5850fb3ea.tar.bz2
serverdata-cd2fa3a4842c4f0fbd6f970485fdbfc5850fb3ea.tar.xz
serverdata-cd2fa3a4842c4f0fbd6f970485fdbfc5850fb3ea.zip
Add a new skill: Transfer MP
-rw-r--r--db/re/skill_db.conf43
-rw-r--r--db/re/skill_tree.conf1
-rw-r--r--npc/functions/hub.txt3
-rw-r--r--npc/magic/mpregen.txt17
4 files changed, 64 insertions, 0 deletions
diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf
index 48e97456f..4e59926ee 100644
--- a/db/re/skill_db.conf
+++ b/db/re/skill_db.conf
@@ -40432,6 +40432,49 @@ skill_db: (
Quest: true
}
},
+{
+ Id: 20079
+ Name: "TMW2_MPTRANSFER"
+ Description: "MP Transfer"
+ MaxLevel: 10
+ SkillType: {
+ Friend: true
+ }
+ Hit: "BDT_SKILL"
+ AttackType: "Magic"
+ DamageType: {
+ NoDamage: true
+ }
+ InterruptCast: true
+ CoolDown: {
+ Lv1: 4000
+ Lv2: 3500
+ Lv3: 3000
+ Lv4: 2500
+ Lv5: 2000
+ Lv6: 1500
+ Lv7: 1000
+ Lv8: 500
+ Lv9: 250
+ Lv10: 100
+ }
+ CastTime: 500
+ AfterCastActDelay: {
+ Lv1: 1000
+ Lv2: 900
+ Lv3: 800
+ Lv4: 700
+ Lv5: 600
+ Lv6: 500
+ Lv7: 400
+ Lv8: 300
+ Lv9: 200
+ Lv10: 100
+ }
+ SkillInfo: {
+ Quest: true
+ }
+},
diff --git a/db/re/skill_tree.conf b/db/re/skill_tree.conf
index 1338d3bca..64a68d45d 100644
--- a/db/re/skill_tree.conf
+++ b/db/re/skill_tree.conf
@@ -130,6 +130,7 @@ Human: {
TMW2_CHANT: 0
SM_RECOVERY: 0
MG_SRECOVERY: 0
+ TMW2_MPTRANSFER: 0
//PF_HPCONVERSION: 0
//HP_MEDITATIO: 0
CR_TRUST: 0
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index bd96481f2..4a33df300 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -528,6 +528,9 @@ function script HUB_SkillInvoke {
case TMW2_MPREGEN:
SK_mpregen();
break;
+ case TMW2_MPTRANSFER:
+ SK_transfermp(@skillTarget);
+ break;
case TMW2_STUDY:
SK_study(@skillTarget);
break;
diff --git a/npc/magic/mpregen.txt b/npc/magic/mpregen.txt
index e58af3c87..dc8ad2bd3 100644
--- a/npc/magic/mpregen.txt
+++ b/npc/magic/mpregen.txt
@@ -20,6 +20,23 @@ function script SK_mpregen {
return;
}
+function script SK_transfermp {
+ .@mp = Sp;
+ .@me = getcharid(3);
+ .@tg = getarg(0, @skillTarget);
+ detachrid();
+ attachrid(.@tg);
+ .@mo = MaxSp - Sp;
+ // Heal will be the smallest from:
+ // Current MP or Missing Mp
+ .@vl = min(.@mo, .@mp);
+ Sp += .@vl;
+ detachrid();
+ attachrid(.@me);
+ Sp -= .@vl;
+ return;
+}
+
/*
- script sk#mpgen 32767,{
end;