1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-08-11 15:11:41 +01:00

Implement the rest of the ent properties I think?

This commit is contained in:
demogorgon22 2022-07-15 17:52:34 -04:00
parent 359524c084
commit 747b2ec2c2
9 changed files with 19 additions and 5 deletions

View file

@ -96,7 +96,7 @@
|| species == ENT_CEDAR || species == ENT_ELDER || species == ENT_ELM || species == ENT_FIR || species == ENT_LARCH \
|| species == ENT_GINKGO || species == ENT_MAPLE || species == ENT_OAK || species == ENT_YEW))
#define is_powerful_build_ent(ptr, species) (is_ent(ptr) && (species == ENT_BLUEGUM || species == ENT_CHESTNUT || species == ENT_GINGKO \
#define is_powerful_build_ent(ptr, species) (is_ent(ptr) && (species == ENT_BLUEGUM || species == ENT_CHESTNUT || species == ENT_GINKGO \
|| species == ENT_LOCUST || species == ENT_MAGNOLIA || species == ENT_OAK || species == ENT_REDWOOD))
#define is_spry_ent(ptr, species) (is_ent(ptr) && (species == ENT_CYPRESS || species == ENT_FIR || species == ENT_POPLAR || species == ENT_SPRUCE || species == ENT_DOGWOOD || species == ENT_ELM))

View file

@ -351,7 +351,7 @@ struct you {
#define ENT_ELDER 8
#define ENT_ELM 9
#define ENT_FIR 10
#define ENT_GINGKO 11
#define ENT_GINKGO 11
#define ENT_LARCH 12
#define ENT_LOCUST 13
#define ENT_MAGNOLIA 14

View file

@ -40,7 +40,7 @@
#define NCold_resistance (species_resists_cold(&youmonst) || \
ward_at(u.ux,u.uy) == BRAND_OF_ITHAQUA)
#define Cold_resistance (HCold_resistance || ECold_resistance || NCold_resistance)
#define InvCold_resistance (ECold_resistance || Preservation || ward_at(u.ux,u.uy) == BRAND_OF_ITHAQUA)
#define InvCold_resistance (ECold_resistance || Preservation || ward_at(u.ux,u.uy) == BRAND_OF_ITHAQUA || (HCold_resistance&FROMRACE && is_coniferous_ent(youracedata, u.ent_species)))
#define HSleep_resistance u.uprops[SLEEP_RES].intrinsic
#define ESleep_resistance u.uprops[SLEEP_RES].extrinsic

View file

@ -861,6 +861,9 @@ you_regen_hp()
// Healer role bonus
if (Role_if(PM_HEALER) && !Upolyd)
reglevel += 10;
// fast healing ent bonus applies after all others
if(is_fast_healing_ent(youracedata, u.ent_species))
reglevel *= 2;
// penalty for being itchy
reglevel -= u_healing_penalty();

View file

@ -1349,6 +1349,7 @@ boolean check;
if(Role_if(PM_ANACHRONOUNBINDER)) return;
int starting_sanity = u.usanity;
int starting_insanity = Insanity;
if(delta < 0 && is_decidious_ent(youracedata, u.ent_species)) delta /= 2;
if(discover || wizard)
pline("Sanity change: %d + %d", u.usanity, delta);
u.usanity += delta;

View file

@ -1639,7 +1639,7 @@ int species;
return "elm";
case ENT_FIR:
return "fir";
case ENT_GINGKO:
case ENT_GINKGO:
return "gingko";
case ENT_LARCH:
return "larch";

View file

@ -1679,6 +1679,9 @@ int howmuch;
}
if (Punished) u.bc_felt = 0; /* forget felt ball&chain */
if(is_decidious_ent(youracedata, u.ent_species))
howmuch /= 2;
forget_map(howmuch);
forget_traps();

View file

@ -1677,7 +1677,7 @@ set_ent_species(){
case ENT_DOGWOOD:
HFast |= FROMRACE;
break;
case ENT_GINGKO:
case ENT_GINKGO:
HPoison_resistance |= FROMRACE;
break;
case ENT_METHUSELAH:
@ -1687,6 +1687,8 @@ set_ent_species(){
HWeldproof |= FROMRACE;
break;
}
if(is_coniferous_ent(youracedata, u.ent_species))
HCold_resistance |= FROMRACE;
}

View file

@ -15058,6 +15058,11 @@ int vis; /* True if action is at all visible to the player */
}
}
}
/**/
if(youagr && !youdef && !thrown && is_beautiful_scent_ent(youracedata, u.ent_species) && !breathless_mon(mdef) && !rn2(5)){
pline("A sweet scent washes over %s.", mon_nam(mdef));
mdef->encouraged = max(-u.ulevel, mdef->encouraged - rnd(1+ u.ulevel/7));
}
/* jousting -- message, break lance */
if (jousting) {
/* message */