mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-01-09 21:09:03 +00:00
ru:: hallucinations based on fake stuff
This commit is contained in:
@@ -828,4 +828,17 @@ struct fire_missile : public missile {
|
||||
bool hit_by_missile(missile *m) override { return m->freezing(); }
|
||||
};
|
||||
|
||||
struct vision : public entity {
|
||||
string text, name;
|
||||
string sglyph;
|
||||
color_t col;
|
||||
string glyph() override { return sglyph; }
|
||||
color_t color() override { return col; }
|
||||
string get_name() override { return name; }
|
||||
string get_help() override { return text; }
|
||||
xy siz() { return {1, 1}; }
|
||||
};
|
||||
|
||||
vector<unique_ptr<vision>> visions;
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ void prepare_hallucination() {
|
||||
visions.push_back(&*e);
|
||||
}
|
||||
|
||||
for(auto& e: rogue_unlike::visions) visions.push_back(&*e);
|
||||
|
||||
for(auto& [c, r]: rooms) for(auto& e: r.entities) {
|
||||
e->hallucinated = hrand_elt(visions);
|
||||
}
|
||||
|
||||
@@ -309,6 +309,15 @@ void load_room(fhstream& f, cell *c) {
|
||||
b->hint_text = scanline_noblank(f);
|
||||
r.entities.emplace_back(std::move(b));
|
||||
}
|
||||
else if(cap == "VISION") {
|
||||
auto b = std::make_unique<vision>();
|
||||
b->col = get_color();
|
||||
s = scanline_noblank(f);
|
||||
b->sglyph = s[0];
|
||||
b->name = s.substr(1);
|
||||
b->text = scanline_noblank(f);
|
||||
visions.emplace_back(std::move(b));
|
||||
}
|
||||
else println(hlog, "unknown mapline ", s);
|
||||
}
|
||||
else println(hlog, "unknown mapline ", s);
|
||||
|
||||
@@ -2676,4 +2676,13 @@ GUINEAPIG Luy 395 105 .25 1
|
||||
GUINEAPIG Muy 448 23 .25 1
|
||||
GUINEAPIG Nuy 463 104 .25 1
|
||||
GUINEAPIG Puy 418 259 .25 1
|
||||
VISION FF8080FF
|
||||
Dancient red dragon
|
||||
A huge fire-breathing reptile. Run away!
|
||||
VISION 80FF80FF
|
||||
Dancient green dragon
|
||||
A huge poison-breathing reptile. Run away!
|
||||
VISION 8080FFFF
|
||||
Dancient blue dragon
|
||||
A huge lightning-breathing reptile. Run away!
|
||||
OK
|
||||
|
||||
Reference in New Issue
Block a user