v0.3.4: externalized dried rose strings
This commit is contained in:
parent
bd635c83fb
commit
7757b47573
|
@ -88,10 +88,10 @@ public class DriedRose extends Artifact {
|
||||||
public void execute( Hero hero, String action ) {
|
public void execute( Hero hero, String action ) {
|
||||||
if (action.equals(AC_SUMMON)) {
|
if (action.equals(AC_SUMMON)) {
|
||||||
|
|
||||||
if (spawned) GLog.n("sad ghost: \"I'm already here\"");
|
if (spawned) GLog.i( Messages.get(this, "spawned") );
|
||||||
else if (!isEquipped( hero )) GLog.i( Messages.get(Artifact.class, "need_to_equip") );
|
else if (!isEquipped( hero )) GLog.i( Messages.get(Artifact.class, "need_to_equip") );
|
||||||
else if (charge != chargeCap) GLog.i("Your rose isn't fully charged yet.");
|
else if (charge != chargeCap) GLog.i( Messages.get(this, "no_charge") );
|
||||||
else if (cursed) GLog.i("You cannot use a cursed rose.");
|
else if (cursed) GLog.i( Messages.get(this, "cursed") );
|
||||||
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++) {
|
||||||
|
@ -114,7 +114,7 @@ public class DriedRose extends Artifact {
|
||||||
hero.sprite.operate(hero.pos);
|
hero.sprite.operate(hero.pos);
|
||||||
|
|
||||||
if (!firstSummon) {
|
if (!firstSummon) {
|
||||||
ghost.yell(ghost.VOICE_HELLO + Dungeon.hero.givenName());
|
ghost.yell( Messages.get(GhostHero.class, "hello", Dungeon.hero.givenName()) );
|
||||||
Sample.INSTANCE.play( Assets.SND_GHOST );
|
Sample.INSTANCE.play( Assets.SND_GHOST );
|
||||||
firstSummon = true;
|
firstSummon = true;
|
||||||
} else
|
} else
|
||||||
|
@ -125,7 +125,7 @@ public class DriedRose extends Artifact {
|
||||||
updateQuickslot();
|
updateQuickslot();
|
||||||
|
|
||||||
} else
|
} else
|
||||||
GLog.i("There is no free space near you.");
|
GLog.i( Messages.get(this, "no_space") );
|
||||||
}
|
}
|
||||||
|
|
||||||
} else{
|
} else{
|
||||||
|
@ -135,18 +135,16 @@ public class DriedRose extends Artifact {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String desc() {
|
public String desc() {
|
||||||
String desc =
|
String desc = super.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.";
|
|
||||||
|
|
||||||
if (isEquipped( Dungeon.hero )){
|
if (isEquipped( Dungeon.hero )){
|
||||||
if (!cursed){
|
if (!cursed){
|
||||||
|
|
||||||
if (level() < levelCap)
|
if (level() < levelCap)
|
||||||
desc+= "\n\nIt seems to be missing some petals. Perhaps reattaching them out strengthen the rose.";
|
desc+= "\n\n" + Messages.get(this, "desc_hint");
|
||||||
|
|
||||||
} else
|
} else
|
||||||
desc += "\n\nThe cursed rose is bound to your hand, it feels eerily cold.";
|
desc += "\n\n" + Messages.get(this, "desc_cursed");
|
||||||
}
|
}
|
||||||
|
|
||||||
return desc;
|
return desc;
|
||||||
|
@ -202,14 +200,13 @@ public class DriedRose extends Artifact {
|
||||||
|
|
||||||
LockedFloor lock = target.buff(LockedFloor.class);
|
LockedFloor lock = target.buff(LockedFloor.class);
|
||||||
if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) {
|
if (charge < chargeCap && !cursed && (lock == null || lock.regenOn())) {
|
||||||
//TODO: investigate balancing on this.
|
|
||||||
partialCharge += 10/75f;
|
partialCharge += 10/75f;
|
||||||
if (partialCharge > 1){
|
if (partialCharge > 1){
|
||||||
charge++;
|
charge++;
|
||||||
partialCharge--;
|
partialCharge--;
|
||||||
if (charge == chargeCap){
|
if (charge == chargeCap){
|
||||||
partialCharge = 0f;
|
partialCharge = 0f;
|
||||||
GLog.p("Your rose is fully charged!");
|
GLog.p( Messages.get(DriedRose.class, "charged") );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (cursed && Random.Int(100) == 0) {
|
} else if (cursed && Random.Int(100) == 0) {
|
||||||
|
@ -250,20 +247,18 @@ public class DriedRose extends Artifact {
|
||||||
DriedRose rose = hero.belongings.getItem( DriedRose.class );
|
DriedRose rose = hero.belongings.getItem( DriedRose.class );
|
||||||
|
|
||||||
if (rose == null){
|
if (rose == null){
|
||||||
GLog.w("You have no rose to add this petal to.");
|
GLog.w( Messages.get(this, "no_rose") );
|
||||||
return false;
|
return false;
|
||||||
} if ( rose.level() >= rose.levelCap ){
|
} if ( rose.level() >= rose.levelCap ){
|
||||||
GLog.i("There is no room left for this petal, so you discard it.");
|
GLog.i( Messages.get(this, "no_room") );
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
rose.upgrade();
|
rose.upgrade();
|
||||||
if (rose.level() == rose.levelCap) {
|
if (rose.level() == rose.levelCap) {
|
||||||
GLog.p("The rose is completed!");
|
GLog.p( Messages.get(this, "maxlevel") );
|
||||||
Sample.INSTANCE.play( Assets.SND_GHOST );
|
|
||||||
GLog.n("sad ghost: \"Thank you...\"");
|
|
||||||
} else
|
} else
|
||||||
GLog.i("You add the petal to the rose.");
|
GLog.i( Messages.get(this, "levelup") );
|
||||||
|
|
||||||
Sample.INSTANCE.play( Assets.SND_DEWDROP );
|
Sample.INSTANCE.play( Assets.SND_DEWDROP );
|
||||||
hero.spendAndNext(TIME_TO_PICK_UP);
|
hero.spendAndNext(TIME_TO_PICK_UP);
|
||||||
|
@ -272,17 +267,11 @@ public class DriedRose extends Artifact {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String info() {
|
|
||||||
return "A frail dried up petal, which has somehow survived this far into the dungeon.";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class GhostHero extends NPC {
|
public static class GhostHero extends NPC {
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "sad ghost";
|
|
||||||
spriteClass = GhostSprite.class;
|
spriteClass = GhostSprite.class;
|
||||||
|
|
||||||
flying = true;
|
flying = true;
|
||||||
|
@ -306,6 +295,7 @@ public class DriedRose extends Artifact {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saySpawned(){
|
public void saySpawned(){
|
||||||
|
if (!name.equals("sad ghost")) return; //don't say anything if not on english
|
||||||
int i = (Dungeon.depth - 1) / 5;
|
int i = (Dungeon.depth - 1) / 5;
|
||||||
if (chooseEnemy() == null)
|
if (chooseEnemy() == null)
|
||||||
yell( Random.element( VOICE_AMBIENT[i] ) );
|
yell( Random.element( VOICE_AMBIENT[i] ) );
|
||||||
|
@ -320,11 +310,13 @@ public class DriedRose extends Artifact {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sayDefeated(){
|
public void sayDefeated(){
|
||||||
|
if (!name.equals("sad ghost")) return; //don't say anything if not on english
|
||||||
yell( Random.element( VOICE_DEFEATED[ Dungeon.bossLevel() ? 1 : 0 ] ) );
|
yell( Random.element( VOICE_DEFEATED[ Dungeon.bossLevel() ? 1 : 0 ] ) );
|
||||||
Sample.INSTANCE.play( Assets.SND_GHOST );
|
Sample.INSTANCE.play( Assets.SND_GHOST );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sayHeroKilled(){
|
public void sayHeroKilled(){
|
||||||
|
if (!name.equals("sad ghost")) return; //don't say anything if not on english
|
||||||
yell(Random.element(VOICE_HEROKILLED));
|
yell(Random.element(VOICE_HEROKILLED));
|
||||||
Sample.INSTANCE.play( Assets.SND_GHOST );
|
Sample.INSTANCE.play( Assets.SND_GHOST );
|
||||||
}
|
}
|
||||||
|
@ -334,11 +326,6 @@ public class DriedRose extends Artifact {
|
||||||
Sample.INSTANCE.play( Assets.SND_GHOST );
|
Sample.INSTANCE.play( Assets.SND_GHOST );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String defenseVerb() {
|
|
||||||
return "evaded";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean act() {
|
protected boolean act() {
|
||||||
if (Random.Int(10) == 0) damage(1 , this);
|
if (Random.Int(10) == 0) damage(1 , this);
|
||||||
|
@ -403,7 +390,7 @@ public class DriedRose extends Artifact {
|
||||||
public void interact() {
|
public void interact() {
|
||||||
if (!DriedRose.talkedTo){
|
if (!DriedRose.talkedTo){
|
||||||
DriedRose.talkedTo = true;
|
DriedRose.talkedTo = true;
|
||||||
GameScene.show(new WndQuest(this, VOICE_INTRODUCE ));
|
GameScene.show(new WndQuest(this, Messages.get(this, "introduce") ));
|
||||||
} else {
|
} else {
|
||||||
int curPos = pos;
|
int curPos = pos;
|
||||||
|
|
||||||
|
@ -430,13 +417,6 @@ public class DriedRose extends Artifact {
|
||||||
super.destroy();
|
super.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String description() {
|
|
||||||
return
|
|
||||||
"A frail looking ethereal figure with a humanoid shape. Its power seems tied to the rose I have." +
|
|
||||||
"\n\nThis ghost may not be much, but it seems to be my only true friend down here.";
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final HashSet<Class<?>> IMMUNITIES = new HashSet<Class<?>>();
|
private static final HashSet<Class<?>> IMMUNITIES = new HashSet<Class<?>>();
|
||||||
static {
|
static {
|
||||||
IMMUNITIES.add( ToxicGas.class );
|
IMMUNITIES.add( ToxicGas.class );
|
||||||
|
@ -452,8 +432,6 @@ public class DriedRose extends Artifact {
|
||||||
//This is a bunch strings & string arrays, used in all of the sad ghost's voice lines.
|
//This is a bunch strings & string arrays, used in all of the sad ghost's voice lines.
|
||||||
//************************************************************************************
|
//************************************************************************************
|
||||||
|
|
||||||
public static final String VOICE_HELLO = "Hello again ";
|
|
||||||
|
|
||||||
private static final String VOICE_INTRODUCE = "My spirit is bound to this rose, it was very precious to me, a "+
|
private static final String VOICE_INTRODUCE = "My spirit is bound to this rose, it was very precious to me, a "+
|
||||||
"gift from my love whom I left on the surface.\n\nI cannot return to him, but thanks to you I have a " +
|
"gift from my love whom I left on the surface.\n\nI cannot return to him, but thanks to you I have a " +
|
||||||
"second chance to complete my journey. When I am able I will respond to your call and fight with you.\n\n" +
|
"second chance to complete my journey. When I am able I will respond to your call and fight with you.\n\n" +
|
||||||
|
|
|
@ -117,7 +117,25 @@ items.artifacts.cloakofshadows$cloakstealth.name=Cloaked
|
||||||
items.artifacts.cloakofshadows$cloakstealth.desc=Your cloak of shadows is granting you invisibility while you are shrouded by it.\n\nWhile you are invisible enemies are unable to attack or follow you. Physical attacks and magical effects (such as scrolls and wands) will immediately cancel invisibility.\n\nYou will remain cloaked until it is cancelled or your cloak runs out of charge.
|
items.artifacts.cloakofshadows$cloakstealth.desc=Your cloak of shadows is granting you invisibility while you are shrouded by it.\n\nWhile you are invisible enemies are unable to attack or follow you. Physical attacks and magical effects (such as scrolls and wands) will immediately cancel invisibility.\n\nYou will remain cloaked until it is cancelled or your cloak runs out of charge.
|
||||||
|
|
||||||
items.artifacts.driedrose.name=dried rose
|
items.artifacts.driedrose.name=dried rose
|
||||||
|
items.artifacts.driedrose.spawned=You have already summed the ghost.
|
||||||
|
items.artifacts.driedrose.no_charge=Your rose isn't fully charged yet.
|
||||||
|
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_hint=It seems to be missing some petals. Perhaps reattaching them out 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
|
items.artifacts.driedrose$petal.name=dried petal
|
||||||
|
items.artifacts.driedrose$petal.no_rose=You have no rose to add this petal to.
|
||||||
|
items.artifacts.driedrose$petal.no_room=There is no room left for this petal, so you discard it.
|
||||||
|
items.artifacts.driedrose$petal.maxlevel=The rose is completed!
|
||||||
|
items.artifacts.driedrose$petal.levelup=You add the petal to the rose.
|
||||||
|
items.artifacts.driedrose$petal.desc=A frail dried up petal, which has somehow survived this far into the dungeon.
|
||||||
|
items.artifacts.driedrose$ghosthero.name=sad ghost
|
||||||
|
items.artifacts.driedrose$ghosthero.def_verb=evaded
|
||||||
|
items.artifacts.driedrose$ghosthero.hello=Hello again %s.
|
||||||
|
items.artifacts.driedrose$ghosthero.introduce=My spirit is bound to this rose, it was very precious to me, a gift from my love whom I left on the surface.\n\nI cannot return to him, but thanks to you I have a second chance to complete my journey. When I am able I will respond to your call and fight with you.\n\nhopefully you may succeed where I failed...
|
||||||
|
items.artifacts.driedrose$ghosthero.desc=A frail looking ethereal figure with a humanoid shape. Its power seems tied to the rose I have.\n\nThis ghost may not be much, but it seems to be my only true friend down here.
|
||||||
|
|
||||||
items.artifacts.etherealchains.name=ethereal chains
|
items.artifacts.etherealchains.name=ethereal chains
|
||||||
items.artifacts.etherealchains.no_charge=Your chains do not have enough charge.
|
items.artifacts.etherealchains.no_charge=Your chains do not have enough charge.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user