v0.3.4: externalized artifacts part 1
This commit is contained in:
committed by
Evan Debenham
parent
250029c19d
commit
33bef1c6cb
@@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ResultDescriptions;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Earthroot;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
@@ -39,15 +40,6 @@ import java.util.ArrayList;
|
||||
|
||||
public class ChaliceOfBlood extends Artifact {
|
||||
|
||||
private static final String TXT_CHALICE = "Chalice of Blood";
|
||||
private static final String TXT_YES = "Yes, I know what I'm doing";
|
||||
private static final String TXT_NO = "No, I changed my mind";
|
||||
private static final String TXT_PRICK =
|
||||
"Each time you use the chalice it will drain more life energy, "+
|
||||
"if you are not careful this draining effect can easily kill you.\n\n"+
|
||||
"Are you sure you want to offer it more life energy?";
|
||||
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.ARTIFACT_CHALICE1;
|
||||
|
||||
@@ -74,7 +66,10 @@ public class ChaliceOfBlood extends Artifact {
|
||||
if (damage > hero.HP*0.75) {
|
||||
|
||||
GameScene.show(
|
||||
new WndOptions(TXT_CHALICE, TXT_PRICK, TXT_YES, TXT_NO) {
|
||||
new WndOptions(Messages.get(this, "name"),
|
||||
Messages.get(this, "prick_warn"),
|
||||
Messages.get(this, "yes"),
|
||||
Messages.get(this, "no")) {
|
||||
@Override
|
||||
protected void onSelect(int index) {
|
||||
if (index == 0)
|
||||
@@ -102,28 +97,19 @@ public class ChaliceOfBlood extends Artifact {
|
||||
hero.sprite.operate( hero.pos );
|
||||
hero.busy();
|
||||
hero.spend(3f);
|
||||
GLog.w( Messages.get(this, "onprick") );
|
||||
if (damage <= 0){
|
||||
GLog.i("You prick yourself, and your blood drips into the chalice.");
|
||||
} else if (damage < 25){
|
||||
GLog.w("You prick yourself and the chalice feeds on you.");
|
||||
Sample.INSTANCE.play(Assets.SND_CURSED);
|
||||
hero.sprite.emitter().burst( ShadowParticle.CURSE, 6 );
|
||||
} else if (damage < 100){
|
||||
GLog.w("Your life essence drains into the chalice.");
|
||||
Sample.INSTANCE.play(Assets.SND_CURSED);
|
||||
hero.sprite.emitter().burst( ShadowParticle.CURSE, 12 );
|
||||
damage = 1;
|
||||
} else {
|
||||
GLog.w("The chalice devours your life energy.");
|
||||
Sample.INSTANCE.play(Assets.SND_CURSED);
|
||||
hero.sprite.emitter().burst( ShadowParticle.CURSE, 18 );
|
||||
hero.sprite.emitter().burst( ShadowParticle.CURSE, 4+(damage/10) );
|
||||
}
|
||||
|
||||
if (damage > 0)
|
||||
hero.damage(damage, this);
|
||||
hero.damage(damage, this);
|
||||
|
||||
if (!hero.isAlive()) {
|
||||
Dungeon.fail(Utils.format( ResultDescriptions.ITEM, name ));
|
||||
GLog.n("The Chalice sucks your life essence dry...");
|
||||
GLog.n( Messages.get(this, "ondeath") );
|
||||
} else {
|
||||
upgrade();
|
||||
}
|
||||
@@ -145,32 +131,18 @@ public class ChaliceOfBlood extends Artifact {
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
String desc = "This shining silver chalice is oddly adorned with sharp gems at the rim. ";
|
||||
if (level() < levelCap)
|
||||
desc += "The chalice is pulling your attention strangely, you feel like it wants something from you.";
|
||||
else
|
||||
desc += "The chalice is full and radiating energy.";
|
||||
String desc = super.desc();
|
||||
|
||||
if (isEquipped (Dungeon.hero)){
|
||||
desc += "\n\n";
|
||||
if (cursed)
|
||||
desc += "The cursed chalice has bound itself to your hand, and is slowly tugging at your life energy.";
|
||||
desc += Messages.get(this, "desc_cursed");
|
||||
else if (level() == 0)
|
||||
desc += "As you hold the chalice, you feel oddly compelled to prick yourself on the sharp gems.";
|
||||
else if (level() < 3)
|
||||
desc += "Some of your blood is pooled into the chalice, you can subtly feel the chalice feeding life " +
|
||||
"energy into you. You still want to cut yourself on the chalice, even though you know it will hurt.";
|
||||
else if (level() < 7)
|
||||
desc += "The chalice is about half full of your blood and you can feel it feeding life energy " +
|
||||
"into you. you still want to hurt yourself, the chalice needs your energy, it's your friend.";
|
||||
desc += Messages.get(this, "desc_1");
|
||||
else if (level() < levelCap)
|
||||
desc += "The chalice is getting pretty full, and the life force it's feeding you is stronger than " +
|
||||
"ever. You should give it more energy, you need too, your friend needs your energy, it needs " +
|
||||
"your help. Your friend knows you have limits though, it doesn't want you to die, just bleed.";
|
||||
desc += Messages.get(this, "desc_2");
|
||||
else
|
||||
desc += "The chalice is filled to the brim with your life essence. You can feel the chalice pouring " +
|
||||
"life energy back into you. It's your best friend. It's happy with you. So happy. " +
|
||||
"You've done well. So well. You're being rewarded. You don't need to touch the sharp gems anymore.";
|
||||
desc += Messages.get(this, "desc_3");
|
||||
}
|
||||
|
||||
return desc;
|
||||
|
||||
Reference in New Issue
Block a user