v0.7.0: adjusted the names of an elixir and alchemy energy
This commit is contained in:
parent
520257ea1f
commit
9c4ae5d68d
|
@ -71,12 +71,12 @@ public class Alchemy extends Blob implements AlchemyScene.AlchemyProvider {
|
||||||
//1 volume is kept in reserve
|
//1 volume is kept in reserve
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getWater() {
|
public int getEnergy() {
|
||||||
return Math.max(0, cur[alchPos] - 1);
|
return Math.max(0, cur[alchPos] - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void spendWater(int reduction) {
|
public void spendEnergy(int reduction) {
|
||||||
cur[alchPos] = Math.max(1, cur[alchPos] - reduction);
|
cur[alchPos] = Math.max(1, cur[alchPos] - reduction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.ElixirOfEarthenPower;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfHoneyedHealing;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfHoneyedHealing;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfRestoration;
|
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.ElixirOfToxicEssence;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfVitality;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.ExoticPotion;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.ExoticPotion;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ExoticScroll;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ExoticScroll;
|
||||||
|
@ -153,7 +153,7 @@ public abstract class Recipe {
|
||||||
new ElixirOfToxicEssence.Recipe(),
|
new ElixirOfToxicEssence.Recipe(),
|
||||||
new ElixirOfHoneyedHealing.Recipe(),
|
new ElixirOfHoneyedHealing.Recipe(),
|
||||||
new ElixirOfRestoration.Recipe(),
|
new ElixirOfRestoration.Recipe(),
|
||||||
new ElixirOfSurgingVitality.Recipe(),
|
new ElixirOfVitality.Recipe(),
|
||||||
new FrigidBrew.Recipe(),
|
new FrigidBrew.Recipe(),
|
||||||
new FrostfireBrew.Recipe(),
|
new FrostfireBrew.Recipe(),
|
||||||
new WickedBrew.Recipe(),
|
new WickedBrew.Recipe(),
|
||||||
|
|
|
@ -29,7 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfShielding;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfShielding;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
|
||||||
public class ElixirOfSurgingVitality extends Elixir {
|
public class ElixirOfVitality extends Elixir {
|
||||||
|
|
||||||
{
|
{
|
||||||
image = ItemSpriteSheet.ELIXIR_SURGE;
|
image = ItemSpriteSheet.ELIXIR_SURGE;
|
||||||
|
@ -49,7 +49,7 @@ public class ElixirOfSurgingVitality extends Elixir {
|
||||||
|
|
||||||
cost = 2;
|
cost = 2;
|
||||||
|
|
||||||
output = ElixirOfSurgingVitality.class;
|
output = ElixirOfVitality.class;
|
||||||
outQuantity = 1;
|
outQuantity = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,8 +74,8 @@ public class AlchemyScene extends PixelScene {
|
||||||
private Emitter lowerBubbles;
|
private Emitter lowerBubbles;
|
||||||
private SkinnedBlock water;
|
private SkinnedBlock water;
|
||||||
|
|
||||||
private RenderedText waterLeft;
|
private RenderedText energyLeft;
|
||||||
private RenderedText waterCost;
|
private RenderedText energyCost;
|
||||||
|
|
||||||
private RedButton btnCombine;
|
private RedButton btnCombine;
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ public class AlchemyScene extends PixelScene {
|
||||||
add(im);
|
add(im);
|
||||||
|
|
||||||
|
|
||||||
RenderedText title = PixelScene.renderText( "Alchemy", 9 );
|
RenderedText title = PixelScene.renderText( Messages.get(this, "title"), 9 );
|
||||||
title.hardlight(Window.TITLE_COLOR);
|
title.hardlight(Window.TITLE_COLOR);
|
||||||
title.x = (Camera.main.width - title.width()) / 2f;
|
title.x = (Camera.main.width - title.width()) / 2f;
|
||||||
title.y = (16 - title.baseLine()) / 2f;
|
title.y = (16 - title.baseLine()) / 2f;
|
||||||
|
@ -122,7 +122,7 @@ public class AlchemyScene extends PixelScene {
|
||||||
int w = 50 + Camera.main.width/2;
|
int w = 50 + Camera.main.width/2;
|
||||||
int left = (Camera.main.width - w)/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);
|
RenderedTextMultiline desc = PixelScene.renderMultiline(6);
|
||||||
desc.text( Messages.get(AlchemyScene.class, "text") );
|
desc.text( Messages.get(AlchemyScene.class, "text") );
|
||||||
|
@ -252,13 +252,13 @@ public class AlchemyScene extends PixelScene {
|
||||||
btnGuide.setRect(0, 0, 16, 16);
|
btnGuide.setRect(0, 0, 16, 16);
|
||||||
add(btnGuide);
|
add(btnGuide);
|
||||||
|
|
||||||
waterLeft = PixelScene.renderText("Alchemy Water: " + availableWater(), 9);
|
energyLeft = PixelScene.renderText(Messages.get(AlchemyScene.class, "energy", availableEnergy()), 9);
|
||||||
waterLeft.y = Camera.main.height - waterLeft.baseLine();
|
energyLeft.y = Camera.main.height - 5 - energyLeft.baseLine();
|
||||||
waterLeft.x = (Camera.main.width - waterLeft.width())/2;
|
energyLeft.x = (Camera.main.width - energyLeft.width())/2;
|
||||||
add(waterLeft);
|
add(energyLeft);
|
||||||
|
|
||||||
waterCost = PixelScene.renderText(6);
|
energyCost = PixelScene.renderText(6);
|
||||||
add(waterCost);
|
add(energyCost);
|
||||||
|
|
||||||
fadeIn();
|
fadeIn();
|
||||||
}
|
}
|
||||||
|
@ -317,24 +317,24 @@ public class AlchemyScene extends PixelScene {
|
||||||
|
|
||||||
int cost = recipe.cost(ingredients);
|
int cost = recipe.cost(ingredients);
|
||||||
|
|
||||||
waterCost.text("Water: " + cost);
|
energyCost.text( Messages.get(AlchemyScene.class, "cost", cost) );
|
||||||
waterCost.y = btnCombine.top() - waterCost.baseLine();
|
energyCost.y = btnCombine.top() - energyCost.baseLine();
|
||||||
waterCost.x = btnCombine.left() + (btnCombine.width() - waterCost.width())/2;
|
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);
|
btnCombine.enable(true);
|
||||||
waterCost.resetColor();
|
energyCost.resetColor();
|
||||||
} else {
|
} else {
|
||||||
btnCombine.enable(false);
|
btnCombine.enable(false);
|
||||||
waterCost.hardlight(1, 0, 0);
|
energyCost.hardlight(1, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
btnCombine.enable(false);
|
btnCombine.enable(false);
|
||||||
output.visible = false;
|
output.visible = false;
|
||||||
waterCost.visible = false;
|
energyCost.visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -347,10 +347,10 @@ public class AlchemyScene extends PixelScene {
|
||||||
Item result = null;
|
Item result = null;
|
||||||
|
|
||||||
if (recipe != null){
|
if (recipe != null){
|
||||||
provider.spendWater(recipe.cost(ingredients));
|
provider.spendEnergy(recipe.cost(ingredients));
|
||||||
waterLeft.text("Alchemy Water: " + availableWater());
|
energyLeft.text(Messages.get(AlchemyScene.class, "energy", availableEnergy()));
|
||||||
waterLeft.y = Camera.main.height - waterLeft.baseLine();
|
energyLeft.y = Camera.main.height - energyLeft.baseLine();
|
||||||
waterLeft.x = (Camera.main.width - waterLeft.width())/2;
|
energyLeft.x = (Camera.main.width - energyLeft.width())/2;
|
||||||
|
|
||||||
result = recipe.brew(ingredients);
|
result = recipe.brew(ingredients);
|
||||||
}
|
}
|
||||||
|
@ -471,15 +471,15 @@ public class AlchemyScene extends PixelScene {
|
||||||
provider = p;
|
provider = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int availableWater(){
|
private static int availableEnergy(){
|
||||||
return provider == null ? 0 : provider.getWater();
|
return provider == null ? 0 : provider.getEnergy();
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface AlchemyProvider {
|
public interface AlchemyProvider {
|
||||||
|
|
||||||
int getWater();
|
int getEnergy();
|
||||||
|
|
||||||
void spendWater(int reduction);
|
void spendEnergy(int reduction);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.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.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.elixirofvitality.name=elixir of 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.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.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.
|
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.
|
||||||
|
|
|
@ -2,10 +2,9 @@
|
||||||
|
|
||||||
scenes.alchemyscene.title=Alchemy
|
scenes.alchemyscene.title=Alchemy
|
||||||
scenes.alchemyscene.text=Combine ingredients to create something new!
|
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.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.exit=Let's call it a day
|
||||||
scenes.amuletscene.stay=I'm not done yet
|
scenes.amuletscene.stay=I'm not done yet
|
||||||
|
|
Loading…
Reference in New Issue
Block a user