diff options
Diffstat (limited to 'src/main/java/io/github')
3 files changed, 59 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/repo/NEURepository.java b/src/main/java/io/github/moulberry/repo/NEURepository.java index 41bfc12..38f8501 100644 --- a/src/main/java/io/github/moulberry/repo/NEURepository.java +++ b/src/main/java/io/github/moulberry/repo/NEURepository.java @@ -40,6 +40,7 @@ public final class NEURepository { .registerSubtype(NEUCraftingRecipe.class, "crafting") .registerSubtype(NEUMobDropRecipe.class, "drops") .registerSubtype(NEUNpcShopRecipe.class, "npc_shop") + .registerSubtype(NEUKatUpgradeRecipe.class, "katgrade") .setFallbackType(NEUUnknownRecipe.class) .setDefaultTypeTag("crafting") ) diff --git a/src/main/java/io/github/moulberry/repo/data/NEUIngredient.java b/src/main/java/io/github/moulberry/repo/data/NEUIngredient.java index 0442cd1..c0c0627 100644 --- a/src/main/java/io/github/moulberry/repo/data/NEUIngredient.java +++ b/src/main/java/io/github/moulberry/repo/data/NEUIngredient.java @@ -11,6 +11,7 @@ public class NEUIngredient { @NEUId String itemId; double amount; public static final String NEU_SENTINEL_EMPTY = "NEU_SENTINEL_EMPTY"; + public static final String NEU_SENTINEL_COINS = "SKYBLOCK_COIN"; public static final NEUIngredient SENTINEL_EMPTY = new NEUIngredient(); static { @@ -21,6 +22,13 @@ public class NEUIngredient { private NEUIngredient() { } + public static NEUIngredient ofCoins(double coins) { + NEUIngredient neuIngredient = new NEUIngredient(); + neuIngredient.amount = coins; + neuIngredient.itemId = NEU_SENTINEL_COINS; + return neuIngredient; + } + public static NEUIngredient fromItem(NEUItem item, int count) { NEUIngredient ingredient = new NEUIngredient(); ingredient.amount = count; diff --git a/src/main/java/io/github/moulberry/repo/data/NEUKatUpgradeRecipe.java b/src/main/java/io/github/moulberry/repo/data/NEUKatUpgradeRecipe.java new file mode 100644 index 0000000..839f693 --- /dev/null +++ b/src/main/java/io/github/moulberry/repo/data/NEUKatUpgradeRecipe.java @@ -0,0 +1,50 @@ +package io.github.moulberry.repo.data; + +import lombok.Getter; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +public class NEUKatUpgradeRecipe implements NEURecipe { + /** + * Base pet. + */ + @Getter + NEUIngredient input; + /** + * Upgraded pet. + */ + @Getter + NEUIngredient output; + /** + * List of bonus items you need to upgrade, not including the pet itself. + */ + @Getter + List<NEUIngredient> items; + /** + * Coin cost for a level "0" pet. This cost is reduced for each level, so even a level 1 pet costs less to upgrade than this. + */ + @Getter + double coins; + /** + * Time for the pet upgrade in seconds. + */ + @Getter + long seconds; + + @Override + public Collection<NEUIngredient> getAllInputs() { + List<NEUIngredient> inputs = new ArrayList<>(); + inputs.add(input); + inputs.addAll(items); + inputs.add(NEUIngredient.ofCoins(coins)); + return inputs; + } + + @Override + public Collection<NEUIngredient> getAllOutputs() { + return Collections.singleton(output); + } +} |