本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning类的典型用法代码示例。如果您正苦于以下问题:Java Burning类的具体用法?Java Burning怎么用?Java Burning使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Burning类属于com.shatteredpixel.shatteredpixeldungeon.actors.buffs包,在下文中一共展示了Burning类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: add
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
@Override
public void add( Buff buff ) {
if (buff instanceof Burning) {
if (HP < HT) {
HP++;
sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
}
} else {
if (buff instanceof Frost) {
if (Level.water[this.pos])
damage( Random.NormalIntRange( HT / 2, HT ), buff );
else
damage( Random.NormalIntRange( 1, HT * 2 / 3 ), buff );
}
if (isAlive())
super.add( buff );
}
}
示例2: attackProc
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
@Override
public int attackProc( Char enemy, int damage ) {
//The gnoll's attacks get more severe the more the player lets it hit them
int effect = Random.Int(4)+combo;
if (effect > 2) {
if (effect >=6 && enemy.buff(Burning.class) == null){
if (Level.flamable[enemy.pos])
GameScene.add( Blob.seed( enemy.pos, 4, Fire.class ) );
Buff.affect( enemy, Burning.class ).reignite( enemy );
} else
Buff.affect( enemy, Poison.class).set((effect-2) * Poison.durationFactor(enemy));
}
return damage;
}
示例3: doSpecial
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
@Override
public void doSpecial() {
for (Mob mob : Dungeon.level.mobs) {
if (Level.fieldOfView[mob.pos]) {
Buff.affect( mob, Burning.class ).reignite( mob );
Buff.prolong( mob, Roots.class, 3 );
}
}
curUser.HP -= (curUser.HP / 3);
curUser.spend( Actor.TICK );
curUser.sprite.operate( curUser.pos );
curUser.busy();
curUser.sprite.centerEmitter().start( ElmoParticle.FACTORY, 0.15f, 4 );
Sample.INSTANCE.play( Assets.SND_READ );
}
示例4: proc
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
@Override
public boolean proc( Weapon weapon, Char attacker, Char defender, int damage ) {
// lvl 0 - 33%
// lvl 1 - 50%
// lvl 2 - 60%
int level = Math.max( 0, weapon.level );
if (Random.Int( level + 3 ) >= 2) {
if (Random.Int( 2 ) == 0) {
Buff.affect( defender, Burning.class ).reignite( defender );
}
defender.damage( Random.Int( 1, level + 2 ), this );
defender.sprite.emitter().burst( FlameParticle.FACTORY, level + 1 );
return true;
} else {
return false;
}
}
示例5: burn
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
private void burn( int pos ) {
Char ch = Actor.findChar( pos );
if (ch != null && !ch.immunities().contains(this.getClass())) {
Buff.affect( ch, Burning.class ).reignite( ch );
}
Heap heap = Dungeon.level.heaps.get( pos );
if (heap != null) {
heap.burn();
}
Plant plant = Dungeon.level.plants.get( pos );
if (plant != null){
plant.wither();
}
}
示例6: add
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
@Override
public void add( Buff buff ) {
if (buff instanceof Burning) {
if (HP < HT) {
HP++;
sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
}
} else if (buff instanceof Frost || buff instanceof Chill) {
if (Dungeon.level.water[this.pos])
damage( Random.NormalIntRange( HT / 2, HT ), buff );
else
damage( Random.NormalIntRange( 1, HT * 2 / 3 ), buff );
} else {
super.add( buff );
}
}
示例7: attackProc
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
@Override
public int attackProc( Char enemy, int damage ) {
damage = super.attackProc( enemy, damage );
//The gnoll's attacks get more severe the more the player lets it hit them
combo++;
int effect = Random.Int(4)+combo;
if (effect > 2) {
if (effect >=6 && enemy.buff(Burning.class) == null){
if (Dungeon.level.flamable[enemy.pos])
GameScene.add(Blob.seed(enemy.pos, 4, Fire.class));
Buff.affect(enemy, Burning.class).reignite( enemy );
} else
Buff.affect( enemy, Poison.class).set((effect-2) * Poison.durationFactor(enemy));
}
return damage;
}
示例8: doSpecial
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
@Override
public void doSpecial() {
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])) {
if (Dungeon.level.heroFOV[mob.pos]) {
Buff.affect( mob, Burning.class ).reignite( mob );
Buff.prolong( mob, Roots.class, 3 );
}
}
curUser.HP -= (curUser.HP / 3);
curUser.spend( Actor.TICK );
curUser.sprite.operate( curUser.pos );
curUser.busy();
curUser.sprite.centerEmitter().start( ElmoParticle.FACTORY, 0.15f, 4 );
Sample.INSTANCE.play( Assets.SND_READ );
}
示例9: proc
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
@Override
public int proc( Armor armor, Char attacker, Char defender, int damage) {
if (Random.Int( 8 ) == 0) {
if (Dungeon.level.adjacent( attacker.pos, defender.pos )) {
Buff.prolong(attacker, Frost.class, Frost.duration(attacker) * Random.Float(0.5f, 1f));
CellEmitter.get(attacker.pos).start(SnowParticle.FACTORY, 0.2f, 6);
}
Buff.affect( defender, Burning.class ).reignite( defender );
defender.sprite.emitter().burst( FlameParticle.FACTORY, 5 );
}
return damage;
}
示例10: effect
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
public static void effect(Hero hero){
switch (Random.Int( 5 )) {
case 0:
GLog.w( Messages.get(MysteryMeat.class, "hot") );
Buff.affect( hero, Burning.class ).reignite( hero );
break;
case 1:
GLog.w( Messages.get(MysteryMeat.class, "legs") );
Buff.prolong( hero, Roots.class, Paralysis.duration( hero ) );
break;
case 2:
GLog.w( Messages.get(MysteryMeat.class, "not_well") );
Buff.affect( hero, Poison.class ).set( Poison.durationFactor( hero ) * hero.HT / 5 );
break;
case 3:
GLog.w( Messages.get(MysteryMeat.class, "stuffed") );
Buff.prolong( hero, Slow.class, Slow.duration( hero ) );
break;
}
}
示例11: proc
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
@Override
public int proc( Weapon weapon, Char attacker, Char defender, int damage ) {
// lvl 0 - 33%
// lvl 1 - 50%
// lvl 2 - 60%
int level = Math.max( 0, weapon.level() );
if (Random.Int( level + 3 ) >= 2) {
if (Random.Int( 2 ) == 0) {
Buff.affect( defender, Burning.class ).reignite( defender );
}
defender.damage( Random.Int( 1, level + 2 ), this );
defender.sprite.emitter().burst( FlameParticle.FACTORY, level + 1 );
}
return damage;
}
示例12: splash
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
protected void splash( int cell ) {
Fire fire = (Fire)Dungeon.level.blobs.get( Fire.class );
if (fire != null)
fire.clear( cell );
final int color = ItemSprite.pick( image, 8, 10 );
Char ch = Actor.findChar(cell);
if (ch != null) {
Buff.detach(ch, Burning.class);
Buff.detach(ch, Ooze.class);
Splash.at( ch.sprite.center(), color, 5 );
} else {
Splash.at( cell, color, 5 );
}
}
示例13: burn
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
private void burn( int pos ) {
Char ch = Actor.findChar( pos );
if (ch != null) {
Buff.affect( ch, Burning.class ).reignite( ch );
}
Heap heap = Dungeon.level.heaps.get( pos );
if (heap != null) {
heap.burn();
}
}
示例14: attackProc
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
@Override
public int attackProc( Char enemy, int damage ) {
if (Random.Int( 2 ) == 0) {
Buff.affect( enemy, Burning.class ).reignite( enemy );
}
return damage;
}
示例15: split
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; //导入依赖的package包/类
private Swarm split() {
Swarm clone = new Swarm();
clone.generation = generation + 1;
if (buff( Burning.class ) != null) {
Buff.affect( clone, Burning.class ).reignite( clone );
}
if (buff( Poison.class ) != null) {
Buff.affect( clone, Poison.class ).set( 2 );
}
return clone;
}