mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
added the cases for the new features
This commit is contained in:
parent
2ca03ededf
commit
081d24edd7
@ -802,7 +802,7 @@ genderswitch_t genderswitch[NUM_GS] = {
|
||||
|
||||
// --- items ---
|
||||
|
||||
const int ittypes = 120;
|
||||
const int ittypes = 121;
|
||||
|
||||
struct itemtype {
|
||||
char glyph;
|
||||
@ -1203,6 +1203,7 @@ itemtype iinf[ittypes] = {
|
||||
{ 'o', 0x30A080, "Orb of the Side II", NODESCYET},
|
||||
{ 'o', 0x30D080, "Orb of the Side III", NODESCYET},
|
||||
{ 'o', 0xD08030, "Orb of Lava", NODESCYET},
|
||||
{ 'o', 0x3080D0, "Orb of Morph", NODESCYET},
|
||||
};
|
||||
|
||||
enum eItem { itNone, itDiamond, itGold, itSpice, itRuby, itElixir, itShard, itBone, itHell, itStatue,
|
||||
@ -1239,7 +1240,7 @@ enum eItem { itNone, itDiamond, itGold, itSpice, itRuby, itElixir, itShard, itBo
|
||||
itInventory,
|
||||
itLavaLily, itDogPlains, itBlizzard, itTerra,
|
||||
itOrbSide1, itOrbSide2, itOrbSide3,
|
||||
itOrbLava
|
||||
itOrbLava, itOrbMorph
|
||||
};
|
||||
|
||||
// --- wall types ---
|
||||
|
@ -103,7 +103,7 @@ bool isNonliving(eMonster m) {
|
||||
m == moZombie || m == moGhost || m == moShadow || m == moSkeleton ||
|
||||
m == moEvilGolem || m == moIllusion || m == moEarthElemental ||
|
||||
m == moWaterElemental || m == moDraugr || m == moTerraWarrior ||
|
||||
m == moIceGolem || m == moVoidBeast;
|
||||
m == moIceGolem || m == moVoidBeast || m == moJiangshi;
|
||||
}
|
||||
|
||||
bool isMetalBeast(eMonster m) {
|
||||
|
42
game.cpp
42
game.cpp
@ -419,10 +419,12 @@ bool boatGoesThrough(cell *c) {
|
||||
c->wall == waCavefloor || c->wall == waFrozenLake || isReptile(c->wall) ||
|
||||
c->wall == waDeadfloor || c->wall == waCIsland || c->wall == waCIsland2 ||
|
||||
c->wall == waMineUnknown || c->wall == waMineMine || c->wall == waMineOpen ||
|
||||
c->wall == waBonfireOff || c->wall == waFire || c->wall == waPartialFire;
|
||||
c->wall == waBonfireOff || c->wall == waFire || c->wall == waPartialFire ||
|
||||
c->wall == waArrowTrap;
|
||||
}
|
||||
|
||||
void placeWater(cell *c, cell *c2) {
|
||||
destroyTrapsOn(c);
|
||||
if(isWatery(c)) ;
|
||||
else if(c2 && isAlchAny(c2))
|
||||
c->wall = c2->wall;
|
||||
@ -1390,6 +1392,7 @@ void prespill(cell* c, eWall t, int rad, cell *from) {
|
||||
c->wall == waBarrowDig || c->wall == waBarrowWall ||
|
||||
c->wall == waMirrorWall)
|
||||
return;
|
||||
destroyTrapsOn(c);
|
||||
// these walls block further spilling
|
||||
if(c->wall == waCavewall || cellUnstable(c) || c->wall == waSulphur ||
|
||||
c->wall == waSulphurC || c->wall == waLake || c->wall == waChasm ||
|
||||
@ -1451,7 +1454,7 @@ bool earthFloor(cell *c) {
|
||||
if(c->monst) return false;
|
||||
if(c->wall == waDeadwall) { c->wall = waDeadfloor; return true; }
|
||||
if(c->wall == waDune) { c->wall = waNone; return true; }
|
||||
if(c->wall == waStone) { c->wall = waNone; return true; }
|
||||
if(c->wall == waStone && c->land != laTerracotta) { c->wall = waNone; return true; }
|
||||
if(c->wall == waAncientGrave || c->wall == waFreshGrave) {
|
||||
c->wall = waNone;
|
||||
return true;
|
||||
@ -1468,6 +1471,10 @@ bool earthFloor(cell *c) {
|
||||
c->wall = waNone;
|
||||
if(c->wall == waBoat && c->land == laWarpSea)
|
||||
c->wall = waStrandedBoat;
|
||||
if(c->wall == waMercury) {
|
||||
c->wall = waNone;
|
||||
return true;
|
||||
}
|
||||
if((c->wall == waBarrowDig || c->wall == waBarrowWall) && c->land == laBurial) {
|
||||
c->item = itNone;
|
||||
c->wall = waNone;
|
||||
@ -1477,6 +1484,10 @@ bool earthFloor(cell *c) {
|
||||
c->wall = waNone;
|
||||
return true;
|
||||
}
|
||||
if(c->wall == waChasm && c->land == laDogPlains) {
|
||||
c->wall = waNone;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1510,6 +1521,20 @@ bool earthWall(cell *c) {
|
||||
c->wall = waBarrowDig;
|
||||
return true;
|
||||
}
|
||||
if(c->wall == waNone && c->land == laDogPlains) {
|
||||
c->item = itNone;
|
||||
c->wall = waChasm;
|
||||
return true;
|
||||
}
|
||||
if(c->wall == waNone && c->land == laTerracotta) {
|
||||
c->wall = waMercury;
|
||||
return true;
|
||||
}
|
||||
if(c->wall == waArrowTrap && c->land == laTerracotta) {
|
||||
destroyTrapsOn(c);
|
||||
c->wall = waMercury;
|
||||
return true;
|
||||
}
|
||||
if(c->wall == waCIsland || c->wall == waCIsland2 || (c->wall == waNone && c->land == laOcean)) {
|
||||
c->item = itNone;
|
||||
c->wall = waSea;
|
||||
@ -1570,6 +1595,7 @@ bool snakepile(cell *c, eMonster m) {
|
||||
}
|
||||
|
||||
bool makeflame(cell *c, int timeout, bool checkonly) {
|
||||
destroyTrapsOn(c);
|
||||
if(itemBurns(c->item)) {
|
||||
if(checkonly) return true;
|
||||
addMessage(XLAT("%The1 burns!", c->item)), c->item = itNone;
|
||||
@ -1637,6 +1663,7 @@ void explodeMine(cell *c) {
|
||||
|
||||
for(int i=0; i<c->type; i++) if(c->mov[i]) {
|
||||
cell *c2 = c->mov[i];
|
||||
destroyTrapsOn(c2);
|
||||
if(c2->wall == waRed2 || c2->wall == waRed3)
|
||||
c2->wall = waRed1;
|
||||
else if(c2->wall == waDeadTroll || c2->wall == waDeadTroll2 || c2->wall == waPetrified || c2->wall == waGargoyle) {
|
||||
@ -2915,6 +2942,14 @@ void toggleGates(cell *ct, eWall type) {
|
||||
playSound(ct, "opengate");
|
||||
}
|
||||
|
||||
void destroyTrapsOn(cell *c) {
|
||||
if(c->wall == waArrowTrap) c->wall = waNone, destroyTrapsAround(c);
|
||||
}
|
||||
|
||||
void destroyTrapsAround(cell *c) {
|
||||
forCellEx(c2, c) destroyTrapsOn(c2);
|
||||
}
|
||||
|
||||
void destroyWeakBranch(cell *cf, cell *ct, eMonster who) {
|
||||
if(cf && ct && cf->wall == waWeakBranch && cellEdgeUnstable(ct) &&
|
||||
gravityLevel(ct) >= gravityLevel(cf) && !ignoresPlates(who)) {
|
||||
@ -3688,6 +3723,7 @@ cell *moveNormal(cell *c, flagtype mf) {
|
||||
}
|
||||
}
|
||||
|
||||
// for sandworms
|
||||
void explodeAround(cell *c) {
|
||||
for(int j=0; j<c->type; j++) {
|
||||
cell* c2 = c->mov[j];
|
||||
@ -3711,7 +3747,7 @@ void explodeAround(cell *c) {
|
||||
if(c2->wall == waGargoyleBridge || c2->wall == waPetrifiedBridge) placeWater(c2, c2);
|
||||
if(c2->wall == waRubble) c2->wall = waNone;
|
||||
if(c2->wall == waPlatform) c2->wall = waNone;
|
||||
if(c2->wall == waStone) c2->wall = waNone;
|
||||
if(c2->wall == waStone) c2->wall = waNone, destroyTrapsAround(c2);
|
||||
if(c2->wall == waRose) c2->wall = waNone;
|
||||
if(c2->wall == waLadder) c2->wall = waNone;
|
||||
if(c2->wall == waGargoyle) c2->wall = waNone;
|
||||
|
3
hyper.h
3
hyper.h
@ -1575,3 +1575,6 @@ extern int hardness_empty();
|
||||
extern eWall getElementalWall(eLand l);
|
||||
|
||||
void gainItem(eItem it);
|
||||
|
||||
void destroyTrapsOn(cell *c);
|
||||
void destroyTrapsAround(cell *c);
|
||||
|
11
orbs.cpp
11
orbs.cpp
@ -171,7 +171,7 @@ void flashCell(cell *c, eMonster killer, flagtype flags) {
|
||||
if(c->wall == waGargoyleBridge) placeWater(c, c);
|
||||
if(c->wall == waGargoyle) c->wall = waNone;
|
||||
if(c->wall == waPlatform) c->wall = waNone;
|
||||
if(c->wall == waStone) c->wall = waNone;
|
||||
if(c->wall == waStone) c->wall = waNone, destroyTrapsAround(c);
|
||||
if(c->wall == waRubble) c->wall = waNone;
|
||||
if(c->wall == waDeadwall) c->wall = waDeadfloor2;
|
||||
if(c->wall == waGiantRug) c->wall = waNone;
|
||||
@ -377,7 +377,8 @@ void castLightningBolt(cellwalker lig) {
|
||||
|
||||
if(c->wall == waBigStatue) c->wall = waNone, spin = true;
|
||||
if(c->wall == waColumn) c->wall = waNone, spin = true;
|
||||
if(c->wall == waStone) c->wall = waNone, brk = true;
|
||||
if(c->wall == waStone) c->wall = waNone, brk = true, destroyTrapsAround(c);
|
||||
if(c->wall == waArrowTrap) activateArrowTrap(c);
|
||||
|
||||
if(c->wall == waCanopy || c->wall == waTrunk || c->wall == waBigBush || c->wall == waSmallBush) {
|
||||
makeflame(c, 12, false); brk = true;
|
||||
@ -674,7 +675,7 @@ eMonster summonedAt(cell *dest) {
|
||||
return moReptile;
|
||||
if(dest->wall == waChasm)
|
||||
return moAirElemental;
|
||||
if(isFire(dest))
|
||||
if(isFire(dest) || dest->wall == waMagma)
|
||||
return moFireElemental;
|
||||
if(dest->wall == waCavewall || dest->wall == waDeadwall)
|
||||
return moSeep;
|
||||
@ -733,6 +734,10 @@ eMonster summonedAt(cell *dest) {
|
||||
if(dest->land == laDragon) return moFireElemental;
|
||||
if(dest->land == laTortoise) return moTortoise;
|
||||
if(dest->land == laBurial) return moEarthElemental;
|
||||
if(dest->land == laVolcano) return moFireElemental;
|
||||
if(dest->land == laBlizzard) return moAirElemental;
|
||||
if(dest->land == laDogPlains) return moAirElemental;
|
||||
if(dest->land == laTerracotta) return moEarthElemental;
|
||||
if(isHaunted(dest->land)) return moGhost;
|
||||
}
|
||||
return moNone;
|
||||
|
20
system.cpp
20
system.cpp
@ -271,7 +271,7 @@ bool havesave = true;
|
||||
|
||||
#if CAP_SAVE
|
||||
#define MAXBOX 500
|
||||
#define POSSCORE 308 // update this when new boxes are added!
|
||||
#define POSSCORE 324 // update this when new boxes are added!
|
||||
|
||||
struct score {
|
||||
string ver;
|
||||
@ -625,6 +625,24 @@ void applyBoxes() {
|
||||
{ int u; applyBoxNum(u); }
|
||||
#endif
|
||||
|
||||
// 10.1:
|
||||
applyBoxI(itLavaLily);
|
||||
applyBoxI(itDogPlains);
|
||||
applyBoxI(itBlizzard);
|
||||
applyBoxI(itTerra);
|
||||
applyBoxOrb(itOrbSide1);
|
||||
applyBoxOrb(itOrbSide2);
|
||||
applyBoxOrb(itOrbSide3);
|
||||
applyBoxOrb(itOrbLava);
|
||||
applyBoxOrb(itOrbMorph);
|
||||
applyBoxM(moHunterDog);
|
||||
applyBoxM(moIceGolem);
|
||||
applyBoxM(moVoidBeast);
|
||||
applyBoxM(moJiangshi);
|
||||
applyBoxM(moTerraWarrior);
|
||||
applyBoxM(moSalamander);
|
||||
applyBoxM(moLavaWolf);
|
||||
|
||||
if(POSSCORE != boxid) printf("ERROR: %d boxes\n", boxid);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user