V0.2.0: reworked Ring of Haste, now only increases movement speed.

This commit is contained in:
Evan Debenham 2014-09-10 10:34:43 -04:00
parent ba636007c2
commit 1828209594
2 changed files with 14 additions and 13 deletions

View File

@ -329,14 +329,23 @@ public class Hero extends Char {
@Override
public float speed() {
float speed = super.speed();
int hasteLevel = 0;
for (Buff buff : buffs( RingOfHaste.Haste.class )) {
hasteLevel += ((RingOfHaste.Haste)buff).level;
}
if (hasteLevel != 0)
speed *= Math.pow(1.2, hasteLevel);
int aEnc = belongings.armor != null ? belongings.armor.STR - STR() : 0;
if (aEnc > 0) {
return (float)(super.speed() * Math.pow( 1.3, -aEnc ));
return (float)(speed * Math.pow( 1.3, -aEnc ));
} else {
float speed = super.speed();
return ((HeroSprite)sprite).sprint( subClass == HeroSubClass.FREERUNNER && !isStarving() ) ? 1.6f * speed : speed;
}
@ -352,15 +361,6 @@ public class Hero extends Char {
}
}
@Override
public void spend( float time ) {
int hasteLevel = 0;
for (Buff buff : buffs( RingOfHaste.Haste.class )) {
hasteLevel += ((RingOfHaste.Haste)buff).level;
}
super.spend( hasteLevel == 0 ? time : (float)(time * Math.pow( 1.1, -hasteLevel )) );
};
public void spendAndNext( float time ) {
busy();
spend( time );

View File

@ -31,7 +31,8 @@ public class RingOfHaste extends Ring {
@Override
public String desc() {
return isKnown() ?
"This ring accelerates the wearer's flow of time, allowing one to perform all actions a little faster." :
"This ring reduces the stress of movement on the wearer, allowing them to run" +
"at superhuman speeds. A cursed ring will instead weigh the wearer down.":
super.desc();
}