ComputerScienceHouse / bingehack4

A replacement for bingehack. For information about in-game features and changes:
https://github.com/ComputerScienceHouse/bingehack4/wiki
Other
17 stars 8 forks source link

Implement amulet of change title. #23

Closed wxsBSD closed 11 years ago

wxsBSD commented 11 years ago

Only blessed amulets allow you to change your title. Uncursed and cursed amulets do nothing. Once you have a custom title the only way to change it is to get another blessed amulet of change title.

wxsBSD commented 11 years ago

This very well might break existing save games.

eatnumber1 commented 11 years ago

Doesn't really matter until release to CSH.

clockfort commented 11 years ago

Doesn't work for me; I cannot wish for one in Wizard Mode.

eatnumber1 commented 11 years ago

How much harder will this make the game; how less likely will it be to get an actually useful amulet?

clockfort commented 11 years ago

Nevermind, I'm retarded, I just had to "make clean", because the dependencies aren't quite right in our buildsystem. Testing it now.

clockfort commented 11 years ago

It doesn't appreciate when you make bigger-than-the-buffer sized titles.

The amulet glows. What do you want to be called?                               
 Clockfort the Ultimate Warrior in All of the Lands                             
Program received signal SIGSEGV, Segmentation fault.
0x0000000000485de9 in Amulet_on () at /home/clockfort/bingehack4/libnethack/src/do_wear.c:597
597     }                                                                        
Missing separate debuginfos, use: debuginfo-install glibc-2.17-1.fc19.x86_64 jansson-2.4-1.fc18.x86_64 ncurses-libs-5.9-7.20121017.fc18.x86_64 zlib-1.2.7-9.fc18.x86_64e amulet.  
(gdb) bt
#0  0x0000000000485de9 in Amulet_on ()
    at /home/clockfort/bingehack4/libnethack/src/do_wear.c:597                   
#1  0x6e614c2065687420 in ?? ()                                                  
#2  0x0000002000007364 in ?? ()                                                  
#3  0x00000000009e79f0 in ?? ()                                                  
#4  0x00000000009b7020 in ?? ()                                                  
#5  0x0000000000000001 in ?? ()                                                  
#6  0x0000003c80228d50 in _nc_globals () from /lib64/libtinfo.so.5               
#7  0x0000003c70216ca6 in wnoutrefresh () from /lib64/libncursesw.so.5           
#8  0x0000000000488b9a in dowear (                                               
    otmp=<error reading variable: Cannot access memory at address 0x1ffffd638>)  
    at /home/clockfort/bingehack4/libnethack/src/do_wear.c:1349                  
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
wxsBSD commented 11 years ago

ESP and poison each drop by ten to make room for this. I'm open to picking different amulets and numbers if desired.

I tested a long title, will try later tonight and get back to you.

clockfort commented 11 years ago

I'm fine with the choice of amulet generation percentages.

eatnumber1 commented 11 years ago

Given that amulets are already hard to identify without a scroll of identify, and that it's not significantly affecting the probability of getting a different / more useful amulet, I'm fine with it too.

wxsBSD commented 11 years ago

Sorry, wasn't thinking and had set buf to be TITLESZ big, instead of the standard BUFSZ. My test wasn't long enough to smash something important on the stack. Should be fixed now.

clockfort commented 11 years ago

Awesome! A rebased single-commit version of your code has been merged as of 467c6ac104ad677bb39553421e47e973dba1ed38.