本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Combo类的典型用法代码示例。如果您正苦于以下问题:Java Combo类的具体用法?Java Combo怎么用?Java Combo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Combo类属于com.shatteredpixel.shatteredpixeldungeon.actors.buffs包,在下文中一共展示了Combo类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onAttackComplete
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Combo; //导入依赖的package包/类
@Override
public void onAttackComplete() {
AttackIndicator.target(enemy);
boolean hit = attack( enemy );
if (subClass == HeroSubClass.GLADIATOR){
if (hit) {
Buff.affect( this, Combo.class ).hit();
} else {
Combo combo = buff(Combo.class);
if (combo != null) combo.miss();
}
}
curAction = null;
super.onAttackComplete();
}
示例2: attackProc
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Combo; //导入依赖的package包/类
@Override
public int attackProc( Char enemy, int damage ) {
KindOfWeapon wep = rangedWeapon != null ? rangedWeapon : belongings.weapon;
if (wep != null) wep.proc( this, enemy, damage );
switch (subClass) {
case GLADIATOR:
if (wep instanceof MeleeWeapon || wep == null) {
damage += Buff.affect( this, Combo.class ).hit( enemy, damage );
}
break;
case BATTLEMAGE:
if (wep instanceof Wand) {
Wand wand = (Wand)wep;
if (wand.curCharges < wand.maxCharges && damage > 0) {
wand.curCharges++;
if (Dungeon.quickslot.contains(wand)) {
QuickSlotButton.refresh();
}
ScrollOfRecharging.charge( this );
}
damage += wand.curCharges;
}
case SNIPER:
if (rangedWeapon != null) {
Buff.prolong( enemy, SnipersMark.class, attackDelay() * 1.1f );
}
break;
default:
}
return damage;
}
示例3: execute
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Combo; //导入依赖的package包/类
public void execute( Hero hero, String action ) {
curUser = hero;
curItem = this;
Combo combo = hero.buff(Combo.class);
if (combo != null) combo.detach();
if (action.equals( AC_DROP )) {
doDrop( hero );
} else if (action.equals( AC_THROW )) {
doThrow( hero );
}
}