Add confirmation for waiting 100 turns


Although the central place for design discussion is ##crawl-dev on freenode, some may find it helpful to discuss requests and suggestions here first.

Ziggurat Zagger

Posts: 4432

Joined: Friday, 8th May 2015, 17:51

Post Wednesday, 29th August 2018, 06:58

Add confirmation for waiting 100 turns

It is common to press 5 after a fight to restore HP/MP. Often it requires more than 100 turns to restore them or your rest is interrupted by some event (form ends, you are poisoned etc.) so players have to press 5 again. Sometimes it results in pressing 5 accidentally so you waste 100 turns of food/piety.
I suggest to add a confirmation "Are you sure you want to rest while having max HP/MP? (y/N)" since it is rare that player actually wants to do it (just waiting for monsters to wonder away from door/stairs, I think).
Underestimated: cleaving, Deep Elf, Formicid, Vehumet, EV
Overestimated: AC, GDS
Twin account of Sandman25

For this message the author VeryAngryFelid has received thanks:
Bleyddyn

Ziggurat Zagger

Posts: 8786

Joined: Sunday, 5th May 2013, 08:25

Post Wednesday, 29th August 2018, 07:42

Re: Add confirmation for waiting 100 turns

Pressing 5 with full HP/MP should wait for 1 turn but retain the current interruption behaviour. So if you want to wait until a monster comes around a corner or whatever, you can mash 5 or hold down 5, and it'll stop once the monster shows up. Then accidentally pressing it at full HP/MP will throw away just 1 turn of piety instead of 100, which is no worse than accidentally pressing a movement key.

There are many situations where you do want to wait for a super long time, usually involving stairs or characters without piety decay, so perhaps another key should be dedicated to that (yeah, you can make a macro for 01005 but most players don't know how to do that). But the rest key shouldn't punish you so hard for accidentally pressing it when you don't need to rest.

For this message the author duvessa has received thanks: 3
nago, Sprucery, Stairdancer

Crypt Cleanser

Posts: 720

Joined: Friday, 6th September 2013, 09:17

Post Thursday, 30th August 2018, 11:41

Re: Add confirmation for waiting 100 turns

100 turns is "hard punishment"? What?

Dungeon Master

Posts: 250

Joined: Thursday, 27th November 2014, 19:12

Post Thursday, 30th August 2018, 17:21

Re: Add confirmation for waiting 100 turns

You can achieve this with clua and your RC file like so:

  Code:
macros += M 5 ===smartfive

<
  function smartfive()
    hp, mhp = you.hp()
    mp, mmp = you.mp()

    if hp ~= mhp or mp ~= mmp or crawl.yesno("Really rest when healed?",
true, "N") then
      crawl.do_commands({"CMD_REST"})
    end
  end
>


Using the
  Code:
you.status()
function (documentation at http://lua.dcss.xyz) you can add exceptions to skip the prompt if you're under certain status effects in addition to checking for full hp.

For this message the author ebering has received thanks: 2
Bleyddyn, Turukano

Lair Larrikin

Posts: 17

Joined: Friday, 16th March 2018, 19:22

Post Thursday, 30th August 2018, 17:29

Re: Add confirmation for waiting 100 turns

ebering wrote:You can achieve this with clua and your RC file like so:



Thanks for the link to the lua documentation! Do you know of a tutorial on how to get started with lua in DCSS? Even looking at your simple example I'm not sure where to put the code and/or macro entry.

Dungeon Master

Posts: 250

Joined: Thursday, 27th November 2014, 19:12

Post Thursday, 30th August 2018, 17:38

Re: Add confirmation for waiting 100 turns

You put the Lua in your init.txt/.crawlrc file, which is where crawl reads it from. Beyond the API documentation I don't know of any other good documents. You can look around on tavern, and read elliptic's qw bot (written entirely in crawl Lua).

In preparing an answer for this thread I've noticed that the documented behavior isn't 100% correct for ch_start_running and ch_stop_running (or perhaps their implementation is currently broken, hard to say). There are probably other inaccuracies or vagaries in the documentation. If you spot some let me know.

For this message the author ebering has received thanks:
Bleyddyn

Lair Larrikin

Posts: 17

Joined: Friday, 16th March 2018, 19:22

Post Thursday, 30th August 2018, 19:05

Re: Add confirmation for waiting 100 turns

ebering wrote:You put the Lua in your init.txt/.crawlrc file, which is where crawl reads it from. Beyond the API documentation I don't know of any other good documents. You can look around on tavern, and read elliptic's qw bot (written entirely in crawl Lua).

In preparing an answer for this thread I've noticed that the documented behavior isn't 100% correct for ch_start_running and ch_stop_running (or perhaps their implementation is currently broken, hard to say). There are probably other inaccuracies or vagaries in the documentation. If you spot some let me know.



Thanks! That worked. Not quite what I want for my transmuters, but a good place for me to start.

Return to Game Design Discussion

Who is online

Users browsing this forum: No registered users and 92 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.