From 50cb7c59a2d6228b5a14b693f574e1ccde99ff3f Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 26 Oct 2014 01:21:04 -0400 Subject: [PATCH] v0.2.2: potion of levitation buffed, now creates cloud of confusion gas. --- .../actors/blobs/ConfusionGas.java | 2 +- .../items/potions/Potion.java | 3 +-- .../items/potions/PotionOfLevitation.java | 20 +++++++++++++++++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ConfusionGas.java b/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ConfusionGas.java index 9e91761f0..fb57fd61b 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ConfusionGas.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/ConfusionGas.java @@ -33,7 +33,7 @@ public class ConfusionGas extends Blob { Char ch; for (int i=0; i < LENGTH; i++) { if (cur[i] > 0 && (ch = Actor.findChar( i )) != null) { - Buff.prolong( ch, Vertigo.class, Vertigo.duration( ch ) ); + Buff.prolong( ch, Vertigo.class, 1 ); } } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java index 2b2d3196f..fbe376347 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/Potion.java @@ -162,8 +162,7 @@ public class Potion extends Item { if (isKnown() && ( this instanceof PotionOfExperience || - this instanceof PotionOfHealing || - this instanceof PotionOfLevitation || + this instanceof PotionOfHealing || this instanceof PotionOfMindVision || this instanceof PotionOfStrength || this instanceof PotionOfInvisibility || diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfLevitation.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfLevitation.java index 57f0a5c10..cffa49836 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfLevitation.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfLevitation.java @@ -17,16 +17,32 @@ */ package com.shatteredpixel.shatteredpixeldungeon.items.potions; +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ConfusionGas; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Levitation; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.watabou.noosa.audio.Sample; public class PotionOfLevitation extends Potion { { name = "Potion of Levitation"; } + + @Override + protected void shatter( int cell ) { + + setKnown(); + + splash( cell ); + Sample.INSTANCE.play( Assets.SND_SHATTER ); + + GameScene.add( Blob.seed( cell, 1000, ConfusionGas.class ) ); + } @Override public void apply( Hero hero ) { @@ -39,8 +55,8 @@ public class PotionOfLevitation extends Potion { public String desc() { return "Drinking this curious liquid will cause you to hover in the air, " + - "able to drift effortlessly over traps. Flames and gases " + - "fill the air, however, and cannot be bypassed while airborne."; + "able to drift effortlessly over traps and pits. Throwing this potion " + + "will create a cloud of unrefined gas, disorienting anything caught in it."; } @Override