1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-05-04 14:25:11 +01:00

Cane, church hammer, and church blade minor abilities

The cane and whip help you recover sanity at high insight
-Use the "wrong" form on a target: the cane vs. targets with no armor and the whip vs. demons.
-Insight% chance to maybe (1/10, 1/32, or 1/100) regen a san point per hit, based on the normal san thresholds but with effective wisdom further modified by the cane's enchantment.

Church hammers banish summoned monsters (+10x insight damage per hit, easily getting into +several-hundred damage)

HMS and Church blades have guidance effects and are further boosted by an equipped guidance thought.
This commit is contained in:
ChrisANG 2024-10-20 10:51:10 -04:00
parent ff59178300
commit d0360445b7
6 changed files with 63 additions and 11 deletions

View file

@ -21,6 +21,7 @@ E char *FDECL(fmt_ptr, (const genericptr,char *));
/* ### allmain.c ### */
E int FDECL(you_action_cost, (int, boolean));
E int NDECL(san_threshhold);
E void NDECL(moveloop);
E void NDECL(stop_occupation);
E void NDECL(display_gamewindows);

View file

@ -936,6 +936,9 @@ struct obj {
(otmp)->otyp == CROW_QUILL || \
(otmp)->otyp == SET_OF_CROW_TALONS || \
(otmp)->otyp == MOON_AXE || \
(otmp)->otyp == CANE || \
(otmp)->otyp == WHIP_SAW || \
(otmp)->otyp == CHURCH_HAMMER || \
(otmp)->otyp == ISAMUSEI || \
(otmp)->otyp == DISKOS || \
(otmp)->otyp == PINCER_STAFF || \

View file

@ -1397,19 +1397,13 @@ you_regen_pw()
}
}
/* perform 1 turn's worth of time-dependent sanity modification, silently */
void
you_regen_san()
int
san_threshhold()
{
// Threshold levels based on wis.
int reglevel = ACURR(A_WIS);
int insight = u.uinsight;
if(u.veil && In_depths(&u.uz)){
u.veil = FALSE;
change_uinsight(1);
}
// role bonuses
if (Role_if(PM_BARBARIAN)) reglevel += 10;
if (Role_if(PM_VALKYRIE)) reglevel += 9;
@ -1501,6 +1495,20 @@ you_regen_san()
// penalty for being itchy
reglevel -= u_healing_penalty();
return reglevel;
}
/* perform 1 turn's worth of time-dependent sanity modification, silently */
void
you_regen_san()
{
if(u.veil && In_depths(&u.uz)){
u.veil = FALSE;
change_uinsight(1);
}
int reglevel = san_threshhold();
// minimum 0
if (reglevel <= 0)

View file

@ -5284,6 +5284,29 @@ boolean direct_weapon;
mdef->mstdy += rnd(u.uinsight/5);
}
}
//Banishes summoned monsters
if(otmp->otyp == CHURCH_HAMMER && !youdef && mdef && get_mx(mdef, MX_ESUM)){
*truedmgptr += 10*u.uinsight;
}
//Flogging raises sanity (note: this is "backwards" on purpose)
if((otmp->otyp == CANE && !youdef && mdef && is_serration_vulnerable(mdef) && u.uinsight >= rnd(100))
|| (otmp->otyp == WHIP_SAW && !youdef && mdef && hates_holy_mon(mdef) && u.uinsight >= rnd(100))
){
int reglevel = san_threshhold() + otmp->spe;
if(u.usanity < reglevel){
if(rn2(10) < basedmg)
change_usanity(1, FALSE);
}
else if(u.usanity < reglevel*2){
if(rn2(32) < basedmg)
change_usanity(1, FALSE);
}
else if(u.usanity < reglevel*3){
if(rn2(100) < basedmg)
change_usanity(1, FALSE);
}
}
if(otmp->otyp == ISAMUSEI && u.uinsight >= 10 && !on_level(&spire_level,&u.uz) && mdef){
if(youdef || !resist(mdef, WEAPON_CLASS, 0, TRUE)){
int factor = 20;

View file

@ -177,7 +177,7 @@ doread()
}
return MOVE_READ;
} else if(scroll->oartifact == ART_HOLY_MOONLIGHT_SWORD && scroll->lamplit){
/* Note: you can see the blade even when blid */
/* Note: you can see the blade even when blind */
if(u.uinsight < 2) {
pline("The glowing cyan blade is decorated with faint curves.");
}

View file

@ -15506,8 +15506,25 @@ int vis; /* True if action is at all visible to the player */
int returnvalue = 0;
boolean artif_hit = FALSE;
/* use guidance glyph */
if (youagr && melee && active_glyph(GUIDANCE))
doguidance(mdef, basedmg);
if (youagr && melee){
if(active_glyph(GUIDANCE))
doguidance(mdef, basedmg);
if(weapon){
if(weapon->oartifact == ART_HOLY_MOONLIGHT_SWORD){
if(u.uinsight >= 40)
doguidance(mdef, active_glyph(GUIDANCE) ? basedmg : basedmg/2);
else if(active_glyph(GUIDANCE)){
doguidance(mdef, (u.uinsight*basedmg)/40);
}
else {
doguidance(mdef, (u.uinsight*basedmg)/80);
}
}
else if(weapon->otyp == CHURCH_BLADE && u.uinsight >= 40){
doguidance(mdef, active_glyph(GUIDANCE) ? basedmg/2 : basedmg/4);
}
}
}
/* hits with a valid weapon proc effects of the weapon */
if (valid_weapon_attack) {
otmp = weapon;