mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-20 11:54:48 +00:00
added CAP_COMPLEX2 guards
This commit is contained in:
parent
8a28d1483b
commit
c39700d8de
@ -566,12 +566,16 @@ EX void killMonster(cell *c, eMonster who, flagtype deathflags IS(0)) {
|
||||
playSound(c, "splash" + pick12());
|
||||
destroyHalfvine(c);
|
||||
minerEffect(c);
|
||||
#if CAP_COMPLEX2
|
||||
brownian::dissolve_brownian(c, 1);
|
||||
#endif
|
||||
forCellEx(c1, c) if(passable(c1, c, P_MONSTER | P_MIRROR | P_CLIMBUP | P_CLIMBDOWN)) {
|
||||
changes.ccell(c1);
|
||||
destroyHalfvine(c1);
|
||||
minerEffect(c1);
|
||||
#if CAP_COMPLEX2
|
||||
brownian::dissolve_brownian(c1, 1);
|
||||
#endif
|
||||
if(c1->monst == moSlime || c1->monst == moSlimeNextTurn)
|
||||
killMonster(c1, who);
|
||||
}
|
||||
|
@ -789,7 +789,9 @@ EX void monstersTurn() {
|
||||
|
||||
orbbull::check();
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
if(!phase1) terracotta::check();
|
||||
#endif
|
||||
|
||||
if(items[itOrbFreedom])
|
||||
for(int i=0; i<numplayers(); i++)
|
||||
|
@ -84,9 +84,11 @@ EX bool collectItem(cell *c2, bool telekinesis IS(false)) {
|
||||
if(c2->item == itDodeca && peace::on) peace::simon::extend();
|
||||
}
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
if(c2->land == laHunting && c2->item && !inv::activating) {
|
||||
ambush::ambush(c2, ambush::size(c2, c2->item));
|
||||
}
|
||||
#endif
|
||||
|
||||
if(isRevivalOrb(c2->item) && multi::revive_queue.size()) {
|
||||
multiRevival(cwt.at, c2);
|
||||
|
@ -424,13 +424,17 @@ EX void explosion(cell *c, int power, int central) {
|
||||
playSound(c, "explosion");
|
||||
drawFireParticles(c, 30, 150);
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
brownian::dissolve_brownian(c, 2);
|
||||
#endif
|
||||
makeflame(c, central, false);
|
||||
|
||||
forCellEx(c2, c) {
|
||||
changes.ccell(c2);
|
||||
destroyTrapsOn(c2);
|
||||
#if CAP_COMPLEX2
|
||||
brownian::dissolve_brownian(c2, 1);
|
||||
#endif
|
||||
if(c2->wall == waRed2 || c2->wall == waRed3)
|
||||
c2->wall = waRed1;
|
||||
else if(c2->wall == waDeadTroll || c2->wall == waDeadTroll2 || c2->wall == waPetrified || c2->wall == waGargoyle) {
|
||||
@ -468,7 +472,9 @@ EX void explodeMine(cell *c) {
|
||||
changes.ccell(c);
|
||||
c->wall = waMineOpen;
|
||||
explosion(c, 20, 20);
|
||||
#if CAP_COMPLEX2
|
||||
mine::auto_teleport_charges();
|
||||
#endif
|
||||
}
|
||||
|
||||
EX void explodeBarrel(cell *c) {
|
||||
|
@ -62,7 +62,9 @@ EX void moveEffect(const movei& mi, eMonster m) {
|
||||
|
||||
mayExplodeMine(ct, m);
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
if(!isNonliving(m)) terracotta::check_around(ct);
|
||||
#endif
|
||||
|
||||
if(ct->wall == waMineUnknown && !ct->item && !ignoresPlates(m) && normal_gravity_at(ct))
|
||||
ct->landparam |= 2; // mark as safe
|
||||
@ -84,7 +86,9 @@ EX void moveEffect(const movei& mi, eMonster m) {
|
||||
|
||||
if(cf && isPrincess(m)) princess::move(mi);
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
if(cf && m == moKnight) camelot::move_knight(cf, ct);
|
||||
#endif
|
||||
|
||||
if(cf && m == moTortoise) {
|
||||
tortoise::move_adult(cf, ct);
|
||||
@ -1533,9 +1537,11 @@ EX int movevalue(eMonster m, cell *c, cell *c2, flagtype flags) {
|
||||
|
||||
else if(monstersnear(c2, m, NULL, c)) val = 50; // linked with mouse suicide!
|
||||
else if(passable_for(m, c2, c, 0)) {
|
||||
#if CAP_COMPLEX2
|
||||
if(mine::marked_mine(c2) && !ignoresPlates(m))
|
||||
val = 50;
|
||||
else
|
||||
#endif
|
||||
val = 4000;
|
||||
}
|
||||
else if(passable_for(m, c2, c, P_DEADLY)) val = -1100;
|
||||
@ -1938,12 +1944,16 @@ EX void movehex_all() {
|
||||
}
|
||||
|
||||
EX void movemonsters() {
|
||||
#if CAP_COMPLEX2
|
||||
ambush::distance = 0;
|
||||
#endif
|
||||
|
||||
DEBB(DF_TURN, ("lava1"));
|
||||
orboflava(1);
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
ambush::check_state();
|
||||
#endif
|
||||
|
||||
sagefresh = true;
|
||||
turncount++;
|
||||
|
@ -815,7 +815,9 @@ bool pcmove::after_escape() {
|
||||
return false;
|
||||
}
|
||||
else if(c2->monst == moKnight) {
|
||||
#if CAP_COMPLEX2
|
||||
if(vmsg()) camelot::knightFlavorMessage(c2);
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
else if(c2->monst && (!isFriendly(c2) || c2->monst == moTameBomberbird || isMountable(c2->monst))
|
||||
@ -833,8 +835,10 @@ bool pcmove::after_escape() {
|
||||
|
||||
bool pcmove::move_if_okay() {
|
||||
cell*& c2 = mi.t;
|
||||
#if CAP_COMPLEX2
|
||||
if(mine::marked_mine(c2) && !mine::safe() && !checkonly && warningprotection(XLAT("Are you sure you want to step there?")))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
if(snakelevel(c2) <= snakelevel(cwt.at)-2) {
|
||||
bool can_leave = false;
|
||||
@ -1002,12 +1006,14 @@ bool pcmove::perform_actual_move() {
|
||||
else
|
||||
c2->wall = cwt.at->wall;
|
||||
}
|
||||
#if CAP_COMPLEX2
|
||||
if(c2->wall == waRoundTable) {
|
||||
addMessage(XLAT("You jump over the table!"));
|
||||
}
|
||||
|
||||
if(cwt.at->wall == waRoundTable)
|
||||
camelot::roundTableMessage(c2);
|
||||
#endif
|
||||
|
||||
invismove = (turncount >= noiseuntil) && items[itOrbInvis] > 0;
|
||||
|
||||
@ -1240,7 +1246,9 @@ EX void playerMoveEffects(cell *c1, cell *c2) {
|
||||
|
||||
destroyWeakBranch(c1, c2, moPlayer);
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
mine::uncover_full(c2);
|
||||
#endif
|
||||
|
||||
if((c2->wall == waClosePlate || c2->wall == waOpenPlate) && normal_gravity_at(c2) && !markOrb(itOrbAether))
|
||||
toggleGates(c2, c2->wall);
|
||||
|
Loading…
Reference in New Issue
Block a user