diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-16 19:49:28 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-16 19:49:28 +0000 |
commit | e4206211f72bdd727fccbe2b67d7f5a6b42c7e65 (patch) | |
tree | 86422d67903dbd9c0da66cb81524538539305413 /src/map | |
parent | 0065f7bc871bb17c6d90994759cbf6c7dcee451b (diff) | |
download | hercules-e4206211f72bdd727fccbe2b67d7f5a6b42c7e65.tar.gz hercules-e4206211f72bdd727fccbe2b67d7f5a6b42c7e65.tar.bz2 hercules-e4206211f72bdd727fccbe2b67d7f5a6b42c7e65.tar.xz hercules-e4206211f72bdd727fccbe2b67d7f5a6b42c7e65.zip |
- Removed unused variable aspd_rate in map_session_data.
- Modified aspd_rate in status_data to hold aspd change on a base of 1000 = 100% rather than 100 = 100%. All status changes that affect aspd have been updated. Study and Single Action should now correctly give +0.5% aspd per level.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7213 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/map.h | 2 | ||||
-rw-r--r-- | src/map/mob.c | 4 | ||||
-rw-r--r-- | src/map/pc.c | 4 | ||||
-rw-r--r-- | src/map/skill.c | 6 | ||||
-rw-r--r-- | src/map/status.c | 68 |
5 files changed, 42 insertions, 42 deletions
diff --git a/src/map/map.h b/src/map/map.h index 4fcc1ff22..dae831ab5 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -651,7 +651,7 @@ struct map_session_data { int castrate,delayrate,hprate,sprate,dsprate;
int atk_rate;
- int aspd_rate,speed_rate,hprecov_rate,sprecov_rate;
+ int speed_rate,hprecov_rate,sprecov_rate;
int matk_rate;
int critical_rate,hit_rate,flee_rate,flee2_rate,def_rate,def2_rate,mdef_rate,mdef2_rate;
diff --git a/src/map/mob.c b/src/map/mob.c index 472d1ba22..686cb71d3 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -3190,7 +3190,7 @@ static int mob_readdb(void) } status->mode=atoi(str[25]); status->speed=atoi(str[26]); - status->aspd_rate = 100; + status->aspd_rate = 1000; status->adelay=atoi(str[27]); status->amotion=atoi(str[28]); status->dmotion=atoi(str[29]); @@ -3869,7 +3869,7 @@ static int mob_read_sqldb(void) } status->mode = TO_INT(25); status->speed = TO_INT(26); - status->aspd_rate = 100; + status->aspd_rate = 1000; status->adelay = TO_INT(27); status->amotion = TO_INT(28); status->dmotion = TO_INT(29); diff --git a/src/map/pc.c b/src/map/pc.c index eeecf6a70..d88c0cc32 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1390,8 +1390,8 @@ int pc_bonus(struct map_session_data *sd,int type,int val) status->adelay -= val*10;
break;
case SP_ASPD_RATE: //Non stackable increase
- if(sd->state.lr_flag != 2 && status->aspd_rate > 100-val)
- status->aspd_rate = 100-val;
+ 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)
diff --git a/src/map/skill.c b/src/map/skill.c index 48cab9cd4..9cd8f58ce 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6285,7 +6285,7 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid, } break; case DC_DONTFORGETME: - val1 = 3*skilllv+status->dex/10; // ASPD decrease + val1 = 30*skilllv+status->dex; // ASPD decrease val2 = 100+2*skilllv+status->agi/10; // Movement speed adjustment. if(sd){ val1 += pc_checkskill(sd,DC_DANCINGLESSON); @@ -6309,7 +6309,7 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid, } break; case BA_ASSASSINCROSS: - val1 = 10+skilllv+(status->agi/10); // ASPD increase + val1 = 100+10*skilllv+status->agi; // ASPD increase if(sd) val1 += pc_checkskill(sd,BA_MUSICALLESSON); break; @@ -6556,7 +6556,7 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned case UNT_GRAVITATION: if (sc && sc->data[type].timer==-1) - sc_start4(bl,type,100,sg->skill_lv,5*sg->skill_lv,BCT_ENEMY,sg->group_id,sg->limit); + sc_start4(bl,type,100,sg->skill_lv,0,BCT_ENEMY,sg->group_id,sg->limit); break; case UNT_ICEWALL: //Destroy the cell. [Skotlex] diff --git a/src/map/status.c b/src/map/status.c index 5cfc34f64..ce52d17ad 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1198,7 +1198,7 @@ int status_calc_mob(struct mob_data* md, int first) status->batk += status->batk * 10*md->guardian_data->guardup_lv/100; status->rhw.atk += status->rhw.atk * 10*md->guardian_data->guardup_lv/100; status->rhw.atk2 += status->rhw.atk2 * 10*md->guardian_data->guardup_lv/100; - status->aspd_rate -= 10*md->guardian_data->guardup_lv; + status->aspd_rate -= 100*md->guardian_data->guardup_lv; } if(!battle_config.enemy_str) @@ -1357,6 +1357,7 @@ int status_calc_homunculus(struct homun_data *hd, int first) status->sp = 0; status->max_hp=500+lv*10+lv*lv; status->max_sp=300+lv*11+lv*lv*90/100; + status->aspd_rate = 1000; status->speed=0x96; status->batk = status_base_atk(&hd->bl, status); status_calc_misc(status, hd->level); @@ -1514,7 +1515,6 @@ int status_calc_pc(struct map_session_data* sd,int first) //FIXME: Most of these stuff should be calculated once, but how do I fix the memset above to do that? [Skotlex] status->speed = DEFAULT_WALK_SPEED; - status->aspd_rate = 100; status->mode = MD_CANMOVE|MD_CANATTACK|MD_LOOTER|MD_ASSIST|MD_AGGRESSIVE|MD_CASTSENSOR; status->size = (sd->class_&JOBL_BABY)?0:1; if (battle_config.character_size && pc_isriding(sd)) { //[Lupus] @@ -1524,7 +1524,7 @@ int status_calc_pc(struct map_session_data* sd,int first) } if(battle_config.character_size&1) status->size++; } - status->aspd_rate = 100; + status->aspd_rate = 1000; status->ele_lv = 1; status->race = RC_DEMIHUMAN; @@ -1766,7 +1766,7 @@ int status_calc_pc(struct map_session_data* sd,int first) sd->perfect_hit += sd->perfect_hit_add; sd->splash_range += sd->splash_add_range; if(sd->aspd_add_rate) - sd->aspd_rate += sd->aspd_add_rate; + status->aspd_rate += 10*sd->aspd_add_rate; if(sd->speed_add_rate) sd->speed_rate += sd->speed_add_rate; @@ -1963,14 +1963,14 @@ int status_calc_pc(struct map_session_data* sd,int first) // Relative modifiers from passive skills if((skill=pc_checkskill(sd,SA_ADVANCEDBOOK))>0 && sd->status.weapon == W_BOOK) - status->aspd_rate -= (skill/2); + status->aspd_rate -= 5*skill; if((skill = pc_checkskill(sd,SG_DEVIL)) > 0 && !pc_nextjobexp(sd)) - status->aspd_rate -= (skill*3); + status->aspd_rate -= 30*skill; if((skill=pc_checkskill(sd,GS_SINGLEACTION))>0 && (sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE)) - status->aspd_rate -= (skill/2); + status->aspd_rate -= 5*skill; if(pc_isriding(sd)) - status->aspd_rate += 50-10*pc_checkskill(sd,KN_CAVALIERMASTERY); + status->aspd_rate += 500-100*pc_checkskill(sd,KN_CAVALIERMASTERY); status->adelay = 2*status->amotion; @@ -2379,8 +2379,8 @@ void status_calc_bl_sub_pc(struct map_session_data *sd, unsigned long flag) status->aspd_rate = status_calc_aspd_rate(&sd->bl, &sd->sc , b_status->aspd_rate); // Apply all relative modifiers - if(status->aspd_rate != 100) - skill = skill *status->aspd_rate/100; + if(status->aspd_rate != 1000) + skill = skill *status->aspd_rate/1000; status->amotion = cap_value(skill,battle_config.max_aspd,2000); @@ -2657,10 +2657,10 @@ void status_calc_bl(struct block_list *bl, unsigned long flag) if(flag&SCB_ASPD) { status->aspd_rate = status_calc_aspd_rate(bl, sc , b_status->aspd_rate); - temp = status->aspd_rate*b_status->amotion/100; + temp = status->aspd_rate*b_status->amotion/1000; status->amotion = cap_value(temp, battle_config.monster_max_aspd, 2000); - temp = status->aspd_rate*b_status->adelay/100; + temp = status->aspd_rate*b_status->adelay/1000; status->adelay = cap_value(temp, battle_config.monster_max_aspd<<1, 4000); } @@ -3255,7 +3255,7 @@ static short status_calc_aspd_rate(struct block_list *bl, struct status_change * { int i; if(!sc || !sc->count) - return aspd_rate; + return cap_value(aspd_rate,0,SHRT_MAX); if(sc->data[SC_QUAGMIRE].timer==-1 && sc->data[SC_DONTFORGETME].timer==-1) { @@ -3263,8 +3263,8 @@ static short status_calc_aspd_rate(struct block_list *bl, struct status_change * if(sc->data[SC_STAR_COMFORT].timer!=-1) max = sc->data[SC_STAR_COMFORT].val2; - if(sc->data[SC_MADNESSCANCEL].timer!=-1 && max < 20) - max = 20; + if(sc->data[SC_MADNESSCANCEL].timer!=-1 && max < 200) + max = 200; if(sc->data[SC_TWOHANDQUICKEN].timer!=-1 && max < sc->data[SC_TWOHANDQUICKEN].val2) @@ -3316,7 +3316,7 @@ static short status_calc_aspd_rate(struct block_list *bl, struct status_change * aspd_rate -= max; if(sc->data[SC_BERSERK].timer!=-1) - aspd_rate -= 30; //Stacks with the rest of bonuses. + aspd_rate -= 300; //Stacks with the rest of bonuses. } if(sc->data[i=SC_ASPDPOTION3].timer!=-1 || sc->data[i=SC_ASPDPOTION2].timer!=-1 || @@ -3328,23 +3328,23 @@ static short status_calc_aspd_rate(struct block_list *bl, struct status_change * if(sc->data[SC_LONGING].timer!=-1) aspd_rate += sc->data[SC_LONGING].val2; if(sc->data[SC_STEELBODY].timer!=-1) - aspd_rate += 25; + aspd_rate += 250; if(sc->data[SC_SKA].timer!=-1) - aspd_rate += 25; + aspd_rate += 250; if(sc->data[SC_DEFENDER].timer != -1) aspd_rate += sc->data[SC_DEFENDER].val3; if(sc->data[SC_GOSPEL].timer!=-1 && sc->data[SC_GOSPEL].val4 == BCT_ENEMY) - aspd_rate += 25; + aspd_rate += 250; if(sc->data[SC_GRAVITATION].timer!=-1) aspd_rate += sc->data[SC_GRAVITATION].val2; //Curse shouldn't effect on this? // if(sc->data[SC_BLEEDING].timer != -1) -// aspd_rate += 25; +// aspd_rate += 250; if(sc->data[SC_JOINTBEAT].timer!=-1) { if (sc->data[SC_JOINTBEAT].val2 == 1) - aspd_rate += 25; + aspd_rate += 250; else if (sc->data[SC_JOINTBEAT].val2 == 2) - aspd_rate += 10; + aspd_rate += 100; } return cap_value(aspd_rate,0,SHRT_MAX); @@ -4520,12 +4520,12 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val break; case SC_ONEHAND: case SC_TWOHANDQUICKEN: - val2 = 30; + val2 = 300; if (val1 > 10) //For boss casted skills [Skotlex] - val2 += 2*(val1-10); + val2 += 20*(val1-10); break; case SC_SPEARQUICKEN: - val2 = 20+val1; + val2 = 200+10*val1; break; case SC_MOONLIT: val2 = bl->id; @@ -4545,7 +4545,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val tick = 1000; break; case SC_LONGING: - val2 = 50-10*val1; //Aspd penalty. + val2 = 500-100*val1; //Aspd penalty. val3 = 50+10*val1; //Walk speed adjustment. break; case SC_EXPLOSIONSPIRITS: @@ -4555,7 +4555,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val case SC_ASPDPOTION1: case SC_ASPDPOTION2: case SC_ASPDPOTION3: - val2 = 5*(2+type-SC_ASPDPOTION0); + val2 = 50*(2+type-SC_ASPDPOTION0); break; case SC_WEDDING: @@ -4698,7 +4698,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val struct map_session_data *tsd; int i; val2 = 5 + 15*val1; //Damage reduction - val3 = 25 - 5*val1; //Aspd adjustment + val3 = 250 - 50*val1; //Aspd adjustment val4 = 135 - 5*val1; //Speed adjustment if (sd) @@ -4903,7 +4903,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val break; case SC_GRAVITATION: - //val2 = aspd reduction + val2 = 50*val1; //aspd reduction if (val3 == BCT_SELF) { struct unit_data *ud = unit_bl2ud(bl); if (ud) { @@ -5048,9 +5048,9 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val case SC_ADRENALINE2: case SC_ADRENALINE: if (val2 || !battle_config.party_skill_penalty) - val2 = 30; + val2 = 300; else - val2 = 20; + val2 = 200; break; case SC_CONCENTRATION: val2 = 5*val1; //Batk/Watk Increase @@ -5078,7 +5078,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val val2 = (status_get_lv(bl) + status->dex + status->luk)/10; //luk increase break; case SC_STAR_COMFORT: - val2 = (status_get_lv(bl) + status->dex + status->luk)/10; //Aspd increase + val2 = (status_get_lv(bl) + status->dex + status->luk); //Aspd increase break; case SC_QUAGMIRE: val2 = (sd?5:10)*val1; //Agi/Dex decrease. @@ -5086,7 +5086,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val // gs_something1 [Vicious] case SC_GATLINGFEVER: - val2 = 2*val1; //Aspd increase + val2 = 20*val1; //Aspd increase val3 = 5*val1; //Flee decrease break; @@ -5106,7 +5106,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val val2 = 20+10*val1; //Atk rate change. break; case SC_FLEET: - val2 = 3*val1; //Aspd change + val2 = 30*val1; //Aspd change val3 = 5+5*val1; //Atk rate change break; case SC_MINDBREAKER: |