v0.3.4: externalized potion strings

This commit is contained in:
Evan Debenham
2016-01-02 04:15:12 -05:00
committed by Evan Debenham
parent 4b768ea85c
commit 5ab29b50fa
14 changed files with 92 additions and 168 deletions
@@ -20,6 +20,7 @@
*/
package com.shatteredpixel.shatteredpixeldungeon.items.potions;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.watabou.noosa.audio.Sample;
import com.watabou.noosa.tweeners.AlphaTweener;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
@@ -33,26 +34,14 @@ public class PotionOfInvisibility extends Potion {
private static final float ALPHA = 0.4f;
{
initials = "In";
}
@Override
public void apply( Hero hero ) {
setKnown();
Buff.affect( hero, Invisibility.class, Invisibility.DURATION );
GLog.i( "You see your hands turn invisible!" );
GLog.i( Messages.get(this, "invisble") );
Sample.INSTANCE.play( Assets.SND_MELD );
}
@Override
public String desc() {
return
"Drinking this potion will render you temporarily invisible. While invisible, " +
"enemies will be unable to see you. Attacking an enemy, as well as using a wand or a scroll " +
"before enemy's eyes, will dispel the effect.";
}
@Override
public int price() {
return isKnown() ? 40 * quantity : super.price();