mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
Merge branch 'master' of https://github.com/zenorogue/hyperrogue
This commit is contained in:
commit
eae1b67013
@ -189,15 +189,8 @@ void celldrawer::setcolors() {
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
case laBrownian: {
|
||||
fcol = wcol =
|
||||
/*
|
||||
c->landparam == 0 ? 0x0000F0 :
|
||||
c->landparam < level ? gradient(0x002000, 0xFFFFFF, 1, c->landparam, level-1) :
|
||||
c->landparam < 2 * level ? 0xFFFF80 :
|
||||
c->landparam < 3 * level ? 0xFF8000 :
|
||||
0xC00000; */
|
||||
|
||||
c->landparam == 0 ? 0x0000F0 : brownian::get_color(c->landparam);
|
||||
if (c->wall == waNone)
|
||||
fcol = wcol = brownian::get_color(c->landparam);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@ -1369,7 +1362,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 +2215,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);
|
||||
|
12
complex2.cpp
12
complex2.cpp
@ -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,
|
||||
|
@ -779,7 +779,7 @@ ITEM( 'o', 0xC00040, "Orb of Recall", itOrbRecall, IC_ORB, ZERO, RESERVED, osUti
|
||||
"When the charges on this Orb expire, "
|
||||
"you will be automatically returned to the place where you have found it. "
|
||||
"Extra Orbs of Recall delay this without changing the recall location. "
|
||||
"Pick up an Orb of Safety causes an immediate recall.")
|
||||
"Picking up an Orb of Safety causes an immediate recall.")
|
||||
ITEM( ']', 0x8080FF, "Dodecahedron", itDodeca, IC_TREASURE, ZERO, RESERVED, osNone,
|
||||
"These dodecahedra made of a mysterious material are the Reptiles' favorite toy."
|
||||
)
|
||||
|
@ -346,7 +346,7 @@ EX void bfs() {
|
||||
c2->item = itNone;
|
||||
c2->landparam |= 2;
|
||||
c2->landparam &= ~1;
|
||||
if(!c2->monst) c2->monst = moBomberbird;
|
||||
if(!c2->monst) c2->monst = moBomberbird, c2->stuntime = 0;
|
||||
}
|
||||
|
||||
if(c2->item == itBarrow && c2->cpdist == distlimit && c2->wall != waBarrowDig) {
|
||||
|
15
graph.cpp
15
graph.cpp
@ -2550,12 +2550,15 @@ EX bool drawMonster(const shiftmatrix& Vparam, int ct, cell *c, color_t col, col
|
||||
#if CAP_SHAPES
|
||||
|
||||
bool darkhistory = history::includeHistory && history::inkillhistory.count(c);
|
||||
|
||||
if(doHighlight())
|
||||
poly_outline =
|
||||
color_t outline = OUTLINE_NONE;
|
||||
|
||||
if(doHighlight()) {
|
||||
outline =
|
||||
(isPlayerOn(c) || isFriendly(c)) ? OUTLINE_FRIEND :
|
||||
noHighlight(c->monst) ? OUTLINE_NONE :
|
||||
OUTLINE_ENEMY;
|
||||
poly_outline = outline;
|
||||
}
|
||||
|
||||
// highlight faraway enemies if that's needed
|
||||
if (vid.faraway_highlight && c->cpdist >= 6 && vid.faraway_highlight <= get_threat_level(c)) {
|
||||
@ -2677,6 +2680,8 @@ EX bool drawMonster(const shiftmatrix& Vparam, int ct, cell *c, color_t col, col
|
||||
add_segment(taildist(c), [=] () {
|
||||
for(int i=11; i>=0; i--) {
|
||||
if(i < 3 && (c->monst == moTentacle || c->monst == moTentaclewait)) continue;
|
||||
if(doHighlight())
|
||||
poly_outline = outline;
|
||||
shiftmatrix Vbx = Vb;
|
||||
if(WDIM == 2) Vbx = Vbx * spin(sin(M_PI * i / 6.) * wav / (i+.1));
|
||||
Vbx = Vbx * xpush(length * (i) / 12.0);
|
||||
@ -3362,7 +3367,9 @@ ld wavefun(ld x) {
|
||||
else return 0; */
|
||||
}
|
||||
|
||||
EX colortable nestcolors = { 0x800000, 0x008000, 0x000080, 0x404040, 0x700070, 0x007070, 0x707000, 0x606060 };
|
||||
// Color components in nestcolors must be less than 0x80 (for addition in drawMonster for Rock Snakes)
|
||||
// and must be divisible by 4 (for brightening of raised cells in celldrawer::setcolors)
|
||||
EX colortable nestcolors = { 0x7C0000, 0x007C00, 0x00007C, 0x404040, 0x700070, 0x007070, 0x707000, 0x606060 };
|
||||
|
||||
color_t floorcolors[landtypes];
|
||||
|
||||
|
2
help.cpp
2
help.cpp
@ -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
|
||||
|
@ -166,10 +166,12 @@ EX bool collectItem(cell *c2, bool telekinesis IS(false)) {
|
||||
else if(c2->item == itOrbLife) {
|
||||
playSound(c2, "pickup-orb"); // TODO summon
|
||||
placeGolem(cwt.at, c2, moGolem);
|
||||
if(cwt.at->monst == moGolem) cwt.at->stuntime = 0;
|
||||
}
|
||||
else if(c2->item == itOrbFriend) {
|
||||
playSound(c2, "pickup-orb"); // TODO summon
|
||||
placeGolem(cwt.at, c2, moTameBomberbird);
|
||||
if(cwt.at->monst == moTameBomberbird) cwt.at->stuntime = 0;
|
||||
}
|
||||
#if CAP_TOUR
|
||||
else if(tour::on && (c2->item == itOrbSafety || c2->item == itOrbRecall)) {
|
||||
|
24
landgen.cpp
24
landgen.cpp
@ -48,7 +48,7 @@ EX bool notDippingForExtra(eItem i, eItem x) {
|
||||
int v = items[i] - min(items[x], currentLocalTreasure);
|
||||
if(v <= 10) return true;
|
||||
if(v >= 20) return false;
|
||||
return v >= hrand(10) + 10;
|
||||
return v < hrand(10) + 10;
|
||||
}
|
||||
|
||||
void buildRedWall(cell *c, int gemchance) {
|
||||
@ -253,6 +253,8 @@ EX void gen_eclectic_monster(cell *c) {
|
||||
cell *c1 = c;
|
||||
c1->monst = moPair;
|
||||
c2->monst = moPair;
|
||||
c1->stuntime = 0;
|
||||
c2->stuntime = 0;
|
||||
c1->mondir = neighborId(c1, c2);
|
||||
c2->mondir = neighborId(c2, c1);
|
||||
}
|
||||
@ -911,6 +913,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->item = itTrollEgg;
|
||||
forCellCM(c2, c) forCellCM(c3, c2) {
|
||||
c3->monst = pickTroll(c);
|
||||
c3->stuntime = 0;
|
||||
c2->item = itTrollEgg;
|
||||
}
|
||||
}
|
||||
@ -1198,11 +1201,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) {
|
||||
@ -1696,6 +1699,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
forCellIdEx(c2, i, c) {
|
||||
c2->monst = moKrakenT;
|
||||
c2->hitpoints = 1;
|
||||
c2->stuntime = 0;
|
||||
c2->mondir = c->c.spin(i);
|
||||
}
|
||||
if(!peace::on) playSound(c, "seen-kraken");
|
||||
@ -2050,7 +2054,9 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->item = itHunting;
|
||||
auto& p = next[hrand(isize(next))];
|
||||
p.first->monst = moHunterGuard;
|
||||
p.first->stuntime = 0;
|
||||
p.second->monst = moHunterGuard;
|
||||
p.second->stuntime = 0;
|
||||
}
|
||||
}
|
||||
else if(items[itHunting] < 10) {
|
||||
@ -2069,8 +2075,10 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
cell *dog2 = dogcells[hrand(isize(dogcells))];
|
||||
if(valence() != 3 || isNeighbor(dog1, dog2)) {
|
||||
dog1->monst = moHunterGuard;
|
||||
dog1->stuntime = 0;
|
||||
dog1->landparam = 0;
|
||||
dog2->monst = moHunterGuard;
|
||||
dog2->stuntime = 0;
|
||||
dog2->landparam = 1;
|
||||
break;
|
||||
}
|
||||
@ -2078,7 +2086,9 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
}
|
||||
else if(isize(dogcells)) {
|
||||
c->item = itHunting;
|
||||
dogcells[hrand(isize(dogcells))]->monst = moHunterGuard;
|
||||
cell *dog = dogcells[hrand(isize(dogcells))];
|
||||
dog->monst = moHunterGuard;
|
||||
dog->stuntime = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2339,6 +2349,8 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
if(c2->monst || c2->wall) return;
|
||||
c1->monst = moPair;
|
||||
c2->monst = moPair;
|
||||
c1->stuntime = 0;
|
||||
c2->stuntime = 0;
|
||||
c1->mondir = neighborId(c1, c2);
|
||||
c2->mondir = neighborId(c2, c1);
|
||||
}
|
||||
@ -3016,6 +3028,8 @@ EX void setdist(cell *c, int d, cell *from) {
|
||||
if(d < BARLEV) brownian::apply_futures(c);
|
||||
#endif
|
||||
|
||||
if(!c->monst) c->stuntime = 0;
|
||||
|
||||
giantLandSwitch(c, d, from);
|
||||
|
||||
if(d == min(reduced_barlev, 9)) moreBigStuff(c);
|
||||
|
@ -4683,7 +4683,7 @@ Orb("Recall", "Návratu")
|
||||
S("When the charges on this Orb expire, "
|
||||
"you will be automatically returned to the place where you have found it. "
|
||||
"Extra Orbs of Recall delay this without changing the recall location. "
|
||||
"Pick up an Orb of Safety causes an immediate recall.",
|
||||
"Picking up an Orb of Safety causes an immediate recall.",
|
||||
|
||||
"Když vyprší náboje této Sféry, automaticky se vrátíš tam, kde jsi ji našel. "
|
||||
"Pokud sebereš více Sfér Návratu, místo návratu se nezmění -- návrat se pouze "
|
||||
|
@ -4593,7 +4593,7 @@ Orb("Recall", "Powrotu")
|
||||
S("When the charges on this Orb expire, "
|
||||
"you will be automatically returned to the place where you have found it. "
|
||||
"Extra Orbs of Recall delay this without changing the recall location. "
|
||||
"Pick up an Orb of Safety causes an immediate recall.",
|
||||
"Picking up an Orb of Safety causes an immediate recall.",
|
||||
|
||||
"Kiedy skończą się ładunki tej Sfery, automatycznie wracasz do "
|
||||
"miejsca, w którym ją znalazłeś. Dodatkowe Sfery Powrotu "
|
||||
|
@ -4678,7 +4678,7 @@ Orb("Recall", "Powrotu")
|
||||
S("When the charges on this Orb expire, "
|
||||
"you will be automatically returned to the place where you have found it. "
|
||||
"Extra Orbs of Recall delay this without changing the recall location. "
|
||||
"Pick up an Orb of Safety causes an immediate recall.",
|
||||
"Picking up an Orb of Safety causes an immediate recall.",
|
||||
|
||||
"Kiedy skończą się ładunki tej Sfery, automatycznie wracasz do "
|
||||
"miejsca, w którym ją znalazłeś. Dodatkowe Sfery Powrotu "
|
||||
|
@ -4731,7 +4731,7 @@ Orb("Recall", "Возвращения")
|
||||
S("When the charges on this Orb expire, "
|
||||
"you will be automatically returned to the place where you have found it. "
|
||||
"Extra Orbs of Recall delay this without changing the recall location. "
|
||||
"Pick up an Orb of Safety causes an immediate recall.",
|
||||
"Picking up an Orb of Safety causes an immediate recall.",
|
||||
|
||||
"Когда заряды этой сферы заканчиваются, вы автоматически возвращаетесь "
|
||||
"в место, где вы её нашли. Дополнительные сферы откладывают этот момент, "
|
||||
|
@ -866,6 +866,7 @@ EX void destroyTrapsOn(cell *c) {
|
||||
if(c->wall == waArrowTrap) {
|
||||
changes.ccell(c);
|
||||
c->wall = waNone;
|
||||
drawParticles(c, 0xFF0000, 4);
|
||||
destroyTrapsAround(c);
|
||||
}
|
||||
}
|
||||
|
@ -527,10 +527,12 @@ EX void wandering() {
|
||||
forCellCM(c3, c2) if(c3->monst || c3->wall != waSea)
|
||||
goto notfound;
|
||||
c2->monst = moKrakenH;
|
||||
c2->stuntime = 0;
|
||||
playSeenSound(c2);
|
||||
for(int i=0; i<c2->type; i++) {
|
||||
c2->move(i)->monst = moKrakenT;
|
||||
c2->move(i)->hitpoints = 1;
|
||||
c2->move(i)->stuntime = 0;
|
||||
c2->move(i)->mondir = c2->c.spin(i);
|
||||
}
|
||||
goto found;
|
||||
@ -597,7 +599,7 @@ EX void wandering() {
|
||||
if (hrand(10) || peace::on)
|
||||
c->monst = moRedTroll;
|
||||
else if (!pseudohept(c))
|
||||
c->monst = moHexSnake;
|
||||
c->monst = moHexSnake, c->hitpoints = 1;
|
||||
}
|
||||
|
||||
else if(c->land == laCaves && wchance(items[itGold], 5))
|
||||
|
2
orbs.cpp
2
orbs.cpp
@ -602,6 +602,7 @@ EX void teleportTo(cell *dest) {
|
||||
playSound(dest, "other-teleport");
|
||||
if(dest->monst) {
|
||||
cwt.at->monst = dest->monst;
|
||||
cwt.at->stuntime = dest->stuntime;
|
||||
dest->monst = moNone;
|
||||
}
|
||||
|
||||
@ -1074,6 +1075,7 @@ void poly_attack(cell *dest) {
|
||||
|
||||
void placeIllusion(cell *c) {
|
||||
c->monst = moIllusion;
|
||||
c->stuntime = 0;
|
||||
useupOrb(itOrbIllusion, 5);
|
||||
addMessage(XLAT("You create an Illusion!"));
|
||||
bfs();
|
||||
|
@ -569,6 +569,10 @@ void apply_chaos() {
|
||||
if(!items[itOrbChaos] || chaos_forbidden(ca) || chaos_forbidden(cb)) return;
|
||||
if(ca && is_paired(ca->monst)) killMonster(ca, moPlayer);
|
||||
if(cb && is_paired(cb->monst)) killMonster(cb, moPlayer);
|
||||
destroyTrapsOn(ca);
|
||||
destroyTrapsOn(cb);
|
||||
if (ca->wall == waStone) destroyTrapsAround(ca);
|
||||
if (cb->wall == waStone) destroyTrapsAround(cb);
|
||||
changes.ccell(ca);
|
||||
changes.ccell(cb);
|
||||
gcell coa = *ca;
|
||||
@ -945,7 +949,7 @@ void pcmove::tell_why_impassable() {
|
||||
if(vmsg(miRESTRICTED))
|
||||
blowaway_message(c2);
|
||||
}
|
||||
else if(isAlch(c2)) {
|
||||
else if(anti_alchemy(c2, cwt.at)) {
|
||||
if(vmsg(miRESTRICTED))
|
||||
addMessage(XLAT("Wrong color!"));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user