mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-07-28 00:12:23 +01:00
Merge https://github.com/Chris-plus-alphanumericgibberish/dNAO into 2023.05.15
This commit is contained in:
commit
add6255627
14 changed files with 77 additions and 46 deletions
|
@ -2340,6 +2340,7 @@ E void FDECL(gods_angry,(int));
|
|||
E void FDECL(gods_upset,(int));
|
||||
E void FDECL(angrygods,(int));
|
||||
E boolean NDECL(maybe_god_gives_gift);
|
||||
E void NDECL(pacify_goat_faction);
|
||||
E int NDECL(dosacrifice);
|
||||
E void FDECL(at_your_feet, (const char *));
|
||||
E boolean FDECL(can_pray, (BOOLEAN_P));
|
||||
|
|
|
@ -648,7 +648,7 @@
|
|||
|| (ptr)->mtyp == PM_GHAELE_ELADRIN || (ptr)->mtyp == PM_LUMINOUS_CLOUD\
|
||||
|| (ptr)->mtyp == PM_PYROCLASTIC_VORTEX)
|
||||
#define is_storm_mon(mon) ((is_level_storm_mtyp((mon)->data) && (mon)->m_lev >= 20) || is_storm_mtyp((mon)->data))
|
||||
#define is_dancer(ptr) ((ptr)->mtyp == PM_PORO_AULON || (ptr)->mtyp == PM_SEYLL_AUZKOVYN || (ptr)->mtyp == PM_ANULO_DANCER)
|
||||
#define is_dancer(ptr) ((ptr)->mtyp == PM_PORO_AULON || (ptr)->mtyp == PM_SEYLL_AUZKOVYN || (ptr)->mtyp == PM_ANULO_DANCER || (ptr)->mtyp == PM_MYRKALFAR_MATRON)
|
||||
|
||||
#define goat_monster(ptr) (In_lost_cities(&u.uz) ? lost_cities_goat_monster(ptr) : always_goat_monster(ptr))
|
||||
#define always_goat_monster(ptr) (\
|
||||
|
@ -900,11 +900,11 @@
|
|||
#define nospellcooldowns_mon(mtmp) (nospellcooldowns((mtmp)->data) || (is_alabaster_mummy((mtmp)->data) && (mtmp)->mvar_syllable == SYLLABLE_OF_THOUGHT__NAEN))
|
||||
#define is_lord(ptr) (((ptr)->mflagsg & MG_LORD) != 0L)
|
||||
#define is_prince(ptr) (((ptr)->mflagsg & MG_PRINCE) != 0L)
|
||||
#define is_ndemon(ptr) (is_demon(ptr) && \
|
||||
#define is_normal_demon(ptr) (is_demon(ptr) && \
|
||||
(((ptr)->mflagsg & (MG_LORD|MG_PRINCE)) == 0L))
|
||||
#define is_dlord(ptr) (is_demon(ptr) && is_lord(ptr))
|
||||
#define is_dprince(ptr) (is_demon(ptr) && is_prince(ptr))
|
||||
#define is_dnoble(ptr) (is_demon(ptr) && (is_lord(pa) || is_prince(pa)))
|
||||
#define is_dnoble(ptr) (is_demon(ptr) && (is_lord(ptr) || is_prince(ptr)))
|
||||
#define is_minion(ptr) ((ptr)->mflagsa & MA_MINION)
|
||||
#define likes_gold(ptr) (((ptr)->mflagst & MT_GREEDY) != 0L)
|
||||
#define likes_gems(ptr) (((ptr)->mflagst & MT_JEWELS) != 0L)
|
||||
|
|
|
@ -507,6 +507,7 @@ struct obj {
|
|||
#define SPEC_BONUS 0x0000040L
|
||||
#define SPEC_DESTRUCTOR 0x0000080L
|
||||
#define SPEC_MARIONETTE 0x0000100L
|
||||
#define SPEC_HYPO 0x0000200L
|
||||
|
||||
// flags for use with readobjnam()
|
||||
#define WISH_QUIET 0x0000001L
|
||||
|
|
|
@ -4424,6 +4424,10 @@ int * truedmgptr;
|
|||
bmod = (otmp->wrathdata&0x3L)+1;
|
||||
*plusdmgptr += bmod*basedmg / 4;
|
||||
}
|
||||
if(magr){
|
||||
bmod = min_ints(4, (*hpmax(magr)-*hp(magr)+mlev(magr))*4/(*hpmax(magr)));
|
||||
*plusdmgptr += bmod*basedmg / 4;
|
||||
}
|
||||
}
|
||||
if(youdef ? (u.ualign.type != A_CHAOTIC) : (sgn(mdef->data->maligntyp) >= 0)){
|
||||
if(check_oprop(otmp, OPROP_ANARW))
|
||||
|
|
|
@ -2852,12 +2852,12 @@ boolean dumping;
|
|||
CHECK_ACHIEVE(CASTLE_WISH,"Completed the castle")
|
||||
CHECK_ACHIEVE(ILLUMIAN,"Became illuminated")
|
||||
CHECK_ACHIEVE(RESCUE,"Lead an exodus")
|
||||
CHECK_ACHIEVE(FULL_LOADOUT,"Super Fighting Robot: fully upgraded a clockwork automata")
|
||||
CHECK_ACHIEVE(FULL_LOADOUT,"Super Fighting Robot: fully upgraded a clockwork automaton")
|
||||
CHECK_ACHIEVE(NIGHTMAREHUNTER,"Hunter of Nightmares")
|
||||
CHECK_ACHIEVE(QUITE_MAD,"Quite Mad: Suffered six madnesses")
|
||||
CHECK_ACHIEVE(TOTAL_DRUNK,"Booze Hound")
|
||||
CHECK_ACHIEVE(BOKRUG_QUEST,"Detestable gods: Completed Bokrug's ascension ritual")
|
||||
CHECK_ACHIEVE(IEA_UPGRADES,": 15+ upgrades on a set of imperial elven armor")
|
||||
CHECK_ACHIEVE(IEA_UPGRADES,"The Elfdalorian: 15+ upgrades on a set of imperial elven armor")
|
||||
if(achieve.get_kroo) put_enl("Kroo's Bling (Acquire the dismal swamp completion prize)");
|
||||
if(achieve.get_raggo) put_enl("Pet Rock (Acquire the gnomish mines completion prize)");
|
||||
if(achieve.get_poplar) put_enl("Punishing Poplars (Acquire the black forest completion prize)");
|
||||
|
|
|
@ -14542,7 +14542,7 @@ int faction;
|
|||
if (mitem) (void) mongets(mtmp, mitem, mkobjflags);
|
||||
|
||||
if(in_mklev) {
|
||||
if(((is_ndemon(ptr)) ||
|
||||
if(((is_normal_demon(ptr)) ||
|
||||
(mndx == PM_WUMPUS) ||
|
||||
(mndx == PM_LONG_WORM) ||
|
||||
(mndx == PM_GIANT_EEL)) && !u.uhave.amulet && rn2(5))
|
||||
|
|
|
@ -62,12 +62,12 @@ struct permonst * ptr; /* summon as though you were <X> */
|
|||
} else if (is_dprince(ptr) || (ptr->mtyp == PM_WIZARD_OF_YENDOR)) {
|
||||
dtype = (!rn2(20)) ? dprince(ptr, atyp) :
|
||||
(!rn2(4)) ? dlord(ptr, atyp) : ndemon(atyp);
|
||||
cnt = (!rn2(4) && is_ndemon(&mons[dtype])) ? 2 : 1;
|
||||
cnt = (!rn2(4) && is_normal_demon(&mons[dtype])) ? 2 : 1;
|
||||
} else if (is_dlord(ptr)) {
|
||||
dtype = (!rn2(50)) ? dprince(ptr, atyp) :
|
||||
(!rn2(20)) ? dlord(ptr, atyp) : ndemon(atyp);
|
||||
cnt = (!rn2(4) && is_ndemon(&mons[dtype])) ? 2 : 1;
|
||||
} else if (is_ndemon(ptr)) {
|
||||
cnt = (!rn2(4) && is_normal_demon(&mons[dtype])) ? 2 : 1;
|
||||
} else if (is_normal_demon(ptr)) {
|
||||
dtype = (!rn2(20) && Inhell) ? dlord(ptr, atyp) :
|
||||
((mons[monsndx(ptr)].geno & G_UNIQ) || !rn2(6)) ? ndemon(atyp) : monsndx(ptr);
|
||||
cnt = 1;
|
||||
|
@ -683,7 +683,7 @@ aligntyp atyp;
|
|||
|
||||
for (tryct = 0; tryct < 20; tryct++) {
|
||||
ptr = mkclass(S_DEMON, G_NOHELL|G_HELL);
|
||||
if (ptr && is_ndemon(ptr) &&
|
||||
if (ptr && is_normal_demon(ptr) &&
|
||||
(atyp == A_NONE || sgn(ptr->maligntyp) == sgn(atyp)))
|
||||
return(monsndx(ptr));
|
||||
}
|
||||
|
|
|
@ -3571,7 +3571,8 @@ maid_clean(mon, obj)
|
|||
* The input obj may be deleted in the process.
|
||||
* Based on the implementation of add_to_container.
|
||||
*/
|
||||
struct obj *add_to_magic_chest(struct obj *obj,int key)
|
||||
struct obj *
|
||||
add_to_magic_chest(struct obj *obj,int key)
|
||||
{
|
||||
struct obj *otmp;
|
||||
|
||||
|
@ -3612,6 +3613,7 @@ add_to_container(container, obj)
|
|||
obj->ocontainer = container;
|
||||
obj->nobj = container->cobj;
|
||||
container->cobj = obj;
|
||||
container->owt = weight(container);
|
||||
return (obj);
|
||||
}
|
||||
|
||||
|
|
|
@ -662,7 +662,8 @@ boolean digest_meal;
|
|||
healup += 3;
|
||||
else if((!mon->mcan && free_android(mtmp->data))
|
||||
|| mtmp->mtyp == PM_MYRKALFR || mtmp->mtyp == PM_MYRKALFAR_WARRIOR
|
||||
|| mtmp->mtyp == PM_ARCADIAN_AVENGER
|
||||
|| mtmp->mtyp == PM_ARCADIAN_AVENGER || mtmp->mtyp == PM_PORO_AULON
|
||||
|| mtmp->mfaction == EILISTRAEE_SYMBOL
|
||||
|| (mtmp->mtyp == PM_ELVENKING && mtmp->mfaction == QUEST_FACTION)
|
||||
|| (is_drow(mtmp->data) && mtmp->mtame && mon->mtame)
|
||||
)
|
||||
|
@ -1619,7 +1620,7 @@ register struct monst *mtmp;
|
|||
return 0;
|
||||
}
|
||||
|
||||
if(mtmp->mtyp == PM_PORO_AULON
|
||||
if((mtmp->mtyp == PM_PORO_AULON || mtmp->mtyp == PM_ALIDER)
|
||||
&& !mtmp->mcan && !mtmp->mspec_used
|
||||
&& !(noactions(mtmp))
|
||||
&& !(mindless_mon(mtmp))
|
||||
|
|
|
@ -520,7 +520,7 @@ find_good_fring()
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* find the object index for a non-polymorph iron ring */
|
||||
/* find the object index for a non-polymorph diamond (adamant) or silver ring */
|
||||
int
|
||||
find_good_wring()
|
||||
{
|
||||
|
@ -539,7 +539,7 @@ find_good_wring()
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* find the object index for a non-polymorph iron ring */
|
||||
/* find the object index for a non-polymorph sapphire or brass ring */
|
||||
int
|
||||
find_good_aring()
|
||||
{
|
||||
|
|
38
src/pray.c
38
src/pray.c
|
@ -1583,6 +1583,27 @@ lawful_god_gives_angel()
|
|||
god_gives_pet(align_to_god(A_LAWFUL));
|
||||
}
|
||||
|
||||
void
|
||||
pacify_goat_faction()
|
||||
{
|
||||
struct monst *mtmp;
|
||||
for(mtmp = migrating_mons; mtmp; mtmp = mtmp->nmon){
|
||||
if(mtmp->mux == u.uz.dnum && mtmp->muy == u.uz.dlevel && (mtmp->mtyp == PM_BLESSED || mtmp->mtyp == PM_MOUTH_OF_THE_GOAT || has_template(mtmp, MISTWEAVER))){
|
||||
mtmp->mpeaceful = 1;
|
||||
set_malign(mtmp);
|
||||
}
|
||||
}
|
||||
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon){
|
||||
if(mtmp->mfaction == GOATMOM_FACTION){
|
||||
if(u.ustuck == mtmp)
|
||||
expels(mtmp, mtmp->data, TRUE);
|
||||
mtmp->mpeaceful = 1;
|
||||
set_malign(mtmp);
|
||||
newsym(mtmp->mx, mtmp->my);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
dosacrifice()
|
||||
{
|
||||
|
@ -4005,22 +4026,7 @@ int eatflag;
|
|||
|
||||
/* direct offerings make all goat-aligned creatures on the level peaceful. This intentionally happens before the holy-symbol check. */
|
||||
if(eatflag == GOAT_EAT_OFFERED) {
|
||||
struct monst *mtmp;
|
||||
for(mtmp = migrating_mons; mtmp; mtmp = mtmp->nmon){
|
||||
if(mtmp->mux == u.uz.dnum && mtmp->muy == u.uz.dlevel && (mtmp->mtyp == PM_BLESSED || mtmp->mtyp == PM_MOUTH_OF_THE_GOAT || has_template(mtmp, MISTWEAVER))){
|
||||
mtmp->mpeaceful = 1;
|
||||
set_malign(mtmp);
|
||||
}
|
||||
}
|
||||
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon){
|
||||
if(mtmp->mfaction == GOATMOM_FACTION){
|
||||
if(u.ustuck == mtmp)
|
||||
expels(mtmp, mtmp->data, TRUE);
|
||||
mtmp->mpeaceful = 1;
|
||||
set_malign(mtmp);
|
||||
newsym(mtmp->mx, mtmp->my);
|
||||
}
|
||||
}
|
||||
pacify_goat_faction();
|
||||
}
|
||||
/* the player must carry a holy symbol to gain credit. Chance to give one, if missing. return early */
|
||||
if(!has_object_type(invent, HOLY_SYMBOL_OF_THE_BLACK_MOTHE)){
|
||||
|
|
|
@ -1021,7 +1021,7 @@ struct monst * mon;
|
|||
verbalize("You're such a %s; I wish...",
|
||||
flags.female ? "sweet lady" : "nice guy");
|
||||
/* unbind Enki. (unless you refused a demon lord) */
|
||||
if (!is_ndemon(mon->data))
|
||||
if (is_normal_demon(mon->data))
|
||||
if(u.sealsActive&SEAL_ENKI) unbind(SEAL_ENKI,TRUE);
|
||||
break;
|
||||
}
|
||||
|
|
22
src/sounds.c
22
src/sounds.c
|
@ -2531,11 +2531,16 @@ humanoid_sound:
|
|||
if((ptr->mtyp == PM_PRIESTESS || ptr->mtyp == PM_DEMINYMPH)
|
||||
&& has_template(mtmp, MISTWEAVER)
|
||||
){
|
||||
if(mtmp->mtame && has_object_type(invent, HOLY_SYMBOL_OF_THE_BLACK_MOTHE) && !u.shubbie_atten){
|
||||
godlist[GOD_THE_BLACK_MOTHER].anger = 0;
|
||||
u.shubbie_atten = 1;
|
||||
if(mtmp->mtame && has_object_type(invent, HOLY_SYMBOL_OF_THE_BLACK_MOTHE)){
|
||||
if(!u.shubbie_atten){
|
||||
godlist[GOD_THE_BLACK_MOTHER].anger = 0;
|
||||
u.shubbie_atten = 1;
|
||||
}
|
||||
if(godlist[GOD_THE_BLACK_MOTHER].anger == 0){
|
||||
pacify_goat_faction();
|
||||
}
|
||||
}
|
||||
switch(rn2(7)){
|
||||
switch(rn2(10)){
|
||||
case 0:
|
||||
verbl_msg = "Ia! Shub-Niggurath! The Goat with a Thousand Young!";
|
||||
break;
|
||||
|
@ -2555,6 +2560,15 @@ humanoid_sound:
|
|||
case 6:
|
||||
verbl_msg = "Ia!";
|
||||
break;
|
||||
case 7:
|
||||
verbl_msg = "Solve et coagula!";
|
||||
break;
|
||||
case 8:
|
||||
verbl_msg = "We stand on the brink of a strange world.";
|
||||
break;
|
||||
case 9:
|
||||
verbl_msg = "She shall spawn and spawn again!";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else switch (monsndx(ptr)) {
|
||||
|
|
22
src/weapon.c
22
src/weapon.c
|
@ -1015,6 +1015,7 @@ struct monst *magr;
|
|||
int spe_mult = 1; // enchantment spe_mult
|
||||
struct permonst *ptr; // defender's permonst
|
||||
struct weapon_dice wdice; // weapon dice of otmp
|
||||
boolean affect_state = !(spec&SPEC_HYPO); // hit is not hypothetical and so should affect game state
|
||||
boolean Is_weapon = (otmp->oclass == WEAPON_CLASS || is_weptool(otmp)), youdefend = mon == &youmonst;
|
||||
boolean add_dice = TRUE; // should dmgval_core() be called to add damage? Overridden (to false) by some special cases.
|
||||
// if (!mon) ptr = &mons[NUMMONS];
|
||||
|
@ -1116,7 +1117,7 @@ struct monst *magr;
|
|||
case DOUBLE_LIGHTSABER:
|
||||
case ROD_OF_FORCE:
|
||||
// drain charge on lightsabers
|
||||
if (litsaber(otmp) && !((otmp->oartifact == ART_ATMA_WEAPON && otmp == uwep && !Drain_resistance) ||
|
||||
if (affect_state && litsaber(otmp) && !((otmp->oartifact == ART_ATMA_WEAPON && otmp == uwep && !Drain_resistance) ||
|
||||
otmp->oartifact == ART_INFINITY_S_MIRRORED_ARC))
|
||||
{
|
||||
otmp->age -= 100;
|
||||
|
@ -1131,7 +1132,8 @@ struct monst *magr;
|
|||
{
|
||||
wdice.oc_damd += 3 * (otmp->spe);
|
||||
// drain charge on future-tech powered weapons
|
||||
otmp->ovar1_charges--;
|
||||
if(affect_state)
|
||||
otmp->ovar1_charges--;
|
||||
}
|
||||
break;
|
||||
case VIBROBLADE:
|
||||
|
@ -1147,7 +1149,7 @@ struct monst *magr;
|
|||
case FORCE_SWORD:
|
||||
case FORCE_WHIP:
|
||||
// drain charge on future-tech powered weapons
|
||||
if (otmp->ovar1_charges)
|
||||
if (affect_state && otmp->ovar1_charges)
|
||||
otmp->ovar1_charges--;
|
||||
break;
|
||||
case DOUBLE_FORCE_BLADE:
|
||||
|
@ -1162,7 +1164,7 @@ struct monst *magr;
|
|||
spe_mult *= 2;
|
||||
}
|
||||
// drain charge on future-tech powered weapons
|
||||
if (otmp->ovar1_charges)
|
||||
if (affect_state && otmp->ovar1_charges)
|
||||
otmp->ovar1_charges--;
|
||||
break;
|
||||
}
|
||||
|
@ -1211,7 +1213,7 @@ struct monst *magr;
|
|||
|
||||
/* lightsaber forms */
|
||||
if (is_lightsaber(otmp) && (otmp == uwep || (u.twoweap && otmp == uswapwep))){
|
||||
if (activeFightingForm(FFORM_MAKASHI) && otmp == uwep && !u.twoweap){
|
||||
if (activeFightingForm(FFORM_MAKASHI) && affect_state && otmp == uwep && !u.twoweap){
|
||||
switch (min(P_SKILL(P_MAKASHI), P_SKILL(weapon_type(otmp)))){
|
||||
case P_BASIC:
|
||||
if (mon->ustdym<5) mon->ustdym += 1;
|
||||
|
@ -1380,7 +1382,7 @@ int spot;
|
|||
(mtmp->misc_worn_check & W_ARMG || !hates_unblessed_mon(mtmp) || (is_unholy(otmp) || otmp->blessed))
|
||||
){
|
||||
if (!obest ||
|
||||
(dmgval(otmp, 0 /*zeromonst*/, 0, mtmp) > dmgval(obest, 0 /*zeromonst*/,0, mtmp))
|
||||
(dmgval(otmp, 0 /*zeromonst*/, SPEC_HYPO, mtmp) > dmgval(obest, 0 /*zeromonst*/, SPEC_HYPO, mtmp))
|
||||
/*
|
||||
(is_bludgeon(otmp) ?
|
||||
(otmp->spe - greatest_erosion(otmp) > obest->spe - greatest_erosion(obest)):
|
||||
|
@ -1404,7 +1406,7 @@ struct monst *mtmp;
|
|||
(!otmp->oartifact || touch_artifact(otmp, mtmp, FALSE)))
|
||||
{
|
||||
if (!obest ||
|
||||
dmgval(otmp, 0 /*zeromonst*/, 0, mtmp) > dmgval(obest, 0 /*zeromonst*/,0, mtmp))
|
||||
dmgval(otmp, 0 /*zeromonst*/, SPEC_HYPO, mtmp) > dmgval(obest, 0 /*zeromonst*/, SPEC_HYPO, mtmp))
|
||||
obest = otmp;
|
||||
}
|
||||
}
|
||||
|
@ -1494,7 +1496,7 @@ struct obj *otmp;
|
|||
if (throws_rocks(mtmp->data) && is_boulder(wep)) return FALSE;
|
||||
if (throws_rocks(mtmp->data) && is_boulder(otmp)) return TRUE;
|
||||
|
||||
if(wep->otyp == otmp->otyp) return dmgval(otmp, 0 /*zeromonst*/, 0, mtmp) > dmgval(wep, 0 /*zeromonst*/, 0, mtmp);
|
||||
if(wep->otyp == otmp->otyp) return dmgval(otmp, 0 /*zeromonst*/, SPEC_HYPO, mtmp) > dmgval(wep, 0 /*zeromonst*/, SPEC_HYPO, mtmp);
|
||||
|
||||
if(wep->otyp == ARM_BLASTER) return FALSE;
|
||||
if(wep->otyp == CARCOSAN_STING) return (otmp->otyp == ARM_BLASTER && otmp->ovar1_charges > 0);
|
||||
|
@ -1524,7 +1526,7 @@ struct obj *otmp;
|
|||
if ( wep &&
|
||||
wep->otyp == rwep[i] &&
|
||||
!(otmp->otyp == rwep[i] &&
|
||||
(dmgval(otmp, 0 /*zeromonst*/, 0, mtmp) > dmgval(wep, 0 /*zeromonst*/, 0, mtmp))))
|
||||
(dmgval(otmp, 0 /*zeromonst*/, SPEC_HYPO, mtmp) > dmgval(wep, 0 /*zeromonst*/, SPEC_HYPO, mtmp))))
|
||||
return FALSE;
|
||||
if (otmp->otyp == rwep[i]) return TRUE;
|
||||
}
|
||||
|
@ -1935,7 +1937,7 @@ struct obj *otmp;
|
|||
if ( wep &&
|
||||
wep->otyp == hwep[i] &&
|
||||
!(otmp->otyp == hwep[i] &&
|
||||
dmgval(otmp, 0 /*zeromonst*/, 0, mtmp) > dmgval(wep, 0 /*zeromonst*/, 0, mtmp)))
|
||||
dmgval(otmp, 0 /*zeromonst*/, SPEC_HYPO, mtmp) > dmgval(wep, 0 /*zeromonst*/, SPEC_HYPO, mtmp)))
|
||||
return FALSE;
|
||||
if (otmp->otyp == hwep[i]) return TRUE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue