diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-08 03:49:44 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-08 03:49:44 +0000 |
commit | aaca2ea1b3c25e29fed6a51e999b662192d92d36 (patch) | |
tree | bc6a47cea6c1df80158e2adab3e0b0aa2a3c3227 /src/map | |
parent | fbd1469bd30b81cddafb69e447db73954edf962f (diff) | |
download | hercules-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')
-rw-r--r-- | src/map/battle.c | 16 | ||||
-rw-r--r-- | src/map/clif.c | 3 | ||||
-rw-r--r-- | src/map/skill.c | 3 |
3 files changed, 13 insertions, 9 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( // 完全回避の判定 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( } // 完全回避の判定 - 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( //三段掌 //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; // 過剰精錬ボーナス @@ -3915,7 +3915,7 @@ static struct Damage battle_calc_pc_weapon_attack( } // 完全回避の判定 - 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( // 対象が完全回避をする設定が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; diff --git a/src/map/clif.c b/src/map/clif.c index 0412192e1..825e18e96 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8041,7 +8041,8 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd) { } if (sd->npc_id != 0 || sd->opt1 > 0 || sd->status.option & 2 || (sd->sc_data && - (sd->sc_data[SC_AUTOCOUNTER].timer != -1 || //オートカウンター + (sd->sc_data[SC_TRICKDEAD].timer != -1 || + sd->sc_data[SC_AUTOCOUNTER].timer != -1 || //オートカウンター sd->sc_data[SC_BLADESTOP].timer != -1 || //白刃取り sd->sc_data[SC_DANCING].timer != -1))) //ダンス中 return; diff --git a/src/map/skill.c b/src/map/skill.c index cf99a8615..69033f716 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -9749,6 +9749,9 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val calc_flag = 1; break; case SC_TRICKDEAD: /* 死んだふり */ + if (bl->type == BL_PC) { + pc_stopattack((struct map_session_data *)sd); + } break; case SC_QUAGMIRE: /* クァグマイア */ calc_flag = 1; |