v2.4.0: added some tutorialization around trinket creation

This commit is contained in:
Evan Debenham
2024-04-15 15:21:35 -04:00
parent 6e7175f320
commit 05ce62915c
9 changed files with 39 additions and 7 deletions

View File

@@ -1321,9 +1321,9 @@ items.trinkets.thirteenleafclover.desc=Somehow stewing in the alchemy pot has ca
items.trinkets.trapmechanism.name=trap mechanism
items.trinkets.trapmechanism.desc=The core mechanism of one of the dungeon's pitfall traps, carefully carved out of the floor so it can be carried. It seems to be magically tied to the dungeon itself, making terrain more hazardous for you and the dungeon's inhabitants.\n\nAt its current level this trinket will make _%d%%_ of regular floors become filled with either traps or chasms instead.
items.trinkets.trinketcatalyst.name=trinket catalyst
items.trinkets.trinketcatalyst.window_text=The water begins to glow as you use the catalyst. There are a few nearby items you could imbue with magical energy.
items.trinkets.trinketcatalyst.desc=TODO
items.trinkets.trinketcatalyst.name=magical catalyst
items.trinkets.trinketcatalyst.window_text=The water begins to glow as you add the catalyst. There are a few nearby items you could imbue with energy to turn into a magical trinket.
items.trinkets.trinketcatalyst.desc=This ball of magical golden dust glimmers in the darkness of the dungeon. This catalyst can be used at an alchemy pot with a little alchemical energy to produce a unique trinket item.\n\nTrinkets provide various different effects that slightly alter the dungeon or its inhabitants. Trinkets can be upgraded with more energy to make their effect more powerful, or dropped to forego the effect entirely.
items.trinkets.trinket$placeholder.name=trinket

View File

@@ -9,6 +9,8 @@ journal.document.adventurers_guide.identifying.title=Identifying Items
journal.document.adventurers_guide.identifying.body=You won't know all of the properties of some items when you first find them.\n\nThe colors of potions and symbols on scrolls are different in each dungeon. Unidentified equipment can be upgraded or enchanted if you're lucky, or it might be cursed!\n\nScrolls of identify, upgrade, or remove curse are very useful if you want to reduce the risk of using unidentified equipment.\n\n(You can find a list of all the items you've identified in the items tab of your journal)
journal.document.adventurers_guide.food.title=Dealing with Hunger
journal.document.adventurers_guide.food.body=Rationing food effectively is one of the best things you can do to improve your odds of survival. Try thinking of health and hunger as resources that need to be managed, not kept full at all times.\n\nWhen you aren't starving you will slowly regenerate health. So if you eat at full health, this regeneration will be wasted.\n\nIf you pace out when you eat based on how your health is doing, your food should last much longer.
journal.document.adventurers_guide.alchemy.title=Alchemy & Trinkets
journal.document.adventurers_guide.alchemy.body=If you don't find a certain consumable item useful, you can use it as an ingredient at an alchemy pot instead! Items can be used in specific recipes, or turned into all-purpose alchemical energy.\n\nTrinkets are the only piece of equipment that can be made using alchemy. They produce a variety of helpful effects and can be made with just a bit of alchemical energy and a magical catalyst.\n\n(You can find the first alchemy pot on the 3rd or 4th floor of the dungeon. You can find pages of an alchemy recipe book near these pots as well.)
journal.document.adventurers_guide.dieing.title=Handling Defeat
journal.document.adventurers_guide.dieing.body=Unfortunately, dungeoneering is a very dangerous profession and most adventurers will eventually meet their demise.\n\nWhile luck can definitely play a role, the best adventurers are the ones who use every little trick to improve their odds of success.\n\n(Don't be dissuaded if you are dying a lot, this game is hard! Focus on learning the game and steadily improving, don't focus on winning right away.)
journal.document.adventurers_guide.searching.title=Searching
@@ -32,7 +34,7 @@ journal.document.alchemy_guide.potions.body=Welcome to Practical Applications of
journal.document.alchemy_guide.stones.title=Creating Runestones
journal.document.alchemy_guide.stones.body=Mixing a scroll into an alchemy pot will imbue its magic into two rocks within the pot. This creates runestones!
journal.document.alchemy_guide.energy_food.title=Energy and Food
journal.document.alchemy_guide.energy_food.body=Many recipes require crystalized alchemical energy, which is produced by deconstructing most consumable items in an alchemy pot. As a few examples: seeds generate 2 energy, stones generate 3, scrolls and potions each generate 6.\n\nSome of these recipes are quite magical, but these ones more resemble traditional cooking.
journal.document.alchemy_guide.energy_food.body=Many recipes require crystallized alchemical energy, which is produced by deconstructing most consumable items in an alchemy pot. As a few examples: seeds generate 2 energy, stones generate 3, scrolls and potions each generate 6.\n\nSome of these recipes are quite magical, but these ones more resemble traditional cooking.
journal.document.alchemy_guide.exotic_potions.title=Exotic Potions
journal.document.alchemy_guide.exotic_potions.body=Potions can be mixed with energy to create exotic potions. They have more powerful effects, but are often useful in different ways.
journal.document.alchemy_guide.exotic_scrolls.title=Exotic Scrolls

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -42,7 +42,7 @@ public class ShatteredPixelDungeon extends Game {
public static final int v2_0_2 = 700;
public static final int v2_1_4 = 737; //iOS was 737, other platforms were 736
public static final int v2_2_1 = 755; //iOS was 755 (also called v2.2.2), other platforms were 754
public static final int v2_3_0 = 765;
public static final int v2_3_2 = 768;
public ShatteredPixelDungeon( PlatformSupport platform ) {
super( sceneClass == null ? WelcomeScene.class : sceneClass, platform );

View File

@@ -49,6 +49,7 @@ public class Guidebook extends Item {
Document.ADVENTURERS_GUIDE.findPage(Document.GUIDE_SURPRISE_ATKS);
Document.ADVENTURERS_GUIDE.findPage(Document.GUIDE_IDING);
Document.ADVENTURERS_GUIDE.findPage(Document.GUIDE_FOOD);
Document.ADVENTURERS_GUIDE.findPage(Document.GUIDE_ALCHEMY);
Document.ADVENTURERS_GUIDE.findPage(Document.GUIDE_DIEING);
GameScene.pickUpJournal(this, pos);

View File

@@ -23,10 +23,14 @@ package com.shatteredpixel.shatteredpixeldungeon.items.trinkets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.journal.Guidebook;
import com.shatteredpixel.shatteredpixeldungeon.journal.Document;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.AlchemyScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
@@ -34,6 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.ItemButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.IconTitle;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndInfoItem;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndSadGhost;
@@ -45,7 +50,7 @@ import java.util.Collection;
public class TrinketCatalyst extends Item {
{
image = ItemSpriteSheet.ARCANE_RESIN;
image = ItemSpriteSheet.TRINKET_CATA;
unique = true;
}
@@ -60,6 +65,19 @@ public class TrinketCatalyst extends Item {
return false;
}
@Override
public boolean doPickUp(Hero hero, int pos) {
if (super.doPickUp(hero, pos)){
if (!Document.ADVENTURERS_GUIDE.isPageRead(Document.GUIDE_ALCHEMY)){
GLog.p(Messages.get(Guidebook.class, "hint"));
GameScene.flashForDocument(Document.ADVENTURERS_GUIDE, Document.GUIDE_ALCHEMY);
}
return true;
} else {
return false;
}
}
private ArrayList<Trinket> rolledTrinkets = new ArrayList<>();
private static final String ROLLED_TRINKETS = "rolled_trinkets";

View File

@@ -176,6 +176,8 @@ public enum Document {
return new ItemSprite( new ScrollOfIdentify() );
case "Food":
return new ItemSprite( ItemSpriteSheet.PASTY );
case "Alchemy":
return new ItemSprite( ItemSpriteSheet.TRINKET_CATA );
case "Dieing":
return new ItemSprite( ItemSpriteSheet.TOMB );
case Document.GUIDE_SEARCHING:
@@ -226,6 +228,7 @@ public enum Document {
public static final String GUIDE_SURPRISE_ATKS = "Surprise_Attacks";
public static final String GUIDE_IDING = "Identifying";
public static final String GUIDE_FOOD = "Food";
public static final String GUIDE_ALCHEMY = "Alchemy";
public static final String GUIDE_DIEING = "Dieing";
public static final String GUIDE_SEARCHING = "Searching";
@@ -239,6 +242,7 @@ public enum Document {
ADVENTURERS_GUIDE.pagesStates.put(GUIDE_SURPRISE_ATKS, debug ? READ : NOT_FOUND);
ADVENTURERS_GUIDE.pagesStates.put(GUIDE_IDING, debug ? READ : NOT_FOUND);
ADVENTURERS_GUIDE.pagesStates.put(GUIDE_FOOD, debug ? READ : NOT_FOUND);
ADVENTURERS_GUIDE.pagesStates.put(GUIDE_ALCHEMY, debug ? READ : NOT_FOUND);
ADVENTURERS_GUIDE.pagesStates.put(GUIDE_DIEING, debug ? READ : NOT_FOUND);
//given in sewers
ADVENTURERS_GUIDE.pagesStates.put(GUIDE_SEARCHING, debug ? READ : NOT_FOUND);

View File

@@ -53,7 +53,7 @@ import java.util.Collections;
public class WelcomeScene extends PixelScene {
private static final int LATEST_UPDATE = ShatteredPixelDungeon.v2_3_0;
private static final int LATEST_UPDATE = ShatteredPixelDungeon.v2_3_2;
//used so that the game does not keep showing the window forever if cleaning fails
private static boolean triedCleaningTemp = false;
@@ -277,6 +277,10 @@ public class WelcomeScene extends PixelScene {
}
Dungeon.daily = Dungeon.dailyReplay = false;
if (previousVersion <= ShatteredPixelDungeon.v2_3_2){
Document.ADVENTURERS_GUIDE.findPage(Document.GUIDE_ALCHEMY);
}
Badges.saveGlobal(true);
Journal.saveGlobal(true);

View File

@@ -147,6 +147,7 @@ public class ItemSpriteSheet {
public static final int CLOAK_SCRAP = MISC_CONSUMABLE +18;
public static final int BOW_FRAGMENT = MISC_CONSUMABLE +19;
public static final int BROKEN_HILT = MISC_CONSUMABLE +20;
public static final int TRINKET_CATA = MISC_CONSUMABLE +21;
static{
assignItemRect(ANKH, 10, 16);
@@ -173,6 +174,8 @@ public class ItemSpriteSheet {
assignItemRect(CLOAK_SCRAP, 9, 9);
assignItemRect(BOW_FRAGMENT, 12, 9);
assignItemRect(BROKEN_HILT, 9, 9);
assignItemRect(TRINKET_CATA, 12, 11);
}
private static final int BOMBS = xy(1, 6); //16 slots