summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog.txt3
-rw-r--r--src/map/battle.c16
-rw-r--r--src/map/clif.c3
-rw-r--r--src/map/skill.c3
4 files changed, 16 insertions, 9 deletions
diff --git a/Changelog.txt b/Changelog.txt
index 5a264dd62..09f72cc25 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,8 @@
Date Added
01/07
+ * Remove some unnecessary checks in battle.c [celest]
+ * Added some checks to prevent novices still allowed to attack when using
+ Trick Dead [celest]
* Added 'summon' script command. Syntax:
summon <monster name>,<monster id>[,<event>];
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;