本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost类的典型用法代码示例。如果您正苦于以下问题:Java PotionOfFrost类的具体用法?Java PotionOfFrost怎么用?Java PotionOfFrost使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PotionOfFrost类属于com.shatteredpixel.shatteredpixeldungeon.items.potions包,在下文中一共展示了PotionOfFrost类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onThrow
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost; //导入依赖的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.PotionOfFrost; //导入依赖的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: imbuePotion
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost; //导入依赖的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;
}