1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-04-28 05:33:21 +00:00

world turtles

This commit is contained in:
Zeno Rogue 2020-03-02 03:06:15 +01:00
parent a9a5a0c9c2
commit 5e48af2bb3
5 changed files with 33 additions and 8 deletions

View File

@ -336,6 +336,7 @@ EX void stunMonster(cell *c2, eMonster killer, flagtype flags) {
c2->monst == moTerraWarrior ? min(int(c2->stuntime + 8 - c2->hitpoints), 7) : c2->monst == moTerraWarrior ? min(int(c2->stuntime + 8 - c2->hitpoints), 7) :
isMetalBeast(c2->monst) ? 7 : isMetalBeast(c2->monst) ? 7 :
c2->monst == moTortoise ? 7 : c2->monst == moTortoise ? 7 :
c2->monst == moWorldTurtle ? 7 :
c2->monst == moReptile ? 7 : c2->monst == moReptile ? 7 :
isPrincess(c2->monst) ? 6 : isPrincess(c2->monst) ? 6 :
// spear stunning // spear stunning
@ -350,7 +351,7 @@ EX void stunMonster(cell *c2, eMonster killer, flagtype flags) {
c2->monst == moBrownBug ? 3 : c2->monst == moBrownBug ? 3 :
3); 3);
if(killer == moArrowTrap) newtime = min(newtime + 3, 7); if(killer == moArrowTrap) newtime = min(newtime + 3, 7);
if(!isMetalBeast(c2->monst) && !among(c2->monst, moSkeleton, moReptile, moSalamander, moTortoise, moBrownBug)) { if(!isMetalBeast(c2->monst) && !among(c2->monst, moSkeleton, moReptile, moSalamander, moTortoise, moWorldTurtle, moBrownBug)) {
c2->hitpoints--; c2->hitpoints--;
if(c2->monst == moPrincess) if(c2->monst == moPrincess)
playSound(c2, princessgender() ? "hit-princess" : "hit-prince"); playSound(c2, princessgender() ? "hit-princess" : "hit-prince");
@ -1002,7 +1003,7 @@ EX void killFriendlyIvy() {
} }
EX bool monsterPushable(cell *c2) { EX bool monsterPushable(cell *c2) {
return (c2->monst != moFatGuard && !(isMetalBeast(c2->monst) && c2->stuntime < 2) && c2->monst != moTortoise && c2->monst != moTerraWarrior && c2->monst != moVizier); return (c2->monst != moFatGuard && !(isMetalBeast(c2->monst) && c2->stuntime < 2) && c2->monst != moTortoise && c2->monst != moTerraWarrior && c2->monst != moVizier && c2->monst != moWorldTurtle);
} }
EX bool should_switchplace(cell *c1, cell *c2) { EX bool should_switchplace(cell *c1, cell *c2) {

View File

@ -1565,7 +1565,13 @@ WALL( '=', 0x0000A0, "deep water", waDeepWater, WF_WATER, RESERVED, 0, sgWater,
MONSTER( 'P', 0xC08080, "Pike", moPike, CF_FACE_SIDE | CF_SHARK, RESERVED, moShark, MONSTER( 'P', 0xC08080, "Pike", moPike, CF_FACE_SIDE | CF_SHARK, RESERVED, moShark,
"You remembler anglers from your hometown showing the impressive pikes they have caught. This one is much larger." "You remembler anglers from your hometown showing the impressive pikes they have caught. This one is much larger."
) )
MONSTER( 'S', 0xC0C080, "Yellow Skipper", moYellowSkipper, CF_FACE_SIDE | CF_SHARK, RESERVED, moShark, "Just a nasty shark.") /* unused */ MONSTER( 'T', 0xFF00FF, "World Turtle", moWorldTurtle, CF_FACE_SIDE | CF_STUNNABLE | CF_SLOWMOVER, RESERVED, moYeti,
"Have you reached the edge of the Poincaré disk? No, it must just be the edge of this world. "
"Which happens to be floating on the backs of some turtles. Wondering how such not very big turtles could "
"support such a large world? Well, there are LOTS of them! "
"This one got so annoyed by the fact that you discovered this that it left its post. However, the world still "
"stands, because there are so many turtles."
)
MONSTER( 'R', 0x4040C0, "Rusałka", moRusalka, CF_FACE_SIDE | CF_SHARK, RESERVED, moShark, GENDERSWITCH) MONSTER( 'R', 0x4040C0, "Rusałka", moRusalka, CF_FACE_SIDE | CF_SHARK, RESERVED, moShark, GENDERSWITCH)
ITEM( 'o', 0x808080, "Orb of Plague", itOrbPlague, IC_ORB, IF_EMPATHY, RESERVED, osOffensive, ITEM( 'o', 0x808080, "Orb of Plague", itOrbPlague, IC_ORB, IF_EMPATHY, RESERVED, osOffensive,
"When you kill an enemy, adjacent enemies all also attacked, as long as they are further away from you than from the originally attacked enemy. " "When you kill an enemy, adjacent enemies all also attacked, as long as they are further away from you than from the originally attacked enemy. "

View File

@ -438,6 +438,13 @@ EX namespace tortoise {
if(getBit(bits, tfShellDark)) shellcolor = gradient(shellcolor, 0, 0, .5, 1); if(getBit(bits, tfShellDark)) shellcolor = gradient(shellcolor, 0, 0, .5, 1);
if(getBit(bits, tfSkinDark)) skincolor = gradient(skincolor, 0, 0, .5, 1); if(getBit(bits, tfSkinDark)) skincolor = gradient(skincolor, 0, 0, .5, 1);
if(bits < 0) {
skincolor = 0xC00060;
shellcolor = 0xFF00FF;
scutecolor = 0x6000C0;
eyecolor = 0xFFFFFF;
}
for(int i=0; i<12; i++) { for(int i=0; i<12; i++) {
color_t col = color_t col =
i == 0 ? shellcolor: i == 0 ? shellcolor:
@ -1266,9 +1273,9 @@ EX bool drawMonsterType(eMonster m, cell *where, const transmatrix& V1, color_t
// if(GDIM == 3) V = V * cspin(0, 2, M_PI/2); // if(GDIM == 3) V = V * cspin(0, 2, M_PI/2);
if(m == moTortoise && where && where->stuntime >= 3) if(among(m, moTortoise, moWorldTurtle) && where && where->stuntime >= 3)
drawStunStars(V, where->stuntime-2); drawStunStars(V, where->stuntime-2);
else if (m == moTortoise || m == moPlayer || (where && !where->stuntime)) ; else if (among(m, moTortoise, moWorldTurtle) || m == moPlayer || (where && !where->stuntime)) ;
else if(where && !(isMetalBeast(m) && where->stuntime == 1)) else if(where && !(isMetalBeast(m) && where->stuntime == 1))
drawStunStars(V, where->stuntime); drawStunStars(V, where->stuntime);
@ -1284,6 +1291,11 @@ EX bool drawMonsterType(eMonster m, cell *where, const transmatrix& V1, color_t
return false; return false;
} }
case moWorldTurtle: {
tortoise::draw(V, -1, 0, where ? where->stuntime : 0);
return false;
}
case moPlayer: case moPlayer:
drawPlayer(m, where, V, col, footphase); drawPlayer(m, where, V, col, footphase);
return false; return false;
@ -1525,7 +1537,7 @@ EX bool drawMonsterType(eMonster m, cell *where, const transmatrix& V1, color_t
return false; return false;
} }
case moShark: case moGreaterShark: case moCShark: case moYellowSkipper: case moShark: case moGreaterShark: case moCShark:
queuepoly(VFISH, cgi.shShark, darkena(col, 0, 0xFF)); queuepoly(VFISH, cgi.shShark, darkena(col, 0, 0xFF));
return false; return false;

View File

@ -2910,9 +2910,14 @@ EX void setdist(cell *c, int d, cell *from) {
c->item = itNone; c->item = itNone;
} }
} }
if(d == 7 && c->land == laMemory && hrand(100) < 5) { if(d == 7 && c->land == laMemory) {
if(hrand(100) < 5) {
c->wall = waTrapdoor, c->item = itOrbSafety; c->wall = waTrapdoor, c->item = itOrbSafety;
} }
else if(hrand(100) < 2) {
c->monst = moWorldTurtle, c->wall = waNone, c->hitpoints = 5;
}
}
} }
ONEMPTY if(!c->item) { ONEMPTY if(!c->item) {

View File

@ -258,6 +258,7 @@ EX void moveMonster(const movei& mi) {
if(!cellEdgeUnstable(ct)) { if(!cellEdgeUnstable(ct)) {
if(isMetalBeast(m)) ct->stuntime += 2; if(isMetalBeast(m)) ct->stuntime += 2;
if(m == moTortoise) ct->stuntime += 3; if(m == moTortoise) ct->stuntime += 3;
if(m == moWorldTurtle) ct->stuntime += 3;
if(m == moDraugr && ct->land != laBurial && ct->land != laHalloween) ct->stuntime += 2; if(m == moDraugr && ct->land != laBurial && ct->land != laHalloween) ct->stuntime += 2;
if(m == moBrownBug && snakelevel(ct) < snakelevel(cf)) ct->stuntime += 2; if(m == moBrownBug && snakelevel(ct) < snakelevel(cf)) ct->stuntime += 2;
if(m == moBrownBug && snakelevel(ct) < snakelevel(cf) - 1) ct->stuntime += 2; if(m == moBrownBug && snakelevel(ct) < snakelevel(cf) - 1) ct->stuntime += 2;