From 1be1ea3b265e4cfbd8339c8e13b7a46615a9b6d3 Mon Sep 17 00:00:00 2001 From: ultramage Date: Fri, 17 Aug 2007 19:29:03 +0000 Subject: * 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 --- src/map/status.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3-70-g09d2