mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 18:00:34 +00:00
Sokoban elements
This commit is contained in:
parent
98f36617c4
commit
e8f9a09930
@ -494,6 +494,10 @@ void celldrawer::setcolors() {
|
||||
fcol = wcol;
|
||||
break;
|
||||
|
||||
case waCrateCrate: case waCrateTarget: case waCrateOnTarget:
|
||||
fcol = c->landparam;
|
||||
break;
|
||||
|
||||
case waDeadTroll2: case waPetrifiedBridge: case waPetrified: {
|
||||
eMonster m = eMonster((unsigned char)c->wparam);
|
||||
if(c->wall == waPetrified || c->wall == waPetrifiedBridge)
|
||||
@ -1413,6 +1417,27 @@ void celldrawer::draw_features() {
|
||||
break;
|
||||
}
|
||||
|
||||
case waCrateCrate: case waCrateTarget: case waCrateOnTarget: {
|
||||
shiftmatrix V2 = V;
|
||||
if(c->wall != waCrateCrate) {
|
||||
draw_floorshape(c, V2, cgi.shMFloor, darkena(winf[waCrateTarget].color, 0, 0xFF));
|
||||
draw_floorshape(c, V2, cgi.shMFloor2, c->wall == waCrateOnTarget ? darkena(0xFFFF00, 0, 0xFF) : (!wmblack) ? darkena(fcol, 1, 0xFF) : darkena(0,1,0xFF));
|
||||
}
|
||||
if(c->wall != waCrateTarget) {
|
||||
if(wmspatial) {
|
||||
const int layers = 2 << detaillevel;
|
||||
for(int z=1; z<=layers; z++) {
|
||||
double zg = zgrad0(0, geom3::actual_wall_height(), z, layers);
|
||||
queuepolyat(xyzscale(V, zg, zg), cgi.shBarrel, darkena((z&1) ? 0xFF0000 : 0xC00000, 0, 0xFF), PPR(PPR::REDWALLm+z));
|
||||
}
|
||||
}
|
||||
else {
|
||||
queuepolyat(V, cgi.shBarrel, darkena(0xC00000, 0, 0xFF), PPR(PPR::REDWALLm));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case waFrozenLake: case waLake: case waCamelotMoat:
|
||||
case waSea: case waOpenGate: case waBubble: case waDock:
|
||||
case waDeepWater: case waShallow:
|
||||
|
12
content.cpp
12
content.cpp
@ -1633,6 +1633,18 @@ ITEM( 'o', 0x808080, "Orb of Chaos", itOrbChaos, IC_ORB, ZERO, RESERVED, osUtili
|
||||
REQ(ITEMS_TOTAL(LST, variant_unlock_value()*4/3))
|
||||
#undef LST
|
||||
|
||||
WALL( '$', 0xFD692F, "Crate", waCrateCrate, WF_WALL | WF_PUSHABLE, RESERVED, 0, sgNone,
|
||||
"These crates can be pushed."
|
||||
)
|
||||
|
||||
WALL( '.', 0x40FD40, "Target", waCrateTarget, 0, RESERVED, 0, sgNone,
|
||||
"Push all your crates on targets."
|
||||
)
|
||||
|
||||
WALL( '$', 0x40FD40, "Crate on Target", waCrateOnTarget, WF_WALL | WF_PUSHABLE, RESERVED, 0, sgNone,
|
||||
"A crate already on a target."
|
||||
)
|
||||
|
||||
//shmupspecials
|
||||
MONSTER( '@', 0xC0C0C0, "Rogue", moPlayer, CF_FACE_UP | CF_PLAYER, RESERVED, moNone, "In the Shoot'em Up mode, you are armed with thrown Knives.")
|
||||
MONSTER( '*', 0xC0C0C0, "Knife", moBullet, ZERO | CF_BULLET, RESERVED, moNone, "A simple, but effective, missile, used by rogues.")
|
||||
|
12
game.cpp
12
game.cpp
@ -361,6 +361,18 @@ EX void pushThumper(const movei& mi) {
|
||||
cto->wall = waNone;
|
||||
playSound(cto, "splash"+pick12());
|
||||
}
|
||||
else if(w == waCrateCrate && cto->wall == waCrateTarget) {
|
||||
cto->wall = waCrateOnTarget;
|
||||
th->wall = waNone;
|
||||
}
|
||||
else if(w == waCrateOnTarget && cto->wall == waNone) {
|
||||
cto->wall = waCrateCrate;
|
||||
th->wall = waCrateTarget;
|
||||
}
|
||||
else if(w == waCrateOnTarget && cto->wall == waCrateTarget) {
|
||||
cto->wall = waCrateOnTarget;
|
||||
th->wall = waCrateTarget;
|
||||
}
|
||||
else
|
||||
cto->wall = w;
|
||||
if(explode) cto->wall = waFireTrap, cto->wparam = explode;
|
||||
|
Loading…
Reference in New Issue
Block a user