v2.4.0: added constants for output quantities of elixirs/brews/spells
This commit is contained in:
@@ -48,16 +48,18 @@ public class AquaBrew extends Brew {
|
||||
|
||||
@Override
|
||||
public int value() {
|
||||
return (int)(60 * (quantity/8f));
|
||||
return (int)(60 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int energyVal() {
|
||||
return (int)(12 * (quantity/8f));
|
||||
return (int)(12 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
||||
private static final int OUT_QUANTITY = 8;
|
||||
|
||||
{
|
||||
inputs = new Class[]{PotionOfStormClouds.class};
|
||||
inQuantity = new int[]{1};
|
||||
@@ -65,7 +67,7 @@ public class AquaBrew extends Brew {
|
||||
cost = 8;
|
||||
|
||||
output = AquaBrew.class;
|
||||
outQuantity = 8;
|
||||
outQuantity = OUT_QUANTITY;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -72,16 +72,18 @@ public class ElixirOfFeatherFall extends Elixir {
|
||||
|
||||
@Override
|
||||
public int value() {
|
||||
return (int)(60 * (quantity/2f));
|
||||
return (int)(60 * (quantity/(float) Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int energyVal() {
|
||||
return (int)(12 * (quantity/2f));
|
||||
return (int)(12 * (quantity/(float) Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
||||
private static final int OUT_QUANTITY = 2;
|
||||
|
||||
{
|
||||
inputs = new Class[]{PotionOfLevitation.class};
|
||||
inQuantity = new int[]{1};
|
||||
@@ -89,7 +91,7 @@ public class ElixirOfFeatherFall extends Elixir {
|
||||
cost = 16;
|
||||
|
||||
output = ElixirOfFeatherFall.class;
|
||||
outQuantity = 2;
|
||||
outQuantity = OUT_QUANTITY;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -57,16 +57,18 @@ public class Alchemize extends Spell {
|
||||
@Override
|
||||
public int value() {
|
||||
//lower value, as it's very cheap to make (and also sold at shops)
|
||||
return (int)(20 * (quantity/8f));
|
||||
return (int)(20 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int energyVal() {
|
||||
return (int)(4 * (quantity/8f));
|
||||
return (int)(4 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe {
|
||||
|
||||
private static final int OUT_QUANTITY = 8;
|
||||
|
||||
@Override
|
||||
public boolean testIngredients(ArrayList<Item> ingredients) {
|
||||
if (ingredients.size() != 2) return false;
|
||||
@@ -96,7 +98,7 @@ public class Alchemize extends Spell {
|
||||
|
||||
@Override
|
||||
public Item sampleOutput(ArrayList<Item> ingredients) {
|
||||
return new Alchemize().quantity(8);
|
||||
return new Alchemize().quantity(OUT_QUANTITY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -212,15 +212,17 @@ public class BeaconOfReturning extends Spell {
|
||||
|
||||
@Override
|
||||
public int value() {
|
||||
return (int)(60 * (quantity/5f));
|
||||
return (int)(60 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int energyVal() {
|
||||
return (int)(12 * (quantity/5f));
|
||||
return (int)(12 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
||||
private static final int OUT_QUANTITY = 5;
|
||||
|
||||
{
|
||||
inputs = new Class[]{ScrollOfPassage.class};
|
||||
@@ -229,7 +231,7 @@ public class BeaconOfReturning extends Spell {
|
||||
cost = 12;
|
||||
|
||||
output = BeaconOfReturning.class;
|
||||
outQuantity = 5;
|
||||
outQuantity = OUT_QUANTITY;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -95,15 +95,17 @@ public class CurseInfusion extends InventorySpell {
|
||||
|
||||
@Override
|
||||
public int value() {
|
||||
return (int)(60 * (quantity/4f));
|
||||
return (int)(60 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int energyVal() {
|
||||
return (int)(12 * (quantity/4f));
|
||||
return (int)(12 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
||||
private static final int OUT_QUANTITY = 4;
|
||||
|
||||
{
|
||||
inputs = new Class[]{ScrollOfRemoveCurse.class, MetalShard.class};
|
||||
@@ -112,7 +114,7 @@ public class CurseInfusion extends InventorySpell {
|
||||
cost = 6;
|
||||
|
||||
output = CurseInfusion.class;
|
||||
outQuantity = 4;
|
||||
outQuantity = OUT_QUANTITY;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -65,15 +65,17 @@ public class PhaseShift extends TargetedSpell {
|
||||
|
||||
@Override
|
||||
public int value() {
|
||||
return (int)(60 * (quantity/6f));
|
||||
return (int)(60 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int energyVal() {
|
||||
return (int)(12 * (quantity/6f));
|
||||
return (int)(12 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
||||
private static final int OUT_QUANTITY = 6;
|
||||
|
||||
{
|
||||
inputs = new Class[]{ScrollOfTeleportation.class};
|
||||
@@ -82,7 +84,7 @@ public class PhaseShift extends TargetedSpell {
|
||||
cost = 10;
|
||||
|
||||
output = PhaseShift.class;
|
||||
outQuantity = 6;
|
||||
outQuantity = OUT_QUANTITY;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -115,12 +115,12 @@ public class ReclaimTrap extends TargetedSpell {
|
||||
|
||||
@Override
|
||||
public int value() {
|
||||
return (int)(60 * (quantity/5f));
|
||||
return (int)(60 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int energyVal() {
|
||||
return (int)(12 * (quantity/5f));
|
||||
return (int)(12 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
private static final String STORED_TRAP = "stored_trap";
|
||||
@@ -138,6 +138,8 @@ public class ReclaimTrap extends TargetedSpell {
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
||||
private static final int OUT_QUANTITY = 5;
|
||||
|
||||
{
|
||||
inputs = new Class[]{ScrollOfMagicMapping.class, MetalShard.class};
|
||||
@@ -146,7 +148,7 @@ public class ReclaimTrap extends TargetedSpell {
|
||||
cost = 8;
|
||||
|
||||
output = ReclaimTrap.class;
|
||||
outQuantity = 5;
|
||||
outQuantity = OUT_QUANTITY;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -91,15 +91,17 @@ public class Recycle extends InventorySpell {
|
||||
|
||||
@Override
|
||||
public int value() {
|
||||
return (int)(60 * (quantity/12f));
|
||||
return (int)(60 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int energyVal() {
|
||||
return (int)(12 * (quantity/12f));
|
||||
return (int)(12 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
||||
private static final int OUT_QUANTITY = 12;
|
||||
|
||||
{
|
||||
inputs = new Class[]{ScrollOfTransmutation.class};
|
||||
@@ -108,7 +110,7 @@ public class Recycle extends InventorySpell {
|
||||
cost = 12;
|
||||
|
||||
output = Recycle.class;
|
||||
outQuantity = 12;
|
||||
outQuantity = OUT_QUANTITY;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -223,6 +223,8 @@ public class SummonElemental extends Spell {
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
||||
private static final int OUT_QUANTITY = 6;
|
||||
|
||||
{
|
||||
inputs = new Class[]{Embers.class};
|
||||
inQuantity = new int[]{1};
|
||||
@@ -230,7 +232,7 @@ public class SummonElemental extends Spell {
|
||||
cost = 10;
|
||||
|
||||
output = SummonElemental.class;
|
||||
outQuantity = 6;
|
||||
outQuantity = OUT_QUANTITY;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -116,16 +116,18 @@ public class TelekineticGrab extends TargetedSpell {
|
||||
|
||||
@Override
|
||||
public int value() {
|
||||
return (int)(60 * (quantity/8f));
|
||||
return (int)(60 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int energyVal() {
|
||||
return (int)(12 * (quantity/8f));
|
||||
return (int)(12 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
||||
private static final int OUT_QUANTITY = 8;
|
||||
|
||||
{
|
||||
inputs = new Class[]{LiquidMetal.class};
|
||||
inQuantity = new int[]{10};
|
||||
@@ -133,7 +135,7 @@ public class TelekineticGrab extends TargetedSpell {
|
||||
cost = 10;
|
||||
|
||||
output = TelekineticGrab.class;
|
||||
outQuantity = 8;
|
||||
outQuantity = OUT_QUANTITY;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -64,15 +64,17 @@ public class WildEnergy extends TargetedSpell {
|
||||
|
||||
@Override
|
||||
public int value() {
|
||||
return (int)(60 * (quantity/5f));
|
||||
return (int)(60 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int energyVal() {
|
||||
return (int)(12 * (quantity/5f));
|
||||
return (int)(12 * (quantity/(float)Recipe.OUT_QUANTITY));
|
||||
}
|
||||
|
||||
public static class Recipe extends com.shatteredpixel.shatteredpixeldungeon.items.Recipe.SimpleRecipe {
|
||||
|
||||
private static final int OUT_QUANTITY = 5;
|
||||
|
||||
{
|
||||
inputs = new Class[]{ScrollOfRecharging.class, MetalShard.class};
|
||||
@@ -81,7 +83,7 @@ public class WildEnergy extends TargetedSpell {
|
||||
cost = 4;
|
||||
|
||||
output = WildEnergy.class;
|
||||
outQuantity = 5;
|
||||
outQuantity = OUT_QUANTITY;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user