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