mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-09-27 13:48:15 +00:00
reg3:: Camelot
This commit is contained in:
parent
c556d21434
commit
a5a9104abf
@ -271,7 +271,7 @@ EX heptagon *createAlternateMap(cell *c, int rad, hstate firststate, int special
|
|||||||
alt->c7 = NULL;
|
alt->c7 = NULL;
|
||||||
alt->alt = alt;
|
alt->alt = alt;
|
||||||
if(reg3::in_rule()) {
|
if(reg3::in_rule()) {
|
||||||
reg3::link_structures(h, alt);
|
reg3::link_structures(h, alt, firststate);
|
||||||
if(alt->fiftyval == -1) return nullptr; /* unlinked */
|
if(alt->fiftyval == -1) return nullptr; /* unlinked */
|
||||||
}
|
}
|
||||||
h->alt = alt;
|
h->alt = alt;
|
||||||
@ -1486,11 +1486,11 @@ EX void buildBigStuff(cell *c, cell *from) {
|
|||||||
buildBarrier4(c, bd, 0, getNewLand(c->land), c->land); */
|
buildBarrier4(c, bd, 0, getNewLand(c->land), c->land); */
|
||||||
}
|
}
|
||||||
|
|
||||||
if((!chaosmode) && bearsCamelot(c->land) && is_master(c) && !bt::in() && !(hyperbolic && WDIM == 3) &&
|
if((!chaosmode) && bearsCamelot(c->land) && is_master(c) && !bt::in() && !(hyperbolic && WDIM == 3 && !reg3::in_rule()) &&
|
||||||
(quickfind(laCamelot) || peace::on || (hrand(I2000) < (c->land == laCrossroads4 ? 800 : 200) && horo_ok() &&
|
(quickfind(laCamelot) || peace::on || (hrand(I2000) < (c->land == laCrossroads4 ? 800 : 200) && horo_ok() &&
|
||||||
items[itEmerald] >= U5 && !tactic::on && !racing::on))) {
|
items[itEmerald] >= U5 && !tactic::on && !racing::on))) {
|
||||||
int rtr = newRoundTableRadius();
|
int rtr = newRoundTableRadius();
|
||||||
heptagon *alt = createAlternateMap(c, rtr+14, hsOrigin);
|
heptagon *alt = createAlternateMap(c, rtr+(hyperbolic && WDIM == 3 ? 11 : 14), hsOrigin);
|
||||||
if(alt) {
|
if(alt) {
|
||||||
alt->emeraldval = rtr;
|
alt->emeraldval = rtr;
|
||||||
alt->fiftyval = c->land;
|
alt->fiftyval = c->land;
|
||||||
@ -1584,7 +1584,9 @@ EX bool openplains(cell *c) {
|
|||||||
|
|
||||||
EX void buildCamelotWall(cell *c) {
|
EX void buildCamelotWall(cell *c) {
|
||||||
if(S3 >= OINF) { c->wall = waRubble; return; }
|
if(S3 >= OINF) { c->wall = waRubble; return; }
|
||||||
|
if(WDIM == 3 && hyperbolic && c->master->fieldval == 0) return;
|
||||||
c->wall = waCamelot;
|
c->wall = waCamelot;
|
||||||
|
if(WDIM == 3 && hyperbolic) return;
|
||||||
for(int i=0; i<c->type; i++) {
|
for(int i=0; i<c->type; i++) {
|
||||||
cell *c2 = createMov(c, i);
|
cell *c2 = createMov(c, i);
|
||||||
if(c2->wall == waNone && (eubinary || (c2->master->alt && c->master->alt)) && celldistAlt(c2) > celldistAlt(c) && c2->monst == moNone)
|
if(c2->wall == waNone && (eubinary || (c2->master->alt && c->master->alt)) && celldistAlt(c2) > celldistAlt(c) && c2->monst == moNone)
|
||||||
|
11
reg3.cpp
11
reg3.cpp
@ -1140,11 +1140,14 @@ EX hrmap *new_alt_map(heptagon *o) {
|
|||||||
return new hrmap_reg3_rule_alt(o);
|
return new hrmap_reg3_rule_alt(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
EX void link_structures(heptagon *h, heptagon *alt) {
|
EX void link_structures(heptagon *h, heptagon *alt, hstate firststate) {
|
||||||
alt->fieldval = h->fieldval;
|
|
||||||
alt->fiftyval = h->fiftyval;
|
|
||||||
vector<int> choices;
|
|
||||||
auto cm = (hrmap_reg3_rule*) currentmap;
|
auto cm = (hrmap_reg3_rule*) currentmap;
|
||||||
|
alt->fieldval = h->fieldval;
|
||||||
|
if(firststate == hsOrigin) {
|
||||||
|
alt->fiftyval = cm->root[alt->fieldval];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
vector<int> choices;
|
||||||
for(auto p: cm->nonlooping_earlier_states)
|
for(auto p: cm->nonlooping_earlier_states)
|
||||||
if(p.first.first == h->fieldval)
|
if(p.first.first == h->fieldval)
|
||||||
choices.push_back(p.first.second);
|
choices.push_back(p.first.second);
|
||||||
|
Loading…
Reference in New Issue
Block a user