1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-24 13:27:17 +00:00

Merge pull request #282 from jruderman/terra_wparam

Fix terra statue interactions with Chaos+Icy, BSoC swap, Alch dup
This commit is contained in:
Zeno Rogue 2021-08-04 19:07:42 +02:00 committed by GitHub
commit ba3c117d97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 12 deletions

View File

@ -1369,7 +1369,7 @@ void celldrawer::draw_features() {
case waTerraWarrior:
#if CAP_COMPLEX2
drawTerraWarrior(V, terracotta::randterra ? (c->landparam & 7) : (5 - (c->landparam & 7)), 7, 0);
drawTerraWarrior(V, terracotta::randterra ? (c->wparam & 7) : (5 - (c->wparam & 7)), 7, 0);
#endif
break;
@ -2222,7 +2222,7 @@ void celldrawer::draw_wall_full() {
if(c->wall == waFireTrap)
asciicol = trapcol[c->wparam & 3];
if(c->wall == waTerraWarrior)
asciicol = terracol[c->landparam & 7];
asciicol = terracol[c->wparam & 7];
if(c->wall == waMineOpen) {
int mines = countMinesAround(c);

View File

@ -654,15 +654,15 @@ EX void check(cell *c) {
if(c->wall == waTerraWarrior && !c->monst && !racing::on) {
bool live = false;
if(randterra) {
c->landparam++;
if((c->landparam == 3 && hrand(3) == 0) ||
(c->landparam == 4 && hrand(2) == 0) ||
c->landparam == 5)
c->wparam++;
if((c->wparam == 3 && hrand(3) == 0) ||
(c->wparam == 4 && hrand(2) == 0) ||
c->wparam == 5)
live = true;
}
else {
c->landparam--;
live = !c->landparam;
c->wparam--;
live = !c->wparam;
}
if(live)
c->monst = moTerraWarrior,

View File

@ -944,7 +944,7 @@ EX void describeMouseover() {
out += ", "; out += XLAT1(winf[c->wall].name);
if(c->wall == waRose) out += " (" + its(7-rosephase) + ")";
if(c->wall == waTerraWarrior) out += " (" + its(c->landparam) + ")";
if(c->wall == waTerraWarrior) out += " (" + its(c->wparam) + ")";
#if CAP_COMPLEX2
if(isDie(c->wall)) out += " (" + dice::describe(c) + ")";
#endif

View File

@ -1198,11 +1198,11 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
createArrowTrapAt(c, laTerracotta);
if(pseudohept(c) && hrand(100) < 40 && c->wall == waNone && !racing::on) {
c->wall = waTerraWarrior;
c->landparam = terracotta::randterra ? 0 : 3 + hrand(3);
c->wparam = terracotta::randterra ? 0 : 3 + hrand(3);
if(hrand(100) < items[itTerra]-10)
c->landparam--;
c->wparam--;
if(hrand(100) < items[itTerra]-10)
c->landparam--;
c->wparam--;
}
}
if(d == 7) {