v0.7.0: adjusted the names of an elixir and alchemy energy

This commit is contained in:
Evan Debenham 2018-08-22 21:53:50 -04:00
parent 520257ea1f
commit 9c4ae5d68d
6 changed files with 36 additions and 37 deletions

View File

@ -71,12 +71,12 @@ public class Alchemy extends Blob implements AlchemyScene.AlchemyProvider {
//1 volume is kept in reserve
@Override
public int getWater() {
public int getEnergy() {
return Math.max(0, cur[alchPos] - 1);
}
@Override
public void spendWater(int reduction) {
public void spendEnergy(int reduction) {
cur[alchPos] = Math.max(1, cur[alchPos] - reduction);
}
}

View File

@ -37,8 +37,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfDr
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfEarthenPower;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfHoneyedHealing;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfRestoration;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfSurgingVitality;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfToxicEssence;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfVitality;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.ExoticPotion;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ExoticScroll;
@ -153,7 +153,7 @@ public abstract class Recipe {
new ElixirOfToxicEssence.Recipe(),
new ElixirOfHoneyedHealing.Recipe(),
new ElixirOfRestoration.Recipe(),
new ElixirOfSurgingVitality.Recipe(),
new ElixirOfVitality.Recipe(),
new FrigidBrew.Recipe(),
new FrostfireBrew.Recipe(),
new WickedBrew.Recipe(),

View File

@ -29,7 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfShielding;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class ElixirOfSurgingVitality extends Elixir {
public class ElixirOfVitality extends Elixir {
{
image = ItemSpriteSheet.ELIXIR_SURGE;
@ -49,7 +49,7 @@ public class ElixirOfSurgingVitality extends Elixir {
cost = 2;
output = ElixirOfSurgingVitality.class;
output = ElixirOfVitality.class;
outQuantity = 1;
}

View File

@ -74,8 +74,8 @@ public class AlchemyScene extends PixelScene {
private Emitter lowerBubbles;
private SkinnedBlock water;
private RenderedText waterLeft;
private RenderedText waterCost;
private RenderedText energyLeft;
private RenderedText energyCost;
private RedButton btnCombine;
@ -112,7 +112,7 @@ public class AlchemyScene extends PixelScene {
add(im);
RenderedText title = PixelScene.renderText( "Alchemy", 9 );
RenderedText title = PixelScene.renderText( Messages.get(this, "title"), 9 );
title.hardlight(Window.TITLE_COLOR);
title.x = (Camera.main.width - title.width()) / 2f;
title.y = (16 - title.baseLine()) / 2f;
@ -122,7 +122,7 @@ public class AlchemyScene extends PixelScene {
int w = 50 + Camera.main.width/2;
int left = (Camera.main.width - w)/2;
int pos = (Camera.main.height - 120)/2;
int pos = (Camera.main.height - 100)/2;
RenderedTextMultiline desc = PixelScene.renderMultiline(6);
desc.text( Messages.get(AlchemyScene.class, "text") );
@ -252,13 +252,13 @@ public class AlchemyScene extends PixelScene {
btnGuide.setRect(0, 0, 16, 16);
add(btnGuide);
waterLeft = PixelScene.renderText("Alchemy Water: " + availableWater(), 9);
waterLeft.y = Camera.main.height - waterLeft.baseLine();
waterLeft.x = (Camera.main.width - waterLeft.width())/2;
add(waterLeft);
energyLeft = PixelScene.renderText(Messages.get(AlchemyScene.class, "energy", availableEnergy()), 9);
energyLeft.y = Camera.main.height - 5 - energyLeft.baseLine();
energyLeft.x = (Camera.main.width - energyLeft.width())/2;
add(energyLeft);
waterCost = PixelScene.renderText(6);
add(waterCost);
energyCost = PixelScene.renderText(6);
add(energyCost);
fadeIn();
}
@ -317,24 +317,24 @@ public class AlchemyScene extends PixelScene {
int cost = recipe.cost(ingredients);
waterCost.text("Water: " + cost);
waterCost.y = btnCombine.top() - waterCost.baseLine();
waterCost.x = btnCombine.left() + (btnCombine.width() - waterCost.width())/2;
energyCost.text( Messages.get(AlchemyScene.class, "cost", cost) );
energyCost.y = btnCombine.top() - energyCost.baseLine();
energyCost.x = btnCombine.left() + (btnCombine.width() - energyCost.width())/2;
waterCost.visible = (cost > 0);
energyCost.visible = (cost > 0);
if (cost <= availableWater()) {
if (cost <= availableEnergy()) {
btnCombine.enable(true);
waterCost.resetColor();
energyCost.resetColor();
} else {
btnCombine.enable(false);
waterCost.hardlight(1, 0, 0);
energyCost.hardlight(1, 0, 0);
}
} else {
btnCombine.enable(false);
output.visible = false;
waterCost.visible = false;
energyCost.visible = false;
}
}
@ -347,10 +347,10 @@ public class AlchemyScene extends PixelScene {
Item result = null;
if (recipe != null){
provider.spendWater(recipe.cost(ingredients));
waterLeft.text("Alchemy Water: " + availableWater());
waterLeft.y = Camera.main.height - waterLeft.baseLine();
waterLeft.x = (Camera.main.width - waterLeft.width())/2;
provider.spendEnergy(recipe.cost(ingredients));
energyLeft.text(Messages.get(AlchemyScene.class, "energy", availableEnergy()));
energyLeft.y = Camera.main.height - energyLeft.baseLine();
energyLeft.x = (Camera.main.width - energyLeft.width())/2;
result = recipe.brew(ingredients);
}
@ -471,15 +471,15 @@ public class AlchemyScene extends PixelScene {
provider = p;
}
private static int availableWater(){
return provider == null ? 0 : provider.getWater();
private static int availableEnergy(){
return provider == null ? 0 : provider.getEnergy();
}
public interface AlchemyProvider {
int getWater();
int getEnergy();
void spendWater(int reduction);
void spendEnergy(int reduction);
}
}

View File

@ -587,8 +587,8 @@ items.potions.elixirs.elixirofhoneyedhealing.desc=This elixir combines healing w
items.potions.elixirs.elixirofrestoration.name=elixir of restoration
items.potions.elixirs.elixirofrestoration.desc=This elixir combines the properties of a healing and cleansing potion. When consumed, the drinker will start to rapidly heal, and will be cleansed of all negative effects.
items.potions.elixirs.elixirofsurgingvitality.name=elixir of surging vitality
items.potions.elixirs.elixirofsurgingvitality.desc=This elixir combines the properties of a healing and shielding potion, granting a massive burst of survivability to whomever drinks it.
items.potions.elixirs.elixirofvitality.name=elixir of vitality
items.potions.elixirs.elixirofvitality.desc=This elixir combines the properties of a healing and shielding potion, granting a massive burst of survivability to whomever drinks it.
items.potions.elixirs.elixiroftoxicessence.name=elixir of toxic essence
items.potions.elixirs.elixiroftoxicessence.desc=When consumed, this elixir will imbue the drinker with toxic energy. The drinker will be immune to toxic gas and poison, and will continuously spread toxic gas as they move.

View File

@ -2,10 +2,9 @@
scenes.alchemyscene.title=Alchemy
scenes.alchemyscene.text=Combine ingredients to create something new!
scenes.alchemyscene.combine=Combine
scenes.alchemyscene.close=Close
scenes.alchemyscene.select=Select an item
scenes.alchemyscene.recipes_title=Recipes
scenes.alchemyscene.cost=Energy: %d
scenes.alchemyscene.energy=Alchemical Energy: %d
scenes.amuletscene.exit=Let's call it a day
scenes.amuletscene.stay=I'm not done yet