summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorDastgir Pojee <dastgirp@gmail.com>2016-10-03 19:06:46 +0530
committerhemagx <ibrahem.h.basyone@gmail.com>2016-10-22 02:22:11 +0200
commit69f3d4815c09ee07ce4ef3c5163411ba05c81731 (patch)
tree5519feea8bc27ce0e668f11ec31c7cfb3adc6ff7 /src/map/battle.c
parent7b6feb8f49d9c2832e505583d0ac5ebf530b8b11 (diff)
downloadhercules-69f3d4815c09ee07ce4ef3c5163411ba05c81731.tar.gz
hercules-69f3d4815c09ee07ce4ef3c5163411ba05c81731.tar.bz2
hercules-69f3d4815c09ee07ce4ef3c5163411ba05c81731.tar.xz
hercules-69f3d4815c09ee07ce4ef3c5163411ba05c81731.zip
Implemented SU_TUNAPARTY Skill.
Protects the target for 30 seconds. Tuna's Defense Power: (10+(20*(SkillLv-1)))% of Caster's MaxHP
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 001da3edd..f7ac60031 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3206,6 +3206,19 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
status_change_end(bl, SC_KYRIE, INVALID_TIMER);
}
+ if ((sce = sc->data[SC_TUNAPARTY]) != NULL && damage > 0) {
+ clif->specialeffect(bl, 336, AREA);
+ sce->val2 -= (int)cap_value(damage, INT_MIN, INT_MAX);
+ if (sce->val2 >= 0) {
+ damage = 0;
+ } else {
+ damage = -sce->val2;
+ }
+ if (sce->val2 <= 0) {
+ status_change_end(bl, SC_TUNAPARTY, INVALID_TIMER);
+ }
+ }
+
if( sc->data[SC_MEIKYOUSISUI] && rnd()%100 < 40 ) // custom value
damage = 0;