v0.6.4: balance changes:

- increased talisman of foresight charge speed
- increased hourglass charge value, and speed at low levels
- significantly slowed sungrass regen speed, no longer lowered by combat
- earthroot defence is now capped on depth, not percentage based
This commit is contained in:
Evan Debenham 2018-03-22 21:59:06 -04:00
parent 8ff3db2088
commit 33b6d83204
7 changed files with 41 additions and 63 deletions

View File

@ -101,7 +101,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm; import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.Earthroot; import com.shatteredpixel.shatteredpixeldungeon.plants.Earthroot;
import com.shatteredpixel.shatteredpixeldungeon.plants.Sungrass;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.SurfaceScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.SurfaceScene;
@ -955,11 +954,6 @@ public class Hero extends Char {
if (armor != null) { if (armor != null) {
damage = armor.absorb( damage ); damage = armor.absorb( damage );
} }
Sungrass.Health health = buff( Sungrass.Health.class );
if (health != null) {
health.absorb( damage );
}
if (belongings.armor != null) { if (belongings.armor != null) {
damage = belongings.armor.proc( enemy, this, damage ); damage = belongings.armor.proc( enemy, this, damage );

View File

@ -236,7 +236,7 @@ public class Artifact extends KindofMisc {
public void restoreFromBundle( Bundle bundle ) { public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle(bundle); super.restoreFromBundle(bundle);
exp = bundle.getInt( EXP ); exp = bundle.getInt( EXP );
charge = bundle.getInt( CHARGE ); charge = Math.min( chargeCap, bundle.getInt( CHARGE ));
partialCharge = bundle.getFloat( PARTIALCHARGE ); partialCharge = bundle.getFloat( PARTIALCHARGE );
} }
} }

View File

@ -174,10 +174,10 @@ public class TalismanOfForesight extends Artifact {
} }
BuffIndicator.refreshHero(); BuffIndicator.refreshHero();
//fully charges in 2500 turns at lvl=0, scaling to 1000 turns at lvl = 10. //fully charges in 2000 turns at lvl=0, scaling to 667 turns at lvl = 10.
LockedFloor lock = target.buff(LockedFloor.class); LockedFloor lock = target.buff(LockedFloor.class);
if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) { if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) {
partialCharge += 0.04+(level()*0.006); partialCharge += 0.05+(level()*0.01);
if (partialCharge > 1 && charge < chargeCap) { if (partialCharge > 1 && charge < chargeCap) {
partialCharge--; partialCharge--;

View File

@ -48,9 +48,9 @@ public class TimekeepersHourglass extends Artifact {
levelCap = 5; levelCap = 5;
charge = 10+level()*2; charge = 5+level();
partialCharge = 0; partialCharge = 0;
chargeCap = 10+level()*2; chargeCap = 5+level();
defaultAction = AC_ACTIVATE; defaultAction = AC_ACTIVATE;
} }
@ -139,7 +139,7 @@ public class TimekeepersHourglass extends Artifact {
@Override @Override
public Item upgrade() { public Item upgrade() {
chargeCap+= 2; chargeCap+= 1;
//for artifact transmutation. //for artifact transmutation.
while (level()+1 > sandBags) while (level()+1 > sandBags)
@ -200,7 +200,7 @@ public class TimekeepersHourglass extends Artifact {
LockedFloor lock = target.buff(LockedFloor.class); LockedFloor lock = target.buff(LockedFloor.class);
if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) { if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) {
partialCharge += 1 / (60f - (chargeCap - charge)*2f); partialCharge += 1 / (50f - (chargeCap - charge)*3f);
if (partialCharge >= 1) { if (partialCharge >= 1) {
partialCharge --; partialCharge --;
@ -228,15 +228,15 @@ public class TimekeepersHourglass extends Artifact {
if (super.attachTo(target)) { if (super.attachTo(target)) {
int usedCharge = Math.min(charge, 5); int usedCharge = Math.min(charge, 2);
//buffs always act last, so the stasis buff should end a turn early. //buffs always act last, so the stasis buff should end a turn early.
spend(usedCharge - 1); spend((5*usedCharge) - 1);
((Hero) target).spendAndNext(usedCharge); ((Hero) target).spendAndNext(5*usedCharge);
//shouldn't punish the player for going into stasis frequently //shouldn't punish the player for going into stasis frequently
Hunger hunger = target.buff(Hunger.class); Hunger hunger = target.buff(Hunger.class);
if (hunger != null && !hunger.isStarving()) if (hunger != null && !hunger.isStarving())
hunger.satisfy(usedCharge); hunger.satisfy(5*usedCharge);
charge -= usedCharge; charge -= usedCharge;
@ -277,8 +277,8 @@ public class TimekeepersHourglass extends Artifact {
public void processTime(float time){ public void processTime(float time){
partialTime += time; partialTime += time;
while (partialTime >= 1f){ while (partialTime >= 2f){
partialTime --; partialTime -= 2f;
charge --; charge --;
} }

View File

@ -93,14 +93,19 @@ public class Earthroot extends Plant {
return true; return true;
} }
private static int blocking(){
return (Dungeon.depth + 5)/2;
}
public int absorb( int damage ) { public int absorb( int damage ) {
if (level <= damage-damage/2) { int block = Math.min( damage, blocking());
if (level <= block) {
detach(); detach();
return damage - level; return damage - block;
} else { } else {
level -= damage-damage/2; level -= block;
BuffIndicator.refreshHero(); BuffIndicator.refreshHero();
return damage/2; return damage - block;
} }
} }
@ -129,7 +134,7 @@ public class Earthroot extends Plant {
@Override @Override
public String desc() { public String desc() {
return Messages.get(this, "desc", level); return Messages.get(this, "desc", blocking(), level);
} }
private static final String POS = "pos"; private static final String POS = "pos";

View File

@ -26,7 +26,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShaftParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShaftParticle;
@ -72,8 +71,7 @@ public class Sungrass extends Plant {
private static final float STEP = 1f; private static final float STEP = 1f;
private int pos; private int pos;
private int healCurr = 1; private float partialHeal;
private int count = 0;
private int level; private int level;
{ {
@ -85,25 +83,19 @@ public class Sungrass extends Plant {
if (target.pos != pos) { if (target.pos != pos) {
detach(); detach();
} }
if (count == 5) {
if (level <= healCurr*.025*target.HT) { //for the hero, full heal takes ~50/93/111/120 turns at levels 1/10/20/30
target.HP = Math.min(target.HT, target.HP + level); partialHeal += (40 + target.HT)/150f;
target.sprite.emitter().burst(Speck.factory(Speck.HEALING), 1);
detach(); if (partialHeal > 1){
} else { target.HP += (int)partialHeal;
target.HP = Math.min(target.HT, target.HP+(int)(healCurr*.025*target.HT)); level -= (int)partialHeal;
level -= (healCurr*.025*target.HT); partialHeal -= (int)partialHeal;
if (healCurr < 6) target.sprite.emitter().burst(Speck.factory(Speck.HEALING), 1);
healCurr ++;
target.sprite.emitter().burst(Speck.factory(Speck.HEALING), 1); if (target.HP > target.HT) target.HP = target.HT;
}
if (target.HP == target.HT && target instanceof Hero){
((Hero)target).resting = false;
}
count = 1;
} else {
count++;
} }
if (level <= 0) { if (level <= 0) {
detach(); detach();
} else { } else {
@ -113,16 +105,6 @@ public class Sungrass extends Plant {
return true; return true;
} }
public int absorb( int damage ) {
level -= damage;
if (level <= 0) {
detach();
} else {
BuffIndicator.refreshHero();
}
return damage;
}
public void boost( int amount ){ public void boost( int amount ){
level += amount; level += amount;
pos = target.pos; pos = target.pos;
@ -149,16 +131,14 @@ public class Sungrass extends Plant {
} }
private static final String POS = "pos"; private static final String POS = "pos";
private static final String HEALCURR = "healCurr"; private static final String PARTIAL = "partial_heal";
private static final String COUNT = "count";
private static final String LEVEL = "level"; private static final String LEVEL = "level";
@Override @Override
public void storeInBundle( Bundle bundle ) { public void storeInBundle( Bundle bundle ) {
super.storeInBundle( bundle ); super.storeInBundle( bundle );
bundle.put( POS, pos ); bundle.put( POS, pos );
bundle.put( HEALCURR, healCurr); bundle.put( PARTIAL, partialHeal);
bundle.put( COUNT, count);
bundle.put( LEVEL, level); bundle.put( LEVEL, level);
} }
@ -166,8 +146,7 @@ public class Sungrass extends Plant {
public void restoreFromBundle( Bundle bundle ) { public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle( bundle ); super.restoreFromBundle( bundle );
pos = bundle.getInt( POS ); pos = bundle.getInt( POS );
healCurr = bundle.getInt( HEALCURR ); partialHeal = bundle.getFloat( PARTIAL );
count = bundle.getInt( COUNT );
level = bundle.getInt( LEVEL ); level = bundle.getInt( LEVEL );
} }

View File

@ -15,7 +15,7 @@ plants.earthroot.name=Earthroot
plants.earthroot.desc=When a creature touches an Earthroot, its roots create a kind of immobile natural armor around it. plants.earthroot.desc=When a creature touches an Earthroot, its roots create a kind of immobile natural armor around it.
plants.earthroot$seed.name=seed of earthroot plants.earthroot$seed.name=seed of earthroot
plants.earthroot$armor.name=Herbal armor plants.earthroot$armor.name=Herbal armor
plants.earthroot$armor.desc=A kind of natural, immobile armor is protecting you. The armor forms plates of bark and twine, wrapping around your body.\n\nThis herbal armor will absorb 50%% of all physical damage you take, until it eventually runs out of durability and collapses. The armor is also immobile, if you attempt to move it will break apart and be lost.\n\nArmor remaining: %d. plants.earthroot$armor.desc=A kind of natural, immobile armor is protecting you. The armor forms plates of bark and twine, wrapping around your body.\n\nThis herbal armor will block %d damage from any physical hit you take, until it eventually runs out of durability and collapses.\n\nAs the armor is immobile, if you attempt to move it will break apart and be lost.\n\nArmor remaining: %d.
plants.fadeleaf.name=Fadeleaf plants.fadeleaf.name=Fadeleaf
plants.fadeleaf.desc=Touching a Fadeleaf will teleport any creature to a random place on the current level. plants.fadeleaf.desc=Touching a Fadeleaf will teleport any creature to a random place on the current level.
@ -53,4 +53,4 @@ plants.sungrass.name=Sungrass
plants.sungrass.desc=Sungrass is renowned for its sap's slow but effective healing properties. plants.sungrass.desc=Sungrass is renowned for its sap's slow but effective healing properties.
plants.sungrass$seed.name=seed of sungrass plants.sungrass$seed.name=seed of sungrass
plants.sungrass$health.name=Herbal Healing plants.sungrass$health.name=Herbal Healing
plants.sungrass$health.desc=Sungrass possesses excellent healing properties, though its not as fast as a potion of healing.\n\nYou are currently slowly regenerating health from the sungrass plant. Taking damage while healing will reduce the healing effectiveness, and moving off the plant will break the healing effect.\n\nHealing remaining: %d. plants.sungrass$health.desc=Sungrass possesses excellent healing properties, though it is much slower than a potion of healing.\n\nYou are currently slowly regenerating health from the sungrass plant. Moving off the plant will break the healing effect.\n\nHealing remaining: %d.