本文整理汇总了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;
}
示例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 );
}
}
示例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;
}
示例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);
}
});
}
}
示例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();
}