v3.1.0: added landmark entries for lost pack and beacon location
This commit is contained in:
@@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HolyTome;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.MagicalHolster;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.journal.Notes;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
@@ -79,6 +80,8 @@ public class LostBackpack extends Item {
|
||||
hero.spendAndNext(TIME_TO_PICK_UP);
|
||||
GameScene.pickUp( this, pos );
|
||||
((HeroSprite)hero.sprite).updateArmor();
|
||||
|
||||
Notes.remove(Notes.Landmark.LOST_PACK);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPassage;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.journal.Catalog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.journal.Notes;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
@@ -90,12 +91,16 @@ public class BeaconOfReturning extends Spell {
|
||||
@Override
|
||||
protected void onThrow(int cell) {
|
||||
returnDepth = -1;
|
||||
if (Dungeon.hero.belongings.getItem(getClass()) == null){
|
||||
Notes.remove(Notes.Landmark.BEACON_LOCATION);
|
||||
}
|
||||
super.onThrow(cell);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doDrop(Hero hero) {
|
||||
returnDepth = -1;
|
||||
Notes.remove(Notes.Landmark.BEACON_LOCATION);
|
||||
super.doDrop(hero);
|
||||
}
|
||||
|
||||
@@ -103,6 +108,8 @@ public class BeaconOfReturning extends Spell {
|
||||
returnDepth = Dungeon.depth;
|
||||
returnBranch = Dungeon.branch;
|
||||
returnPos = hero.pos;
|
||||
|
||||
Notes.add(Notes.Landmark.BEACON_LOCATION);
|
||||
|
||||
hero.spend( 1f );
|
||||
hero.busy();
|
||||
@@ -173,6 +180,9 @@ public class BeaconOfReturning extends Spell {
|
||||
InterlevelScene.returnPos = returnPos;
|
||||
Game.switchScene( InterlevelScene.class );
|
||||
}
|
||||
if (quantity == 1){
|
||||
Notes.remove(Notes.Landmark.BEACON_LOCATION);
|
||||
}
|
||||
detach(hero.belongings.backpack);
|
||||
Catalog.countUse(getClass());
|
||||
if (Random.Float() < talentChance){
|
||||
|
||||
@@ -38,7 +38,9 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Shopkeeper;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Wandmaker;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.LostBackpack;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.keys.Key;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.spells.BeaconOfReturning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.WeakFloorRoom;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
@@ -126,6 +128,9 @@ public class Notes {
|
||||
WELL_OF_AWARENESS,
|
||||
SACRIFICIAL_FIRE,
|
||||
STATUE,
|
||||
|
||||
LOST_PACK,
|
||||
BEACON_LOCATION,
|
||||
|
||||
GHOST,
|
||||
RAT_KING,
|
||||
@@ -185,6 +190,11 @@ public class Notes {
|
||||
case STATUE:
|
||||
return new Image(new StatueSprite());
|
||||
|
||||
case LOST_PACK:
|
||||
return Icons.get(Icons.BACKPACK_LRG);
|
||||
case BEACON_LOCATION:
|
||||
return new ItemSprite(ItemSpriteSheet.RETURN_BEACON);
|
||||
|
||||
case GHOST:
|
||||
return new Image(new GhostSprite());
|
||||
case RAT_KING:
|
||||
@@ -212,6 +222,9 @@ public class Notes {
|
||||
case LARGE_FLOOR: return Messages.get(Level.Feeling.class, "large_title");
|
||||
case TRAPS_FLOOR: return Messages.get(Level.Feeling.class, "traps_title");
|
||||
case SECRETS_FLOOR: return Messages.get(Level.Feeling.class, "secrets_title");
|
||||
|
||||
case LOST_PACK: return Messages.get(LostBackpack.class, "name");
|
||||
case BEACON_LOCATION:return Messages.get(BeaconOfReturning.class, "name");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,6 +252,9 @@ public class Notes {
|
||||
case SACRIFICIAL_FIRE: return Messages.get(SacrificialFire.class, "desc");
|
||||
case STATUE: return Messages.get(Statue.class, "desc");
|
||||
|
||||
case LOST_PACK: return Messages.get(LostBackpack.class, "desc");
|
||||
case BEACON_LOCATION: return Messages.get(BeaconOfReturning.class, "desc");
|
||||
|
||||
case GHOST: return Messages.get(Ghost.class, "desc");
|
||||
case RAT_KING: return new RatKing().description(); //variable description based on holiday/run state
|
||||
case WANDMAKER: return Messages.get(Wandmaker.class, "desc");
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.ShadowBox;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.LostBackpack;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.journal.Document;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.journal.Notes;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
|
||||
@@ -764,6 +765,8 @@ public class InterlevelScene extends PixelScene {
|
||||
level.drop(new LostBackpack(), invPos);
|
||||
}
|
||||
|
||||
Notes.add(Notes.Landmark.LOST_PACK);
|
||||
|
||||
Dungeon.switchLevel( level, Dungeon.hero.pos );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user