From de21dd4173c6b6525a8479e3970f76e731ed7829 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 16 Apr 2026 12:39:31 +0200 Subject: [PATCH] ru:: arena doors --- rogueviz/ru/globals.cpp | 5 ++++- rogueviz/ru/ru.cpp | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/rogueviz/ru/globals.cpp b/rogueviz/ru/globals.cpp index ad2214f2..97d8b354 100644 --- a/rogueviz/ru/globals.cpp +++ b/rogueviz/ru/globals.cpp @@ -64,7 +64,9 @@ enum eWall { wSecretPassageHHidden, wSecretPassageH, wSign, wWallSign, wTimeDoor, wBottomSpike, wRogueWallHidden, wRogueWall, wRightSlope, wLeftSlope, wLeftSlopedRoof, wRightSlopedRoof, - wWeakWall, wStrangeSign, wWalkSpikes, wHyperBouncy, wGUARD }; + wWeakWall, wStrangeSign, wWalkSpikes, wHyperBouncy, + wArenaDoor, + wGUARD }; flagtype W_BLOCK = 1; flagtype W_TRANS = 2; @@ -134,6 +136,7 @@ ruwall walls[qwall] = { {"strange sign", "X", 0x90909080, W_TRANS, "A strange sign is drawn in the background."}, {"walkable spikes", "|", 0xC08080FF, W_TRANS | W_PAIN_DOWN, "You can walk through these spikes, but falling into them would hurt."}, {"hyper-bouncy wall", "#", 0xC04040FF, W_BLOCK | W_BOUNCY | W_HYPERBOUNCY, "Like walls, but things really bounce off them."}, + {"arena door", "+", 0x50A000FF, W_BLOCK, "You need to defeat all monsters here to open this door."} }; int sel = 1; diff --git a/rogueviz/ru/ru.cpp b/rogueviz/ru/ru.cpp index a7d013f4..0631fa6b 100644 --- a/rogueviz/ru/ru.cpp +++ b/rogueviz/ru/ru.cpp @@ -162,6 +162,18 @@ void playing_frame() { for(auto& e: ents) if(!e->destroyed) *(mb++) = std::move(e); ents.resize(mb - ents.begin()); + int enemies = 0; + for(auto& e: ents) if(e->as_enemy() && e->existing) enemies++; + if(enemies > 0) { + walls[wArenaDoor].glyph = '+'; + walls[wArenaDoor].flags = W_BLOCK | W_BLOCKBIRD; + } + else { + walls[wArenaDoor].glyph = '\''; + walls[wArenaDoor].flags = W_TRANS; + } + + for(auto &e: new_entities) ents.push_back(std::move(e)); new_entities.clear();