summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c13
-rw-r--r--src/map/clif.c6
-rw-r--r--src/map/pc.c4
-rw-r--r--src/map/skill.c12
4 files changed, 25 insertions, 10 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index ef43ed39a..12438ea62 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1121,14 +1121,21 @@ static struct Damage battle_calc_weapon_attack(
hitrate += 10*skill_lv;
break;
case KN_AUTOCOUNTER:
+ case PA_SHIELDCHAIN:
+ case NPC_WATERATTACK:
+ case NPC_GROUNDATTACK:
+ case NPC_FIREATTACK:
+ case NPC_WINDATTACK:
+ case NPC_POISONATTACK:
+ case NPC_HOLYATTACK:
+ case NPC_DARKNESSATTACK:
+ case NPC_UNDEADATTACK:
+ case NPC_TELEKINESISATTACK:
hitrate += 20;
break;
case KN_PIERCE:
hitrate += hitrate*(5*skill_lv)/100;
break;
- case PA_SHIELDCHAIN:
- hitrate += 20;
- break;
case AS_SONICBLOW:
if(sd && pc_checkskill(sd,AS_SONICACCEL)>0)
hitrate += 50;
diff --git a/src/map/clif.c b/src/map/clif.c
index 85f7cdd58..32152dfc1 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -7566,6 +7566,12 @@ int clif_refresh(struct map_session_data *sd) {
}
clif_updatestatus(sd,SP_MAXWEIGHT);
clif_updatestatus(sd,SP_WEIGHT);
+ clif_updatestatus(sd,SP_STR);
+ clif_updatestatus(sd,SP_AGI);
+ clif_updatestatus(sd,SP_VIT);
+ clif_updatestatus(sd,SP_INT);
+ clif_updatestatus(sd,SP_DEX);
+ clif_updatestatus(sd,SP_LUK);
map_foreachinrange(clif_getareachar,&sd->bl,AREA_SIZE,BL_ALL,sd);
clif_weather_check(sd);
return 0;
diff --git a/src/map/pc.c b/src/map/pc.c
index 5f16e01c0..de5977bcf 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2397,12 +2397,12 @@ int pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type4
switch(type){
case SP_AUTOSPELL:
if(sd->state.lr_flag != 2)
- pc_bonus_autospell(sd->autospell, MAX_PC_BONUS, (val?type2:-type2), type3, type4, current_equip_card_id);
+ pc_bonus_autospell(sd->autospell, MAX_PC_BONUS, (val&1?type2:-type2), (val&2?-type3:type3), type4, current_equip_card_id);
break;
case SP_AUTOSPELL_WHENHIT:
if(sd->state.lr_flag != 2)
- pc_bonus_autospell(sd->autospell2, MAX_PC_BONUS, (val?type2:-type2), type3, type4, current_equip_card_id);
+ pc_bonus_autospell(sd->autospell2, MAX_PC_BONUS, (val&1?type2:-type2), (val&2?-type3:type3), type4, current_equip_card_id);
break;
default:
if(battle_config.error_log)
diff --git a/src/map/skill.c b/src/map/skill.c
index 1b06c355a..8e792f604 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1408,7 +1408,9 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
if (skillnotok(skill, sd))
continue;
- skilllv = (sd->autospell[i].lv > 0) ? sd->autospell[i].lv : 1;
+ skilllv = sd->autospell[i].lv?sd->autospell[i].lv:1;
+ if (skilllv < 0) skilllv = 1+rand()%(-skilllv);
+
rate = (!sd->state.arrow_atk) ? sd->autospell[i].rate : sd->autospell[i].rate / 2;
if (rand()%1000 > rate)
@@ -1569,12 +1571,12 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
struct unit_data *ud;
int i, skillid, skilllv, rate;
- for (i = 0; i < MAX_PC_BONUS; i++) {
- if (dstsd->autospell2[i].id == 0)
- break;
+ for (i = 0; i < MAX_PC_BONUS && dstsd->autospell2[i].id; i++) {
skillid = (dstsd->autospell2[i].id > 0) ? dstsd->autospell2[i].id : -dstsd->autospell2[i].id;
- skilllv = (dstsd->autospell2[i].lv > 0) ? dstsd->autospell2[i].lv : 1;
+ skilllv = dstsd->autospell2[i].lv?dstsd->autospell2[i].lv:1;
+ if (skilllv < 0) skilllv = 1+rand()%(-skilllv);
+
rate = ((sd && !sd->state.arrow_atk) || (status_get_range(src)<=2)) ?
dstsd->autospell2[i].rate : dstsd->autospell2[i].rate / 2;