diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 24 | ||||
-rw-r--r-- | src/map/pc.c | 10 | ||||
-rw-r--r-- | src/map/skill-pools.c | 2 |
3 files changed, 24 insertions, 12 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 9b5f699..177c63e 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2283,6 +2283,7 @@ static struct Damage battle_calc_pc_weapon_attack( int watk,watk_,cardfix,t_ele; int da=0,i,t_class,ac_flag = 0; int idef_flag=0,idef_flag_=0; + int target_distance; //return前の処理があるので情報出力部のみ変更 if( src == NULL || target == NULL || sd == NULL ){ @@ -2354,27 +2355,36 @@ static struct Damage battle_calc_pc_weapon_attack( } } hitrate=battle_get_hit(src) - flee + 80; //命中率計算 - battle_is_unarmed(src); - { // [Fate] Reduce hit chance by distance + + { // [fate] Reduce hit chance by distance int dx = abs(src->x - target->x); int dy = abs(src->y - target->y); - int dist = MAX(dx, dy); - hitrate -= (dist * (dist + 1)); - } + int malus_dist; - type=0; // normal - div_ = 1; // single attack + target_distance = MAX(dx, dy); + malus_dist = MAX(0, target_distance - (skill_power(sd, AC_OWL) / 75)); + hitrate -= (malus_dist * (malus_dist + 1)); + } dex=battle_get_dex(src); //DEX luk=battle_get_luk(src); //LUK watk = battle_get_atk(src); //ATK watk_ = battle_get_atk_(src); //ATK左手 + type=0; // normal + div_ = 1; // single attack + if(skill_num==HW_MAGICCRASHER){ /* マジッククラッシャーはMATKで殴る */ damage = damage2 = battle_get_matk1(src); //damega,damega2初登場、base_atkの取得 }else{ damage = damage2 = battle_get_baseatk(&sd->bl); //damega,damega2初登場、base_atkの取得 } + if (sd->attackrange > 2) { // [fate] ranged weapon? + const int range_damage_bonus = 80; // up to 31.25% bonus for long-range hit + damage = damage * (256 + ((range_damage_bonus * target_distance) / sd->attackrange)) >> 8; + damage2 = damage2 * (256 + ((range_damage_bonus * target_distance) / sd->attackrange)) >> 8; + } + atkmin = atkmin_ = dex; //最低ATKはDEXで初期化? sd->state.arrow_atk = 0; //arrow_atk初期化 if(sd->equip_index[9] >= 0 && sd->inventory_data[sd->equip_index[9]]) diff --git a/src/map/pc.c b/src/map/pc.c index 5976137..e2f8eec 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1431,9 +1431,6 @@ int pc_calcstatus(struct map_session_data* sd,int first) if( (skill=pc_checkskill(sd,MC_INCCARRY))>0 ) // skill can be used with an item now, thanks to orn [Valaris] sd->max_weight += skill*1000; - if( (skill=pc_checkskill(sd,AC_OWL))>0 ) // ソスモゑソスソスうソスフ厄ソス - sd->paramb[4] += skill; - // ソスXソスeソス[ソス^ソスXソスマ会ソスソスノゑソスソスソスソスソスソス{ソスpソスソスソスソスソス[ソス^ソス竦ウ if(sd->sc_count){ if(sd->sc_data[SC_CONCENTRATE].timer!=-1 && sd->sc_data[SC_QUAGMIRE].timer == -1){ // ソスWソスソスソスヘ鯉ソスソスソス @@ -1568,10 +1565,15 @@ int pc_calcstatus(struct map_session_data* sd,int first) if( (skill=pc_checkskill(sd,AC_VULTURE))>0){ // ソスソスソスVソスフ厄ソス sd->hit += skill; - if(sd->status.weapon == 11) + if (sd->status.weapon == 11) sd->attackrange += skill; } + if (sd->attackrange > 2) { // [fate] ranged weapon? + sd->attackrange += MIN(skill_power(sd, AC_OWL) / 60, 3); + sd->hit += skill_power(sd, AC_OWL) / 10; // 20 for 200 + } + if( (skill=pc_checkskill(sd,BS_WEAPONRESEARCH))>0) // ソスソスソス研ソスソスソスフ厄ソスソスソスソスソスソスソスソスソス sd->hit += skill*2; if(sd->status.option&2 && (skill = pc_checkskill(sd,RG_TUNNELDRIVE))>0 ) // ソスgソスソスソスlソスソスソスhソスソスソスCソスu // ソスgソスソスソスlソスソスソスhソスソスソスCソスu diff --git a/src/map/skill-pools.c b/src/map/skill-pools.c index de7f04b..177a6a2 100644 --- a/src/map/skill-pools.c +++ b/src/map/skill-pools.c @@ -96,10 +96,10 @@ skill_pool_activate(struct map_session_data *sd, int skill_id) else if (sd->status.skill[skill_id].id == skill_id // knows the skill && (skill_pool_size(sd) < skill_pool_max(sd))) { sd->status.skill[skill_id].flags |= SKILL_POOL_ACTIVATED; + pc_calcstatus(sd, 0); MAP_LOG_PC(sd, "SKILL-ACTIVATE %d %d %d", skill_id, sd->status.skill[skill_id].lv, skill_power(sd, skill_id)); return 0; } - pc_calcstatus(sd, 0); return 1; // failed } |