1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2024-11-21 16:55:06 +00:00
notnotdnethack/include/xhity.h
Ron Nazarov 7dd65d4260
New race: octopode
Based on http://crawl.chaosforge.org/Octopode to some extent.

-Can wear 8 rings.
--Extra rings fall off if polymorphed.
--Not a valid polymorph form, but it should work.
-Can be wizards, rogues, pirates, acus, or binders.
-Attribute caps:
 Str   Int Wis Dex Con Cha
 18/** 20  18  20  16  16
-Special spell: poison spray.
--Not very useful since they don't have a special way of learning it.
-Human HP and energy growth.
-Radius-2 low light vision.
-Medium sized.  Can wear barded helmets and soft hats, cloaks, dragon
 scales (not scale mail) and waistcloths, shields.
-Extra 1d8 tentacle wrap attack that can drown if over water.
-+level/10 bonus to natural DR and +level/2 bonus to natural AC, to
 compensate for being unable to wear most armour.
--Rings of protection can also compensate, but unlike in DCSS they
  need to be identified and charged first.
-Starts with stone resistance, poison resistance, stealth, swimming,
 magical breathing, waterproofing.
--Stone resistance because it would be unplayable otherwise (no
  gloves).
--Waterproof so swimming is usable.
-Immune to heart-piercing and bisection vorpality (doesn't have any
 special effect) and being ripped apart by Demogorgon (does double damage
 instead).
--Immunity to heart piercing vorpality could be explained by octopodes
  having 3 hearts, but the real reason for this is that they can't wear
  armour that would protect them.
-Weldproof because I didn't implement interactions of curses with
 being able to wear 8 rings.  Unlike the other intrinsics, this is
 only provided from form (you will lose it if you polymorph).
-Immune to glib because of their suckers (and because I didn't
 implement how being able to wear 8 rings interacts with it).
-Can't have rings put on by seduction because I didn't implement it.

Also:
-Parasitized androids are weldproof.
-Enlightenment message for white hlf waterproofing.
2024-04-12 14:30:52 +01:00

81 lines
5.3 KiB
C

#ifndef XHITY_H
#define XHITY_H
/* macros to unify player and monster */
#define x(mon) ((mon)==&youmonst ? u.ux : (mon)->mx)
#define y(mon) ((mon)==&youmonst ? u.uy : (mon)->my)
#define trapped(mon) ((mon)==&youmonst ? u.utrap : (mon)->mtrapped)
#define cantmove(mon) ((mon)==&youmonst ? (multi<0 || u.usleep) : helpless((mon)))
#define mlev(mon) ((mon)==&youmonst ? (Upolyd ? mons[u.umonnum].mlevel : u.ulevel) : (mon)->m_lev)
#define hp(mon) ((mon)==&youmonst ? (Upolyd ? &(u.mh) : &(u.uhp)) : &((mon)->mhp))
#define hpmax(mon) ((mon)==&youmonst ? (Upolyd ? &(u.mhmax) : &(u.uhpmax)) : &((mon)->mhpmax))
#define Fire_res(mon) ((mon)==&youmonst ? Fire_resistance : resists_fire((mon)))
#define InvFire_res(mon) (((mon)==&youmonst ? InvFire_resistance : resists_fire((mon))) || ward_at(x((mon)),y((mon))) == SIGIL_OF_CTHUGHA)
#define UseInvFire_res(mon) (InvFire_res(mon) || check_res_engine(mon, AD_FIRE))
#define Cold_res(mon) ((mon)==&youmonst ? Cold_resistance : resists_cold((mon)))
#define InvCold_res(mon) (((mon)==&youmonst ? InvCold_resistance : resists_cold((mon))) || ward_at(x((mon)),y((mon))) == BRAND_OF_ITHAQUA)
#define UseInvCold_res(mon) (InvCold_res(mon) || check_res_engine(mon, AD_COLD))
#define Shock_res(mon) ((mon)==&youmonst ? Shock_resistance : resists_elec((mon)))
#define InvShock_res(mon) (((mon)==&youmonst ? InvShock_resistance : resists_elec((mon))) || ward_at(x((mon)),y((mon))) == TRACERY_OF_KARAKAL)
#define UseInvShock_res(mon) (InvShock_res(mon) || check_res_engine(mon, AD_ELEC))
#define Acid_res(mon) ((mon)==&youmonst ? Acid_resistance : resists_acid((mon)))
#define InvAcid_res(mon) ((mon)==&youmonst ? InvAcid_resistance : resists_acid((mon)))
#define UseInvAcid_res(mon) (InvAcid_res(mon) || check_res_engine(mon, AD_ACID))
#define Sleep_res(mon) ((mon)==&youmonst ? Sleep_resistance : resists_sleep((mon)))
#define Disint_res(mon) ((mon)==&youmonst ? Disint_resistance : resists_disint((mon)))
#define Poison_res(mon) ((mon)==&youmonst ? Poison_resistance : resists_poison((mon)))
#define Drain_res(mon) ((mon)==&youmonst ? Drain_resistance : resists_drli((mon)))
#define Sick_res(mon) ((mon)==&youmonst ? Sick_resistance : resists_sickness((mon)))
#define Stone_res(mon) ((mon)==&youmonst ? Stone_resistance : resists_ston((mon)))
#define Magic_res(mon) ((mon)==&youmonst ? Antimagic : resists_magm((mon)))
#define Dark_res(mon) ((mon)==&youmonst ? Dark_immune : dark_immune((mon)))
#define Dark_vuln(mon) ((mon)==&youmonst ? Mortal_race : mortal_race((mon)))
#define Half_phys(mon) ((mon)==&youmonst ? Half_physical_damage : mon_resistance((mon), HALF_PHDAM))
#define Half_spel(mon) ((mon)==&youmonst ? Half_spell_damage : mon_resistance((mon), HALF_SPDAM))
#define Change_res(mon) ((mon)==&youmonst ? Unchanging : mon_resistance((mon), UNCHANGING))
#define Breathless_res(mon) ((mon)==&youmonst ? Breathless : breathless_mon(mon))
#define Water_res(mon) ((mon)==&youmonst ? Waterproof : mon_resistance((mon), WATERPROOF))
#define Gaze_res(mon) ((mon)==&youmonst ? Gaze_immune : mon_resistance((mon), GAZE_RES))
#define creature_at(x,y) (isok(x,y) ? MON_AT(x, y) ? level.monsters[x][y] : (x==u.ux && y==u.uy) ? &youmonst : (struct monst *)0 : (struct monst *)0)
#define FATAL_DAMAGE_MODIFIER 9001
#define VIS_MAGR 0x01 /* aggressor is clearly visible */
#define VIS_MDEF 0x02 /* defender is clearly visible */
#define VIS_NONE 0x04 /* you are aware of at least one of magr and mdef */
#define ATTACKCHECK_NONE 0x00 /* do not attack */
#define ATTACKCHECK_ATTACK 0x01 /* attack normally */
#define ATTACKCHECK_BLDTHRST 0x02 /* attack against the player's will */
/* TODO: put these in their specified header files */
/* mondata.h */
#define is_holy_mon(mon) (is_angel((mon)->data) || has_template(mon, ILLUMINATED) || (mon)->mtyp == PM_DREAD_SERAPH)
#define is_unholy_mon(mon) (is_demon((mon)->data) || (mon)->mtyp == PM_DREAD_SERAPH)
#define is_unblessed_mon(mon) (is_auton((mon)->data) || is_rilmani((mon)->data) || is_kamerel((mon)->data))
#define SUBOUT_SPELLS 1 /* Spellcasting attack instead (Five Fiends of Chaos1 and Gae) */
#define SUBOUT_BAEL1 2 /* Bael's Sword Archon attack chain */
#define SUBOUT_BAEL2 3 /* Bael's marilith-hands attack chain */
#define SUBOUT_SPIRITS 4 /* Player's bound spirits */
#define SUBOUT_BARB1 5 /* 1st bit of barbarian bonus attacks */
#define SUBOUT_BARB2 6 /* 2nd bit of barbarian bonus attacks, must directly precede the 1st bit */
#define SUBOUT_MAINWEPB 7 /* Bonus attack caused by the wielded *mainhand* weapon */
#define SUBOUT_XWEP 8 /* Made an offhand attack */
#define SUBOUT_GOATSPWN 9 /* Goat spawn: seduction */
#define SUBOUT_GRAPPLE 10 /* Grappler's Grasp crushing damage */
#define SUBOUT_SCORPION 11 /* Scorpion Carapace's sting */
#define SUBOUT_LOLTH1 12 /* Lolth's 8 arm attack chain */
#define SUBOUT_MARIARM1 13 /* Mechanical armor attack 1 */
#define SUBOUT_MARIARM2 14 /* Mechanical armor attack 2 */
#define SUBOUT_SHUBTONG 15 /* Mind-stealing tongue attack */
#define SUBOUT_V_CLAWS1 16 /* Extra vermiurge claws 1 */
#define SUBOUT_V_CLAWS2 17 /* Extra vermiurge claws 2 */
#define SUBOUT_ACU 18 /* ACU tentacle attack */
#define SUBOUT_SALA1 19 /* Sala tuch attack */
#define SUBOUT_SALA2 20 /* Sala hug attack */
#define SUBOUT_OCT 21 /* Octopode tentacle attack */
#define MAX_SUBOUT 22
#define SUBOUT_ARRAY_SIZE (MAX_SUBOUT/8+1)
#endif