summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--src/map/battle.c5
-rw-r--r--src/map/skill.c6
-rw-r--r--src/map/status.c6
4 files changed, 13 insertions, 7 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 817267b90..8b4529c19 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,9 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2008/07/03
+ * Fixes regarding bugreport:1727 (undead element/race skill behaviors) follow up on revisions r12820 r12821 and r12822 [Brainstorm]
+
2008/06/24
* Rev. 12891 Increased Item group limit for new item groups. [L0ne_W0lf]
2008/06/23
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.