Skip to content

Commit

Permalink
-Added gully dwarf race
Browse files Browse the repository at this point in the history
-Added race and level back to who list
-Added the following bonus types: spell circles (1-9), spell potency, spell dc, spell duration, spell penetration
-Added lastroom command
-Added listraces command
  • Loading branch information
GickerLDS committed Nov 29, 2024
1 parent 9925a92 commit 5a2bd1a
Show file tree
Hide file tree
Showing 26 changed files with 529 additions and 102 deletions.
16 changes: 12 additions & 4 deletions act.informative.c
Original file line number Diff line number Diff line change
Expand Up @@ -2091,6 +2091,8 @@ void perform_cooldowns(struct char_data *ch, struct char_data *k)
send_to_char(ch, "Forage - Duration: %d seconds\r\n", GET_FORAGE_COOLDOWN(k) * 6);
if (GET_RETAINER_COOLDOWN(k) > 0)
send_to_char(ch, "Call Retainer - Duration: %d seconds\r\n", GET_RETAINER_COOLDOWN(k) * 6);
if (GET_SCROUNGE_COOLDOWN(k) > 0)
send_to_char(ch, "Scrounge - Duration: %d seconds\r\n", GET_SCROUNGE_COOLDOWN(k) * 6);

list_item_activate_ability_cooldowns(ch);

Expand Down Expand Up @@ -4205,7 +4207,7 @@ ACMD(do_who)
else
snprintf(clan_name, sizeof(clan_name), "%s", ((c_n = real_clan(GET_CLAN(tch))) != NO_CLAN && GET_CLANRANK(tch) > 0) ? CLAN_NAME(c_n) : "Adventurer");
length = strlen(clan_name);
padding = 20 - length;
padding = 28 - length;

// Move characters to make room for padding at the front
for (x = length; x >= 0; x--)
Expand All @@ -4217,14 +4219,18 @@ ACMD(do_who)
clan_name[x] = ' ';
}
// Append spaces at the end
for (x = length + padding / 2; x < 20; x++) {
for (x = length + padding / 2; x < 28; x++) {
clan_name[x] = ' ';
}
if (padding % 2 != 0) {
// If padding is odd, add one more space at the end
clan_name[20] = ' ';
clan_name[28] = ' ';
}
send_to_char(ch, "\tC[ %20.20s ]\tn %s", clan_name, GET_TITLE(tch));
if (GET_LEVEL(tch) >= LVL_IMMORT)
send_to_char(ch, "\tW[\tC%28.28s \tW]\tn %s", clan_name, GET_TITLE(tch));
else
send_to_char(ch, "\tW[ \tC%2d %-4.4s %-20.20s \tW]\tn %s", GET_LEVEL(tch), race_list[GET_REAL_RACE(tch)].abbrev,
((c_n = real_clan(GET_CLAN(tch))) != NO_CLAN && GET_CLANRANK(tch) > 0) ? CLAN_NAME(c_n) : "Adventurer", GET_TITLE(tch));

// num_can_see++;
if (GET_LEVEL(tch) >= LVL_IMMORT)
Expand Down Expand Up @@ -4386,6 +4392,8 @@ ACMD(do_who)
send_to_char(ch, "Number of unique accounts connected: %d.\r\n", num_accounts);
}

send_to_char(ch, "Type 'listraces' to understand race abbreviations.\r\n");

if (IS_HAPPYHOUR > 0)
{
send_to_char(ch, "\tWIt's a Happy Hour! Type \tRhappyhour\tW to see the current bonuses.\tn\r\n");
Expand Down
1 change: 0 additions & 1 deletion act.movement.c
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,6 @@ int do_simple_move(struct char_data *ch, int dir, int need_specials_check)
/* fleeing: no retreat feat offers free AOO */
if (need_specials_check == 3 && GET_POS(ch) > POS_DEAD)
{

/* loop room */
struct char_data *tch, *next_tch;
for (tch = world[IN_ROOM(ch)].people; tch; tch = next_tch)
Expand Down
8 changes: 8 additions & 0 deletions act.offensive.c
Original file line number Diff line number Diff line change
Expand Up @@ -3449,6 +3449,11 @@ ACMD(do_taunt)
send_to_char(ch, "This mob cannot be attacked by you.\r\n");
return;
}
if (HAS_FEAT(vict, FEAT_COWARDLY))
{
act("$n is too cowardly to be goaded by your taunts.", FALSE, vict, 0, ch, TO_VICT);
return;
}
if (char_has_mud_event(vict, eTAUNTED))
{
send_to_char(ch, "Your target is already taunted...\r\n");
Expand Down Expand Up @@ -3476,6 +3481,9 @@ int perform_intimidate(struct char_data *ch, struct char_data *vict)
if (HAS_FEAT(vict, FEAT_DEMORALIZE))
resist += 2;

if (HAS_FEAT(vict, FEAT_COWARDLY))
resist -= 4;

/* Should last one round, plus one second for every point over the resist */
if (attempt >= resist)
{
Expand Down
70 changes: 2 additions & 68 deletions backgrounds.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,10 +927,7 @@ ACMD(do_relay)
ACMD(do_forage)
{

int skill, dc, result, modifier = 2, bonus = 0, roll;
bool food = false;
char ripeness[50], food_desc[150];
struct obj_data *obj;
int skill, dc, result, roll;

if (IS_NPC(ch))
{
Expand Down Expand Up @@ -964,70 +961,7 @@ ACMD(do_forage)
return;
}

result /= 10;

switch (result)
{
case 0: modifier = 2; snprintf(ripeness, sizeof(ripeness), "rather unripe"); break;
case 1: modifier = 3; snprintf(ripeness, sizeof(ripeness), "barely ripe"); break;
case 2: modifier = 4; snprintf(ripeness, sizeof(ripeness), "nicely ripened"); break;
case 3: modifier = 5; snprintf(ripeness, sizeof(ripeness), "very well ripened"); break;
default: modifier = 6; snprintf(ripeness, sizeof(ripeness), "perfectly ripened"); break;
}

switch (rand_number(0, 18))
{
case 0: bonus = APPLY_AC_NEW; break;
case 1: bonus = APPLY_STR; break;
case 2: bonus = APPLY_DEX; break;
case 3: bonus = APPLY_CON; break;
case 4: bonus = APPLY_INT; break;
case 5: bonus = APPLY_WIS; break;
case 6: bonus = APPLY_CHA; break;
case 7: bonus = APPLY_DAMROLL; modifier /= 2; break;
case 8: bonus = APPLY_HITROLL; modifier /= 2; break;
case 9: bonus = APPLY_ENCUMBRANCE; break;
case 10: bonus = APPLY_HIT; modifier *= 10; break;
case 11: bonus = APPLY_MOVE; modifier *= 100; break;
case 12: bonus = APPLY_HP_REGEN; break;
case 13: bonus = APPLY_MV_REGEN; break;
case 14: bonus = APPLY_PSP; modifier *= 5; break;
case 15: bonus = APPLY_PSP_REGEN; break;
case 16: bonus = APPLY_SAVING_FORT; break;
case 17: bonus = APPLY_SAVING_REFL; break;
case 18: bonus = APPLY_SAVING_WILL; break;
}

obj = read_object(FORAGE_FOOD_ITEM_VNUM, VIRTUAL);

if (!obj)
{
send_to_char(ch, "The forage food item prototype was not found. Please inform a staff with code ERRFOR001.\r\n");
return;
}

GET_FORAGE_COOLDOWN(ch) = 100;

food = apply_type_food_or_drink[bonus];

if (!food)
GET_OBJ_TYPE(obj) = ITEM_DRINK;

obj->affected[0].location = bonus;
obj->affected[0].modifier = modifier;
obj->affected[0].bonus_type = (food) ? BONUS_TYPE_FOOD : BONUS_TYPE_DRINK;

snprintf(food_desc, sizeof(food_desc), "some %s %s", ripeness, apply_type_food_names[bonus]);
obj->name = strdup(food_desc);
obj->short_description = strdup(food_desc);
snprintf(food_desc, sizeof(food_desc), "Some %s %s lie here.", ripeness, apply_type_food_names[bonus]);
obj->description = strdup(food_desc);

obj_to_char(obj, ch);

act("You forage for food and find $p!", TRUE, ch, obj, 0, TO_CHAR);
act("$n forages for food and finds $p!", TRUE, ch, obj, 0, TO_ROOM);

award_random_food_item(ch, result, 1);
}

#define RETAINER_SYNTAX ("Proper syntax is:\r\n" \
Expand Down
3 changes: 3 additions & 0 deletions constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -2587,6 +2587,7 @@ const char *apply_types[] = {
"Spell-Potency",
"Spell-DC",
"Spell-Duration",
"Spell-Penetration",
"\n" /*73*/
};
CHECK_TABLE_SIZE(apply_types, NUM_APPLIES + 1);
Expand Down Expand Up @@ -2667,6 +2668,7 @@ const char *apply_type_food_names[] =
"", // spell potency
"", // spell dc
"", // spell duration
"", // spell penetration
"\n"
};
CHECK_TABLE_SIZE(apply_type_food_names, NUM_APPLIES + 1);
Expand Down Expand Up @@ -2748,6 +2750,7 @@ const int apply_type_food_or_drink[] =
TRUE, // spell potency
TRUE, // spell dc
TRUE, // spell duration
TRUE, // spell penetration
TRUE
};
CHECK_TABLE_SIZE(apply_type_food_or_drink, NUM_APPLIES + 1);
Expand Down
8 changes: 6 additions & 2 deletions craft.c
Original file line number Diff line number Diff line change
Expand Up @@ -1603,7 +1603,7 @@ int bonearmor(char *argument, struct obj_data *kit, struct char_data *ch)
if (cost == 0)
GET_CRAFTING_TICKS(ch) = 1;
else
GET_CRAFTING_TICKS(ch) = 5 - fast_craft_bonus;
GET_CRAFTING_TICKS(ch) = MAX(1, 5 - fast_craft_bonus);

obj_to_char(obj, ch);
save_char(ch, 0);
Expand Down Expand Up @@ -2816,7 +2816,6 @@ EVENTFUNC(event_crafting)

/* resize system check point -Zusuk */
autoquest_trigger_check(ch, NULL, NULL, 0, AQ_CRAFT_RESIZE);

break;

case SCMD_REFORGE:
Expand Down Expand Up @@ -3551,4 +3550,9 @@ void put_mysql_supply_orders_available(struct char_data *ch, int avail)
{
log("SYSERR: Unable to INSERT INTO player_supply_orders: %s", mysql_error(conn));
}
}

ACMD(do_need_craft_kit)
{
send_to_char(ch, "You must be in a room with a crafting station or have a crafting kit in your inventory to perform this action.\r\n");
}
1 change: 1 addition & 0 deletions craft.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ void reset_acraft(struct char_data *ch);
/* command functions */
ACMD_DECL(do_harvest);
ACMD_DECL(do_disenchant);
ACMD_DECL(do_need_craft_kit);
/* end command functions */

int get_mysql_supply_orders_available(struct char_data *ch);
Expand Down
3 changes: 3 additions & 0 deletions db.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,9 @@ void boot_world(void)
log("Loading evolutions.");
assign_evolutions();

// we'll sort races alphabetically
sort_races();

// assign backgrounds
assign_backgrounds();
sort_backgrounds();
Expand Down
5 changes: 3 additions & 2 deletions depend
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ config.o: config.c conf.h sysdep.h structs.h bool.h protocol.h lists.h \
constants.o: constants.c conf.h sysdep.h structs.h bool.h protocol.h \
lists.h campaign.h utils.h db.h helpers.h perfmon.h interpreter.h \
spells.h craft.h feats.h domains_schools.h handler.h deities.h \
constants.h
constants.h roleplay.h
craft.o: craft.c conf.h sysdep.h structs.h bool.h protocol.h lists.h \
campaign.h mysql.h utils.h db.h helpers.h perfmon.h comm.h spells.h \
interpreter.h constants.h handler.h craft.h mud_event.h dg_event.h \
Expand Down Expand Up @@ -449,7 +449,8 @@ redit.o: redit.c conf.h sysdep.h structs.h bool.h protocol.h lists.h \
roleplay.o: roleplay.c conf.h sysdep.h structs.h bool.h protocol.h \
lists.h campaign.h utils.h db.h helpers.h perfmon.h comm.h spells.h \
handler.h interpreter.h constants.h backgrounds.h treasure.h fight.h \
spec_procs.h clan.h dg_scripts.h feats.h improved-edit.h
spec_procs.h clan.h dg_scripts.h feats.h improved-edit.h roleplay.h \
deities.h char_descs.h modify.h
sedit.o: sedit.c conf.h sysdep.h structs.h bool.h protocol.h lists.h \
campaign.h utils.h db.h helpers.h perfmon.h comm.h interpreter.h shop.h \
genolc.h genshp.h genzon.h oasis.h help.h constants.h
Expand Down
25 changes: 23 additions & 2 deletions feats.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,23 @@ void assign_feats(void)
feato(FEAT_DWARF_RACIAL_ADJUSTMENT, "dwarf racial adjustment", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"+2 con",
"As a racial adjustment you have +2 to constitution.");
#if defined(CAMAPIGN_DL)
#if defined(CAMPAIGN_DL)
// gully dwarf
feato(FEAT_GULLY_DWARF_RACIAL_ADJUSTMENT, "gully dwarf racial adjustment", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"+4 Con, +4 Dex, -4 Int, -2 Cha",
"+4 racial bonus to dexterity and constituion ability scores. -4 to intelligence and -2 to charisma.");
feato(FEAT_SURVIVAL_INSTINCT, "survival instinct", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"+3 to Stealth and Nature skills. Can use the scrounge ability to find random items virtually anywhere.",
"+3 to Stealth and Nature skills. Can use the scrounge ability to find random items virtually anywhere.");
feato(FEAT_COWARDLY, "cowardly", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"-4 penalty to intimidation attempts on the gully dwarf. Movement speed will not prevent them from fleeing, and they do not need an action to flee. Immune to taunts.",
"-4 penalty to intimidation attempts on the gully dwarf. Movement speed will not prevent them from fleeing, and they do not need an action to flee. Immune to taunts.");
feato(FEAT_PITIABLE, "pitiable", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"Has a 75% chance to avoid aggro attacks by mobs.",
"Has a 75% chance to avoid aggro attacks by mobs.");
feato(FEAT_GRUBBY, "grubby", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"-6 to persuasion and appraise skill checks. 50% resistance to poison and disease damage. +4 saving throw bonus against disease.",
"-6 to persuasion and appraise skill checks. 50% resistance to poison and disease damage. +4 saving throw bonus against disease.");
// mountain dwarf
feato(FEAT_SHIELD_DWARF_RACIAL_ADJUSTMENT, "mountain dwarf racial adjustment", TRUE, FALSE, FALSE, FEAT_TYPE_INNATE_ABILITY,
"+2 str +2 Con",
Expand Down Expand Up @@ -5058,7 +5074,12 @@ feato(FEAT_MOON_ELF_RACIAL_ADJUSTMENT, "moon elf racial adjustment", TRUE, FALSE
/* Pale/Death Master */
feato(FEAT_BONE_ARMOR, "bone armor", TRUE, FALSE, FALSE, FEAT_TYPE_CLASS_ABILITY,
"allows creation of bone armor with the bonearmor command, and 10 percent arcane spell failure reduction in per rank, if and only if all armor slots are made of bone (body, arms, legs and head).",
"allows creation of bone armor with the bonearmor command, and 10 percent arcane spell failure reduction in per rank, if and only if all armor slots are made of bone (body, arms, legs and head).");
"allows creation of bone armor with the bonearmor command, and 10 percent arcane spell failure reduction "
"in per rank, if and only if all armor slots are made of bone (body, arms, legs and head). To do so, ensure "
"that you have a crafting station in your same room or a crafting kit in your inventory. Put the armor piece "
"or shield in the kit and type: bonearmor (new item description) Eg. 'put breastplate kit' then 'bonearmor a "
"bone breast plate'. There will be a gold cost, and then the armor piece will be placed in your inventory with "
"the new description and the item's material now being bone.");
feato(FEAT_ESSENCE_OF_UNDEATH, "essence of undeath", TRUE, FALSE, FALSE, FEAT_TYPE_CLASS_ABILITY,
"Gives immunity to poison, sleep and death affects, paralysis, sneak attack and critical hits.",
"Gives immunity to poison, sleep and death affects, paralysis, sneak attack and critical hits.");
Expand Down
14 changes: 10 additions & 4 deletions fight.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ void perform_flee(struct char_data *ch)
return;
}

if (!is_action_available(ch, atMOVE, TRUE))
if (!is_action_available(ch, atMOVE, TRUE) && !HAS_FEAT(ch, FEAT_COWARDLY))
{
GUI_CMBT_OPEN(ch);
send_to_char(ch, "You need a move action to flee!\r\n");
Expand Down Expand Up @@ -327,7 +327,8 @@ void perform_flee(struct char_data *ch)
}

/* cost */
USE_MOVE_ACTION(ch);
if (!HAS_FEAT(ch, FEAT_COWARDLY))
USE_MOVE_ACTION(ch);

// not fighting? no problems
if (!FIGHTING(ch))
Expand Down Expand Up @@ -2223,6 +2224,7 @@ void die(struct char_data *ch, struct char_data *killer)
REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_SPELLBATTLE);
SPELLBATTLE(ch) = 0;
wildshape_return(ch);
GET_LAST_ROOM(ch) = 0;
}

/* clear grapple */
Expand Down Expand Up @@ -2449,7 +2451,7 @@ static void solo_gain(struct char_data *ch, struct char_data *victim)
/* minimum of 1 xp point */
exp = MAX(exp, 1);

#if defined(CAMAPIGN_DL)
#if defined(CAMPAIGN_DL)
if (GET_LEVEL(victim) < 18)
if ((GET_LEVEL(victim) + CONFIG_EXP_LEVEL_DIFFERENCE) < GET_LEVEL(ch))
exp /= 2;
Expand Down Expand Up @@ -3594,6 +3596,8 @@ int compute_damtype_reduction(struct char_data *ch, int dam_type)
damtype_reduction += 25;
if (HAS_FEAT(ch, FEAT_STOUT_RESILIENCE))
damtype_reduction += 50;
if (HAS_FEAT(ch, FEAT_GRUBBY))
damtype_reduction += 50;
if (HAS_REAL_FEAT(ch, FEAT_ESSENCE_OF_UNDEATH))
damtype_reduction += 100;
if (HAS_EVOLUTION(ch, EVOLUTION_UNDEAD_APPEARANCE))
Expand Down Expand Up @@ -3644,6 +3648,8 @@ int compute_damtype_reduction(struct char_data *ch, int dam_type)
damtype_reduction += 10;
if (HAS_FEAT(ch, FEAT_STRONG_AGAINST_DISEASE))
damtype_reduction += 50;
if (HAS_FEAT(ch, FEAT_GRUBBY))
damtype_reduction += 50;

/* npc vulnerabilities/strengths */
if (IS_NPC(ch))
Expand Down Expand Up @@ -8607,7 +8613,7 @@ int compute_attack_bonus_full(struct char_data *ch, /* Attacker */
/* Profane bonus */

/* Racial bonus */
#if !defined(CAMAPIGN_DL) && !defined(CAMPAIGN_FR)
#if !defined(CAMPAIGN_DL) && !defined(CAMPAIGN_FR)
if (GET_RACE(ch) == RACE_TRELUX)
{
bonuses[BONUS_TYPE_RACIAL] += 4;
Expand Down
1 change: 1 addition & 0 deletions handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ void aff_apply_modify(struct char_data *ch, byte loc, sh_int mod, const char *ms
case APPLY_SPELL_POTENCY:
case APPLY_SPELL_DC:
case APPLY_SPELL_DURATION:
case APPLY_SPELL_PENETRATION:
break;

/* end Do Not Use */
Expand Down
4 changes: 3 additions & 1 deletion interpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ cpp_extern const struct command_info cmd_info[] = {
{"blank", "blank", POS_RECLINING, do_consign_to_oblivion, 0, SCMD_BLANK, FALSE, ACTION_NONE, {0, 0}, NULL},
{"blooddrain", "blooddrain", POS_RESTING, do_blood_drain, 0, 0, FALSE, ACTION_STANDARD, {0, 0}, NULL},
{"bombs", "bombs", POS_RESTING, do_bombs, 0, 0, FALSE, ACTION_STANDARD, {0, 0}, NULL},
{"bonearmor", "bonearmor", POS_STANDING, do_not_here, 1, 0, FALSE, ACTION_NONE, {0, 0}, NULL},
{"bonearmor", "bonearmor", POS_STANDING, do_need_craft_kit, 1, 0, FALSE, ACTION_NONE, {0, 0}, NULL},
{"boosts", "boost", POS_RECLINING, do_boosts, 1, 0, FALSE, ACTION_NONE, {0, 0}, NULL},
{"buck", "buck", POS_FIGHTING, do_buck, 1, 0, FALSE, ACTION_MOVE, {0, 6}, NULL},
{"bodyslam", "bodyslam", POS_FIGHTING, do_bodyslam, 1, 0, FALSE, ACTION_STANDARD | ACTION_MOVE, {6, 6}, can_bodyslam},
Expand Down Expand Up @@ -541,6 +541,7 @@ cpp_extern const struct command_info cmd_info[] = {
{"levels", "lev", POS_DEAD, do_levels, 0, 0, TRUE, ACTION_NONE, {0, 0}, NULL},
{"lifebond", "lifebond", POS_STANDING, do_gen_tog, 1, SCMD_LIFE_BOND, FALSE, ACTION_NONE, {0, 0}, NULL},
{"listen", "listen", POS_STANDING, do_listen, 1, 0, FALSE, ACTION_NONE, {0, 0}, NULL},
{"listraces", "listraces", POS_DEAD, do_listraces, 1, 0, FALSE, ACTION_NONE, {0, 0}, NULL},
{"links", "lin", POS_STANDING, do_links, LVL_IMMORT, 0, TRUE, ACTION_NONE, {0, 0}, NULL},
{"lock", "loc", POS_SITTING, do_gen_door, 0, SCMD_LOCK, FALSE, ACTION_NONE, {0, 0}, NULL},
{"load", "load", POS_DEAD, do_load, LVL_BUILDER, 0, TRUE, ACTION_NONE, {0, 0}, NULL},
Expand Down Expand Up @@ -749,6 +750,7 @@ cpp_extern const struct command_info cmd_info[] = {
{"scan", "sca", POS_RECLINING, do_scan, 0, 0, FALSE, ACTION_NONE, {0, 0}, NULL},
{"scopy", "scopy", POS_DEAD, do_oasis_copy, LVL_STAFF, CON_SEDIT, TRUE, ACTION_NONE, {0, 0}, NULL},
{"scribe", "scribe", POS_RESTING, do_scribe, 0, 0, FALSE, ACTION_NONE, {0, 0}, NULL},
{"scrounge", "scrounge", POS_STANDING, do_scrounge, 0, 0, FALSE, ACTION_NONE, {0, 0}, NULL},
{"sit", "si", POS_RECLINING, do_sit, 0, 0, FALSE, ACTION_NONE, {0, 0}, NULL},
{"'", "'", POS_RECLINING, do_say, 0, 0, TRUE, ACTION_NONE, {0, 0}, NULL},
{"save", "sav", POS_SLEEPING, do_save, 0, 0, TRUE, ACTION_NONE, {0, 0}, NULL},
Expand Down
Loading

0 comments on commit 5a2bd1a

Please sign in to comment.