summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-14 17:33:21 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-14 17:33:21 +0000
commitc07a09726d9e94d75786192fc671cde81dc73176 (patch)
tree8cf57867e258ba4d4c1fbfff8c55d0af760b1a1e /src/map/battle.c
parent7167494574430bdaa1fe7fa13d106e2eabbf0f08 (diff)
downloadhercules-c07a09726d9e94d75786192fc671cde81dc73176.tar.gz
hercules-c07a09726d9e94d75786192fc671cde81dc73176.tar.bz2
hercules-c07a09726d9e94d75786192fc671cde81dc73176.tar.xz
hercules-c07a09726d9e94d75786192fc671cde81dc73176.zip
Fixed bugreport:5954 SC_SHADOWFORM Can now be canceled with detecting skills which is check in every 2 seconds.
Fixed bugreport:6010 AB_EXPIATIO now give a piercing damage bonus. Fixed Diamond/Crystallize status to work only to non mob target and its official behavior(bugreport:5893) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16296 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c42
1 files changed, 39 insertions, 3 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index ce0f1b9a6..a6b422ccb 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -344,7 +344,13 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag
if( tsc->data[SC_THORNSTRAP] && atk_elem == ELE_FIRE )
status_change_end(target, SC_THORNSTRAP, -1);
if( tsc->data[SC_FIRE_CLOAK_OPTION] && atk_elem == ELE_FIRE )
- damage -= damage * tsc->data[SC_FIRE_CLOAK_OPTION]->val2 / 100;
+ damage -= damage * tsc->data[SC_FIRE_CLOAK_OPTION]->val2 / 100;
+ if( tsc->data[SC_CRYSTALIZE] && target->type != BL_MOB){
+ if( atk_elem == ELE_WIND)
+ damage = damage * 150 / 100;
+ if( atk_elem == ELE_FIRE )
+ status_change_end(target, SC_CRYSTALIZE, INVALID_TIMER);
+ }
}
return damage*ratio/100;
}
@@ -573,12 +579,36 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
#endif
if( damage ) {
-
+ struct map_session_data *tsd = BL_CAST(BL_PC, src);
if( sc->data[SC_DEEPSLEEP] ) {
damage += damage / 2; // 1.5 times more damage while in Deep Sleep.
status_change_end(bl,SC_DEEPSLEEP,INVALID_TIMER);
}
-
+ if( tsd && sd && sc->data[SC_CRYSTALIZE] && flag&BF_WEAPON ){
+ switch(tsd->status.weapon){
+ case W_MACE:
+ case W_2HMACE:
+ case W_1HAXE:
+ case W_2HAXE:
+ damage = damage * 150 / 100;
+ break;
+ case W_MUSICAL:
+ case W_WHIP:
+ if(!sd->state.arrow_atk)
+ break;
+ case W_BOW:
+ case W_REVOLVER:
+ case W_RIFLE:
+ case W_GATLING:
+ case W_SHOTGUN:
+ case W_GRENADE:
+ case W_DAGGER:
+ case W_1HSWORD:
+ case W_2HSWORD:
+ damage = damage * 50 / 100;
+ break;
+ }
+ }
if( sc->data[SC_VOICEOFSIREN] )
status_change_end(bl,SC_VOICEOFSIREN,INVALID_TIMER);
}
@@ -2550,6 +2580,12 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
}
}
+ if( sc && sc->data[SC_EXPIATIO] ){
+ i = 5 * sc->data[SC_EXPIATIO]->val1; // 5% per level
+ def1 -= def1 * i / 100;
+ def2 -= def2 * i / 100;
+ }
+
if( battle_config.vit_penalty_type && battle_config.vit_penalty_target&target->type ) {
unsigned char target_count; //256 max targets should be a sane max
target_count = unit_counttargeted(target);