本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfMight类的典型用法代码示例。如果您正苦于以下问题:Java RingOfMight类的具体用法?Java RingOfMight怎么用?Java RingOfMight使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RingOfMight类属于com.shatteredpixel.shatteredpixeldungeon.items.rings包,在下文中一共展示了RingOfMight类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: remove
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfMight; //导入依赖的package包/类
@Override
public void remove( Buff buff ) {
super.remove( buff );
if (buff instanceof Light) {
sprite.remove( CharSprite.State.ILLUMINATED );
} else if (buff instanceof RingOfMight.Might){
if (((RingOfMight.Might)buff).level > 0){
HT -= ((RingOfMight.Might) buff).level * 5;
HP = Math.min(HT, HP);
}
}
BuffIndicator.refreshHero();
}
示例2: updateHT
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfMight; //导入依赖的package包/类
public void updateHT( boolean boostHP ){
int curHT = HT;
HT = 20 + 5*(lvl-1) + HTBoost;
float multiplier = RingOfMight.HTMultiplier(this);
HT = Math.round(multiplier * HT);
if (boostHP){
HP += Math.max(HT - curHT, 0);
}
HP = Math.min(HP, HT);
}
示例3: add
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfMight; //导入依赖的package包/类
@Override
public void add( Buff buff ) {
if (buff(TimekeepersHourglass.timeStasis.class) != null)
return;
super.add( buff );
if (sprite != null) {
if (buff instanceof Burning) {
GLog.w( "You catch fire!" );
interrupt();
} else if (buff instanceof Paralysis) {
GLog.w( "You are paralysed!" );
interrupt();
} else if (buff instanceof Poison) {
GLog.w( "You are poisoned!" );
interrupt();
} else if (buff instanceof Ooze) {
GLog.w( "Caustic ooze eats your flesh. Wash it away!" );
} else if (buff instanceof Roots) {
GLog.w( "You can't move!" );
} else if (buff instanceof Weakness) {
GLog.w( "You feel weakened!" );
} else if (buff instanceof Blindness) {
GLog.w( "You are blinded!" );
} else if (buff instanceof Fury) {
GLog.w( "You become furious!" );
sprite.showStatus( CharSprite.POSITIVE, "furious" );
} else if (buff instanceof Charm) {
GLog.w( "You are charmed!" );
} else if (buff instanceof Cripple) {
GLog.w( "You are crippled!" );
} else if (buff instanceof Bleeding) {
GLog.w( "You are bleeding!" );
} else if (buff instanceof RingOfMight.Might){
if (((RingOfMight.Might)buff).level > 0) {
HT += ((RingOfMight.Might) buff).level * 5;
}
} else if (buff instanceof Vertigo) {
GLog.w("Everything is spinning around you!");
interrupt();
}
else if (buff instanceof Light) {
sprite.add( CharSprite.State.ILLUMINATED );
}
}
BuffIndicator.refreshHero();
}