summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-01 14:40:49 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-01 14:40:49 +0000
commit11aa43448a18e4334f6ddc89711d15f73273484d (patch)
tree1c7dfa37df1c89642ca5f6f529b4f116e8435f90 /src/map/status.c
parentb11dfba7a7ce1b7b5cfd114c066c0eb8614958c4 (diff)
downloadhercules-11aa43448a18e4334f6ddc89711d15f73273484d.tar.gz
hercules-11aa43448a18e4334f6ddc89711d15f73273484d.tar.bz2
hercules-11aa43448a18e4334f6ddc89711d15f73273484d.tar.xz
hercules-11aa43448a18e4334f6ddc89711d15f73273484d.zip
- Removed bonus 'bAspdAddRate'. bAspdRate now behaves on a stackable matter, so it's no longer needed.
- Reimplemented the bonus 'bAspd' - Renamed variable aspd_add_rate to aspd_add, since bAspdAddRate was removed, this variable now holds the absolute aspd bonuses. - Added define status_base_amotion_pc to get the base amotion value. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10107 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c37
1 files changed, 11 insertions, 26 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 8d4084f28..d1442e4bf 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1170,6 +1170,14 @@ 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))
+
static int status_base_atk(struct block_list *bl, struct status_data *status)
{
int flag = 0, str, dex, dstr;
@@ -1692,7 +1700,7 @@ int status_calc_pc(struct map_session_data* sd,int first)
+ sizeof(sd->sp_loss_rate)
+ sizeof(sd->classchange)
+ sizeof(sd->speed_add_rate)
- + sizeof(sd->aspd_add_rate)
+ + sizeof(sd->aspd_add)
+ sizeof(sd->setitem_hash)
+ sizeof(sd->setitem_hash2)
// shorts
@@ -1882,8 +1890,6 @@ int status_calc_pc(struct map_session_data* sd,int first)
sd->double_rate += sd->double_add_rate;
sd->perfect_hit += sd->perfect_hit_add;
sd->splash_range += sd->splash_add_range;
- if(sd->aspd_add_rate)
- status->aspd_rate += 10*sd->aspd_add_rate;
if(sd->speed_add_rate)
sd->speed_rate += sd->speed_add_rate;
@@ -2166,18 +2172,7 @@ int status_calc_pc(struct map_session_data* sd,int first)
// Unlike other stats, ASPD rate modifiers from skills/SCs/items/etc are first all added together, then the final modifier is applied
// Basic ASPD value
- if (sd->status.weapon < MAX_WEAPON_TYPE)
- i = (1000 -4*status->agi -status->dex)
- *aspd_base[sd->status.class_][sd->status.weapon]/1000;
- else
- i = ((
- (1000 -4*status->agi -status->dex)
- *aspd_base[sd->status.class_][sd->weapontype1]/1000
- )+(
- (1000 -4*status->agi -status->dex)
- *aspd_base[sd->status.class_][sd->weapontype2]/1000
- )) *2/3; //From what I read in rodatazone, 2/3 should be more accurate than 0.7 -> 140 / 200; [Skotlex]
-
+ i = status_base_amotion_pc(sd,status);
status->amotion = cap_value(i,battle_config.max_aspd,2000);
// Relative modifiers from passive skills
@@ -2696,18 +2691,8 @@ void status_calc_bl_sub_pc(struct map_session_data *sd, unsigned long flag)
}
if(flag&(SCB_ASPD|SCB_AGI|SCB_DEX)) {
flag|=SCB_ASPD;
- if (sd->status.weapon < MAX_WEAPON_TYPE)
- skill = (1000 -4*status->agi -status->dex)
- *aspd_base[sd->status.class_][sd->status.weapon]/1000;
- else
- skill = ((
- (1000 -4*status->agi -status->dex)
- *aspd_base[sd->status.class_][sd->weapontype1]/1000
- )+(
- (1000 -4*status->agi -status->dex)
- *aspd_base[sd->status.class_][sd->weapontype2]/1000
- )) *2/3;
+ skill = status_base_amotion_pc(sd,status);
status->aspd_rate = status_calc_aspd_rate(&sd->bl, &sd->sc , b_status->aspd_rate);
// Apply all relative modifiers