本文整理汇总了Java中com.shatteredpixel.shatteredpixeldungeon.levels.Level.flamable方法的典型用法代码示例。如果您正苦于以下问题:Java Level.flamable方法的具体用法?Java Level.flamable怎么用?Java Level.flamable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.shatteredpixel.shatteredpixeldungeon.levels.Level
的用法示例。
在下文中一共展示了Level.flamable方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: attackProc
import com.shatteredpixel.shatteredpixeldungeon.levels.Level; //导入方法依赖的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;
}
示例2: onThrow
import com.shatteredpixel.shatteredpixeldungeon.levels.Level; //导入方法依赖的package包/类
@Override
protected void onThrow( int cell ) {
Char enemy = Actor.findChar( cell );
if (enemy == null || enemy == curUser) {
if (Level.flamable[cell]) {
GameScene.add( Blob.seed( cell, 4, Fire.class ) );
} else {
super.onThrow( cell );
}
} else {
if (!curUser.shoot( enemy, this )) {
Dungeon.level.drop( this, cell ).sprite.drop();
} else {
int bonus = 0;
for (Buff buff : curUser.buffs(RingOfSharpshooting.Aim.class)) {
bonus += ((RingOfSharpshooting.Aim)buff).level;
}
if (Random.Float() > Math.pow(0.7, bonus))
Dungeon.level.drop( this, cell ).sprite.drop();
}
}
}
示例3: onZap
import com.shatteredpixel.shatteredpixeldungeon.levels.Level; //导入方法依赖的package包/类
@Override
protected void onZap( int cell ) {
int level = level();
for (int i=1; i < Ballistica.distance - 1; i++) {
int c = Ballistica.trace[i];
if (Level.flamable[c]) {
GameScene.add( Blob.seed( c, 1, Fire.class ) );
}
}
GameScene.add( Blob.seed( cell, 1, Fire.class ) );
Char ch = Actor.findChar( cell );
if (ch != null) {
ch.damage( Random.Int( 1, 8 + level * level ), this );
Buff.affect( ch, Burning.class ).reignite( ch );
ch.sprite.emitter().burst( FlameParticle.FACTORY, 5 );
if (ch == curUser && !ch.isAlive()) {
Dungeon.fail( Utils.format( ResultDescriptions.ITEM, name ) );
GLog.n( "You killed yourself with your own Wand of Firebolt..." );
}
}
}
示例4: evolve
import com.shatteredpixel.shatteredpixeldungeon.levels.Level; //导入方法依赖的package包/类
@Override
protected void evolve() {
boolean[] flamable = Level.flamable;
int from = WIDTH + 1;
int to = Level.LENGTH - WIDTH - 1;
boolean observe = false;
for (int pos=from; pos < to; pos++) {
int fire;
if (cur[pos] > 0) {
burn( pos );
fire = cur[pos] - 1;
if (fire <= 0 && flamable[pos]) {
int oldTile = Dungeon.level.map[pos];
Level.set( pos, Terrain.EMBERS );
observe = true;
GameScene.updateMap( pos );
if (Dungeon.visible[pos]) {
GameScene.discoverTile( pos, oldTile );
}
}
} else {
if (flamable[pos] && (cur[pos-1] > 0 || cur[pos+1] > 0 || cur[pos-WIDTH] > 0 || cur[pos+WIDTH] > 0)) {
fire = 4;
burn( pos );
} else {
fire = 0;
}
}
volume += (off[pos] = fire);
}
if (observe) {
Dungeon.observe();
}
}
示例5: act
import com.shatteredpixel.shatteredpixeldungeon.levels.Level; //导入方法依赖的package包/类
@Override
public boolean act() {
if (target.isAlive()) {
if (target instanceof Hero) {
Buff.prolong( target, Light.class, TICK * 1.01f );
}
target.damage( Random.Int( 1, 5 ), this );
if (target instanceof Hero) {
Item item = ((Hero)target).belongings.randomUnequipped();
if (item instanceof Scroll) {
item = item.detach( ((Hero)target).belongings.backpack );
GLog.w( TXT_BURNS_UP, item.toString() );
Heap.burnFX( target.pos );
} else if (item instanceof MysteryMeat) {
item = item.detach( ((Hero)target).belongings.backpack );
ChargrilledMeat steak = new ChargrilledMeat();
if (!steak.collect( ((Hero)target).belongings.backpack )) {
Dungeon.level.drop( steak, target.pos ).sprite.drop();
}
GLog.w( TXT_BURNS_UP, item.toString() );
Heap.burnFX( target.pos );
}
} else if (target instanceof Thief && ((Thief)target).item instanceof Scroll) {
((Thief)target).item = null;
target.sprite.emitter().burst( ElmoParticle.FACTORY, 6 );
}
} else {
detach();
}
if (Level.flamable[target.pos]) {
GameScene.add( Blob.seed( target.pos, 4, Fire.class ) );
}
spend( TICK );
left -= TICK;
if (left <= 0 ||
Random.Float() > (2 + (float)target.HP / target.HT) / 3 ||
(Level.water[target.pos] && !target.flying)) {
detach();
}
return true;
}