Skip to content

Commit

Permalink
Cavemen start with a random set of dragon scales.
Browse files Browse the repository at this point in the history
Kind of inspired by a change I thought warriors had in SlashTHEM, but on double checking they don't - so maybe I was thinking of SpliceHacks Dragon Master role??? I don't know, but I thought this would greatly spice up the caveman role.
  • Loading branch information
elunna committed Dec 14, 2024
1 parent 596cfd3 commit d7b7bc7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 0 additions & 4 deletions include/obj.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,7 @@ struct obj {
#define LAST_DRAGON PM_YELLOW_DRAGON
#define FIRST_DRAGON_SCALES GRAY_DRAGON_SCALES
#define LAST_DRAGON_SCALES YELLOW_DRAGON_SCALES
#define FIRST_DRAGON PM_GRAY_DRAGON
#define LAST_DRAGON PM_YELLOW_DRAGON
#define NUM_DRAGONS (LAST_DRAGON - FIRST_DRAGON)
#define FIRST_DRAGON_SCALES GRAY_DRAGON_SCALES
#define LAST_DRAGON_SCALES YELLOW_DRAGON_SCALES

#define Is_dragon_scales(obj) \
((obj)->otyp >= FIRST_DRAGON_SCALES && (obj)->otyp <= LAST_DRAGON_SCALES)
Expand Down
5 changes: 4 additions & 1 deletion src/u_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,11 @@ static struct trobj Cartomancer[] = {
};
static struct trobj Cave_man[] = {
#define C_AMMO 2
#define C_SCALES 3
{ CLUB, 1, WEAPON_CLASS, 1, UNDEF_BLESS },
{ SLING, 2, WEAPON_CLASS, 1, UNDEF_BLESS },
{ FLINT, 0, GEM_CLASS, 15, UNDEF_BLESS }, /* trquan is overridden below */
{ LEATHER_ARMOR, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
{ GRAY_DRAGON_SCALES, 0, ARMOR_CLASS, 1, UNDEF_BLESS },
{ 0, 0, 0, 0, 0 }
};
static struct trobj Healer[] = {
Expand Down Expand Up @@ -721,6 +722,8 @@ u_init_role(void)
break;
case PM_CAVE_DWELLER:
Cave_man[C_AMMO].trquan = rn1(11, 20); /* 20..30 */
Cave_man[C_SCALES].trotyp = FIRST_DRAGON_SCALES
+ rn2(LAST_DRAGON_SCALES - FIRST_DRAGON_SCALES);
ini_inv(Cave_man);
skill_init(Skill_C);
knows_object(SLING_BULLET, FALSE);
Expand Down

0 comments on commit d7b7bc7

Please sign in to comment.