summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-08 03:49:44 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-08 03:49:44 +0000
commitaaca2ea1b3c25e29fed6a51e999b662192d92d36 (patch)
treebc6a47cea6c1df80158e2adab3e0b0aa2a3c3227 /src/map/battle.c
parentfbd1469bd30b81cddafb69e447db73954edf962f (diff)
downloadhercules-aaca2ea1b3c25e29fed6a51e999b662192d92d36.tar.gz
hercules-aaca2ea1b3c25e29fed6a51e999b662192d92d36.tar.bz2
hercules-aaca2ea1b3c25e29fed6a51e999b662192d92d36.tar.xz
hercules-aaca2ea1b3c25e29fed6a51e999b662192d92d36.zip
* Remove some unnecessary checks in battle.c
* Added some checks to prevent novices still allowed to attack when using Trick Dead git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@936 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index c0daf16a1..b442405b3 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1932,7 +1932,7 @@ static struct Damage battle_calc_pet_weapon_attack(
if(t_sc_data != NULL && t_sc_data[SC_SLEEP].timer!=-1 )
cri <<=1;
- if(skill_num == 0 && skill_lv >= 0 && battle_config.enemy_critical && (rand() % 1000) < cri)
+ if(skill_num == 0 && battle_config.enemy_critical && (rand() % 1000) < cri)
{
damage += atkmax;
type = 0x0a;
@@ -2250,7 +2250,7 @@ static struct Damage battle_calc_pet_weapon_attack(
// Š®‘S‰ñ”ð‚Ì”»’è
if(battle_config.enemy_perfect_flee) {
- if(skill_num == 0 && skill_lv >= 0 && tmd!=NULL && rand()%1000 < battle_get_flee2(target) ){
+ if(skill_num == 0 && tmd!=NULL && rand()%1000 < battle_get_flee2(target) ){
damage=0;
type=0x0b;
dmg_lv = ATK_LUCKY;
@@ -2782,14 +2782,14 @@ static struct Damage battle_calc_mob_weapon_attack(
}
// Š®‘S‰ñ”ð‚Ì”»’è
- if(skill_num == 0 && skill_lv >= 0 && tsd!=NULL && rand()%1000 < battle_get_flee2(target) ){
+ if(skill_num == 0 && tsd!=NULL && rand()%1000 < battle_get_flee2(target) ){
damage=0;
type=0x0b;
dmg_lv = ATK_LUCKY;
}
if(battle_config.enemy_perfect_flee) {
- if(skill_num == 0 && skill_lv >= 0 && tmd!=NULL && rand()%1000 < battle_get_flee2(target) ){
+ if(skill_num == 0 && tmd!=NULL && rand()%1000 < battle_get_flee2(target) ){
damage=0;
type=0x0b;
dmg_lv = ATK_LUCKY;
@@ -2984,11 +2984,11 @@ static struct Damage battle_calc_pc_weapon_attack(
//ŽO’i¶
//if(skill_num == 0 && skill_lv >= 0 && (skill = pc_checkskill(sd,MO_TRIPLEATTACK)) > 0 && sd->status.weapon <= 16 && !sd->state.arrow_atk) {
- if(skill_num == 0 && skill_lv >= 0 && (skill = pc_checkskill(sd,MO_TRIPLEATTACK)) > 0 && sd->status.weapon <= 16) { // triple blow works with bows ^^ [celest]
+ if(skill_num == 0 && (skill = pc_checkskill(sd,MO_TRIPLEATTACK)) > 0 && sd->status.weapon <= 16) { // triple blow works with bows ^^ [celest]
da = (rand()%100 < (30 - skill)) ? 2:0;
}
- if(sd->double_rate > 0 && da == 0 && skill_num == 0 && skill_lv >= 0)
+ if(sd->double_rate > 0 && da == 0 && skill_num == 0)
da = (rand()%100 < sd->double_rate) ? 1:0;
// ‰ß踘Bƒ{[ƒiƒX
@@ -3915,7 +3915,7 @@ static struct Damage battle_calc_pc_weapon_attack(
}
// Š®‘S‰ñ”ð‚Ì”»’è
- if(skill_num == 0 && skill_lv >= 0 && tsd!=NULL && div_ < 255 && rand()%1000 < battle_get_flee2(target) ){
+ if(skill_num == 0 && tsd!=NULL && div_ < 255 && rand()%1000 < battle_get_flee2(target) ){
damage=damage2=0;
type=0x0b;
dmg_lv = ATK_LUCKY;
@@ -3923,7 +3923,7 @@ static struct Damage battle_calc_pc_weapon_attack(
// ‘ÎÛ‚ªŠ®‘S‰ñ”ð‚ð‚·‚éݒ肪ON‚È‚ç
if(battle_config.enemy_perfect_flee) {
- if(skill_num == 0 && skill_lv >= 0 && tmd!=NULL && div_ < 255 && rand()%1000 < battle_get_flee2(target) ) {
+ if(skill_num == 0 && tmd!=NULL && div_ < 255 && rand()%1000 < battle_get_flee2(target) ) {
damage=damage2=0;
type=0x0b;
dmg_lv = ATK_LUCKY;