Git Product home page Git Product logo

Comments (5)

 avatar commented on September 14, 2024

Looks like there are two components to this (using scroll of wishing as an example because it also behaves this way):

  1. The Wish function in game.cpp calls DefaultQuestion, which passes AllowExit=false to StringQuestion. A parameter could be added to the DefaultQuestion function to set AllowExit 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).
  2. Wish (as well as scroll of detect material and probably other prompts using DefaultQuestion) 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.

emlai avatar emlai commented on September 14, 2024

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.

 avatar commented on September 14, 2024

Of the 5 calls to DefaultQuestion in the code:

  1. Scroll of Change Material
  2. Scroll of Detect Material
  3. Wishing
  4. PolyControl
  5. 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.

andrewtweber avatar andrewtweber commented on September 14, 2024

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.

emlai avatar emlai commented on September 14, 2024

Sounds good. I'm working on this right now. Pull request incoming… soon.

from ivan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.