- 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://svn.code.sf.net/p/rathena/svn/trunk@10107 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
4d5a0a08bb
commit
945be871ce
@ -3,6 +3,10 @@ Date Added
|
|||||||
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
||||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||||
|
|
||||||
|
2007/04/02
|
||||||
|
* Removed bonus 'bAspdAddRate'. bAspdRate now behaves on a stackable
|
||||||
|
matter, so it's no longer needed.
|
||||||
|
* Reimplemented the bonus 'bAspd' (raw Aspd increase) [Skotlex]
|
||||||
2007/03/31
|
2007/03/31
|
||||||
* Added all the missing defines for ctype.h functions and converted all
|
* Added all the missing defines for ctype.h functions and converted all
|
||||||
the direct uses to the defines. [FlavioJS]
|
the direct uses to the defines. [FlavioJS]
|
||||||
|
@ -302,7 +302,7 @@ bIgnoreDefEle 1026
|
|||||||
bIgnoreDefRace 1027
|
bIgnoreDefRace 1027
|
||||||
bAtkRate 1028
|
bAtkRate 1028
|
||||||
bSpeedAddRate 1029
|
bSpeedAddRate 1029
|
||||||
bAspdAddRate 1030
|
|
||||||
bMagicAtkDef 1031
|
bMagicAtkDef 1031
|
||||||
bMiscAtkDef 1032
|
bMiscAtkDef 1032
|
||||||
bIgnoreMdefEle 1033
|
bIgnoreMdefEle 1033
|
||||||
|
@ -704,7 +704,7 @@ struct map_session_data {
|
|||||||
int hp_loss_rate;
|
int hp_loss_rate;
|
||||||
int sp_loss_rate;
|
int sp_loss_rate;
|
||||||
int classchange; // [Valaris]
|
int classchange; // [Valaris]
|
||||||
int speed_add_rate, aspd_add_rate;
|
int speed_add_rate, aspd_add;
|
||||||
unsigned int setitem_hash, setitem_hash2; //Split in 2 because shift operations only work on int ranges. [Skotlex]
|
unsigned int setitem_hash, setitem_hash2; //Split in 2 because shift operations only work on int ranges. [Skotlex]
|
||||||
|
|
||||||
short splash_range, splash_add_range;
|
short splash_range, splash_add_range;
|
||||||
@ -1149,7 +1149,7 @@ enum _sp {
|
|||||||
SP_CRITICAL_DEF,SP_NEAR_ATK_DEF,SP_LONG_ATK_DEF, // 1019-1021
|
SP_CRITICAL_DEF,SP_NEAR_ATK_DEF,SP_LONG_ATK_DEF, // 1019-1021
|
||||||
SP_DOUBLE_RATE, SP_DOUBLE_ADD_RATE, SP_FREE2, SP_MATK_RATE, // 1022-1025
|
SP_DOUBLE_RATE, SP_DOUBLE_ADD_RATE, SP_FREE2, SP_MATK_RATE, // 1022-1025
|
||||||
SP_IGNORE_DEF_ELE,SP_IGNORE_DEF_RACE, // 1026-1027
|
SP_IGNORE_DEF_ELE,SP_IGNORE_DEF_RACE, // 1026-1027
|
||||||
SP_ATK_RATE,SP_SPEED_ADDRATE,SP_ASPD_ADDRATE, // 1028-1030
|
SP_ATK_RATE,SP_SPEED_ADDRATE,SP_FREE3, // 1028-1030
|
||||||
SP_MAGIC_ATK_DEF,SP_MISC_ATK_DEF, // 1031-1032
|
SP_MAGIC_ATK_DEF,SP_MISC_ATK_DEF, // 1031-1032
|
||||||
SP_IGNORE_MDEF_ELE,SP_IGNORE_MDEF_RACE, // 1033-1034
|
SP_IGNORE_MDEF_ELE,SP_IGNORE_MDEF_RACE, // 1033-1034
|
||||||
SP_MAGIC_ADDELE,SP_MAGIC_ADDRACE,SP_MAGIC_ADDSIZE, // 1035-1037
|
SP_MAGIC_ADDELE,SP_MAGIC_ADDRACE,SP_MAGIC_ADDSIZE, // 1035-1037
|
||||||
@ -1179,6 +1179,7 @@ enum _sp {
|
|||||||
SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE //2041
|
SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE //2041
|
||||||
//Before adding another, note that these are free:
|
//Before adding another, note that these are free:
|
||||||
//1024 (SP_FREE2, previous matk)
|
//1024 (SP_FREE2, previous matk)
|
||||||
|
//1030 (SP_FREE3, previous AspdAddRate)
|
||||||
//2022 (SP_FREE, previous bDefIgnoreMob)
|
//2022 (SP_FREE, previous bDefIgnoreMob)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
18
src/map/pc.c
18
src/map/pc.c
@ -1528,20 +1528,12 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
|
|||||||
sd->speed_add_rate -= val;
|
sd->speed_add_rate -= val;
|
||||||
break;
|
break;
|
||||||
case SP_ASPD: //Raw increase
|
case SP_ASPD: //Raw increase
|
||||||
// if(sd->state.lr_flag != 2)
|
|
||||||
// status->amotion -= val*10;
|
|
||||||
if (battle_config.error_log)
|
|
||||||
ShowError("pc_bonus: bonus bAspd is no longer supported!\n");
|
|
||||||
break;
|
|
||||||
case SP_ASPD_RATE: //Non stackable increase
|
|
||||||
if(val >= 0) { //Let negative ASPD bonuses become AddRate ones.
|
|
||||||
if(sd->state.lr_flag != 2 && status->aspd_rate > 1000-val*10)
|
|
||||||
status->aspd_rate = 1000-val*10;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SP_ASPD_ADDRATE: //Stackable increase - Made it linear as per rodatazone
|
|
||||||
if(sd->state.lr_flag != 2)
|
if(sd->state.lr_flag != 2)
|
||||||
sd->aspd_add_rate -= val;
|
sd->aspd_add -= 10*val;
|
||||||
|
break;
|
||||||
|
case SP_ASPD_RATE: //Stackable increase - Made it linear as per rodatazone
|
||||||
|
if(sd->state.lr_flag != 2)
|
||||||
|
status->aspd_rate -= 10*val;
|
||||||
break;
|
break;
|
||||||
case SP_HP_RECOV_RATE:
|
case SP_HP_RECOV_RATE:
|
||||||
if(sd->state.lr_flag != 2)
|
if(sd->state.lr_flag != 2)
|
||||||
|
@ -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);
|
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)
|
static int status_base_atk(struct block_list *bl, struct status_data *status)
|
||||||
{
|
{
|
||||||
int flag = 0, str, dex, dstr;
|
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->sp_loss_rate)
|
||||||
+ sizeof(sd->classchange)
|
+ sizeof(sd->classchange)
|
||||||
+ sizeof(sd->speed_add_rate)
|
+ sizeof(sd->speed_add_rate)
|
||||||
+ sizeof(sd->aspd_add_rate)
|
+ sizeof(sd->aspd_add)
|
||||||
+ sizeof(sd->setitem_hash)
|
+ sizeof(sd->setitem_hash)
|
||||||
+ sizeof(sd->setitem_hash2)
|
+ sizeof(sd->setitem_hash2)
|
||||||
// shorts
|
// shorts
|
||||||
@ -1882,8 +1890,6 @@ int status_calc_pc(struct map_session_data* sd,int first)
|
|||||||
sd->double_rate += sd->double_add_rate;
|
sd->double_rate += sd->double_add_rate;
|
||||||
sd->perfect_hit += sd->perfect_hit_add;
|
sd->perfect_hit += sd->perfect_hit_add;
|
||||||
sd->splash_range += sd->splash_add_range;
|
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)
|
if(sd->speed_add_rate)
|
||||||
sd->speed_rate += 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
|
// 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
|
// Basic ASPD value
|
||||||
if (sd->status.weapon < MAX_WEAPON_TYPE)
|
i = status_base_amotion_pc(sd,status);
|
||||||
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]
|
|
||||||
|
|
||||||
status->amotion = cap_value(i,battle_config.max_aspd,2000);
|
status->amotion = cap_value(i,battle_config.max_aspd,2000);
|
||||||
|
|
||||||
// Relative modifiers from passive skills
|
// 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)) {
|
if(flag&(SCB_ASPD|SCB_AGI|SCB_DEX)) {
|
||||||
flag|=SCB_ASPD;
|
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);
|
status->aspd_rate = status_calc_aspd_rate(&sd->bl, &sd->sc , b_status->aspd_rate);
|
||||||
|
|
||||||
// Apply all relative modifiers
|
// Apply all relative modifiers
|
||||||
|
Loading…
x
Reference in New Issue
Block a user