summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-08 14:21:50 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-08 14:21:50 +0000
commita7f08a5ac5602e897ee4ac09ec4267106c5fd07b (patch)
tree67c5b29c2ae9e13a984254ca03c56deb9fb3ac9e /src/map
parent38633b84e729539bcbdf037a97421e2e18fea2df (diff)
downloadhercules-a7f08a5ac5602e897ee4ac09ec4267106c5fd07b.tar.gz
hercules-a7f08a5ac5602e897ee4ac09ec4267106c5fd07b.tar.bz2
hercules-a7f08a5ac5602e897ee4ac09ec4267106c5fd07b.tar.xz
hercules-a7f08a5ac5602e897ee4ac09ec4267106c5fd07b.zip
- Adjusted Don't Forget Me, Defender, Longing to use all val entries, and to hold the speed adjustment value rather than speed penalty (eg: 125 instead of 25).
- Cleaned up status_calc_speed so that speed penalties are correctly handled (eg: 25% penalty is speed*100/125, not +speed*25/100). Thanks to Euph for pointing it out and Belle for the speed mechanics. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7046 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/skill.c2
-rw-r--r--src/map/status.c70
2 files changed, 41 insertions, 31 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index dfa8a8992..4720074c2 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
- val2 = 2*skilllv+status->agi/10; // Movement speed decrease
+ val2 = 100+2*skilllv+status->agi/10; // Movement speed adjustment.
if(sd){
val1 += pc_checkskill(sd,DC_DANCINGLESSON);
val2 += pc_checkskill(sd,DC_DANCINGLESSON);
diff --git a/src/map/status.c b/src/map/status.c
index cdc916bdc..8bf47c39e 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3143,18 +3143,25 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
if(!sc || !sc->count)
return cap_value(speed,10,USHRT_MAX);
+ // Fixed reductions
if(sc->data[SC_CURSE].timer!=-1)
speed += 450;
if(sc->data[SC_SWOO].timer != -1) // [marquis007]
speed += 450; //Let's use Curse's slow down momentarily (exact value unknown)
if(sc->data[SC_WEDDING].timer!=-1)
speed += 300;
+
+ //% increases (they don't stack)
if(sc->data[SC_SPEEDUP1].timer!=-1)
- speed -= speed*50/100;
+ speed -= speed * 50/100;
else if(sc->data[SC_SPEEDUP0].timer!=-1)
- speed -= speed*25/100;
+ speed -= speed * 25/100;
else if(sc->data[SC_INCREASEAGI].timer!=-1)
speed -= speed * 25/100;
+ else if(sc->data[SC_RUN].timer!=-1)
+ speed -= speed * 25/100;
+ else if(sc->data[SC_FUSION].timer != -1)
+ speed -= speed * 25/100;
else if(sc->data[SC_CARTBOOST].timer!=-1)
speed -= speed * 20/100;
else if(sc->data[SC_BERSERK].timer!=-1)
@@ -3163,45 +3170,44 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
speed -= speed * sc->data[SC_AVOID].val2/100;
else if(sc->data[SC_WINDWALK].timer!=-1)
speed -= speed * sc->data[SC_WINDWALK].val3/100;
- if(sc->data[SC_SLOWDOWN].timer!=-1)
- speed += speed * 50/100;
+
+ //% reductions (they stack)
+ if(sc->data[SC_DANCING].timer!=-1 && sc->data[SC_DANCING].val3&0xFFFF)
+ speed += speed*(sc->data[SC_DANCING].val3&0xFFFF)/100;
if(sc->data[SC_DECREASEAGI].timer!=-1)
- speed += speed * 25/100;
+ speed = speed * 100/75;
if(sc->data[SC_STEELBODY].timer!=-1)
- speed += speed * 25/100;
+ speed = speed * 100/75;
if(sc->data[SC_QUAGMIRE].timer!=-1)
- speed += speed * 50/100;
+ speed = speed * 100/50;
if(sc->data[SC_DONTFORGETME].timer!=-1)
- speed += speed * sc->data[SC_DONTFORGETME].val3/100;
+ speed = speed * 100/sc->data[SC_DONTFORGETME].val3;
if(sc->data[SC_DEFENDER].timer!=-1)
- speed += speed * (35-5*sc->data[SC_DEFENDER].val1)/100;
+ speed = speed * 100/sc->data[SC_DEFENDER].val4;
if(sc->data[SC_GOSPEL].timer!=-1 && sc->data[SC_GOSPEL].val4 == BCT_ENEMY)
- speed += speed * 25/100;
+ speed = speed * 100/75;
if(sc->data[SC_JOINTBEAT].timer!=-1) {
if (sc->data[SC_JOINTBEAT].val2 == 0)
- speed += speed * 50/100;
- else if (sc->data[SC_JOINTBEAT].val2 == 2)
- speed += speed * 30/100;
+ speed = speed * 100/50;
+ else
+ if (sc->data[SC_JOINTBEAT].val2 == 2)
+ speed = speed * 100/70;
}
if(sc->data[SC_CLOAKING].timer!=-1)
- speed = speed*(
+ speed = speed * 100 /(
(sc->data[SC_CLOAKING].val4&2?25:0) //Wall speed bonus
- +sc->data[SC_CLOAKING].val3) /100; //Normal adjustment bonus.
+ +sc->data[SC_CLOAKING].val3); //Normal adjustment bonus.
- if(sc->data[SC_DANCING].timer!=-1 && sc->data[SC_DANCING].val3&0xFFFF)
- speed += speed*(sc->data[SC_DANCING].val3&0xFFFF)/100;
if(sc->data[SC_LONGING].timer!=-1)
- speed += speed*sc->data[SC_LONGING].val2/100;
+ speed = speed * 100/sc->data[SC_LONGING].val3;
if(sc->data[SC_HIDING].timer!=-1 && sc->data[SC_HIDING].val3)
- speed += speed*sc->data[SC_HIDING].val3/100;
+ speed = speed * 100/sc->data[SC_HIDING].val3;
if(sc->data[SC_CHASEWALK].timer!=-1)
- speed = speed * sc->data[SC_CHASEWALK].val3/100;
- if(sc->data[SC_RUN].timer!=-1)
- speed -= speed * 25/100;
- if(sc->data[SC_FUSION].timer != -1)
- speed -= speed * 25/100;
+ speed = speed * 100/sc->data[SC_CHASEWALK].val3;
if(sc->data[SC_GATLINGFEVER].timer!=-1)
- speed += speed * 25/100;
+ speed = speed * 100/75;
+ if(sc->data[SC_SLOWDOWN].timer!=-1)
+ speed = speed * 100/75;
return cap_value(speed,10,USHRT_MAX);
}
@@ -3287,7 +3293,7 @@ static short status_calc_aspd_rate(struct block_list *bl, struct status_change *
if(sc->data[SC_SKA].timer!=-1)
aspd_rate += 25;
if(sc->data[SC_DEFENDER].timer != -1)
- aspd_rate += 25 -sc->data[SC_DEFENDER].val1*5;
+ aspd_rate += sc->data[SC_DEFENDER].val3;
if(sc->data[SC_GOSPEL].timer!=-1 && sc->data[SC_GOSPEL].val4 == BCT_ENEMY)
aspd_rate += 25;
if(sc->data[SC_GRAVITATION].timer!=-1)
@@ -4482,7 +4488,8 @@ 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/Speed penalty.
+ val2 = 50-10*val1; //Aspd penalty.
+ val3 = 50+10*val1; //Walk speed adjustment.
break;
case SC_EXPLOSIONSPIRITS:
val2 = 75 + 25*val1; //Cri bonus
@@ -4562,7 +4569,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
tick = 1000;
//Store speed penalty on val3.
if(sd && (val3 = pc_checkskill(sd,RG_TUNNELDRIVE))>0)
- val3 = 100 - 16*val3;
+ val3 = 20 + 6*val3;
val4 = val1+3; //Seconds before SP substraction happen.
break;
case SC_CHASEWALK:
@@ -4632,12 +4639,15 @@ 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 + val1*15;
+ val2 = 5 + 15*val1; //Damage reduction
+ val3 = 25 - 5*val1; //Aspd adjustment
+ val4 = 135 - 5*val1; //Speed adjustment
+
if (sd)
for (i = 0; i < 5; i++)
{ //See if there are devoted characters, and pass the status to them. [Skotlex]
if (sd->devotion[i] && (tsd = map_id2sd(sd->devotion[i])))
- status_change_start(&tsd->bl,SC_DEFENDER,10000,val1,5+val1*5,0,0,tick,1);
+ status_change_start(&tsd->bl,SC_DEFENDER,10000,val1,5+val1*5,val3,val4,tick,1);
}
}
break;