summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-19 13:26:50 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-19 13:26:50 +0000
commitc1d7d16b0e4010b27591f37ee93a1ca8d1137ecb (patch)
treeffa19893e7d612e011d2d441a48ed23c37a15898 /src/map/battle.c
parenta36580661f18d01c8b4f97be7d56d827df520638 (diff)
downloadhercules-c1d7d16b0e4010b27591f37ee93a1ca8d1137ecb.tar.gz
hercules-c1d7d16b0e4010b27591f37ee93a1ca8d1137ecb.tar.bz2
hercules-c1d7d16b0e4010b27591f37ee93a1ca8d1137ecb.tar.xz
hercules-c1d7d16b0e4010b27591f37ee93a1ca8d1137ecb.zip
* Implemented script command "areamobuseskill" and skill NPC_INVINCIBLE and NPC_INVINCIBLEOFF. (topic:217330)
* Using items no longer cancels invincibility(but using target and ground skills through items does). (bugreport:3259) * Fixed Butterfly Wings not working during GVG. (bugreport:3264) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13897 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 0f943c5c4..17f052bb0 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -294,12 +294,15 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
if(!damage) return 0;
}
-
- if (skill_num == PA_PRESSURE)
- return damage; //This skill bypass everything else.
sc = status_get_sc(bl);
+ if( sc && sc->data[SC_INVINCIBLE] && !sc->data[SC_INVINCIBLEOFF] )
+ return 0;
+
+ if (skill_num == PA_PRESSURE)
+ return damage; //This skill bypass everything else.
+
if( sc && sc->count )
{
//First, sc_*'s that reduce damage to 0.
@@ -482,12 +485,16 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
status_heal(src, damage*sce->val4/100, 0, 3);
}
- //SC effects from caster side. Currently none.
-/*
+
+ //SC effects from caster side.
sc = status_get_sc(src);
- if (sc && sc->count) {
+
+ if (sc && sc->count)
+ {
+ if( sc->data[SC_INVINCIBLE] && !sc->data[SC_INVINCIBLEOFF] )
+ damage += damage * 75 / 100;
}
-*/
+
if (battle_config.pk_mode && sd && bl->type == BL_PC && damage)
{
if (flag & BF_SKILL) { //Skills get a different reduction than non-skills. [Skotlex]
@@ -3820,6 +3827,7 @@ static const struct _battle_data {
{ "display_status_timers", &battle_config.display_status_timers, 1, 0, 1, },
{ "skill_add_heal_rate", &battle_config.skill_add_heal_rate, 7, 0, INT_MAX, },
{ "eq_single_target_reflectable", &battle_config.eq_single_target_reflectable, 1, 0, 1, },
+ { "invincible.nodamage", &battle_config.invincible_nodamage, 0, 0, 1, },
// BattleGround Settings
{ "bg_update_interval", &battle_config.bg_update_interval, 1000, 100, INT_MAX, },
{ "bg_short_attack_damage_rate", &battle_config.bg_short_damage_rate, 80, 0, INT_MAX, },