Skip to content

Commit

Permalink
Added high elf, shade and goliath races.
Browse files Browse the repository at this point in the history
Added monkey grip feat.
  • Loading branch information
GickerLDS committed Nov 9, 2022
1 parent 6470a0d commit 879481c
Show file tree
Hide file tree
Showing 19 changed files with 320 additions and 36 deletions.
2 changes: 2 additions & 0 deletions act.h
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,8 @@ ACMD_DECL(do_dragonborn_breath_weapon);
ACMDCHECK(can_dragonborn_breath_weapon);
ACMD_DECL(do_tabaxi_claw_attack);
ACMDCHECK(can_tabaxi_claw_attack);
ACMD_DECL(do_stones_endurance);
ACMDCHECK(can_stones_endurance);
ACMD_DECL(do_impromptu);
ACMDCHECK(can_impromptu);
ACMD_DECL(do_favoredenemies);
Expand Down
18 changes: 17 additions & 1 deletion act.item.c
Original file line number Diff line number Diff line change
Expand Up @@ -3651,12 +3651,17 @@ int hands_available(struct char_data *ch)
return (hands_have(ch) - hands_used(ch));
}

int hands_needed(struct char_data *ch, struct obj_data *obj)
{
return hands_needed_full(ch, obj, TRUE);
}

/* when handling wielding, holding, wearing of shields, we have to know
how may hands you have available to equipping these items. Also some
held and wielded items will take two hands based on their size. */
// should only return 1 or 2, -1 if problematic

static int hands_needed(struct char_data *ch, struct obj_data *obj)
int hands_needed_full(struct char_data *ch, struct obj_data *obj, int use_feats)
{
/* example: huge sword, medium human, size = 2
* large sword, medium human, size = 1
Expand All @@ -3665,6 +3670,17 @@ static int hands_needed(struct char_data *ch, struct obj_data *obj)
* tiny dagger, medium human, size = -2 */
int size = GET_OBJ_SIZE(obj) - GET_SIZE(ch);

// if this is turned on it will use any feats that reduce or otherwise
// affect what size weapons can be wielded. We have this option so
// that we can calculate penalties associated with such feat uses
if (use_feats)
{
if (HAS_FEAT(ch, FEAT_MONKEY_GRIP))
size--;
else if (HAS_FEAT(ch, FEAT_POWERFUL_BUILD))
size--;
}

// size check
if (size == 1) // two handed
return 2;
Expand Down
33 changes: 33 additions & 0 deletions act.offensive.c
Original file line number Diff line number Diff line change
Expand Up @@ -5145,6 +5145,39 @@ int perform_tailsweep(struct char_data *ch)
return vict_count;
}

void perform_stones_endurance(struct char_data *ch)
{
struct affected_type af;

new_affect(&af);
af.spell = ABILITY_AFFECT_STONES_ENDURANCE;
af.duration = 5;

affect_to_char(ch, &af);

if (!IS_NPC(ch))
start_daily_use_cooldown(ch, FEAT_STONES_ENDURANCE);

act("You summon the fortitude and hardiness of the mountains!", FALSE, ch, 0, 0, TO_CHAR);
act("$n flexes and $s skin turns grey and hard as a mountainside.", FALSE, ch, 0, 0, TO_ROOM);
}

ACMDCHECK(can_stones_endurance)
{
ACMDCHECK_PREREQ_HASFEAT(FEAT_STONES_ENDURANCE, "You have no idea how.\r\n");
ACMDCHECK_TEMPFAIL_IF(affected_by_spell(ch, ABILITY_AFFECT_STONES_ENDURANCE), "You have already triggered stone's endurance.\r\n");
return CAN_CMD;
}

ACMDU(do_stones_endurance)
{
PREREQ_CAN_FIGHT();
PREREQ_CHECK(can_stones_endurance);
PREREQ_HAS_USES(FEAT_STONES_ENDURANCE, "You must recover before you can trigger stone's endurance again.\r\n");

perform_stones_endurance(ch);
}

ACMDCHECK(can_tailsweep)
{
ACMDCHECK_PERMFAIL_IF(!IS_DRAGON(ch), "You have no idea how.\r\n");
Expand Down
25 changes: 25 additions & 0 deletions class.c
Original file line number Diff line number Diff line change
Expand Up @@ -1857,6 +1857,31 @@ static int level_feats[][LEVEL_FEATS] = {
{CLASS_UNDEFINED, RACE_TABAXI, FALSE, 1, FEAT_TABAXI_CATS_CLAWS},
{CLASS_UNDEFINED, RACE_TABAXI, FALSE, 1, FEAT_TABAXI_CATS_TALENT},

// Goliath
{CLASS_UNDEFINED, RACE_GOLIATH, FALSE, 1, FEAT_NATURAL_ATHLETE},
{CLASS_UNDEFINED, RACE_GOLIATH, FALSE, 1, FEAT_GOLIATH_RACIAL_ADJUSTMENT},
{CLASS_UNDEFINED, RACE_GOLIATH, FALSE, 1, FEAT_MOUNTAIN_BORN},
{CLASS_UNDEFINED, RACE_GOLIATH, FALSE, 1, FEAT_POWERFUL_BUILD},
{CLASS_UNDEFINED, RACE_GOLIATH, FALSE, 1, FEAT_STONES_ENDURANCE},

/* high elf */
{CLASS_UNDEFINED, RACE_HIGH_ELF, FALSE, 1, FEAT_INFRAVISION},
{CLASS_UNDEFINED, RACE_HIGH_ELF, FALSE, 1, FEAT_WEAPON_PROFICIENCY_ELF},
{CLASS_UNDEFINED, RACE_HIGH_ELF, FALSE, 1, FEAT_SLEEP_ENCHANTMENT_IMMUNITY},
{CLASS_UNDEFINED, RACE_HIGH_ELF, FALSE, 1, FEAT_KEEN_SENSES},
{CLASS_UNDEFINED, RACE_HIGH_ELF, FALSE, 1, FEAT_RESISTANCE_TO_ENCHANTMENTS},
{CLASS_UNDEFINED, RACE_HIGH_ELF, FALSE, 1, FEAT_ELF_RACIAL_ADJUSTMENT},
{CLASS_UNDEFINED, RACE_HIGH_ELF, FALSE, 1, FEAT_HIGH_ELF_RACIAL_ADJUSTMENT},
{CLASS_UNDEFINED, RACE_HIGH_ELF, FALSE, 1, FEAT_HIGH_ELF_CANTRIP},
{CLASS_UNDEFINED, RACE_HIGH_ELF, FALSE, 1, FEAT_HIGH_ELF_LINGUIST},

/* Shade */
{CLASS_UNDEFINED, RACE_SHADE, FALSE, 1, FEAT_ULTRAVISION},
{CLASS_UNDEFINED, RACE_SHADE, FALSE, 1, FEAT_SHADE_RACIAL_ADJUSTMENT},
{CLASS_UNDEFINED, RACE_SHADE, FALSE, 1, FEAT_SHADOWFELL_MIND},
{CLASS_UNDEFINED, RACE_SHADE, FALSE, 1, FEAT_PRACTICED_SNEAK},
{CLASS_UNDEFINED, RACE_SHADE, FALSE, 1, FEAT_ONE_WITH_SHADOW},

// Aasimar
{CLASS_UNDEFINED, RACE_AASIMAR, FALSE, 1, FEAT_ULTRAVISION},
{CLASS_UNDEFINED, RACE_AASIMAR, FALSE, 1, FEAT_ASTRAL_MAJESTY},
Expand Down
69 changes: 62 additions & 7 deletions feats.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,37 @@ void assign_feats(void)
"+2 cha and 2 extra ability score points at 1st level",
"The half elf receive +2 to their charisma score and 2 more points when choosing ability scores at level one.");

/* Goliath */
feato(FEAT_GOLIATH_RACIAL_ADJUSTMENT, "goliath racial adjustment", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"+2 to strength, +1 to constitution",
"Goliaths as a racial adjustment have +2 strength, +1 constitution.");
feato(FEAT_NATURAL_ATHLETE, "natural athlete", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"+2 to climb, swim and survival skills.",
"Goliaths get +2 to climb, swim and survival skills.");
feato(FEAT_POWERFUL_BUILD, "powerful build", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"Treats weapons as if they were one size smaller when wielding them. Will impose a -2 penalty to attack rolls if this modification is in effect.",
"Goliaths treat weapons as if they were one size smaller when wielding them. Will impose a -2 penalty to attack rolls if this modification is in effect.");
feato(FEAT_MOUNTAIN_BORN, "mountain born", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"50 resistance to cold damage.",
"Goliaths get 50 resistance to cold damage.");
feato(FEAT_STONES_ENDURANCE, "stone's endurance", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"Reduce damage of next attack by 1d12 + constitution modifier.",
"Goliaths can use the stonesendurance command to reduce damage of next attack by 1d12 + constitution modifier.");

/* Shade */
feato(FEAT_SHADE_RACIAL_ADJUSTMENT, "shade racial adjustment", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"+2 to dexterity, +1 to charisma",
"Shades as a racial adjustment have +2 dexterity and +1 charisma.");
feato(FEAT_PRACTICED_SNEAK, "practiced sneak", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"Stealth is considered a class skill, regardless of class.",
"Shades treat stealth as a class skill no matter which class they are levelling at the time.");
feato(FEAT_SHADOWFELL_MIND, "shadowfell mind", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"+2 to stealth and spellcraft skills.",
"Shades get +2 tp their stealth and spellcraft skills.");
feato(FEAT_ONE_WITH_SHADOW, "one with shadow", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"Can hide even during battle in cover or concealment.",
"Shades can hide even during battle if he has cover or concealment. He can also use allies as cover for this purpose.");

// Half drow
feato(FEAT_HALF_DROW_RACIAL_ADJUSTMENT, "half drow racial adjustment", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"+2 int and 2 extra ability score points at 1st level",
Expand Down Expand Up @@ -879,6 +910,16 @@ void assign_feats(void)
"max movement points increased by +20 per level",
"The wood elf's maximum movement points increases by +20 per level.");

feato(FEAT_HIGH_ELF_RACIAL_ADJUSTMENT, "high elf racial adjustment", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"+2 dex +1 int",
"High Elven racial adjustment to stats are: +2 dexterity, +1 intelligence.");
feato(FEAT_HIGH_ELF_CANTRIP, "high elf cantrip", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"can choose 1 wizard cantrip",
"Allows the choosing of a single circle 1 wizard spell that can be cast at will, chosen via the study menu.");
feato(FEAT_HIGH_ELF_LINGUIST, "high elf linguist", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"can learn an additional language",
"Allows the choosing of an extra language.");

/* Shared - Various */
/* feat-number | name | in game? | learnable? | stackable? | feat-type | short-descrip | long descrip */
feato(FEAT_LIGHT_BLINDNESS, "light blindness", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
Expand Down Expand Up @@ -4145,6 +4186,10 @@ void assign_feats(void)
"Allows the alchemist to select a single grand discovery upon reaching level 20,"
"with the 'gdiscovery' command.");

feato(FEAT_MONKEY_GRIP, "monkey grip", TRUE, TRUE, FALSE, FEAT_TYPE_GENERAL,
"can wield weapons one size larger than wielder in one hand with -2 to attacks.",
"can wield weapons one size larger than wielder in one hand with -2 to attacks.");

/**************************/
/* Disabled/Unimplemented */
/**************************/
Expand All @@ -4162,7 +4207,6 @@ void assign_feats(void)
feato(FEAT_IMPROVED_BULL_RUSH, "improved bull rush", FALSE, FALSE, FALSE, FEAT_TYPE_GENERAL, "ask staff", "ask staff");
feato(FEAT_IMPROVED_SUNDER, "improved sunder", FALSE, FALSE, FALSE, FEAT_TYPE_GENERAL, "ask staff", "ask staff");
feato(FEAT_SUNDER, "sunder", FALSE, FALSE, FALSE, FEAT_TYPE_GENERAL, "ask staff", "ask staff");
feato(FEAT_MONKEY_GRIP, "monkey grip", FALSE, TRUE, TRUE, FEAT_TYPE_GENERAL, "can wield weapons one size larger than wielder in one hand with -2 to attacks.", "can wield weapons one size larger than wielder in one hand with -2 to attacks.");
feato(FEAT_IMPROVED_INSTIGATION, "improved instigation", FALSE, TRUE, FALSE, FEAT_TYPE_GENERAL, "ask staff", "ask staff");
feato(FEAT_DIEHARD, "diehard", TRUE, TRUE, FALSE, FEAT_TYPE_GENERAL,
"Gives you a 33% chance to avoid a killing blow.",
Expand Down Expand Up @@ -4605,6 +4649,7 @@ void assign_feats(void)
dailyfeat(FEAT_TINKER, eTINKER);
dailyfeat(FEAT_DRAGONBORN_BREATH, eDRAGBREATH);
dailyfeat(FEAT_TABAXI_CATS_CLAWS, eCATSCLAWS);
dailyfeat(FEAT_STONES_ENDURANCE, eSTONESENDURANCE);
/** END **/
}

Expand Down Expand Up @@ -5064,12 +5109,11 @@ int feat_is_available(struct char_data *ch, int featnum, int iarg, char *sarg)
return TRUE;

case FEAT_MONKEY_GRIP:
/* if (!iarg)
return TRUE;
if (!is_proficient_with_weapon(ch, iarg))
return FALSE;
return TRUE;
*/
if (!iarg)
return TRUE;
if (!is_proficient_with_weapon(ch, iarg))
return FALSE;
return TRUE;
return false;

case FEAT_LAST_FEAT:
Expand Down Expand Up @@ -5874,6 +5918,17 @@ void list_feats(struct char_data *ch, const char *arg, int list_type, struct cha
strlcat(buf2, buf, sizeof(buf2));
none_shown = FALSE;
}
else if (i == FEAT_HIGH_ELF_CANTRIP) {
if (mode == 1) {
sprintf(buf3, "%s (%s)", feat_list[i].name, spell_info[HIGH_ELF_CANTRIP(ch)].name);
sprintf(buf, "\tW%-30s\tC:\tn %s\r\n", buf3, feat_list[i].short_description);
} else {
sprintf(buf3, "%s (%s)", feat_list[i].name, spell_info[HIGH_ELF_CANTRIP(ch)].name);
sprintf(buf, "%-40s ", buf3);
}
strcat(buf2, buf);
none_shown = FALSE;
}
else if (i == FEAT_DRAGONBORN_ANCESTRY)
{
if (mode == 1)
Expand Down
18 changes: 18 additions & 0 deletions fight.c
Original file line number Diff line number Diff line change
Expand Up @@ -3153,6 +3153,9 @@ int compute_damtype_reduction(struct char_data *ch, int dam_type)
damtype_reduction += 20;
else if (HAS_FEAT(ch, FEAT_DOMAIN_COLD_RESIST) && CLASS_LEVEL(ch, CLASS_CLERIC) >= 6)
damtype_reduction += 10;

if (HAS_FEAT(ch, FEAT_MOUNTAIN_BORN))
damtype_reduction += 50;

/* npc vulnerabilities/strengths */
if (GET_NPC_RACE(ch) == RACE_TYPE_ELEMENTAL &&
Expand Down Expand Up @@ -4130,7 +4133,17 @@ int damage_handling(struct char_data *ch, struct char_data *victim,
}

damage_reduction = compute_damage_reduction(victim, dam_type);

if (affected_by_spell(victim, ABILITY_AFFECT_STONES_ENDURANCE))
{
damage_reduction += dice(1, 12) + GET_CON_BONUS(victim);
act("The rocky hardness of your skin deflects some of the damage, then crumbles to dust.", FALSE, victim, 0, 0, TO_CHAR);
act("The rocky hardness of $n's skin deflects some of the damage, then crumbles to dust.", FALSE, victim, 0, 0, TO_ROOM);
affect_from_char(victim, ABILITY_AFFECT_STONES_ENDURANCE);
}

dam -= MIN(dam, damage_reduction);

if (!dam && (ch != victim))
{

Expand Down Expand Up @@ -7645,6 +7658,11 @@ int compute_attack_bonus(struct char_data *ch, /* Attacker */
calc_bab -= 2;
}

// -2 penalty if wielding a large weapon in one hand
// through the monkey grip and powerful build feats
if (wielded && wielded != GET_EQ(ch, WEAR_WIELD_2H) && hands_needed_full(ch, wielded, FALSE) != 0)
calc_bab -= 2;

if (wielded)
{
calc_bab += wielded->tinker_bonus;
Expand Down
1 change: 1 addition & 0 deletions interpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ cpp_extern const struct command_info cmd_info[] = {
{"stand", "st", POS_RECLINING, do_stand, 0, 0, FALSE, ACTION_STANDARD, {6, 0}, NULL},
{"stat", "stat", POS_DEAD, do_stat, LVL_IMMORT, 0, TRUE, ACTION_NONE, {0, 0}, NULL},
{"steal", "ste", POS_STANDING, do_steal, 1, 0, FALSE, ACTION_NONE, {0, 0}, NULL},
{"stonesendurance", "stonese", POS_FIGHTING, do_stones_endurance, 0, 0, TRUE, ACTION_NONE, {0, 0}, can_stones_endurance},
{"store", "store", POS_FIGHTING, do_store, 1, 0, FALSE, ACTION_MOVE, {0, 0}, NULL},
{"stunningfist", "stunningfist", POS_FIGHTING, do_stunningfist, 1, 0, FALSE, ACTION_NONE, {0, 0}, can_stunningfist},
{"study", "study", POS_RECLINING, do_study, 1, 0, FALSE, ACTION_NONE, {0, 0}, NULL},
Expand Down
9 changes: 9 additions & 0 deletions mud_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ struct mud_event_list mud_event_index[] = {
{"Moonbeam", event_moonbeam, EVENT_CHAR}, // eMOONBEAM
{"Dragonborn Breath Weapon Cooldown", event_daily_use_cooldown, EVENT_CHAR}, // eDRAGBREATH
{"Tabaxi Cats Claws Attack Cooldown", event_daily_use_cooldown, EVENT_CHAR}, // eCATSCLAWS
// 150
{"Goliath Stone's Endurance Cooldown", event_daily_use_cooldown, EVENT_CHAR}, // eSTONESENDURANCE

};

Expand Down Expand Up @@ -339,6 +341,9 @@ EVENTFUNC(event_countdown)
case eCHANNELENERGY:
send_to_char(ch, "You are now able to channel energy again.\r\n");
break;
case eSTONESENDURANCE:
send_to_char(ch, "You are now able to ujse stones endurance again.\r\n");
break;
case eJUDGEMENT:
send_to_char(ch, "You are now able to use your judgement ability again.\r\n");
break;
Expand Down Expand Up @@ -752,6 +757,10 @@ EVENTFUNC(event_daily_use_cooldown)
featnum = FEAT_CHANNEL_ENERGY;
send_to_char(ch, "One of your channel energy uses has recovered.\r\n");
break;
case eSTONESENDURANCE:
featnum = FEAT_STONES_ENDURANCE;
send_to_char(ch, "One of your stonesendurance ability uses has recovered.\r\n");
break;
case ePURIFY:
featnum = FEAT_REMOVE_DISEASE;
send_to_char(ch, "One of your remove disease (purify) uses has recovered.\r\n");
Expand Down
1 change: 1 addition & 0 deletions mud_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ typedef enum
eMOONBEAM, // moon beam spell lingering effect
eDRAGBREATH, // Dragonborn breath weapon
eCATSCLAWS, // tabaxi Cats Claws ability
eSTONESENDURANCE, // goliath stones endurance ability
} event_id;

/* probably a smart place to mention to not forget to update:
Expand Down
2 changes: 2 additions & 0 deletions oasis.h
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,8 @@ i added this trying to debug issues with qedit-copy -zusuk
#define SET_DRAGONBORN_ANCESTRY 57
#define STUDY_CONFIRM_DRAGONBORN_ANCESTRY 58
#define STUDY_SELECT_RACIAL_ABILITY 59
#define SET_HIGH_ELF_CANTRIP 60
#define STUDY_CONFIRM_HIGH_ELF_CANTRIP 61

int save_config(IDXTYPE nowhere);

Expand Down
5 changes: 5 additions & 0 deletions players.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ int load_char(const char *name, struct char_data *ch)
GET_BLOODLINE_SUBTYPE(ch) = PFDEF_SORC_BLOODLINE_SUBTYPE;
NEW_ARCANA_SLOT(ch, 0) = NEW_ARCANA_SLOT(ch, 1) = NEW_ARCANA_SLOT(ch, 2) = NEW_ARCANA_SLOT(ch, 3) = 0;
GET_DRAGONBORN_ANCESTRY(ch) = 0;
HIGH_ELF_CANTRIP(ch) = 0;
for (i = 0; i < AF_ARRAY_MAX; i++)
AFF_FLAGS(ch)
[i] = PFDEF_AFFFLAGS;
Expand Down Expand Up @@ -812,6 +813,8 @@ int load_char(const char *name, struct char_data *ch)
load_HMVS(ch, line, LOAD_HIT);
else if (!strcmp(tag, "Hite"))
GET_HEIGHT(ch) = atoi(line);
else if (!strcmp(tag, "HECn"))
HIGH_ELF_CANTRIP(ch) = atoi(line);
else if (!strcmp(tag, "HlyW"))
GET_HOLY_WEAPON_TYPE(ch) = atoi(line);
else if (!strcmp(tag, "Host"))
Expand Down Expand Up @@ -1406,6 +1409,8 @@ void save_char(struct char_data *ch, int mode)
fprintf(fl, "Host: %s\n", GET_HOST(ch));
if (GET_HEIGHT(ch) != PFDEF_HEIGHT)
fprintf(fl, "Hite: %d\n", GET_HEIGHT(ch));
if (HIGH_ELF_CANTRIP(ch))
fprintf(fl, "HECn: %d\n", HIGH_ELF_CANTRIP(ch));
if (GET_HOLY_WEAPON_TYPE(ch) != PFDEF_HOLY_WEAPON_TYPE)
fprintf(fl, "HlyW: %d\n", GET_HOLY_WEAPON_TYPE(ch));
if (GET_WEIGHT(ch) != PFDEF_WEIGHT)
Expand Down
Loading

0 comments on commit 879481c

Please sign in to comment.