当前位置: 首页>>代码示例>>Java>>正文


Java RingOfMight类代码示例

本文整理汇总了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();
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:16,代码来源:Hero.java

示例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);
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:13,代码来源:Hero.java

示例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();
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:52,代码来源:Hero.java


注:本文中的com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfMight类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。