v3.1.0: improved new terrain in the caves and city

This commit is contained in:
Evan Debenham
2025-05-30 13:54:54 -04:00
parent 94ed2188d2
commit 1ec4c3e7d8
7 changed files with 38 additions and 9 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -2269,7 +2269,7 @@ items.brokenseal.prompt=Select an armor
items.brokenseal.unknown_armor=You must identify whether that armor is cursed or not first. items.brokenseal.unknown_armor=You must identify whether that armor is cursed or not first.
items.brokenseal.cursed_armor=The seal won't apply to cursed armor. items.brokenseal.cursed_armor=The seal won't apply to cursed armor.
items.brokenseal.affix=You affix the seal to your armor! items.brokenseal.affix=You affix the seal to your armor!
items.brokenseal.desc=A wax seal, affixed to armor as a symbol of valor. It has a faded rune of protection engraved in the center, and is broken in half across the middle.\n\nA memento from his home, the seal helps the warrior persevere. While wearing the seal the warrior will instantly gain shielding when he is about to be damaged to half health or lower.\n\nThe seal can be _affixed to armor,_ and moved between armors. It can carry a single upgrade with it, so long as that upgrade was applied to the armor while the seal was attached to it. items.brokenseal.desc=A wax seal, affixed to armor as a symbol of valor. It has a faded rune of protection engraved in the center, and is cracked in half across the middle.\n\nA memento from his home, the seal helps the warrior persevere. While wearing the seal the warrior will instantly gain shielding when he is about to be damaged to half health or lower.\n\nThe seal can be _affixed to armor,_ and moved between armors. It can carry a single upgrade with it, so long as that upgrade was applied to the armor while the seal was attached to it.
items.brokenseal.inscribed=The seal is inscribed with a _%s._ items.brokenseal.inscribed=The seal is inscribed with a _%s._
items.brokenseal.choose_title=Choose a Glyph items.brokenseal.choose_title=Choose a Glyph
items.brokenseal.choose_desc=Both this armor and the broken seal are carrying a glyph. Pick which glyph should be kept.\n\nArmor Glyph: %1$s\nBroken Seal Glyph: %2$s\n\nNote that if you pick the glyph that is currently on the armor, the seal will not be able to transfer it later. items.brokenseal.choose_desc=Both this armor and the broken seal are carrying a glyph. Pick which glyph should be kept.\n\nArmor Glyph: %1$s\nBroken Seal Glyph: %2$s\n\nNote that if you pick the glyph that is currently on the armor, the seal will not be able to transfer it later.

View File

@@ -208,7 +208,7 @@ public class CityLevel extends RegularLevel {
public static final Emitter.Factory factory = new Factory() { public static final Emitter.Factory factory = new Factory() {
@Override @Override
public void emit( Emitter emitter, int index, float x, float y ) { public void emit( Emitter emitter, int index, float x, float y ) {
ElmoParticle p = (ElmoParticle)emitter.recycle( ElmoParticle.class ); GreenFlameParticle p = (GreenFlameParticle)emitter.recycle( GreenFlameParticle.class );
p.reset( x, y ); p.reset( x, y );
} }
@Override @Override
@@ -223,9 +223,9 @@ public class CityLevel extends RegularLevel {
this.pos = pos; this.pos = pos;
PointF p = DungeonTilemap.raisedTileCenterToWorld( pos ); PointF p = DungeonTilemap.raisedTileCenterToWorld( pos );
pos( p.x - 3, p.y - 6, 6, 6 ); pos( p.x - 2, p.y - 5, 4, 4 );
pour( factory, 0.05f ); pour( factory, 0.1f );
} }
@Override @Override
@@ -236,6 +236,16 @@ public class CityLevel extends RegularLevel {
} }
} }
public static class GreenFlameParticle extends ElmoParticle {
public GreenFlameParticle(){
super();
acc.set( 0, -40 );
}
}
public static class Smoke extends Emitter { public static class Smoke extends Emitter {

View File

@@ -22,6 +22,7 @@
package com.shatteredpixel.shatteredpixeldungeon.tiles; package com.shatteredpixel.shatteredpixeldungeon.tiles;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.watabou.noosa.Image; import com.watabou.noosa.Image;
import com.watabou.noosa.TextureFilm; import com.watabou.noosa.TextureFilm;
import com.watabou.noosa.Tilemap; import com.watabou.noosa.Tilemap;
@@ -78,9 +79,6 @@ public abstract class DungeonTilemap extends Tilemap {
return screenToTile(x, y, false); return screenToTile(x, y, false);
} }
//wall assist is used to make raised perspective tapping a bit easier.
// If the pressed tile is a wall tile, the tap can be 'bumped' down into a none-wall tile.
// currently this happens if the bottom 1/4 of the wall tile is pressed.
public int screenToTile(int x, int y, boolean wallAssist ) { public int screenToTile(int x, int y, boolean wallAssist ) {
PointF p = camera().screenToCamera( x, y ). PointF p = camera().screenToCamera( x, y ).
offset( this.point().negate() ). offset( this.point().negate() ).
@@ -92,13 +90,16 @@ public abstract class DungeonTilemap extends Tilemap {
int cell = (int)p.x + (int)p.y * Dungeon.level.width(); int cell = (int)p.x + (int)p.y * Dungeon.level.width();
//wall assist is used to make raised perspective tapping a bit easier.
// If the pressed tile is a wall tile, the tap can be 'bumped' down into a none-wall tile.
// currently this happens if the bottom 1/4 of the wall tile is pressed.
if (wallAssist if (wallAssist
&& map != null && map != null
&& DungeonTileSheet.wallStitcheable(map[cell])){ && isWallAssistable(cell)){
if (cell + mapWidth < size if (cell + mapWidth < size
&& p.y % 1 >= 0.75f && p.y % 1 >= 0.75f
&& !DungeonTileSheet.wallStitcheable(map[cell + mapWidth])){ && !isWallAssistable(cell + mapWidth)){
cell += mapWidth; cell += mapWidth;
} }
@@ -106,6 +107,24 @@ public abstract class DungeonTilemap extends Tilemap {
return cell; return cell;
} }
private boolean isWallAssistable(int cell){
if (map == null || cell >= size){
return false;
}
if (DungeonTileSheet.wallStitcheable(map[cell])){
return true;
}
//caves region deco is very wall-like, so it counts
if (Dungeon.depth >= 10 && Dungeon.depth <= 15
&& (map[cell] == Terrain.REGION_DECO || map[cell] == Terrain.REGION_DECO_ALT)) {
return true;
}
return false;
}
@Override @Override
public boolean overlapsPoint( float x, float y ) { public boolean overlapsPoint( float x, float y ) {