v0.2.2: potion of levitation buffed, now creates cloud of confusion gas.

This commit is contained in:
Evan Debenham 2014-10-26 01:21:04 -04:00
parent 8d00feb289
commit 50cb7c59a2
3 changed files with 20 additions and 5 deletions

View File

@ -33,7 +33,7 @@ public class ConfusionGas extends Blob {
Char ch; Char ch;
for (int i=0; i < LENGTH; i++) { for (int i=0; i < LENGTH; i++) {
if (cur[i] > 0 && (ch = Actor.findChar( i )) != null) { if (cur[i] > 0 && (ch = Actor.findChar( i )) != null) {
Buff.prolong( ch, Vertigo.class, Vertigo.duration( ch ) ); Buff.prolong( ch, Vertigo.class, 1 );
} }
} }
} }

View File

@ -163,7 +163,6 @@ public class Potion extends Item {
if (isKnown() && ( if (isKnown() && (
this instanceof PotionOfExperience || this instanceof PotionOfExperience ||
this instanceof PotionOfHealing || this instanceof PotionOfHealing ||
this instanceof PotionOfLevitation ||
this instanceof PotionOfMindVision || this instanceof PotionOfMindVision ||
this instanceof PotionOfStrength || this instanceof PotionOfStrength ||
this instanceof PotionOfInvisibility || this instanceof PotionOfInvisibility ||

View File

@ -17,10 +17,15 @@
*/ */
package com.shatteredpixel.shatteredpixeldungeon.items.potions; 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.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Levitation; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Levitation;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample;
public class PotionOfLevitation extends Potion { public class PotionOfLevitation extends Potion {
@ -28,6 +33,17 @@ public class PotionOfLevitation extends Potion {
name = "Potion of Levitation"; 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 @Override
public void apply( Hero hero ) { public void apply( Hero hero ) {
setKnown(); setKnown();
@ -39,8 +55,8 @@ public class PotionOfLevitation extends Potion {
public String desc() { public String desc() {
return return
"Drinking this curious liquid will cause you to hover in the air, " + "Drinking this curious liquid will cause you to hover in the air, " +
"able to drift effortlessly over traps. Flames and gases " + "able to drift effortlessly over traps and pits. Throwing this potion " +
"fill the air, however, and cannot be bypassed while airborne."; "will create a cloud of unrefined gas, disorienting anything caught in it.";
} }
@Override @Override