Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.watabou.pixeldungeon.items.potions;
- import com.watabou.noosa.Group;
- import com.watabou.noosa.audio.Sample;
- import com.watabou.noosa.tweeners.AlphaTweener;
- import com.watabou.pixeldungeon.actors.Char;
- import com.watabou.pixeldungeon.actors.buffs.Buff;
- import com.watabou.pixeldungeon.actors.buffs.Invisibility;
- import com.watabou.pixeldungeon.actors.hero.Hero;
- import com.watabou.pixeldungeon.sprites.CharSprite;
- import com.watabou.pixeldungeon.utils.GLog;
- public class PotionOfInvisibility extends Potion
- {
- private static final float ALPHA = 0.4F;
- public PotionOfInvisibility()
- {
- this.name = "Potion of Invisibility";
- }
- public static void melt(Char paramChar)
- {
- if (paramChar.sprite.parent != null)
- {
- paramChar.sprite.parent.add(new AlphaTweener(paramChar.sprite, 0.4F, 0.4F));
- return;
- }
- paramChar.sprite.alpha(0.4F);
- }
- protected void apply(Hero paramHero)
- {
- setKnown();
- Buff.affect(paramHero, Invisibility.class, 15.0F);
- GLog.i("You see your hands turn invisible!", new Object[0]);
- Sample.INSTANCE.play("snd_meld.mp3");
- }
- 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.";
- }
- public int price()
- {
- if (isKnown())
- return 40 * this.quantity;
- return super.price();
- }
- }
- /* Location: C:\Users\Hermans\Desktop\Pixel Dungeon Decompilation\classes-dex2jar.jar
- * Qualified Name: com.watabou.pixeldungeon.items.potions.PotionOfInvisibility
- * JD-Core Version: 0.6.2
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement