diff options
author | Jared Adams <jaxad0127@gmail.com> | 2008-10-25 15:26:39 +0000 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2008-10-25 15:26:39 +0000 |
commit | ca26e3ffa7b4baf9bd6e8e55f57151695492e7a0 (patch) | |
tree | 22dd70e247762530afa72ada3fe723168a179492 | |
parent | cf635e4d6fc28800b056bc9d99a145db9ae2694a (diff) | |
download | tmwa-ca26e3ffa7b4baf9bd6e8e55f57151695492e7a0.tar.gz tmwa-ca26e3ffa7b4baf9bd6e8e55f57151695492e7a0.tar.bz2 tmwa-ca26e3ffa7b4baf9bd6e8e55f57151695492e7a0.tar.xz tmwa-ca26e3ffa7b4baf9bd6e8e55f57151695492e7a0.zip |
Commit Mantis 504
-rw-r--r-- | src/map/battle.c | 9 | ||||
-rw-r--r-- | src/map/pc.c | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index d455d78..991affd 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -486,7 +486,7 @@ int battle_get_critical(struct block_list *bl) nullpo_retr(1, bl); sc_data=battle_get_sc_data(bl); if(bl->type==BL_PC && (struct map_session_data *)bl){ - critical = battle_get_luk(bl)*3 + 10; + critical = battle_get_luk(bl)*2 + 10; critical += ((struct map_session_data *)bl)->critical - ((((struct map_session_data *)bl)->paramc[5]*3) + 10); } else @@ -2744,7 +2744,6 @@ static struct Damage battle_calc_pc_weapon_attack( return wd; } - // アタッカー s_race=battle_get_race(src); //種族 s_ele=battle_get_attack_element(src); //属性 @@ -2808,6 +2807,12 @@ static struct Damage battle_calc_pc_weapon_attack( } } hitrate=battle_get_hit(src) - flee + 80; //命中率計算 + { // [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)); + } type=0; // normal div_ = 1; // single attack diff --git a/src/map/pc.c b/src/map/pc.c index 8bb2ee8..996b1c1 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1504,9 +1504,11 @@ int pc_calcstatus(struct map_session_data* sd,int first) else { str = sd->paramc[0]; dex = sd->paramc[4]; + sd->critical += ((dex * 3) >> 1); } dstr = str/10; sd->base_atk += str + dstr*dstr + dex/5 + sd->paramc[5]/5; +//fprintf(stderr, "baseatk = %d = x + %d + %d + %d + %d\n", sd->base_atk, str, dstr*dstr, dex/5, sd->paramc[5]/5); sd->matk1 += sd->paramc[3]+(sd->paramc[3]/5)*(sd->paramc[3]/5); sd->matk2 += sd->paramc[3]+(sd->paramc[3]/7)*(sd->paramc[3]/7); if(sd->matk1 < sd->matk2) { |