diff options
-rw-r--r-- | Changelog-Trunk.txt | 3 | ||||
-rw-r--r-- | src/map/battle.c | 30 |
2 files changed, 17 insertions, 16 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 3f69afe72..10ef82bc9 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/08/09
+ * Removed the code which was auto-setting attacks that do no damage to type
+ FLEE, since that was disabling status-effects which should incur even when
+ the damage was blocked. [Skotlex]
* Trade requests will now fail when either character is unable to act
(character in storage, vending, interacting with an npc, petrified, etc)
[Skotlex]
diff --git a/src/map/battle.c b/src/map/battle.c index 5044543bf..32857bcb3 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1943,23 +1943,23 @@ static struct Damage battle_calc_weapon_attack( if(sd && !skill_num && !flag.cri) { //Check for double attack. - if(( (skill_lv = 5*pc_checkskill(sd,TF_DOUBLE)) > 0 && sd->weapontype1 == W_DAGGER) || - sd->double_rate > 0) //Success chance is not added, the higher one is used? [Skotlex] - { - if (rand()%100 < (skill_lv>sd->double_rate?skill_lv:sd->double_rate)) + if(((skill_lv = pc_checkskill(sd,TF_DOUBLE)) > 0 && sd->weapontype1 == W_DAGGER) || sd->double_rate > 0) + { //Success chance is not added, the higher one is used [Skotlex] + if (rand()%100 < (5*skill_lv>sd->double_rate?5*skill_lv:sd->double_rate)) { - wd.div_=skill_get_num(TF_DOUBLE,skill_lv?skill_lv/5:1); + wd.div_=skill_get_num(TF_DOUBLE,skill_lv?skill_lv:1); damage_div_fix(wd.damage, wd.div_); wd.type = 0x08; } - } else if ((skill_lv = pc_checkskill(sd,GS_CHAINACTION)) > 0 && sd->weapontype1 == W_REVOLVER) + } else + if (sd->weapontype1 == W_REVOLVER && + (skill_lv = pc_checkskill(sd,GS_CHAINACTION)) > 0 && + (rand()%100 < 5*skill_lv) + ) { - if (rand()%100 < 5*skill_lv) - { - wd.div_=skill_get_num(GS_CHAINACTION,skill_lv); - damage_div_fix(wd.damage, wd.div_); - wd.type = 0x08; - } + wd.div_=skill_get_num(GS_CHAINACTION,skill_lv); + damage_div_fix(wd.damage, wd.div_); + wd.type = 0x08; } } @@ -2460,7 +2460,7 @@ struct Damage battle_calc_magic_attack( damage_div_fix(ad.damage, ad.div_); if (flag.infdef && ad.damage) - ad.damage/= ad.damage; //Why this? Because, well, if damage is absorbed, it should heal 1, not do 1 dmg. + ad.damage = ad.damage>0?1:-1; ad.damage=battle_calc_damage(src,target,ad.damage,ad.div_,skill_num,skill_lv,ad.flag); if (map_flag_gvg(target->m)) @@ -2747,10 +2747,8 @@ struct Damage battle_calc_attack( int attack_type, break; } if (d.damage + d.damage2 < 1 && d.dmg_lv != ATK_LUCKY) - { //Miss/Absorbed - d.dmg_lv = ATK_FLEE; + //Miss/Absorbed d.dmotion = 0; - } return d; } |