diff options
-rw-r--r-- | Changelog-Trunk.txt | 3 | ||||
-rw-r--r-- | src/map/battle.c | 17 | ||||
-rw-r--r-- | src/map/skill.c | 7 |
3 files changed, 15 insertions, 12 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index f1790d1b1..92f6629b6 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/07/12
+ * Added back the undead check to turn undead/resurrection to prevent
+ damaging non-undead targets, removed it from the battle damage section.
+ [Skotlex]
* Resurrection will now silently fail when used on non-undead + not-dead
characters. [Skotlex]
* Poem of bragi/magic String's base delay reduction at level 10 (or above)
diff --git a/src/map/battle.c b/src/map/battle.c index c956fcda8..38143997d 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2167,15 +2167,14 @@ struct Damage battle_calc_magic_attack( break; case ALL_RESURRECTION: case PR_TURNUNDEAD: - if(battle_check_undead(tstatus->race,tstatus->def_ele)){ - int thres; - thres = (skill_lv * 20) + sstatus->luk + sstatus->int_ + status_get_lv(src) + ((200 - tstatus->hp * 200 / tstatus->max_hp)); - if(thres > 700) thres = 700; - if(rand()%1000 < thres && !(tstatus->mode&MD_BOSS)) - ad.damage = tstatus->hp; - else - ad.damage = status_get_lv(src) + sstatus->int_ + skill_lv * 10; - } + //Undead check is on skill_castend_damageid code. + i = 20*skill_lv + sstatus->luk + sstatus->int_ + status_get_lv(src) + + 200 - 200*tstatus->hp/tstatus->max_hp; + if(i > 700) i = 700; + if(rand()%1000 < i && !(tstatus->mode&MD_BOSS)) + ad.damage = tstatus->hp; + else + ad.damage = status_get_lv(src) + sstatus->int_ + skill_lv * 10; break; case PF_SOULBURN: ad.damage = tstatus->sp * 2; diff --git a/src/map/skill.c b/src/map/skill.c index 08dce3b6d..34423071a 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2817,9 +2817,10 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int skill_addtimerskill(src, tick + 1000, bl->id, 0, 0, skillid, skilllv, BF_WEAPON, flag); break; - case ALL_RESURRECTION: /* リザレクション */ - case PR_TURNUNDEAD: /* ターンアンデッド */ - //Undead check is on unit-use skill + case PR_TURNUNDEAD: + case ALL_RESURRECTION: + if (!battle_check_undead(tstatus->race, tstatus->def_ele)) + break; skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag); break; |