From 778cd71d3933ac6172b09654fdf2b4b317d18398 Mon Sep 17 00:00:00 2001 From: wushin Date: Wed, 9 Mar 2016 13:28:09 -0600 Subject: Fix Healing --- world/map/db/params.txt | 1 + world/map/npc/magic/_procedures.txt | 9 +++------ world/map/npc/magic/level1-lesser-heal.txt | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) (limited to 'world') diff --git a/world/map/db/params.txt b/world/map/db/params.txt index 4d905522..b10a4dce 100644 --- a/world/map/db/params.txt +++ b/world/map/db/params.txt @@ -11,6 +11,7 @@ MaxHp 6 1 Sp 7 1 MaxSp 8 1 STATUSPOINT 9 1 +HEALXP 10 1 BaseLevel 11 1 SKILLPOINT 12 1 Str 13 1 diff --git a/world/map/npc/magic/_procedures.txt b/world/map/npc/magic/_procedures.txt index 3fe0ed34..5f1ea865 100644 --- a/world/map/npc/magic/_procedures.txt +++ b/world/map/npc/magic/_procedures.txt @@ -138,17 +138,14 @@ L_Block: set @heal_xp, (@last_heal_xp + @mexp); if (@heal_xp > SCRIPT_HEALSPELL_MASK) set @heal_xp, SCRIPT_HEALSPELL_MASK; - set XMASTIME, (XMASTIME & ~(NIBBLE_0_MASK) | (@xmas_state << NIBBLE_0_SHIFT)); set SCRIPT_XP, (SCRIPT_XP & ~(SCRIPT_HEALSPELL_MASK) | (@heal_xp << SCRIPT_HEALSPELL_SHIFT)); goto L_Gain_Xp; L_Gain_Xp: - set @target_heal_xp, (get(MaxHp, @target_id) - get(HEALXP, @target_id)); - set @heal_exp, .@heal_value; - if (@target_heal_xp < .@heal_value) - set @heal_exp, @target_heal_xp; + set @heal_exp, .@heal_value; + if (.@heal_value > get(HEALXP, @target_id)) + set @heal_exp, get(HEALXP, @target_id); getexp (.base_exp_factor * @heal_exp), 0; - set HEALXP, (get(HEALXP, @target_id) + @heal_exp), @target_id; goto L_Return; L_Return: diff --git a/world/map/npc/magic/level1-lesser-heal.txt b/world/map/npc/magic/level1-lesser-heal.txt index 85f2f8a8..c4c74dd7 100644 --- a/world/map/npc/magic/level1-lesser-heal.txt +++ b/world/map/npc/magic/level1-lesser-heal.txt @@ -15,10 +15,10 @@ callfunc "adjust_spellpower"; set Sp, Sp - 6; misceffect FX_MAGIC_WHITE, strcharinfo(0); - set .@heal_value, (get(MaxHp, @target_id) - get(Hp, @target_id)); + set .@heal_value, get(HEALXP, @target_id); set @mexp, .exp_gain; callfunc "magic_exp"; - if (.@heal_value < 200) + if (.@heal_value > 200) set .@heal_value, 200; if (@args$ == "Mouboo" || @args$ == "mouboo") goto L_Mouboo; if (@target_id != BL_ID) goto L_NotMe; @@ -32,7 +32,7 @@ L_NotMe: 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_value, 1, 1; + if (!(isdead())) heal 200, 1, 1; end; L_Mouboo: -- cgit v1.2.3-60-g2f50