From e8ad29ef417bf67fbd0f0d1d358cddc70f3b5540 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 6 Jan 2016 03:23:02 -0500 Subject: [PATCH] v0.3.4: externalized a couple buff strings I missed --- .../shatteredpixeldungeon/actors/buffs/Burning.java | 7 +++---- .../shatteredpixeldungeon/actors/buffs/Chill.java | 6 ++---- .../shatteredpixeldungeon/actors/buffs/Frost.java | 6 ++---- .../messages/actors/actors.properties | 4 ++++ 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java index aa1b11cad..254fd1b29 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Burning.java @@ -47,7 +47,6 @@ import com.watabou.utils.Random; public class Burning extends Buff implements Hero.Doom { private static final String TXT_BURNS_UP = "%s burns up!"; - private static final String TXT_BURNED_TO_DEATH = "You burned to death..."; private static final float DURATION = 8f; @@ -88,7 +87,7 @@ public class Burning extends Buff implements Hero.Doom { if (item instanceof Scroll) { item = item.detach( hero.belongings.backpack ); - GLog.w( TXT_BURNS_UP, item.toString() ); + GLog.w( Messages.get(this, "burnsup", item.toString()) ); Heap.burnFX( hero.pos ); @@ -99,7 +98,7 @@ public class Burning extends Buff implements Hero.Doom { if (!steak.collect( hero.belongings.backpack )) { Dungeon.level.drop( steak, hero.pos ).sprite.drop(); } - GLog.w( TXT_BURNS_UP, item.toString() ); + GLog.w( Messages.get(this, "burnsup", item.toString()) ); Heap.burnFX( hero.pos ); @@ -172,6 +171,6 @@ public class Burning extends Buff implements Hero.Doom { Badges.validateDeathFromFire(); Dungeon.fail( ResultDescriptions.BURNING ); - GLog.n( TXT_BURNED_TO_DEATH ); + GLog.n( Messages.get(this, "ondeath") ); } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Chill.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Chill.java index d9552004f..4050a3e0f 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Chill.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Chill.java @@ -38,8 +38,6 @@ import java.text.DecimalFormat; public class Chill extends FlavourBuff { - private static final String TXT_FREEZES = "%s freezes!"; - { type = buffType.NEGATIVE; } @@ -60,7 +58,7 @@ public class Chill extends FlavourBuff { if (item instanceof Potion) { item = item.detach( hero.belongings.backpack ); - GLog.w(TXT_FREEZES, item.toString()); + GLog.w( Messages.get(this, "freezes", item.toString()) ); ((Potion) item).shatter(hero.pos); } else if (item instanceof MysteryMeat) { @@ -70,7 +68,7 @@ public class Chill extends FlavourBuff { if (!carpaccio.collect( hero.belongings.backpack )) { Dungeon.level.drop( carpaccio, target.pos ).sprite.drop(); } - GLog.w(TXT_FREEZES, item.toString()); + GLog.w( Messages.get(this, "freezes", item.toString()) ); } } else if (target instanceof Thief && ((Thief)target).item instanceof Potion) { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Frost.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Frost.java index b53d91f5e..f0da889db 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Frost.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Frost.java @@ -37,8 +37,6 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; public class Frost extends FlavourBuff { - private static final String TXT_FREEZES = "%s freezes!"; - private static final float DURATION = 5f; { @@ -60,7 +58,7 @@ public class Frost extends FlavourBuff { if (item instanceof Potion) { item = item.detach( hero.belongings.backpack ); - GLog.w(TXT_FREEZES, item.toString()); + GLog.w( Messages.get(this, "freezes", item.toString()) ); ((Potion) item).shatter(hero.pos); } else if (item instanceof MysteryMeat) { @@ -70,7 +68,7 @@ public class Frost extends FlavourBuff { if (!carpaccio.collect( hero.belongings.backpack )) { Dungeon.level.drop( carpaccio, target.pos ).sprite.drop(); } - GLog.w(TXT_FREEZES, item.toString()); + GLog.w( Messages.get(this, "freezes", item.toString()) ); } } else if (target instanceof Thief && ((Thief)target).item instanceof Potion) { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties b/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties index ec0a79dd0..785f69be5 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties +++ b/src/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties @@ -52,6 +52,8 @@ actors.buffs.buff.#moreturns=%s more turns actors.buffs.burning.name=Burning actors.buffs.burning.heromsg=You catch fire! +actors.buffs.burning.burnsup=%s burns up! +actors.buffs.burning.ondeath=You burned to death.. actors.buffs.burning.desc=Few things are more distressing than being engulfed in flames.\n\nFire will deal damage every turn until it is put out by water or it expires. Fire can be extinquished by stepping into water, or from the splash of a shattering potion.\n\nAdditionally, the fire may ignite flammable terrain or items that it comes into contact with.\n\nThe burning will last for %s, or until it is extinquished. actors.buffs.charm.name=Charmed @@ -59,6 +61,7 @@ actors.buffs.charm.heromsg=You are charmed! actors.buffs.charm.desc=A charm is manipulative magic that can make enemies temporarily adore eachother.\n\nCharacters affected by charm are unable to directly attack the enemy they are charmed by. Attacking other targets is still possible however.\n\nThe charm will last for %s. actors.buffs.chill.name=Chilled +actors.buffs.chill.freezes=%s freezes! actors.buffs.chill.desc=Not quite frozen, but still much too cold.\n\nChilled targets perform all actions more slowly, depending on how many turns are left in the effect. At it's worst, this is equivalent to being slowed.\n\nThis chill will last for %s, and is currently reducing speed by %s%% actors.buffs.combo.name=Combo @@ -84,6 +87,7 @@ actors.buffs.fireimbue.name=Imbued with Fire actors.buffs.fireimbue.desc=You are imbued with the power of fire!\n\nAll physical attacks will have a chance to light enemies ablaze. Additionally, you are completely immune to the effects of fire.\n\nYou are imbued for %s. actors.buffs.frost.name=Frozen +actors.buffs.frost.freezes=%s freezes! actors.buffs.frost.desc=Not to be confused with freezing solid, this more benign freezing simply encases the target in ice.\n\nFreezing acts similarly to paralysis, making it impossible for the target to act. Unlike paralysis, freezing is immediately cancelled if the target takes damage, as the ice will shatter.\n\nThe freeze will last for %s, or until the target takes damage. actors.buffs.fury.name=Furious