mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-08-28 00:12:18 +00:00
ru:: bottom spikes
This commit is contained in:
parent
d2ef8d1caa
commit
4664591e3a
@ -104,6 +104,7 @@ void entity::apply_walls() {
|
|||||||
|
|
||||||
for(int x = obb.minx; x < obb.maxx; x++) for(int y = obb.maxy; y < jbb.maxy; y++) {
|
for(int x = obb.minx; x < obb.maxx; x++) for(int y = obb.maxy; y < jbb.maxy; y++) {
|
||||||
eWall b = current_room->at(x, y);
|
eWall b = current_room->at(x, y);
|
||||||
|
if(walls[b].flags & W_DOWNWARD) continue;
|
||||||
if(walls[b].flags & blocking) {
|
if(walls[b].flags & blocking) {
|
||||||
if(walls[b].flags & W_BOUNCY) { vel.y = -vel.y; apply_grav(); apply_grav(); if(vel.y > 0) vel.y = 0; on_bounce = true; goto again; }
|
if(walls[b].flags & W_BOUNCY) { vel.y = -vel.y; apply_grav(); apply_grav(); if(vel.y > 0) vel.y = 0; on_bounce = true; goto again; }
|
||||||
on_floor = true;
|
on_floor = true;
|
||||||
@ -154,6 +155,7 @@ void entity::apply_walls() {
|
|||||||
|
|
||||||
for(int x = obb.maxx; x < jbb.maxx; x++) for(int y = jbb.miny; y < jbb.maxy; y++) {
|
for(int x = obb.maxx; x < jbb.maxx; x++) for(int y = jbb.miny; y < jbb.maxy; y++) {
|
||||||
eWall b = current_room->at(x, y);
|
eWall b = current_room->at(x, y);
|
||||||
|
if((walls[b].flags & W_DOWNWARD) && b == current_room->at(x-1, y)) continue;
|
||||||
if(walls[b].flags & W_BLOCK) {
|
if(walls[b].flags & W_BLOCK) {
|
||||||
if(walls[b].flags & W_BOUNCY) { vel.x = -vel.x; on_bounce = true; goto again; }
|
if(walls[b].flags & W_BOUNCY) { vel.x = -vel.x; on_bounce = true; goto again; }
|
||||||
if(freezing()) { hit_wall(); }
|
if(freezing()) { hit_wall(); }
|
||||||
@ -170,6 +172,7 @@ void entity::apply_walls() {
|
|||||||
|
|
||||||
for(int x = jbb.minx; x < obb.minx; x++) for(int y = jbb.miny; y < jbb.maxy; y++) {
|
for(int x = jbb.minx; x < obb.minx; x++) for(int y = jbb.miny; y < jbb.maxy; y++) {
|
||||||
eWall b = current_room->at(x, y);
|
eWall b = current_room->at(x, y);
|
||||||
|
if((walls[b].flags & W_DOWNWARD) && b == current_room->at(x+1, y)) continue;
|
||||||
if(walls[b].flags & W_BLOCK) {
|
if(walls[b].flags & W_BLOCK) {
|
||||||
if(walls[b].flags & W_BOUNCY) { vel.x = -vel.x; on_bounce = true; goto again; }
|
if(walls[b].flags & W_BOUNCY) { vel.x = -vel.x; on_bounce = true; goto again; }
|
||||||
if(freezing()) { hit_wall(); }
|
if(freezing()) { hit_wall(); }
|
||||||
|
@ -58,7 +58,8 @@ struct ruwall {
|
|||||||
enum eWall {
|
enum eWall {
|
||||||
wAir, wWall, wBouncy, wSpike, wWater, wFrozen, wDoor, wSmashedDoor,
|
wAir, wWall, wBouncy, wSpike, wWater, wFrozen, wDoor, wSmashedDoor,
|
||||||
wLockedDoor, wFountain, wBluePortal, wOrangePortal, wPlatform, wStaircase,
|
wLockedDoor, wFountain, wBluePortal, wOrangePortal, wPlatform, wStaircase,
|
||||||
wColumn, wForge, wWoodWall, wShopDoor, wSecretPassage, wSign, wWallSign, wTimeDoor, wGUARD };
|
wColumn, wForge, wWoodWall, wShopDoor, wSecretPassage, wSign, wWallSign, wTimeDoor,
|
||||||
|
wBottomSpike, wGUARD };
|
||||||
|
|
||||||
flagtype W_BLOCK = 1;
|
flagtype W_BLOCK = 1;
|
||||||
flagtype W_TRANS = 2;
|
flagtype W_TRANS = 2;
|
||||||
@ -69,6 +70,7 @@ flagtype W_BOUNCY = 32;
|
|||||||
flagtype W_FROZEN = 64;
|
flagtype W_FROZEN = 64;
|
||||||
flagtype W_BLOCKBIRD = 128;
|
flagtype W_BLOCKBIRD = 128;
|
||||||
flagtype W_STABLE = 256;
|
flagtype W_STABLE = 256;
|
||||||
|
flagtype W_DOWNWARD = 512;
|
||||||
|
|
||||||
constexpr int qwall = int(wGUARD);
|
constexpr int qwall = int(wGUARD);
|
||||||
|
|
||||||
@ -95,6 +97,7 @@ ruwall walls[qwall] = {
|
|||||||
{"sign", "X", 0xFFFF40FF, W_TRANS, "You need to wait close to this sign to read it."},
|
{"sign", "X", 0xFFFF40FF, W_TRANS, "You need to wait close to this sign to read it."},
|
||||||
{"wall sign", "X", 0xFFFFC0FF, W_BLOCK, "You need to wait close to this sign to read it."},
|
{"wall sign", "X", 0xFFFFC0FF, W_BLOCK, "You need to wait close to this sign to read it."},
|
||||||
{"time door", "#", 0x8080FFFF, W_BLOCK | W_STABLE, "A powerful door, opened by a mechanism."},
|
{"time door", "#", 0x8080FFFF, W_BLOCK | W_STABLE, "A powerful door, opened by a mechanism."},
|
||||||
|
{"bottom spike", "v", 0xC08080FF, W_TRANS | W_PAIN | W_BLOCKBIRD | W_DOWNWARD, "A downward-pointing spike. You can fall from above through it safely, but otherwise, it is very dangerous."},
|
||||||
};
|
};
|
||||||
|
|
||||||
int sel = 1;
|
int sel = 1;
|
||||||
|
@ -2055,7 +2055,7 @@ ROOM Long Rope I
|
|||||||
A staircase
|
A staircase
|
||||||
. air
|
. air
|
||||||
- platform
|
- platform
|
||||||
^ spike
|
^ bottom spike
|
||||||
MAP
|
MAP
|
||||||
########....................^.........^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
|
########....................^.........^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
|
||||||
########------------........^.........^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^....
|
########------------........^.........^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^....
|
||||||
@ -2103,7 +2103,7 @@ MOVE 2 Central Cavern Left
|
|||||||
ROOM Long Rope Ib
|
ROOM Long Rope Ib
|
||||||
# wall
|
# wall
|
||||||
. air
|
. air
|
||||||
^ spike
|
^ bottom spike
|
||||||
MAP
|
MAP
|
||||||
^^^^...^.......#################################################################
|
^^^^...^.......#################################################################
|
||||||
......^........#################################################################
|
......^........#################################################################
|
||||||
@ -2151,7 +2151,7 @@ MOVE 0 Long Rope I
|
|||||||
ROOM Long Rope II
|
ROOM Long Rope II
|
||||||
# wall
|
# wall
|
||||||
. air
|
. air
|
||||||
^ spike
|
^ bottom spike
|
||||||
MAP
|
MAP
|
||||||
######################......................####################################
|
######################......................####################################
|
||||||
#####################........................###################################
|
#####################........................###################################
|
||||||
@ -2201,7 +2201,7 @@ ROOM Long Rope IIb
|
|||||||
# wall
|
# wall
|
||||||
- staircase
|
- staircase
|
||||||
. air
|
. air
|
||||||
^ spike
|
^ bottom spike
|
||||||
MAP
|
MAP
|
||||||
################################################################################
|
################################################################################
|
||||||
################################################################################
|
################################################################################
|
||||||
@ -2251,7 +2251,7 @@ ROOM Long Rope IIc
|
|||||||
- platform
|
- platform
|
||||||
. air
|
. air
|
||||||
A bouncy wall
|
A bouncy wall
|
||||||
^ spike
|
^ bottom spike
|
||||||
| column
|
| column
|
||||||
MAP
|
MAP
|
||||||
################################################################################
|
################################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user