v0.4.1: rebalanced several artifacts

This commit is contained in:
Evan Debenham
2016-07-07 17:49:34 -04:00
committed by Evan Debenham
parent cc1c156428
commit 669e0bb87b
7 changed files with 40 additions and 36 deletions
@@ -37,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShaftParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfPsionicBlast;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.messages.Languages;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
@@ -201,7 +202,7 @@ public class DriedRose extends Artifact {
LockedFloor lock = target.buff(LockedFloor.class);
if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) {
partialCharge += 10/75f;
partialCharge += 1/5f; //500 turns to a full charge
if (partialCharge > 1){
charge++;
partialCharge--;
@@ -292,11 +293,11 @@ public class DriedRose extends Artifact {
public GhostHero(int roseLevel){
this();
HP = HT = 10+roseLevel*3;
HP = HT = 10+roseLevel*4;
}
public void saySpawned(){
if (!name.equals("sad ghost")) return; //don't say anything if not on english
if (Messages.lang() != Languages.ENGLISH) return; //don't say anything if not on english
int i = (Dungeon.depth - 1) / 5;
if (chooseEnemy() == null)
yell( Random.element( VOICE_AMBIENT[i] ) );
@@ -311,13 +312,13 @@ public class DriedRose extends Artifact {
}
public void sayDefeated(){
if (!name.equals("sad ghost")) return; //don't say anything if not on english
if (Messages.lang() != Languages.ENGLISH) return; //don't say anything if not on english
yell( Random.element( VOICE_DEFEATED[ Dungeon.bossLevel() ? 1 : 0 ] ) );
Sample.INSTANCE.play( Assets.SND_GHOST );
}
public void sayHeroKilled(){
if (!name.equals("sad ghost")) return; //don't say anything if not on english
if (Messages.lang() != Languages.ENGLISH) return; //don't say anything if not on english
yell(Random.element(VOICE_HEROKILLED));
Sample.INSTANCE.play( Assets.SND_GHOST );
}
@@ -371,7 +372,6 @@ public class DriedRose extends Artifact {
@Override
public int damageRoll() {
//equivalent to N/2 to 5+N, where N is rose level.
int lvl = (HT-10)/3;
return Random.NormalIntRange( lvl/2, 5+lvl);
}
@@ -26,7 +26,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
@@ -165,19 +164,18 @@ public class HornOfPlenty extends Artifact {
public class hornRecharge extends ArtifactBuff{
@Override
public boolean act() {
LockedFloor lock = target.buff(LockedFloor.class);
if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) {
public void gainCharge(float levelPortion) {
if (charge < chargeCap) {
//generates 0.25 food value every round, +0.015 value per level
//to a max of 0.70 food value per round (0.25+0.5, at level 30)
partialCharge += 0.25f + (0.015f*level());
//generates 0.25x max hunger value every hero level, +0.025x max value per horn level
//to a max of exactly max hunger value per hero level (0.25+0.75, at horn level 30)
//This means that a standard ration will be recovered in 10 hero levels
partialCharge += Hunger.STARVING * levelPortion * (0.25f + (0.025f*level()));
//charge is in increments of 36 food value.
if (partialCharge >= 36) {
//charge is in increments of 1/10 max hunger value.
while (partialCharge >= Hunger.STARVING/10) {
charge++;
partialCharge -= 36;
partialCharge -= Hunger.STARVING/10;
if (charge == chargeCap)image = ItemSpriteSheet.ARTIFACT_HORN4;
else if (charge >= 7) image = ItemSpriteSheet.ARTIFACT_HORN3;
@@ -193,10 +191,6 @@ public class HornOfPlenty extends Artifact {
}
} else
partialCharge = 0;
spend( TICK );
return true;
}
}
@@ -80,17 +80,16 @@ public class MasterThievesArmband extends Artifact {
exp += value;
}
}
while(exp >= 600 && level() < levelCap) {
exp -= 600;
while(exp >= (250 + 50*level()) && level() < levelCap) {
exp -= (250 + 50*level());
upgrade();
}
return true;
}
public float stealChance(int value){
//get lvl*100 gold or lvl*5% item value of free charge, whichever is less.
int chargeBonus = Math.min(level()*100, (value*level())/20);
//get lvl*50 gold or lvl*3.33% item value of free charge, whichever is less.
int chargeBonus = Math.min(level()*50, (value*level())/30);
return (((float)charge + chargeBonus)/value);
}
}
@@ -176,7 +176,7 @@ public class SandalsOfNature extends Artifact {
Sample.INSTANCE.play( Assets.SND_PLANT );
hero.busy();
hero.spend( 2f );
if (seeds.size() >= 5+(level()*2)){
if (seeds.size() >= 3+(level()*3)){
seeds.clear();
upgrade();
if (level() >= 1 && level() <= 3) {
@@ -75,8 +75,13 @@ public class TimekeepersHourglass extends Artifact {
if (action.equals(AC_ACTIVATE)){
if (!isEquipped( hero )) GLog.i( Messages.get(Artifact.class, "need_to_equip") );
else if (activeBuff != null) GLog.i( Messages.get(this, "in_use") );
else if (charge <= 1) GLog.i( Messages.get(this, "no_charge") );
else if (activeBuff != null) {
if (activeBuff instanceof timeStasis) { //do nothing
} else {
activeBuff.detach();
GLog.i( Messages.get(this, "deactivate") );
}
} else if (charge <= 1) GLog.i( Messages.get(this, "no_charge") );
else if (cursed) GLog.i( Messages.get(this, "cursed") );
else GameScene.show(
new WndOptions( Messages.get(this, "name"),
@@ -220,16 +225,18 @@ public class TimekeepersHourglass extends Artifact {
public boolean attachTo(Char target) {
if (super.attachTo(target)) {
int usedCharge = Math.min(charge, 5);
//buffs always act last, so the stasis buff should end a turn early.
spend(charge - 1);
((Hero) target).spendAndNext(charge);
spend(usedCharge - 1);
((Hero) target).spendAndNext(usedCharge);
//shouldn't punish the player for going into stasis frequently
Hunger hunger = target.buff(Hunger.class);
if (hunger != null && !hunger.isStarving())
hunger.satisfy(charge);
hunger.satisfy(usedCharge);
charge = 0;
charge -= usedCharge;
target.invisible++;
@@ -310,7 +317,6 @@ public class TimekeepersHourglass extends Artifact {
mob.sprite.remove(CharSprite.State.PARALYSED);
GameScene.freezeEmitters = false;
charge = 0;
updateQuickslot();
super.detach();
activeBuff = null;