Major amnesia revamp
Instead of forgetting maps and objects, make amnesia forget skills. Forgetting maps and objects could be circumvented with taking notes, or by using an external tool to remember the forgotten levels. Forgetting skills allows the player to optionally go down another skill path, if they trained the wrong weapon in the early game. Amnesia still forgets spells. As a replacement for the deja vu messages when entering a forgotten level, those messages will now indicate a ghost with your own name existing on the level, given only when the level is entered for the first time. These changes based on fiqhack, with some adjustments.
This commit is contained in:
39
src/weapon.c
39
src/weapon.c
@@ -1373,6 +1373,45 @@ int n; /* number of slots to lose; normally one */
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
drain_weapon_skill(n)
|
||||
int n; /* number of skills to drain */
|
||||
{
|
||||
int skill;
|
||||
int i;
|
||||
int tmpskills[P_NUM_SKILLS];
|
||||
int tmpidx = 0;
|
||||
|
||||
(void) memset((genericptr_t) tmpskills, 0, sizeof(tmpskills));
|
||||
|
||||
while (--n >= 0) {
|
||||
if (u.skills_advanced) {
|
||||
/* Pick a random skill, deleting it from the list. */
|
||||
i = rn2(u.skills_advanced);
|
||||
skill = u.skill_record[i];
|
||||
tmpskills[skill] = 1;
|
||||
for (; i < u.skills_advanced - 1; i++) {
|
||||
u.skill_record[i] = u.skill_record[i + 1];
|
||||
}
|
||||
u.skills_advanced--;
|
||||
if (P_SKILL(skill) <= P_UNSKILLED)
|
||||
panic("drain_weapon_skill (%d)", skill);
|
||||
P_SKILL(skill)--; /* drop skill one level */
|
||||
/* refund slots used for skill */
|
||||
u.weapon_slots += slots_required(skill);
|
||||
/* drain a random proportion of skill training */
|
||||
if (P_ADVANCE(skill))
|
||||
P_ADVANCE(skill) = rn2(P_ADVANCE(skill));
|
||||
}
|
||||
}
|
||||
|
||||
for (skill = 0; skill < P_NUM_SKILLS; skill++)
|
||||
if (tmpskills[skill]) {
|
||||
You("forget %syour training in %s.",
|
||||
P_SKILL(skill) >= P_BASIC ? "some of " : "", P_NAME(skill));
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
weapon_type(obj)
|
||||
struct obj *obj;
|
||||
|
||||
Reference in New Issue
Block a user