diff options
author | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-05-07 09:36:53 +0000 |
---|---|---|
committer | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-05-07 09:36:53 +0000 |
commit | 4303c5001974a694aa1be004d7b062c82927a460 (patch) | |
tree | 99f91cc3984c4c0e79ff743a96af01043d81813c /src | |
parent | 78dd9d3e2c08e1291c3245f9aa25a4c10d7632e4 (diff) | |
download | hercules-4303c5001974a694aa1be004d7b062c82927a460.tar.gz hercules-4303c5001974a694aa1be004d7b062c82927a460.tar.bz2 hercules-4303c5001974a694aa1be004d7b062c82927a460.tar.xz hercules-4303c5001974a694aa1be004d7b062c82927a460.zip |
Fixed bugreport:5685 Base atk formula is now in RE
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16084 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/status.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/map/status.c b/src/map/status.c index 623a39dce..f8197ee7d 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1726,7 +1726,12 @@ int status_base_amotion_pc(struct map_session_data* sd, struct status_data* stat static unsigned short status_base_atk(const struct block_list *bl, const struct status_data *status) { - int flag = 0, str, dex, dstr; + int flag = 0, str, dex, +#ifdef RENEWAL + rstr, +#endif + dstr; + if(!(bl->type&battle_config.enable_baseatk)) return 0; @@ -1744,9 +1749,15 @@ static unsigned short status_base_atk(const struct block_list *bl, const struct flag = 1; } if (flag) { +#ifdef RENEWAL + rstr = +#endif str = status->dex; dex = status->str; } else { +#ifdef RENEWAL + rstr = +#endif str = status->str; dex = status->dex; } @@ -1756,7 +1767,11 @@ static unsigned short status_base_atk(const struct block_list *bl, const struct dstr = str/10; str += dstr*dstr; if (bl->type == BL_PC) +#ifdef RENEWAL + str = (rstr*10 + dex*10/5 + status->luk*10/3 + ((TBL_PC*)bl)->status.base_level*10/4)/10; +#else str+= dex/5 + status->luk/5; +#endif return cap_value(str, 0, USHRT_MAX); } @@ -1827,11 +1842,6 @@ void status_calc_misc(struct block_list *bl, struct status_data *status, int lev status->batk = cap_value(temp, 0, USHRT_MAX); } else status->batk = status_base_atk(bl, status); - -#ifdef RENEWAL // renewal attack bonus formula - status->batk += (int)((float)status->luk/3 + (float)level/4); //(every 3 luk = + 1ATK) + (every 4 base level = +1 ATK) -#endif - if (status->cri) switch (bl->type) { case BL_MOB: |