summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDastgir Pojee <dastgirp@gmail.com>2016-10-03 19:17:38 +0530
committerhemagx <ibrahem.h.basyone@gmail.com>2016-10-22 02:22:13 +0200
commit52bd4a502c919e789e8900820423a49a4343b3d7 (patch)
tree02118d843fa381009928714aefffd71eadfb894d
parentf4e8189545642ee0bf87f3da546bddc918682935 (diff)
downloadhercules-52bd4a502c919e789e8900820423a49a4343b3d7.tar.gz
hercules-52bd4a502c919e789e8900820423a49a4343b3d7.tar.bz2
hercules-52bd4a502c919e789e8900820423a49a4343b3d7.tar.xz
hercules-52bd4a502c919e789e8900820423a49a4343b3d7.zip
Implemented SC_BITESCAR:
Cannot be reset by dispell. Cannot be healed by item/NPC once in BITESCAR. Heal Skill would end the BiteScar Effect.
-rw-r--r--db/sc_config.txt1
-rw-r--r--src/map/pc.c3
-rw-r--r--src/map/script.c7
-rw-r--r--src/map/skill.c6
-rw-r--r--src/map/status.c13
5 files changed, 27 insertions, 3 deletions
diff --git a/db/sc_config.txt b/db/sc_config.txt
index 8f784158a..661e9bb87 100644
--- a/db/sc_config.txt
+++ b/db/sc_config.txt
@@ -494,6 +494,7 @@ SC_BLOSSOM_FLUTTERING, 463
// Summoner
SC_SPRITEMABLE, 205
+SC_BITESCAR, 4
// Cant Clear
SC_ALL_RIDING, 397
diff --git a/src/map/pc.c b/src/map/pc.c
index 8f6d3bcb0..bfd6c0ea5 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -8408,6 +8408,9 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp)
if( sd->sc.data[SC_EXTREMITYFIST2] )
sp = 0;
#endif
+ if (sd->sc.data[SC_BITESCAR]) {
+ hp = 0;
+ }
}
return status->heal(&sd->bl, hp, sp, 1);
diff --git a/src/map/script.c b/src/map/script.c
index d1aee29bf..2a39bc832 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -6721,13 +6721,16 @@ BUILDIN(percentheal)
}
sd = script->rid2sd(st);
- if( sd == NULL )
+ if (sd == NULL)
return true;
#ifdef RENEWAL
if( sd->sc.data[SC_EXTREMITYFIST2] )
sp = 0;
#endif
- pc->percentheal(sd,hp,sp);
+ if (sd->sc.data[SC_BITESCAR]) {
+ hp = 0;
+ }
+ pc->percentheal(sd, hp, sp);
return true;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 4be827572..73154d3ae 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5589,6 +5589,9 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
else if (tsc->data[SC_BERSERK])
heal = 0; //Needed so that it actually displays 0 when healing.
}
+ if (skill_id == AL_HEAL) {
+ status_change_end(bl, SC_BITESCAR, INVALID_TIMER);
+ }
clif->skill_nodamage (src, bl, skill_id, heal, 1);
if( tsc && tsc->data[SC_AKAITSUKI] && heal && skill_id != HLIF_HEAL )
heal = ~heal + 1;
@@ -6751,7 +6754,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
status_change_end(bl, SC_SILENCE, INVALID_TIMER);
status_change_end(bl, SC_BLIND, INVALID_TIMER);
status_change_end(bl, SC_CONFUSION, INVALID_TIMER);
- clif->skill_nodamage(src,bl,skill_id,skill_lv,1);
+ status_change_end(bl, SC_BITESCAR, INVALID_TIMER);
+ clif->skill_nodamage(src, bl, skill_id, skill_lv, 1);
break;
case TF_DETOXIFY:
diff --git a/src/map/status.c b/src/map/status.c
index 508127cb6..ca1d6249d 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -7836,6 +7836,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_NETHERWORLD:
case SC_FRESHSHRIMP:
case SC_SV_ROOTTWIST:
+ case SC_BITESCAR:
return 0;
}
}
@@ -9822,6 +9823,11 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_TUNAPARTY:
val2 = (st->max_hp * (val1 * 10) / 100); // %Max HP to absorb
break;
+ case SC_BITESCAR:
+ val2 = 2 * val1; // MHP% damage
+ val4 = tick / 1000;
+ tick_time = 1000;
+ break;
default:
if (calc_flag == SCB_NONE && status->dbs->SkillChangeTable[type] == 0 && status->dbs->IconChangeTable[type] == 0) {
//Status change with no calc, no icon, and no skill associated...?
@@ -12095,6 +12101,13 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data)
sc_timer_next((10000 - ((sce->val1 - 1) * 1000)) + tick, status->change_timer, bl->id, data);
}
break;
+ case SC_BITESCAR:
+ if (--(sce->val4) >= 0) {
+ status_percent_damage(bl, bl, -(sce->val2), 0, 0);
+ sc_timer_next(1000 + tick, status->change_timer, bl->id, data);
+ return 0;
+ }
+ break;
}
// default for all non-handled control paths is to end the status