本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfParalyticGas类的典型用法代码示例。如果您正苦于以下问题:Java PotionOfParalyticGas类的具体用法?Java PotionOfParalyticGas怎么用?Java PotionOfParalyticGas使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PotionOfParalyticGas类属于com.shatteredpixel.shatteredpixeldungeon.items.potions包,在下文中一共展示了PotionOfParalyticGas类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onThrow
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfParalyticGas; //导入依赖的package包/类
@Override
protected void onThrow(int cell) {
if (Dungeon.level.map[cell] == Terrain.WELL || Dungeon.level.pit[cell]) {
super.onThrow( cell );
} else if (potionAttrib instanceof PotionOfLiquidFlame ||
potionAttrib instanceof PotionOfToxicGas ||
potionAttrib instanceof PotionOfParalyticGas ||
potionAttrib instanceof PotionOfFrost ||
potionAttrib instanceof PotionOfLevitation ||
potionAttrib instanceof PotionOfPurity) {
Dungeon.level.press( cell, null );
potionAttrib.shatter( cell );
} else {
super.onThrow( cell );
}
}
示例2: execute
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfParalyticGas; //导入依赖的package包/类
@Override
public void execute( Hero hero, String action ) {
if (action.equals( AC_EAT ) && potionAttrib == null) {
GLog.w( Messages.get(this, "raw"));
return;
}
super.execute(hero, action);
if (action.equals( AC_EAT ) && potionAttrib != null){
if (potionAttrib instanceof PotionOfFrost) {
GLog.i(Messages.get(this, "ice_msg"));
FrozenCarpaccio.effect(hero);
} else if (potionAttrib instanceof PotionOfLiquidFlame){
GLog.i(Messages.get(this, "fire_msg"));
Buff.affect(hero, FireImbue.class).set(FireImbue.DURATION);
} else if (potionAttrib instanceof PotionOfToxicGas) {
GLog.i(Messages.get(this, "toxic_msg"));
Buff.affect(hero, ToxicImbue.class).set(ToxicImbue.DURATION);
} else if (potionAttrib instanceof PotionOfParalyticGas) {
GLog.i(Messages.get(this, "para_msg"));
Buff.affect(hero, EarthImbue.class, EarthImbue.DURATION);
} else {
potionAttrib.apply(hero);
}
}
}
示例3: switchLevel
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfParalyticGas; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public static void switchLevel( final Level level, int pos ) {
Dungeon.level = level;
Actor.init();
Actor respawner = level.respawner();
if (respawner != null) {
Actor.add( level.respawner() );
}
for (Potion potion : level.fallingPotions){
int cell = level.randomRespawnCell();
while (cell == -1)
cell = level.randomRespawnCell();
if (potion instanceof PotionOfLiquidFlame)
GameScene.add( Blob.seed( cell, 2, Fire.class));
else if (potion instanceof PotionOfToxicGas)
GameScene.add( Blob.seed( cell, 1000, ToxicGas.class ) );
else if (potion instanceof PotionOfParalyticGas)
GameScene.add( Blob.seed( cell, 1000, ParalyticGas.class ) );
else if (potion instanceof PotionOfLevitation)
GameScene.add( Blob.seed( cell, 1000, ConfusionGas.class ) );
}
level.fallingPotions.clear();
hero.pos = pos != -1 ? pos : level.exit;
Light light = hero.buff( Light.class );
hero.viewDistance = light == null ? level.viewDistance : Math.max( Light.DISTANCE, level.viewDistance );
observe();
try {
saveAll();
} catch (IOException e) {
/*This only catches IO errors. Yes, this means things can do wrong, and they can go wrong catastrophically.
But when they do the user will get a nice 'report this issue' dialogue, and I can fix the bug.*/
}
}
示例4: imbuePotion
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfParalyticGas; //导入依赖的package包/类
public Item imbuePotion(Potion potion){
potionAttrib = potion;
potionAttrib.ownedByFruit = true;
potionAttrib.image = ItemSpriteSheet.BLANDFRUIT;
if (potionAttrib instanceof PotionOfHealing){
name = Messages.get(this, "sunfruit");
potionGlow = new ItemSprite.Glowing( 0x2EE62E );
} else if (potionAttrib instanceof PotionOfStrength){
name = Messages.get(this, "rotfruit");
potionGlow = new ItemSprite.Glowing( 0xCC0022 );
} else if (potionAttrib instanceof PotionOfParalyticGas){
name = Messages.get(this, "earthfruit");
potionGlow = new ItemSprite.Glowing( 0x67583D );
} else if (potionAttrib instanceof PotionOfInvisibility){
name = Messages.get(this, "blindfruit");
potionGlow = new ItemSprite.Glowing( 0xE5D273 );
} else if (potionAttrib instanceof PotionOfLiquidFlame){
name = Messages.get(this, "firefruit");
potionGlow = new ItemSprite.Glowing( 0xFF7F00 );
} else if (potionAttrib instanceof PotionOfFrost){
name = Messages.get(this, "icefruit");
potionGlow = new ItemSprite.Glowing( 0x66B3FF );
} else if (potionAttrib instanceof PotionOfMindVision){
name = Messages.get(this, "fadefruit");
potionGlow = new ItemSprite.Glowing( 0xB8E6CF );
} else if (potionAttrib instanceof PotionOfToxicGas){
name = Messages.get(this, "sorrowfruit");
potionGlow = new ItemSprite.Glowing( 0xA15CE5 );
} else if (potionAttrib instanceof PotionOfLevitation) {
name = Messages.get(this, "stormfruit");
potionGlow = new ItemSprite.Glowing( 0x1C3A57 );
} else if (potionAttrib instanceof PotionOfPurity) {
name = Messages.get(this, "dreamfruit");
potionGlow = new ItemSprite.Glowing( 0x8E2975 );
} else if (potionAttrib instanceof PotionOfExperience) {
name = Messages.get(this, "starfruit");
potionGlow = new ItemSprite.Glowing( 0xA79400 );
}
return this;
}