mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-08-28 00:12:18 +00:00
ru:: trap circle now detects secret doors
This commit is contained in:
parent
10877afd3b
commit
c7a40edb66
@ -266,11 +266,25 @@ void man::draw() {
|
||||
|
||||
if(m.current.detect_area > 0) {
|
||||
ld r = inverse_wvolarea_auto(m.current.detect_area);
|
||||
auto h0 = to_hyper(m.where);
|
||||
auto T = eupush(h0);
|
||||
for(int a=0; a<=360; a++) {
|
||||
auto h = from_hyper(eupush(to_hyper(m.where)) * xspinpush0(a*1._deg, r));
|
||||
auto h = from_hyper(T * xspinpush0(a*1._deg, r));
|
||||
curvepoint(eupush(h.x, h.y) * C0);
|
||||
}
|
||||
vid.linewidth *= 3;
|
||||
queuecurve(scrm, 0x800080, 0, PPR::LINE);
|
||||
vid.linewidth /= 3;
|
||||
current_room->bfs(xy_to_block(m.where), [&] (intxy xy) {
|
||||
if(hdist(h0, block_to_hyper(xy)) > r) return false;
|
||||
if(!current_room->fov[xy.y][xy.x]) return false;
|
||||
auto what = current_room->at(xy);
|
||||
if(what == wRogueWallHidden) {
|
||||
current_room->replace_block_frev(xy, wRogueWall);
|
||||
addMessage("You discover a secret door!");
|
||||
}
|
||||
return bool(walls[what].flags & W_TRANS);
|
||||
});
|
||||
}
|
||||
|
||||
if(m.current.detect_cross > 0) for(int d: {0, 1, 2, 3}) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user