diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-08-17 19:29:03 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-08-17 19:29:03 +0000 |
commit | 1be1ea3b265e4cfbd8339c8e13b7a46615a9b6d3 (patch) | |
tree | 0ac36419edc5e7ab6a2006f964477b0c21264572 /src | |
parent | f34575273520e89695da1446868275e7c4e37431 (diff) | |
download | hercules-1be1ea3b265e4cfbd8339c8e13b7a46615a9b6d3.tar.gz hercules-1be1ea3b265e4cfbd8339c8e13b7a46615a9b6d3.tar.bz2 hercules-1be1ea3b265e4cfbd8339c8e13b7a46615a9b6d3.tar.xz hercules-1be1ea3b265e4cfbd8339c8e13b7a46615a9b6d3.zip |
* Implemented the official dual-wield aspd equation
- using 0.7 instead of 0.66 as modifier (so aspd will be lower now)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11030 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/status.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/map/status.c b/src/map/status.c index 7059bb903..21ab964a5 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -59,7 +59,6 @@ int current_equip_item_index; //Contains inventory index of an equipped item. To int current_equip_card_id; //To prevent card-stacking (from jA) [Skotlex] //we need it for new cards 15 Feb 2005, to check if the combo cards are insrerted into the CURRENT weapon only //to avoid cards exploits -void status_calc_bl_sub_hom(struct homun_data *hd, unsigned long flag); //[orn] static void add_sc(int skill, int sc) { @@ -1170,13 +1169,24 @@ int status_check_visibility(struct block_list *src, struct block_list *target) void status_calc_bl(struct block_list *bl, unsigned long flag); - // Basic ASPD value -#define status_base_amotion_pc(sd,status) (sd->aspd_add + \ - (sd->status.weapon < MAX_WEAPON_TYPE? \ - (1000 -4*status->agi -status->dex)*aspd_base[sd->status.class_][sd->status.weapon]/1000:\ - (1000 -4*status->agi -status->dex)*(\ - aspd_base[sd->status.class_][sd->weapontype1]+\ - aspd_base[sd->status.class_][sd->weapontype2])*2/3000)) +// Basic ASPD value +int status_base_amotion_pc(struct map_session_data* sd, struct status_data* status) +{ + int amotion; + + // base weapon delay + amotion = (sd->status.weapon < MAX_WEAPON_TYPE) + ? (aspd_base[sd->status.class_][sd->status.weapon]) // single weapon + : (aspd_base[sd->status.class_][sd->weapontype1] + aspd_base[sd->status.class_][sd->weapontype2])*7/10; // dual-wield + + // percentual delay reduction from stats + amotion-= amotion * (4*status->agi + status->dex)/1000; + + // raw delay adjustment from bAspd bonus + amotion+= sd->aspd_add; + + return amotion; +} static int status_base_atk(struct block_list *bl, struct status_data *status) { |