本文整理汇总了Java中com.watabou.pixeldungeon.levels.Terrain.EMPTY_DECO属性的典型用法代码示例。如果您正苦于以下问题:Java Terrain.EMPTY_DECO属性的具体用法?Java Terrain.EMPTY_DECO怎么用?Java Terrain.EMPTY_DECO使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.watabou.pixeldungeon.levels.Terrain
的用法示例。
在下文中一共展示了Terrain.EMPTY_DECO属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: attackProc
@Override
public int attackProc(@NonNull Char enemy, int damage) {
int cell = enemy.getPos();
if (Random.Int(2) == 0) {
int c = Dungeon.level.map[cell];
if (c == Terrain.EMPTY || c == Terrain.EMBERS
|| c == Terrain.EMPTY_DECO || c == Terrain.GRASS
|| c == Terrain.HIGH_GRASS) {
GameScene.add(Blob.seed(cell, Math.max(exp,10) * 15, Regrowth.class));
}
}
return damage;
}
示例2: evolve
@Override
protected void evolve() {
super.evolve();
if (volume > 0) {
boolean mapUpdated = false;
for (int i=0; i < LENGTH; i++) {
if (off[i] > 0) {
int c = Dungeon.level.map[i];
int c1 = c;
if (c == Terrain.EMPTY || c == Terrain.EMBERS || c == Terrain.EMPTY_DECO) {
c1 = cur[i] > 9 ? Terrain.HIGH_GRASS : Terrain.GRASS;
} else if (c == Terrain.GRASS && cur[i] > 9) {
c1 = Terrain.HIGH_GRASS ;
}
if (c1 != c) {
Level.set( i, Terrain.HIGH_GRASS );
mapUpdated = true;
GameScene.updateMap( i );
if (Dungeon.visible[i]) {
GameScene.discoverTile( i, c );
}
}
Char ch = Actor.findChar( i );
if (ch != null) {
Buff.prolong( ch, Roots.class, TICK );
}
}
}
if (mapUpdated) {
Dungeon.observe();
}
}
}
示例3: evolve
@Override
protected void evolve() {
super.evolve();
if (volume > 0) {
boolean mapUpdated = false;
for (int i=0; i < LENGTH; i++) {
if (off[i] > 0) {
int c = Dungeon.level.map[i];
if (c == Terrain.EMPTY || c == Terrain.EMBERS || c == Terrain.EMPTY_DECO) {
Level.set( i, cur[i] > 9 ? Terrain.HIGH_GRASS : Terrain.GRASS );
mapUpdated = true;
} else if (c == Terrain.GRASS && cur[i] > 9) {
Level.set( i, Terrain.HIGH_GRASS );
mapUpdated = true;
}
Char ch = Actor.findChar( i );
if (ch != null) {
Buff.prolong( ch, Roots.class, TICK );
}
}
}
if (mapUpdated) {
GameScene.updateMap();
Dungeon.observe();
}
}
}
示例4: decorate
@Override
protected void decorate() {
for (int i=0; i < getWidth(); i++) {
if (map[i] == Terrain.WALL &&
map[i + getWidth()] == Terrain.WATER &&
Random.Int( 4 ) == 0) {
map[i] = Terrain.WALL_DECO;
}
}
for (int i=getWidth(); i < getLength() - getWidth(); i++) {
if (map[i] == Terrain.WALL &&
map[i - getWidth()] == Terrain.WALL &&
map[i + getWidth()] == Terrain.WATER &&
Random.Int( 2 ) == 0) {
map[i] = Terrain.WALL_DECO;
}
}
for (int i=getWidth() + 1; i < getLength() - getWidth() - 1; i++) {
if (map[i] == Terrain.EMPTY) {
int count =
(map[i + 1] == Terrain.WALL ? 1 : 0) +
(map[i - 1] == Terrain.WALL ? 1 : 0) +
(map[i + getWidth()] == Terrain.WALL ? 1 : 0) +
(map[i - getWidth()] == Terrain.WALL ? 1 : 0);
if (Random.Int( 16 ) < count * count) {
map[i] = Terrain.EMPTY_DECO;
}
}
}
placeEntranceSign();
}
示例5: decorate
@Override
protected void decorate() {
for (int i=0; i < getLength(); i++) {
if (map[i] == Terrain.EMPTY && Random.Int( 10 ) == 0) {
map[i] = Terrain.EMPTY_DECO;
} else if (map[i] == Terrain.WALL && Random.Int( 8 ) == 0) {
map[i] = Terrain.WALL_DECO;
}
}
}
示例6: decorate
@Override
protected void decorate() {
for (int i=0; i < getLength(); i++) {
if (map[i] == Terrain.EMPTY && Random.Int( 10 ) == 0) {
map[i] = Terrain.EMPTY_DECO;
}
}
}
示例7: tileDesc
@Override
public String tileDesc(int tile) {
switch (tile) {
case Terrain.EMPTY_DECO:
return Game.getVar(R.string.Prison_TileDescDeco);
case Terrain.BOOKSHELF:
return Game.getVar(R.string.Halls_TileDescBookshelf);
default:
return super.tileDesc( tile );
}
}
示例8: evolve
@Override
protected void evolve() {
super.evolve();
if (volume > 0) {
boolean mapUpdated = false;
for (int i=0; i < getLength(); i++) {
if (off[i] > 0) {
int c = Dungeon.level.map[i];
if (c == Terrain.EMPTY || c == Terrain.EMBERS || c == Terrain.EMPTY_DECO) {
Dungeon.level.set( i, cur[i] > 9 ? Terrain.HIGH_GRASS : Terrain.GRASS );
mapUpdated = true;
} else if (c == Terrain.GRASS && cur[i] > 9) {
Dungeon.level.set( i, Terrain.HIGH_GRASS );
mapUpdated = true;
}
Char ch = Actor.findChar( i );
if (ch != null) {
Buff.prolong( ch, Roots.class, TICK );
}
}
}
if (mapUpdated) {
GameScene.updateMap();
Dungeon.observe();
}
}
}
示例9: decorate
@Override
protected void decorate() {
for (int i=getWidth() + 1; i < getLength() - getWidth() - 1; i++) {
if (map[i] == Terrain.EMPTY) {
float c = 0.05f;
if (map[i + 1] == Terrain.WALL && map[i + getWidth()] == Terrain.WALL) {
c += 0.2f;
}
if (map[i - 1] == Terrain.WALL && map[i + getWidth()] == Terrain.WALL) {
c += 0.2f;
}
if (map[i + 1] == Terrain.WALL && map[i - getWidth()] == Terrain.WALL) {
c += 0.2f;
}
if (map[i - 1] == Terrain.WALL && map[i - getWidth()] == Terrain.WALL) {
c += 0.2f;
}
if (Random.Float() < c) {
map[i] = Terrain.EMPTY_DECO;
}
}
}
for (int i=0; i < getWidth(); i++) {
if (map[i] == Terrain.WALL &&
(map[i + getWidth()] == Terrain.EMPTY || map[i + getWidth()] == Terrain.EMPTY_SP) &&
Random.Int( 6 ) == 0) {
map[i] = Terrain.WALL_DECO;
}
}
for (int i=getWidth(); i < getLength() - getWidth(); i++) {
if (map[i] == Terrain.WALL &&
map[i - getWidth()] == Terrain.WALL &&
(map[i + getWidth()] == Terrain.EMPTY || map[i + getWidth()] == Terrain.EMPTY_SP) &&
Random.Int( 3 ) == 0) {
map[i] = Terrain.WALL_DECO;
}
}
}