1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-04-08 01:20:42 +01:00

Undead hunters improve at least 3 skill caps to expert over the course of the game

One existing cap of skilled is chosen and improved to expert.

If there is an uh weapon of that skill with a paired weapon of another skill, the second skill may be improved as well
-"may": if there is also an uh weapon of that skill with NO paired skill, the second may not be improved. If there are two paired weapons with different skills, only one will be improved.

These improvements are handed out at the same time the smithing skill is improved ("The knowledge from the crystal sinks into your subconscious.").
-1 (pair) of skills is chosen when improving smithing from basic to skilled with a twin columnar crystal.
-2 more (pairs) of skills are chose when improving smithing from skilled to expert with a chunk or mass.
--If the first improvement is skipped (via enchant weapon/armor scrolls) all three improvents are handed out when improving smithing from basic->expert.
This commit is contained in:
ChrisANG 2025-01-11 19:28:58 -05:00
parent 4fe5b04f4d
commit 46a8a7a2c3

View file

@ -402,6 +402,80 @@ get_blood_smithing_x(int oprop, struct obj **crystal, int *spellnum)
return FALSE;
}
void
expert_undead_hunter_skill()
{
int count = 0;
int skill;
for(skill = P_FIRST_WEAPON; skill <= P_LAST_WEAPON; skill++){
if(OLD_P_MAX_SKILL(skill) == P_SKILLED)
count++;
}
if(!count)
return; //Apparently upgraded all skills to expert via other means
count = rn2(count);
for(skill = P_FIRST_WEAPON; skill <= P_LAST_WEAPON; skill++){
if(OLD_P_MAX_SKILL(skill) == P_SKILLED){
if(count) count--;
else {
expert_weapon_skill(skill);
if(skill == P_DAGGER){
static const int complements[] = {P_SHORT_SWORD, P_SABER};
expert_weapon_skill(ROLL_FROM(complements));
}
else if(skill == P_SHORT_SWORD){
static const int complements[] = {P_DAGGER, P_HAMMER};
expert_weapon_skill(ROLL_FROM(complements));
}
else if(skill == P_TWO_HANDED_SWORD){
expert_weapon_skill(P_LONG_SWORD);
}
else if(skill == P_SCIMITAR){
expert_weapon_skill(P_BOW);
}
else if(skill == P_SABER){
if(rn2(2))
expert_weapon_skill(P_DAGGER);
}
else if(skill == P_HAMMER){
expert_weapon_skill(P_SHORT_SWORD);
}
else if(skill == P_SPEAR){
expert_weapon_skill(P_HARVEST);
}
else if(skill == P_BOW){
expert_weapon_skill(P_SCIMITAR);
}
else if(skill == P_WHIP){
expert_weapon_skill(P_LONG_SWORD);
}
else if(skill == P_HARVEST){
if(rn2(2))
expert_weapon_skill(P_SPEAR);
}
else if(skill == P_CLUB){
if(rn2(2))
expert_weapon_skill(P_FLAIL);
}
else if(skill == P_FLAIL){
expert_weapon_skill(P_CLUB);
}
else if(skill == P_MACE){
if(rn2(2))
expert_weapon_skill(P_PICK_AXE);
}
else if(skill == P_PICK_AXE){
if(rn2(2))
expert_weapon_skill(P_MACE);
else
expert_weapon_skill(P_SHORT_SWORD);
}
return;
}
}
}
}
void
smithing_object(struct obj *obj)
{
@ -620,9 +694,14 @@ smithing_object(struct obj *obj)
if(crystal->spe == 2 && OLD_P_MAX_SKILL(P_SMITHING) < P_SKILLED){
pline("The knowledge from the crystal sinks into your subconscious.");
skilled_weapon_skill(P_SMITHING);
expert_undead_hunter_skill();
}
else if(crystal->spe > 2 && OLD_P_MAX_SKILL(P_SMITHING) < P_EXPERT){
pline("The knowledge from the crystal sinks into your subconscious.");
if(OLD_P_MAX_SKILL(P_SMITHING) < P_SKILLED)
expert_undead_hunter_skill();
expert_undead_hunter_skill();
expert_undead_hunter_skill();
expert_weapon_skill(P_SMITHING);
}
}