v0.6.1: more bugfixes and improvements to the dried rose
This commit is contained in:
parent
d0dfa22fe4
commit
b294155fb1
|
@ -75,7 +75,7 @@ public class Ghost extends NPC {
|
|||
|
||||
@Override
|
||||
protected boolean act() {
|
||||
if (Quest.completed())
|
||||
if (Quest.processed())
|
||||
target = Dungeon.hero.pos;
|
||||
return super.act();
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public class Ghost extends NPC {
|
|||
|
||||
@Override
|
||||
public float speed() {
|
||||
return Quest.completed() ? 2f : 0.5f;
|
||||
return Quest.processed() ? 2f : 0.5f;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -334,7 +334,6 @@ public class Ghost extends NPC {
|
|||
GLog.n( Messages.get(Ghost.class, "find_me") );
|
||||
Sample.INSTANCE.play( Assets.SND_GHOST );
|
||||
processed = true;
|
||||
Generator.Category.ARTIFACT.probs[10] = 1; //flags the dried rose as spawnable.
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -345,8 +344,12 @@ public class Ghost extends NPC {
|
|||
Notes.remove( Notes.Landmark.GHOST );
|
||||
}
|
||||
|
||||
public static boolean completed(){
|
||||
public static boolean processed(){
|
||||
return spawned && processed;
|
||||
}
|
||||
|
||||
public static boolean completed(){
|
||||
return processed() && weapon == null && armor == null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ package com.shatteredpixel.shatteredpixeldungeon.items;
|
|||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.LeatherArmor;
|
||||
|
@ -192,7 +191,7 @@ public class Generator {
|
|||
return item instanceof Bag ? Integer.MAX_VALUE : Integer.MAX_VALUE - 1;
|
||||
}
|
||||
|
||||
private static final float[] INITIAL_ARTIFACT_PROBS = new float[]{ 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1};
|
||||
private static final float[] INITIAL_ARTIFACT_PROBS = new float[]{ 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1};
|
||||
|
||||
static {
|
||||
GOLD.classes = new Class<?>[]{
|
||||
|
@ -342,7 +341,7 @@ public class Generator {
|
|||
TimekeepersHourglass.class,
|
||||
UnstableSpellbook.class,
|
||||
AlchemistsToolkit.class, //currently removed from drop tables, pending rework.
|
||||
DriedRose.class, //starts with no chance of spawning, chance is set directly after beating ghost quest.
|
||||
DriedRose.class,
|
||||
LloydsBeacon.class,
|
||||
EtherealChains.class
|
||||
};
|
||||
|
@ -524,10 +523,6 @@ public class Generator {
|
|||
//resets artifact probabilities, for new dungeons
|
||||
public static void initArtifacts() {
|
||||
Category.ARTIFACT.probs = Category.INITIAL_ARTIFACT_PROBS.clone();
|
||||
|
||||
//checks for dried rose quest completion, adds the rose in accordingly.
|
||||
if (Ghost.Quest.completed()) Category.ARTIFACT.probs[10] = 1;
|
||||
|
||||
spawnedArtifacts = new ArrayList<>();
|
||||
}
|
||||
|
||||
|
|
|
@ -138,6 +138,11 @@ public class Artifact extends KindofMisc {
|
|||
@Override
|
||||
public String status() {
|
||||
|
||||
//if the artifact isn't IDed, or is cursed, don't display anything
|
||||
if (!isIdentified() || cursed){
|
||||
return null;
|
||||
}
|
||||
|
||||
//display the current cooldown
|
||||
if (cooldown != 0)
|
||||
return Messages.format( "%d", cooldown );
|
||||
|
|
|
@ -33,6 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Wraith;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
|
@ -100,6 +101,10 @@ public class DriedRose extends Artifact {
|
|||
@Override
|
||||
public ArrayList<String> actions( Hero hero ) {
|
||||
ArrayList<String> actions = super.actions( hero );
|
||||
if (!Ghost.Quest.completed()){
|
||||
actions.remove(AC_EQUIP);
|
||||
return actions;
|
||||
}
|
||||
if (isEquipped( hero ) && charge == chargeCap && !cursed) {
|
||||
actions.add(AC_SUMMON);
|
||||
}
|
||||
|
@ -168,6 +173,10 @@ public class DriedRose extends Artifact {
|
|||
|
||||
@Override
|
||||
public String desc() {
|
||||
if (!Ghost.Quest.completed() && !isIdentified()){
|
||||
return Messages.get(this, "desc_no_quest");
|
||||
}
|
||||
|
||||
String desc = super.desc();
|
||||
|
||||
if (isEquipped( Dungeon.hero )){
|
||||
|
@ -262,7 +271,7 @@ public class DriedRose extends Artifact {
|
|||
ghostPos = pos + PathFinder.NEIGHBOURS8[Random.Int(8)];
|
||||
} while (Level.solid[ghostPos] || level.findMob(ghostPos) != null);
|
||||
|
||||
heldGhost.pos = pos;
|
||||
heldGhost.pos = ghostPos;
|
||||
heldGhost = null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ public abstract class Level implements Bundlable {
|
|||
}
|
||||
|
||||
DriedRose rose = Dungeon.hero.belongings.getItem( DriedRose.class );
|
||||
if (rose != null && !rose.cursed){
|
||||
if (rose != null && rose.isIdentified() && !rose.cursed){
|
||||
//aim to drop 1 petal every 2 floors
|
||||
int petalsNeeded = (int) Math.ceil((float)((Dungeon.depth / 2) - rose.droppedPetals) / 3);
|
||||
|
||||
|
|
|
@ -176,6 +176,7 @@ items.artifacts.driedrose.cursed=You cannot use a cursed rose.
|
|||
items.artifacts.driedrose.no_space=There is no free space near you.
|
||||
items.artifacts.driedrose.charged=Your rose is fully charged!
|
||||
items.artifacts.driedrose.desc=Is this the rose that the ghost mentioned before disappearing? It seems to hold some spiritual power, perhaps it can be used to channel the energy of that lost warrior.
|
||||
items.artifacts.driedrose.desc_no_quest=A dried aged rose that is somehow still holding together despite its age.\n\nIt seems to have some spiritual power, but you have no idea how to use it right now.
|
||||
items.artifacts.driedrose.desc_hint=It seems to be missing some petals. Perhaps reattaching them will strengthen the rose.
|
||||
items.artifacts.driedrose.desc_cursed=The cursed rose is bound to your hand, it feels eerily cold.
|
||||
items.artifacts.driedrose$petal.name=dried petal
|
||||
|
|
Loading…
Reference in New Issue
Block a user