diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-12 20:26:33 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-12 20:26:33 +0000 |
commit | 5eca0f4fbf1e4ae5c8aceccdd623f400a137355a (patch) | |
tree | bb8d555f00d775ed04d108cdcb1aec6042e8f2f7 /src/map/battle.c | |
parent | 7cc7a44ec1ba5a64e978fa0f89f45f70da10a748 (diff) | |
download | hercules-5eca0f4fbf1e4ae5c8aceccdd623f400a137355a.tar.gz hercules-5eca0f4fbf1e4ae5c8aceccdd623f400a137355a.tar.bz2 hercules-5eca0f4fbf1e4ae5c8aceccdd623f400a137355a.tar.xz hercules-5eca0f4fbf1e4ae5c8aceccdd623f400a137355a.zip |
- Added back the undead check to turn undead/resurrection to prevent damaging non-undead targets, removed it from the battle damage section.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7639 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 17 |
1 files changed, 8 insertions, 9 deletions
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; |