summaryrefslogtreecommitdiff
path: root/world/map/npc/magic/level1-lesser-heal.txt
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2016-03-08 18:27:49 -0600
committermekolat <mekolat@users.noreply.github.com>2016-03-30 11:22:50 -0400
commit502bb1adfbe060d81b8bbcd6d41153170f43031c (patch)
tree8f3f9c992a07d83e0063e67974442190ff747a7a /world/map/npc/magic/level1-lesser-heal.txt
parentafb8f6982d9a6458197faeb9c035b0a882b5b7fa (diff)
downloadserverdata-502bb1adfbe060d81b8bbcd6d41153170f43031c.tar.gz
serverdata-502bb1adfbe060d81b8bbcd6d41153170f43031c.tar.bz2
serverdata-502bb1adfbe060d81b8bbcd6d41153170f43031c.tar.xz
serverdata-502bb1adfbe060d81b8bbcd6d41153170f43031c.zip
Add heal_gain_xp
Diffstat (limited to 'world/map/npc/magic/level1-lesser-heal.txt')
-rw-r--r--world/map/npc/magic/level1-lesser-heal.txt20
1 files changed, 14 insertions, 6 deletions
diff --git a/world/map/npc/magic/level1-lesser-heal.txt b/world/map/npc/magic/level1-lesser-heal.txt
index 6b728e81..22aec370 100644
--- a/world/map/npc/magic/level1-lesser-heal.txt
+++ b/world/map/npc/magic/level1-lesser-heal.txt
@@ -15,16 +15,23 @@
callfunc "adjust_spellpower";
set Sp, Sp - 6;
misceffect FX_MAGIC_WHITE, strcharinfo(0);
- if (@target_id != BL_ID) misceffect FX_MAGIC_WHITE, @target_id;
- // TODO gain_heal_exp
- // TODO magic_exp
+ set .@heal_value, (get(MaxHp, @target_id) - get(Hp, @target_id));
+ set @mexp, .exp_gain;
+ if (.@heal_value < 200)
+ set .@heal_value, 200;
if (@args$ == "Mouboo" || @args$ == "mouboo") goto L_Mouboo;
+ if (@target_id != BL_ID) goto L_NotMe;
+ goto L_Continue;
- if (getskilllv(SKILL_MAGIC_DARK) >= 1) sc_start SC_HALT_REGENERATE, 2000, 0;
+L_NotMe:
+ misceffect FX_MAGIC_WHITE, @target_id;
+ callfunc "gain_heal_xp";
+ goto L_Continue;
- set @heal_amount, 200, @target_id;
+L_Continue:
+ if (getskilllv(SKILL_MAGIC_DARK) >= 1) sc_start SC_HALT_REGENERATE, 2000, 0;
if (attachrid(@target_id) != 1) end; // XXX: to avoid the ugly attachrid method we would need some kind of `run_as` builtin
- if (!(isdead())) heal @heal_amount, 0, 1;
+ if (!(isdead())) heal .@heal_value, 1, 1;
end;
L_Mouboo:
@@ -37,5 +44,6 @@ OnInit:
void call("magic_register");
set .level, 1;
set .exp_gain, 1;
+ set .heal_xp_value_divisor, 2;
end;
}