v0.2.3: artifact fixes
This commit is contained in:
parent
1ed89667ea
commit
80686f6ad7
|
@ -16,7 +16,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.WraithSprite;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
@ -55,7 +54,7 @@ public class DriedRose extends Artifact {
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<String> actions( Hero hero ) {
|
public ArrayList<String> actions( Hero hero ) {
|
||||||
ArrayList<String> actions = super.actions( hero );
|
ArrayList<String> actions = super.actions( hero );
|
||||||
if (isEquipped( hero ) && charge == chargeCap)
|
if (isEquipped( hero ) && charge == chargeCap && !cursed)
|
||||||
actions.add(AC_SUMMON);
|
actions.add(AC_SUMMON);
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
@ -67,6 +66,7 @@ public class DriedRose extends Artifact {
|
||||||
if (spawned) GLog.n("sad ghost: I'm already here");
|
if (spawned) GLog.n("sad ghost: I'm already here");
|
||||||
else if (!isEquipped( hero )) GLog.i("You need to equip your rose to do that.");
|
else if (!isEquipped( hero )) GLog.i("You need to equip your rose to do that.");
|
||||||
else if (charge != chargeCap) GLog.i("Your rose isn't fully charged yet.");
|
else if (charge != chargeCap) GLog.i("Your rose isn't fully charged yet.");
|
||||||
|
else if (cursed) GLog.i("You cannot use a cursed rose.");
|
||||||
else {
|
else {
|
||||||
ArrayList<Integer> spawnPoints = new ArrayList<Integer>();
|
ArrayList<Integer> spawnPoints = new ArrayList<Integer>();
|
||||||
for (int i = 0; i < Level.NEIGHBOURS8.length; i++) {
|
for (int i = 0; i < Level.NEIGHBOURS8.length; i++) {
|
||||||
|
|
|
@ -15,6 +15,7 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -28,7 +29,9 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
private static final String TXT_STASIS = "Put myself in stasis";
|
private static final String TXT_STASIS = "Put myself in stasis";
|
||||||
private static final String TXT_FREEZE = "Freeze time around me";
|
private static final String TXT_FREEZE = "Freeze time around me";
|
||||||
private static final String TXT_DESC =
|
private static final String TXT_DESC =
|
||||||
"...";
|
"How would you like to use the hourglass's magic?\n\n" +
|
||||||
|
"While in stasis, time will move normally while you are frozen and completely invulnerable.\n\n" +
|
||||||
|
"When time is frozen, you can move as if your actions take no time. Note that attacking will break this.";
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "Timekeeper's Hourglass";
|
name = "Timekeeper's Hourglass";
|
||||||
|
@ -52,7 +55,7 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<String> actions( Hero hero ) {
|
public ArrayList<String> actions( Hero hero ) {
|
||||||
ArrayList<String> actions = super.actions( hero );
|
ArrayList<String> actions = super.actions( hero );
|
||||||
if (isEquipped( hero ) && charge > 0)
|
if (isEquipped( hero ) && charge > 0 && !cursed)
|
||||||
actions.add(AC_ACTIVATE);
|
actions.add(AC_ACTIVATE);
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
@ -64,12 +67,13 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
if (!isEquipped( hero )) GLog.i("You need to equip your hourglass to do that.");
|
if (!isEquipped( hero )) GLog.i("You need to equip your hourglass to do that.");
|
||||||
else if (activeBuff != null) GLog.i("Your hourglass is already in use.");
|
else if (activeBuff != null) GLog.i("Your hourglass is already in use.");
|
||||||
else if (charge <= 1) GLog.i("Your hourglass hasn't recharged enough to be usable yet.");
|
else if (charge <= 1) GLog.i("Your hourglass hasn't recharged enough to be usable yet.");
|
||||||
|
else if (cursed) GLog.i("You cannot use a cursed hourglass.");
|
||||||
else GameScene.show(
|
else GameScene.show(
|
||||||
new WndOptions(TXT_HGLASS, TXT_DESC, TXT_STASIS, TXT_FREEZE) {
|
new WndOptions(TXT_HGLASS, TXT_DESC, TXT_STASIS, TXT_FREEZE) {
|
||||||
@Override
|
@Override
|
||||||
protected void onSelect(int index) {
|
protected void onSelect(int index) {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
GLog.i("Everything seems to blur while moving around you.");
|
GLog.i("The world seems to shift around you in an instant.");
|
||||||
GameScene.flash(0xFFFFFF);
|
GameScene.flash(0xFFFFFF);
|
||||||
Sample.INSTANCE.play(Assets.SND_TELEPORT);
|
Sample.INSTANCE.play(Assets.SND_TELEPORT);
|
||||||
|
|
||||||
|
@ -83,10 +87,7 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
activeBuff = new timeFreeze();
|
activeBuff = new timeFreeze();
|
||||||
activeBuff.attachTo(Dungeon.hero);
|
activeBuff.attachTo(Dungeon.hero);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
}
|
|
||||||
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else
|
} else
|
||||||
|
@ -130,7 +131,24 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String desc() {
|
public String desc() {
|
||||||
return "";
|
String desc =
|
||||||
|
"This large ornate hourglass looks fairly unassuming, but you feel a great power in its finely carved" +
|
||||||
|
" frame. As you rotate the hourglass and watch the sand pour you can feel its magic tugging at you, " +
|
||||||
|
"surely invoking this magic would give you some power over time.";
|
||||||
|
|
||||||
|
if (isEquipped( Dungeon.hero )){
|
||||||
|
if (!cursed) {
|
||||||
|
desc += "\n\nThe hourglass rests at your side, the whisper of steadily pouring sand is reassuring.";
|
||||||
|
|
||||||
|
if (level < levelCap )
|
||||||
|
desc +=
|
||||||
|
"\n\nThe hourglass seems to have lost some sand with age. While there are no cracks, " +
|
||||||
|
"there is a port on the top of the hourglass to pour sand in, if only you could find some...";
|
||||||
|
}else
|
||||||
|
desc += "\n\nThe cursed hourglass is locked to your side, " +
|
||||||
|
"you can feel it trying to manipulate your flow of time.";
|
||||||
|
}
|
||||||
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -171,7 +189,7 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
public class hourglassRecharge extends ArtifactBuff {
|
public class hourglassRecharge extends ArtifactBuff {
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
if (charge < chargeCap) {
|
if (charge < chargeCap && !cursed) {
|
||||||
partialCharge += 1 / (60f - (chargeCap - charge)*2f);
|
partialCharge += 1 / (60f - (chargeCap - charge)*2f);
|
||||||
|
|
||||||
if (partialCharge >= 1) {
|
if (partialCharge >= 1) {
|
||||||
|
@ -182,7 +200,8 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
partialCharge = 0;
|
partialCharge = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else if (cursed && Random.Int(10) == 0)
|
||||||
|
((Hero) target).spend( TICK );
|
||||||
|
|
||||||
QuickSlot.refresh();
|
QuickSlot.refresh();
|
||||||
|
|
||||||
|
@ -323,7 +342,7 @@ public class TimekeepersHourglass extends Artifact {
|
||||||
@Override
|
@Override
|
||||||
public boolean doPickUp( Hero hero ) {
|
public boolean doPickUp( Hero hero ) {
|
||||||
TimekeepersHourglass hourglass = hero.belongings.getItem( TimekeepersHourglass.class );
|
TimekeepersHourglass hourglass = hero.belongings.getItem( TimekeepersHourglass.class );
|
||||||
if (hourglass != null) {
|
if (hourglass != null && !hourglass.cursed) {
|
||||||
hourglass.upgrade();
|
hourglass.upgrade();
|
||||||
Sample.INSTANCE.play( Assets.SND_DEWDROP );
|
Sample.INSTANCE.play( Assets.SND_DEWDROP );
|
||||||
if (hourglass.level == hourglass.levelCap)
|
if (hourglass.level == hourglass.levelCap)
|
||||||
|
|
|
@ -82,6 +82,7 @@ public class UnstableSpellbook extends Artifact {
|
||||||
if (hero.buff( Blindness.class ) != null) GLog.w("You cannot read from the book while blinded.");
|
if (hero.buff( Blindness.class ) != null) GLog.w("You cannot read from the book while blinded.");
|
||||||
else if (!isEquipped( hero )) GLog.i("You need to equip your spellbook to do that.");
|
else if (!isEquipped( hero )) GLog.i("You need to equip your spellbook to do that.");
|
||||||
else if (charge == 0) GLog.i("Your spellbook is out of energy for now.");
|
else if (charge == 0) GLog.i("Your spellbook is out of energy for now.");
|
||||||
|
else if (cursed) GLog.i("Your cannot read from a cursed spellbook.");
|
||||||
else {
|
else {
|
||||||
charge--;
|
charge--;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user