Comments (5)
Looks like there are two components to this (using scroll of wishing as an example because it also behaves this way):
- The
Wish
function in game.cpp callsDefaultQuestion
, which passesAllowExit=false
toStringQuestion
. A parameter could be added to theDefaultQuestion
function to setAllowExit
and pass it along, or it could just be set to true as the default, though this may cause problems with certain questions (such as forced polycontrol, though you do have the option of transforming into a human to avoid polymorphing). Wish
(as well as scroll of detect material and probably other prompts usingDefaultQuestion
) run infinite loops until good input is received, so even allowing exit with ESC will just call the question again unless the function has a case added to handle an aborted prompt.
from ivan.
Ah, forgot to test scrolls of wishing. And yes the forced polycontrol question is annoying too. Also commandsystem::SummonMonster
and the "What material do you want to wish for?"
part in SoCM seem to be unescapable (although entering an invalid material in SoCM makes it go back to choosing the item that's escapable). Should we make all these five escapable?
iosystem::StringQuestion
has already implemented the possibility to abort so we could just make use of it in game::StringQuestion
and its call site.
from ivan.
Of the 5 calls to DefaultQuestion
in the code:
- Scroll of Change Material
- Scroll of Detect Material
- Wishing
- PolyControl
- Summoning monsters in Wizard mode.
The only one that I can see causing issues is the wishing, since this applies to scrolls as well as fountains and genies; if a player cancels a genie's wish it would be gone, so non-scroll wishes shouldn't be escapable.
Aside from that I'm all for the others being escapable.
from ivan.
I can't think of any reason for them not to be. I know I've experienced that before and it annoyed me. I say remove them except the non-scroll wishes!
from ivan.
Sounds good. I'm working on this right now. Pull request incoming… soon.
from ivan.
Related Issues (20)
- Bone files from Aslona appearing in GC HOT 1
- The message "You feel the cold breeze of death" doesn't appear HOT 1
- Wishing for wand of polymorph doesn't work
- Compiling in Ubuntu 20.04 with an SDL2 error HOT 2
- Make linux binaries HOT 1
- Infinite recursion with dummy sound system HOT 2
- Werewolf diet
- Add alternate graphics to main menu
- Flaming material spills
- Floodfill on Pangea HOT 1
- Vomiting during Sumo Wrestling HOT 1
- Building on postmarketOS (Alpine) on aarch64 hardware HOT 21
- GitHub Action for OSX HOT 3
- Multiple problems related to sound support HOT 1
- String question crash HOT 5
- XBRz multithread? HOT 1
- Crash after attacking with a weapon coated with raw liquefied magic
- Dismantling provides more material than what you started with HOT 1
- v0.59 Crash on start MacOS Big Sur 11.3.1 HOT 4
- Fix code scanning alert - Potentially overrunning write with float to string conversion
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ivan.