summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDastgir <dastgir@users.noreply.github.com>2016-03-20 21:52:15 +0530
committerDastgir <dastgir@users.noreply.github.com>2016-03-20 21:52:15 +0530
commit504770250595fdb8f3f56400ea101a4d0d45faff (patch)
treed33bd7c5933fb40bc8f4ef8ebfa64753d12cdea1 /src
parent2993842616623a4ad1e4d58f02d75f21d2700a58 (diff)
parente30c443d605312e9c87c7e16ce24fc4f8e250e15 (diff)
downloadhercules-504770250595fdb8f3f56400ea101a4d0d45faff.tar.gz
hercules-504770250595fdb8f3f56400ea101a4d0d45faff.tar.bz2
hercules-504770250595fdb8f3f56400ea101a4d0d45faff.tar.xz
hercules-504770250595fdb8f3f56400ea101a4d0d45faff.zip
Merge pull request #1080 from Jedzkie/Skill_Fixes
Fixes #1014 - Corrects the Behavior of Tension Relax
Diffstat (limited to 'src')
-rw-r--r--src/map/status.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 2f0007b8f..a8771c0a5 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3520,10 +3520,18 @@ void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, str
regen->flag &=~RGN_SP; //No natural SP regen
}
+
+ // Tension relax allows the user to recover HP while overweight
+ // at 1x speed. Other SC ignored? [csnv]
if (sc->data[SC_TENSIONRELAX]) {
- regen->rate.hp += 2;
- if (regen->sregen)
- regen->sregen->rate.hp += 3;
+ if (sc->data[SC_WEIGHTOVER50] || sc->data[SC_WEIGHTOVER90]) {
+ regen->flag &= ~RGN_SP;
+ regen->rate.hp = 1;
+ } else {
+ regen->rate.hp += 2;
+ if (regen->sregen)
+ regen->sregen->rate.hp += 3;
+ }
}
if (sc->data[SC_MAGNIFICAT]) {
@@ -12442,8 +12450,10 @@ int status_natural_heal(struct block_list* bl, va_list args) {
}
}
- if (flag && regen->state.overweight)
- flag=0;
+ // SC_TENSIONRELAX allows HP to be recovered even when overweight. [csnv]
+ if (flag && regen->state.overweight && (sc == NULL || sc->data[SC_TENSIONRELAX] == NULL)) {
+ flag = 0;
+ }
ud = unit->bl2ud(bl);