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


Java Fury类代码示例

本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Fury的典型用法代码示例。如果您正苦于以下问题:Java Fury类的具体用法?Java Fury怎么用?Java Fury使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Fury类属于com.shatteredpixel.shatteredpixeldungeon.actors.buffs包,在下文中一共展示了Fury类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: damageRoll

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Fury; //导入依赖的package包/类
@Override
public int damageRoll() {
       KindOfWeapon wep = rangedWeapon != null ? rangedWeapon : belongings.weapon;
	int dmg;
       int bonus = 0;
       for (Buff buff : buffs( RingOfForce.Force.class )) {
           bonus += ((RingOfForce.Force)buff).level;
       }

	if (wep != null) {
		dmg = wep.damageRoll( this ) + bonus;
	} else {
		int str = STR() - 8;
		dmg = bonus == 0 ?
				str > 1 ? Random.NormalIntRange( 1, str ) : 1
				: bonus > 0 ?
						str > 0 ? Random.NormalIntRange( str/2+bonus, (int)(str*0.5f*bonus) + str*2 ) : 1
						: 0;
	}
	if (dmg < 0) dmg = 0;
	return buff( Fury.class ) != null ? (int)(dmg * 1.5f) : dmg;
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:23,代码来源:Hero.java

示例2: choose

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Fury; //导入依赖的package包/类
public void choose( HeroSubClass way ) {
	
	detach( curUser.belongings.backpack );
	
	curUser.spend( TomeOfMastery.TIME_TO_READ );
	curUser.busy();
	
	curUser.subClass = way;
	
	curUser.sprite.operate( curUser.pos );
	Sample.INSTANCE.play( Assets.SND_MASTERY );
	
	SpellSprite.show( curUser, SpellSprite.MASTERY );
	curUser.sprite.emitter().burst( Speck.factory( Speck.MASTERY ), 12 );
	GLog.w( "You have chosen the way of the %s!", Utils.capitalize( way.title() ) );
	
	if (way == HeroSubClass.BERSERKER && curUser.HP <= curUser.HT * Fury.LEVEL) {
		Buff.affect( curUser, Fury.class );
	}
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:21,代码来源:TomeOfMastery.java

示例3: damageRoll

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Fury; //导入依赖的package包/类
@Override
public int damageRoll() {
	KindOfWeapon wep = rangedWeapon != null ? rangedWeapon : belongings.weapon;
	int dmg;

	if (wep != null) {
		dmg = wep.damageRoll( this ) + RingOfForce.armedDamageBonus(this);
	} else {
		dmg = RingOfForce.damageRoll(this);
	}
	if (dmg < 0) dmg = 0;
	if (subClass == HeroSubClass.BERSERKER){
		berserk = Buff.affect(this, Berserk.class);
		dmg = berserk.damageFactor(dmg);
	}
	return buff( Fury.class ) != null ? (int)(dmg * 1.5f) : dmg;
}
 
开发者ID:00-Evan,项目名称:shattered-pixel-dungeon,代码行数:18,代码来源:Hero.java

示例4: onSelect

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Fury; //导入依赖的package包/类
@Override
public void onSelect( Integer target ) {
	if (target != null && target != curUser.pos) {
		
		int cell = Ballistica.cast( curUser.pos, target, false, true );
		if (Actor.findChar( cell ) != null && cell != curUser.pos) {
			cell = Ballistica.trace[Ballistica.distance - 2];
		}

              curUser.HP -= (curUser.HP / 3);
		if (curUser.subClass == HeroSubClass.BERSERKER && curUser.HP <= curUser.HT * Fury.LEVEL) {
			Buff.affect( curUser, Fury.class );
		}
		


              final int dest = cell;
              curUser.busy();
              ((HeroSprite)curUser.sprite).jump(curUser.pos, cell, new Callback() {
                  @Override
                  public void call() {
                      curUser.move(dest);
                      Dungeon.level.press(dest, curUser);
                      Dungeon.observe();

                      for (int i = 0; i < Level.NEIGHBOURS8.length; i++) {
                          Char mob = Actor.findChar(curUser.pos + Level.NEIGHBOURS8[i]);
                          if (mob != null && mob != curUser) {
                              Buff.prolong(mob, Paralysis.class, SHOCK_TIME);
                          }
                      }

                      CellEmitter.center(dest).burst(Speck.factory(Speck.DUST), 10);
                      Camera.main.shake(2, 0.5f);

                      curUser.spendAndNext(LEAP_TIME);
                  }
              });
	}
}
 
开发者ID:wolispace,项目名称:soft-pixel-dungeon,代码行数:41,代码来源:WarriorArmor.java

示例5: add

import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Fury; //导入依赖的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.actors.buffs.Fury类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。