diff options
author | shadow <shadow@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-07-03 02:18:44 +0000 |
---|---|---|
committer | shadow <shadow@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-07-03 02:18:44 +0000 |
commit | f02e49e2f48c7aa316bffce2ec51357e9e869b7c (patch) | |
tree | a132b9b00e308e26002a13e872c949c15ca41e8f /src/map/battle.c | |
parent | 747b5c7474ac2d42f7242dfb3baeb46d5450a2ed (diff) | |
download | hercules-f02e49e2f48c7aa316bffce2ec51357e9e869b7c.tar.gz hercules-f02e49e2f48c7aa316bffce2ec51357e9e869b7c.tar.bz2 hercules-f02e49e2f48c7aa316bffce2ec51357e9e869b7c.tar.xz hercules-f02e49e2f48c7aa316bffce2ec51357e9e869b7c.zip |
Fixes regarding bugreport:1727 (undead element/race skill behaviors) follow up on revisions r12820 r12821 and r12822
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12903 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 348cd8ad0..9db8d2647 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -614,7 +614,8 @@ int battle_addmastery(struct map_session_data *sd,struct block_list *target,int nullpo_retr(0, sd); if((skill = pc_checkskill(sd,AL_DEMONBANE)) > 0 && - (status->race==RC_UNDEAD || status->race==RC_DEMON) ) + target->type == BL_MOB && //This bonus doesnt work against players. + (battle_check_undead(status->race,status->def_ele) || status->race==RC_DEMON) ) damage += (skill*(int)(3+(sd->status.base_level+1)*0.05)); // submitted by orn //damage += (skill * 3); @@ -1713,7 +1714,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo vit_def = def2*(def2-15)/150; vit_def = def2/2 + (vit_def>0?rand()%vit_def:0); - if((sstatus->race==RC_UNDEAD || sstatus->race==RC_DEMON) && + if((battle_check_undead(sstatus->race,sstatus->def_ele) || sstatus->race==RC_DEMON) && //This bonus already doesnt work vs players src->type == BL_MOB && (skill=pc_checkskill(tsd,AL_DP)) > 0) vit_def += skill*(int)(3 +(tsd->status.base_level+1)*0.04); // submitted by orn } else { //Mob-Pet vit-eq |