1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

more work on the Crystal World

This commit is contained in:
Zeno Rogue 2017-10-30 09:05:16 +01:00
parent e492ea09d9
commit 36fe4c670b
10 changed files with 55 additions and 12 deletions

View File

@ -1197,6 +1197,7 @@ itemtype iinf[ittypes] = {
{ 'o', 0x3080D0, "Orb of Change",
"This ranged Orb will transform the target monster into one without any special powers. It also stuns them for one turn. "
"Does not affect multi-tile monsters."},
{ '!', 0x80FF00, "Glowing Crystal", NODESC},
};
// --- wall types ---
@ -1558,7 +1559,7 @@ const landtype linf[landtypes] = {
{ 0x207068, "Hunting Ground", huntingdesc},
{ 0xE2725B, "Terracotta Army", terraldesc},
{ 0xE2725B, "Terracotta Army", terraldesc},
{ 0xE04040, "Dual", NODESCYET}
{ 0x80FF00, "Crystal World", NODESCYET}
};
#define LAND_OVER 57

View File

@ -68,7 +68,7 @@ struct genderswitch_t {
#define NUM_GS 6
static const int ittypes = 121;
static const int ittypes = 122;
struct itemtype {
char glyph;
@ -112,7 +112,7 @@ enum eItem {
itInventory,
itLavaLily, itHunting, itBlizzard, itTerra,
itOrbSide1, itOrbSide2, itOrbSide3,
itOrbLava, itOrbMorph,
itOrbLava, itOrbMorph, itGlowCrystal
};
static const int walltypes = 105;

View File

@ -275,7 +275,7 @@ int itemclass(eItem i) {
i == itSlime || i == itAmethyst || i == itDodeca ||
i == itGreenGrass || i == itBull ||
i == itLavaLily || i == itHunting ||
i == itBlizzard || i == itTerra
i == itBlizzard || i == itTerra || i == itGlowCrystal
)
return IC_TREASURE;
if(i == itSavedPrincess || i == itStrongWind || i == itWarning)

View File

@ -2431,9 +2431,15 @@ void setcolors(cell *c, int& wcol, int &fcol) {
case laBurial: case laTrollheim: case laBarrier: case laOceanWall:
case laCrossroads2: case laCrossroads3: case laCrossroads4: case laCrossroads5:
case laRose: case laPower: case laWildWest: case laHalloween: case laRedRock:
case laDragon: case laStorms: case laTerracotta: case laMercuryRiver: case laDual:
case laDragon: case laStorms: case laTerracotta: case laMercuryRiver:
fcol = linf[c->land].color; break;
case laDual:
fcol = linf[c->land].color;
if(c->landparam == 2) fcol = 0x40FF00;
if(c->landparam == 3) fcol = 0xC0FF00;
break;
case laDesert: fcol = 0xEDC9AF; break;
case laKraken: fcol = 0x20A020; break;
case laCA: fcol = 0x404040; break;
@ -3139,6 +3145,7 @@ int getfd(cell *c) {
case laDeadCaves:
case laPalace:
case laCA:
case laDual:
return 1;
case laTrollheim:

View File

@ -1921,8 +1921,33 @@ void giantLandSwitch(cell *c, int d, cell *from) {
break;
case laDual:
if(d == 9 && (ctof(c) || hrand(100) < 5))
c->wall = waChasm;
if(d == 7) {
if(pseudohept(c))
c->wall = waChasm;
else {
c->landparam = 1;
if(S7%2 == 0) {
c->landparam = 2;
forCellCM(c2, c) {
if(c2->landparam == 2) c->landparam = 3;
if(!ctof(c2)) forCellCM(c3, c2) if(c3->landparam == 3) c->landparam = 3;
}
}
int hr = hrand(100) / 5;
if(hr == 0)
c->wall = waTrapdoor;
else if(hr == 1)
c->wall = waSmallTree;
else if(hr == 2)
c->wall = waStone;
}
}
ONEMPTY {
if(hrand(5000) < PT(100 + 2 * kills[moRatling], 200) && notDippingFor(itGlowCrystal))
c->item = itGlowCrystal;
if(hrand(2000) < 2 * (items[itGlowCrystal] + yendor::hardness()))
c->monst = moRatling;
}
break;
}
}

View File

@ -198,6 +198,9 @@ int isNative(eLand l, eMonster m) {
case laHunting:
return m == moHunterDog ? 1 : 0;
case laDual:
return m == moRatling ? 2 : 0;
case laCA: return 0;
}
return false;
@ -290,6 +293,7 @@ eItem treasureType(eLand l) {
case laTerracotta: case laMercuryRiver: return itTerra;
case laBlizzard: return itBlizzard;
case laHunting: return itHunting;
case laDual: return itGlowCrystal;
case laCA: return itNone;
}
@ -385,7 +389,7 @@ bool landUnlocked(eLand l) {
case laStorms: case laWhirlwind:
return gold() >= R60;
case laWildWest: case laHalloween:
case laWildWest: case laHalloween: case laDual:
return false;
case laIce: case laJungle: case laCaves: case laDesert:

View File

@ -438,6 +438,11 @@ void wandering() {
else if(c->land == laClearing && wchance(items[itMutant2], 150) && items[itMutant2] >= 15 && !c->monst && c->type == 7)
c->monst = moRedFox;
else if(c->land == laDual && wchance(items[itGlowCrystal], 40)) {
c->monst = moRatling;
playSeenSound(c);
}
else if(hrand(50) < statuecount * statuecount)
c->monst = moCultistLeader;

View File

@ -1,4 +1,4 @@
#define ORBLINES 61
#define ORBLINES 62
// orbgen flags
@ -104,6 +104,7 @@ const orbinfo orbinfos[ORBLINES] = {
{orbgenflags::S_NATIVE, laHunting, 0, 2500, itOrbSide3},
{orbgenflags::S_NATIVE, laBlizzard, 0, 2000, itOrbWinter},
{orbgenflags::S_NATIVE, laTerracotta, 800, 2500, itOrbSide1},
{orbgenflags::S_NATIVE, laDual, 600, 2500, itOrbSide2},
{orbgenflags::S_NATIVE, laWhirlpool, 0, 2000, itOrbWater}, // needs to be last
};

View File

@ -967,7 +967,7 @@ void buildpolys() {
0;
bshape(shFloorShadow[0], PPR_FLOOR);
for(int t=0; t<=6; t++) hpcpush(ddi(S7 + t*S14, floorrad0*SHADMUL) * C0);
for(int t=0; t<=S6; t++) hpcpush(ddi(S7 + t*S14, floorrad0*SHADMUL) * C0);
bshape(shFloorShadow[1], PPR_FLOOR);
for(int t=0; t<=S7; t++) hpcpush(ddi(t*S12 + td, floorrad1*SHADMUL) * C0);
@ -1324,7 +1324,7 @@ void buildpolys() {
for(int t=0; t<=S3; t++) hpcpush(ddi(t*S28, -hcrossf*.94) * C0);
bshape(shBigTriShadow, PPR_FLOOR);
for(int t=0; t<=S3; t++) hpcpush(ddi(t*S28 + S14, hcrossf*.94*SHADMUL) * C0);
for(int t=0; t<=S3; t++) hpcpush(ddi(t*S28 + S14 + (S3==4?S14:0), hcrossf*.94*SHADMUL) * C0);
/*bshape(shBigHexTriangleRev, PPR_FLOOR);

View File

@ -589,7 +589,7 @@ namespace tactic {
bool tacticUnlocked(int i) {
eLand l = land_tac[i].l;
if(autocheat) return true;
if(l == laWildWest) return true;
if(l == laWildWest || l == laDual) return true;
return hiitemsMax(treasureType(l)) * landMultiplier(l) >= 20;
}