summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshadow <shadow@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-03 02:18:44 +0000
committershadow <shadow@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-07-03 02:18:44 +0000
commitf02e49e2f48c7aa316bffce2ec51357e9e869b7c (patch)
treea132b9b00e308e26002a13e872c949c15ca41e8f /src/map
parent747b5c7474ac2d42f7242dfb3baeb46d5450a2ed (diff)
downloadhercules-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')
-rw-r--r--src/map/battle.c5
-rw-r--r--src/map/skill.c6
-rw-r--r--src/map/status.c6
3 files changed, 10 insertions, 7 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
diff --git a/src/map/skill.c b/src/map/skill.c
index 758aa6fd2..f106ebd57 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -609,7 +609,8 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
case CR_GRANDCROSS:
case NPC_GRANDDARKNESS:
- if(tstatus->race == RC_UNDEAD || tstatus->race == RC_DEMON)
+ //Chance to cause blind status vs demon and undead element, but not against players
+ if(!dstsd && (battle_check_undead(tstatus->race,tstatus->def_ele) || tstatus->race == RC_DEMON))
sc_start(bl,SC_BLIND,100,skilllv,skill_get_time2(skillid,skilllv));
break;
@@ -6817,7 +6818,8 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
break;
case UNT_EVILLAND:
- if (tstatus->race!=RC_UNDEAD && tstatus->race!=RC_DEMON)
+ //Will heal demon and undead element monsters, but not players.
+ if (bl->type != BL_PC && !battle_check_undead(tstatus->race, tstatus->def_ele) && tstatus->race!=RC_DEMON)
{ //Damage enemies
if(battle_check_target(&src->bl,bl,BCT_ENEMY)>0)
skill_attack(BF_MISC, ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0);
diff --git a/src/map/status.c b/src/map/status.c
index 02714d82c..9f7a05d52 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -4810,7 +4810,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
return 0;
switch (type) {
case SC_BLESSING:
- if (status->race!=RC_UNDEAD && status->race!=RC_DEMON)
+ if (!undead_flag && status->race!=RC_DEMON)
break;
case SC_QUAGMIRE:
case SC_DECREASEAGI:
@@ -4835,7 +4835,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_BLESSING:
//TO-DO Blessing and Agi up should do 1 damage against players on Undead Status, even on PvM
//but cannot be plagiarized (this requires aegis investigation on packets and official behavior) [Brainstorm]
- if (status->race!=RC_UNDEAD && status->race!=RC_DEMON) {
+ if ((!undead_flag && status->race!=RC_DEMON) || bl->type == BL_PC) {
if (sc->data[SC_CURSE])
status_change_end(bl,SC_CURSE,-1);
if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE)
@@ -5677,7 +5677,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
val4 = -1; //Kaahi Timer.
break;
case SC_BLESSING:
- if (status->race!=RC_UNDEAD && status->race!=RC_DEMON)
+ if ((!undead_flag && status->race!=RC_DEMON) || bl->type == BL_PC)
val2 = val1;
else
val2 = 0; //0 -> Half stat.