Allow starting game as pauper, without any inventory

And also without spells, skills, or preidentified items.
This also implies nudist.

Breaks saves and bones.
This commit is contained in:
Pasi Kallinen
2024-08-29 20:51:09 +03:00
parent 1595b682cf
commit e645c0b4bb
9 changed files with 31 additions and 3 deletions

View File

@@ -2061,6 +2061,8 @@ show_conduct(int final)
you_have_been("deaf from birth");
if (u.uroleplay.nudist)
you_have_been("faithfully nudist");
if (u.uroleplay.pauper)
enl_msg(You_, "have gone", "started out", " without possessions", "");
if (!u.uconduct.food)
enl_msg(You_, "have gone", "went", " without food", "");

View File

@@ -5172,6 +5172,10 @@ optfn_boolean(
/* After the change */
switch (optidx) {
case opt_pauper:
/* pauper implies nudist */
u.uroleplay.nudist = u.uroleplay.pauper;
break;
case opt_ascii_map:
iflags.wc_tiled_map = negated;
break;

View File

@@ -596,6 +596,7 @@ encode_extended_conducts(char *buf)
add_achieveX(buf, "blind", u.uroleplay.blind);
add_achieveX(buf, "deaf", u.uroleplay.deaf);
add_achieveX(buf, "nudist", u.uroleplay.nudist);
add_achieveX(buf, "pauper", u.uroleplay.pauper);
add_achieveX(buf, "bonesless", !flags.bones);
add_achieveX(buf, "petless", !u.uconduct.pets);

View File

@@ -559,6 +559,8 @@ static const struct def_skill Skill_W[] = {
staticfn void
knows_object(int obj)
{
if (u.uroleplay.pauper)
return;
discover_object(obj, TRUE, FALSE);
objects[obj].oc_pre_discovered = 1; /* not a "discovery" */
}
@@ -571,6 +573,9 @@ knows_class(char sym)
struct obj odummy, *o;
int ct;
if (u.uroleplay.pauper)
return;
odummy = cg.zeroobj;
odummy.oclass = sym;
o = &odummy; /* for use in various obj.h macros */
@@ -1213,6 +1218,9 @@ ini_inv(struct trobj *trop)
int otyp;
boolean got_sp1 = FALSE; /* got a level 1 spellbook? */
if (u.uroleplay.pauper) /* pauper gets no items */
return;
while (trop->trclass) {
otyp = (int) trop->trotyp;
if (otyp != UNDEF_TYP) {