Skip to content

Commit

Permalink
Added A LOT of dragonlance theme specific code.
Browse files Browse the repository at this point in the history
Also made these changes:
added support for dragonlance campaign setting
added auto prep toggle, which allows spellcasters to automatically start preparing spells when they rest.
characters will now automatically create their own group when they log in or after a copyover.  Pets are automatically added to the owners group in such situations as well.
added kender race for dragonlance and lumia campaign settings.
added hoopak weapon type.
eidolon custom descriptions will save now.
Added new quest type: multiple mob kill.  Allows you to provide a comma-separated list of mob vnums valid for the quest.
Added ability to specify a buff target with the buff command.
Pets should now come along with owners when owners change rooms via script or carriage/airships/sailing.
Buffing psionic powers temporarily disabled as it was causing a severe bug that sometimes wiped a person's pfile.

[Oct 15 2023] - Gicker
  Overland flight now works. Please see HELP OVERLAND FLIGHT for a disclaimer on travel times with this spell.
[Oct 14 2023] - Gicker
  Arcane spellcasting requirements or prestige classes will now include summoner class
  Fixed toggling auto-prep on rest option in prefedit
  fixed a message on siphon might so that a partial resist will show as partial not the same as if fully resisted.
  fixed a bug with picking locks so you need at least one rank in disable device to be able to pick locks
  fixed a few shops in palanthas that stopped working
  Crafting kits now sold in the Crafting Guild in Palanthas.
  Characters now start with a crafting kit in their backpack.
[Oct 13 2023] - Gicker
  Added a crafting area west of the Palanthas bank on Center Street.
  Added a music instrument shop on market street in Palanthas
  Added a mercenary shop on market street
  Added bonus exp when grouping with other players. equal to +10% for each group member (minimum 2)
  summoners are now considered arcane spellcasters for certain feats, and blackguards are also for divine spellcasting feats.
  Kender now get +2 to damage when wielding a hoopak to offset their size penalty
[Oct 12 2023] - Gicker
  fixed spells: holy weapon, unholy weapon, continual flame, globe of light
  fixed geniekind spell
  Fixed summon mount and communal summon mount spells
  Infravision now let's you see fully at night if outside.
  Fixed ghost wolf spell.
[Oct 11 2023] - Gicker
  Max number of items that can be carried now shows in score.
  Increased the base number of items a person can carry by 10.
  casting spells in combat will now yield experience gains.
  added recall potions for sanction and solace sold in the respective cities. Teniqua in Sanction and Mordeth in Solace.
  fixed a bug where quest mob kills wouldn't count if killed by a charmie or other group member.
[Oct 10 2023] - Gicker
  Added recall potions in the wizard academy shop in Palanthas.
  temporarily disabled blocker mobs until we can fix them
  Fixed a bug where summoners using call eidolon would crash the mud if they haven't set custom descriptions for their eidolon.
  Fixed a bug where some spellcaster classes would cause a crash when resting.
  • Loading branch information
GickerLDS committed Oct 15, 2023
1 parent d8ceb58 commit eb233a5
Show file tree
Hide file tree
Showing 62 changed files with 4,014 additions and 366 deletions.
8 changes: 7 additions & 1 deletion account.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ int change_account_xp(struct char_data *ch, int change_val)

int has_unlocked_race(struct char_data *ch, int race)
{
#ifdef CAMPAIGN_FR
#if defined(CAMPAIGN_FR) || defined(CAMPAIGN_DL)
if (!ch || !ch->desc || !ch->desc->account)
#else
if (!ch || !ch->desc || !ch->desc->account || race == RACE_LICH || race == RACE_VAMPIRE)
Expand Down Expand Up @@ -197,6 +197,8 @@ ACMD(do_accexp)
send_to_char(ch, "Please choose from the following races:\r\n");
#ifdef CAMPAIGN_FR
for (i = 0; i < NUM_EXTENDED_PC_RACES; i++)
#elif defined(CAMPAIGN_DL)
for (i = DL_RACE_START; i < DL_RACE_END; i++)
#else
for (i = 0; i < NUM_RACES; i++)
#endif
Expand All @@ -211,6 +213,8 @@ ACMD(do_accexp)
}
#ifdef CAMPAIGN_FR
for (i = 0; i < NUM_EXTENDED_PC_RACES; i++)
#elif defined(CAMPAIGN_DL)
for (i = DL_RACE_START; i < DL_RACE_END; i++)
#else
for (i = 0; i < NUM_RACES; i++)
#endif
Expand All @@ -223,6 +227,8 @@ ACMD(do_accexp)
}
#ifdef CAMPAIGN_FR
if (i >= NUM_EXTENDED_PC_RACES)
#elif defined(CAMPAING_DL)
if (i >= DL_RACE_END)
#else
if (i >= NUM_RACES)
#endif
Expand Down
6 changes: 5 additions & 1 deletion act.h
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,8 @@ ACMD_DECL(do_shieldslam);
ACMDCHECK(can_shieldslam);
ACMD_DECL(do_dirtkick);
ACMDCHECK(can_dirtkick);
ACMD_DECL(do_minotaur_gore);
ACMD_DECL(do_bite_attack);
ACMD_DECL(do_sap);
ACMDCHECK(can_sap);
ACMD_DECL(do_assist);
Expand Down Expand Up @@ -724,6 +726,7 @@ ACMD_DECL(do_racefix);
#define SCMD_SICKENING_AURA 53
#define SCMD_LIFE_BOND 54
#define SCMD_CHARMIE_COMBATROLL 55
#define SCMD_AUTO_PREP 56

/* do_quit */
ACMD_DECL(do_quit);
Expand Down Expand Up @@ -787,10 +790,11 @@ ACMD_DECL(do_ethshift);
ACMD_DECL(do_handleanimal);
// ACMD_DECL(do_nohints);
ACMD_DECL(do_todo);
ACMD_DECL(do_buffself);
ACMD_DECL(do_buff);
ACMDCHECK(can_tinker);
ACMD_DECL(do_tinker);
ACMD_DECL(do_eldritch);
ACMD_DECL(do_borrow);

/*****************************************************************************
* Begin Functions and defines for act.social.c
Expand Down
104 changes: 96 additions & 8 deletions act.informative.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@ static void list_one_char(struct char_data *i, struct char_data *ch)
{
if (IS_NPC(i))
send_to_char(ch, "[%d] ", GET_MOB_VNUM(i));
send_to_char(ch, "[%2d] ", GET_LEVEL(i));
if (SCRIPT(i) && TRIGGERS(SCRIPT(i)))
{
if (!TRIGGERS(SCRIPT(i))->next)
Expand Down Expand Up @@ -815,7 +816,10 @@ static void list_one_char(struct char_data *i, struct char_data *ch)
if (IS_NPC(i) && (GET_MOB_SPEC(i) == questmaster))
send_to_char(ch, "\tn(\tY!\tn) ");

send_to_char(ch, "%s", i->player.long_descr);
if (strstr(i->player.long_descr, "\n"))
send_to_char(ch, "\ty%s", i->player.long_descr);
else
send_to_char(ch, "\ty%s\r\n", i->player.long_descr);

if (AFF_FLAGGED(i, AFF_SANCTUARY))
act("...$e glows with a bright light!", FALSE, i, 0, ch, TO_VICT);
Expand Down Expand Up @@ -1272,9 +1276,30 @@ void look_at_room(struct char_data *ch, int ignore_brief)
"In the distance, your destination beckons forward, a faint outline on the horizon.\r\n"
"Judging by how far you've gone so far you should arrive in\r\n"
"about %d minutes and %d seconds to your destination: %s.\r\n",
ch->player_specials->travel_timer / 60, ch->player_specials->travel_timer % 60,
ch->player_specials->travel_timer / 60, ch->player_specials->travel_timer % 60,
#ifdef CAMPAIGN_FR
zone_entrances[ch->player_specials->travel_locale][0]);
#elif defined(CAMPAIGN_DL)
zone_entrances[ch->player_specials->travel_locale][0]);
#else
carriage_locales[ch->player_specials->travel_locale][0]);
#endif
rm->description = strdup(buf);
}
else if (ch->player_specials->travel_type == TRAVEL_OVERLAND_FLIGHT_SAIL)
{
rm->name = strdup("Flying High Above in the Sky");
snprintf(buf, sizeof(buf),
"Soaring through the air, high above in the sky, the landscape below stretches\r\n"
"out endlessly, a tapestry of green forests, blue oceans, and sprawling cities.\r\n"
"In the distance, your destination beckons forward, a faint outline on the horizon.\r\n"
"Judging by how far you've gone so far you should arrive in\r\n"
"about %d minutes and %d seconds to your destination: %s.\r\n",
ch->player_specials->travel_timer / 60, ch->player_specials->travel_timer % 60,
#ifdef CAMPAIGN_FR
zone_entrances[ch->player_specials->travel_locale][0]);
#elif defined(CAMPAIGN_DL)
sailing_locales[ch->player_specials->travel_locale][0]);
#else
carriage_locales[ch->player_specials->travel_locale][0]);
#endif
Expand Down Expand Up @@ -1414,6 +1439,16 @@ void look_at_room(struct char_data *ch, int ignore_brief)
}
i++;
}
i = 0;
while (atoi(sailing_locales[i][1]) != 0)
{
if (GET_ROOM_VNUM(IN_ROOM(ch)) == atoi(sailing_locales[i][1]))
{
send_to_char(ch, "\r\nThis room is a ferry dock. Use the \tYsail\tn command to see options.\r\n");
break;
}
i++;
}

if (in_encounter_room(ch))
{
Expand Down Expand Up @@ -3183,8 +3218,8 @@ ACMD(do_score)
send_to_char(ch, "\tcAlignment : \tn%s (%d)\r\n", get_align_by_num(GET_ALIGNMENT(ch)), GET_ALIGNMENT(ch));
send_to_char(ch, "\tcAge : \tn%-3d \tcyrs / \tn%2d \tcmths \tcPlayed : \tn%d days / %d hrs\r\n",
age(ch)->year, age(ch)->month, playing_time.day, playing_time.hours);
send_to_char(ch, "\tcSize : \tn%-20s \tcLoad : \tn%d\tc/\tn%d \tclbs \tcNum Items: \tn%d\r\n",
size_names[GET_SIZE(ch)], IS_CARRYING_W(ch), CAN_CARRY_W(ch), IS_CARRYING_N(ch));
send_to_char(ch, "\tcSize : \tn%-20s \tcLoad : \tn%d\tc/\tn%d \tclbs \tcNum Items: \tn%d\tc/\tn%d \tn\r\n",
size_names[GET_SIZE(ch)], IS_CARRYING_W(ch), CAN_CARRY_W(ch), IS_CARRYING_N(ch), CAN_CARRY_N(ch));

send_to_char(ch, "\tC");
draw_line(ch, line_length, '-', '-');
Expand Down Expand Up @@ -3773,7 +3808,13 @@ ACMD(do_who)
const int max_level;
int count; /* must always start as 0 */
} rank[] = {
#if defined(CAMPAIGN_DL)
{"\tb--\tB= \tCChronicles of Krynn Staff \tB=\tb--\tn\r\n\tc-=-=-=-=-=-=-=-=-=-=-=-\tn\r\n", LVL_IMMORT, LVL_IMPL, 0},
#elif defined(CAMPAIGN_FR)
{"\tb--\tB= \tCFaerun Staff \tB=\tb--\tn\r\n\tc-=-=-=-=-=-=-=-=-=-=-=-\tn\r\n", LVL_IMMORT, LVL_IMPL, 0},
#else
{"\tb--\tB= \tCLuminari Staff \tB=\tb--\tn\r\n\tc-=-=-=-=-=-=-=-=-=-=-=-\tn\r\n", LVL_IMMORT, LVL_IMPL, 0},
#endif
{"\tb--\tB=\tC Mortals \tB=\tb--\tn\r\n\tc-=-=-=-=-=-=-=-=-=-=-=-\tn\r\n", 1, LVL_IMMORT - 1, 0},
{"\n", 0, 0, 0}};

Expand Down Expand Up @@ -5519,7 +5560,7 @@ bool get_zone_levels(zone_rnum znum, char *buf)

ACMD(do_areas)
{
int i, hilev = -1, lolev = -1, zcount = 0, lev_set, len = 0, tmp_len = 0;
int i, hilev = -1, lolev = -1, zcount = 0, lev_set, len = 0, tmp_len = 0, count = 0;
char arg[MAX_INPUT_LENGTH] = {'\0'}, *second, lev_str[MAX_INPUT_LENGTH] = {'\0'}, buf[MAX_STRING_LENGTH] = {'\0'};
// char zvn[MAX_INPUT_LENGTH] = {'\0'};
bool show_zone = FALSE, overlap = FALSE, overlap_shown = FALSE, show_popularity = FALSE;
Expand All @@ -5528,7 +5569,15 @@ ACMD(do_areas)

one_argument(argument, arg, sizeof(arg));

if (*arg)
if (!*arg)
{
lolev = GET_LEVEL(ch);
}
else if (is_abbrev(arg, "all"))
{
;
}
else
{
/* There was an arg typed - check for level range */
second = strchr(arg, '-');
Expand Down Expand Up @@ -5638,12 +5687,27 @@ ACMD(do_areas)
if (overlap)
overlap_shown = TRUE;
lev_set = get_zone_levels(i, lev_str);
tmp_len = snprintf(buf + len, sizeof(buf) - len, "\tn(%3d) %s%-*s\tn %s%s\tn\r\n", ++zcount, overlap ? QRED : QCYN,
tmp_len = snprintf(buf + len, sizeof(buf) - len, "\tn(%3d) %s%-*s\tn %s%s\tn ", ++zcount, overlap ? QRED : QCYN,
count_color_chars(zone_table[i].name) + 30, zone_table[i].name,
lev_set ? "\tc" : "\tn", lev_set ? lev_str : "All Levels");
len += tmp_len;
if ((count % 2) == 1)
{
tmp_len = snprintf(buf + len, sizeof(buf) - len, "\r\n");
len += tmp_len;
}
count++;
}
}
if ((count % 2) != 1)
{
tmp_len = snprintf(buf + len, sizeof(buf) - len, "\r\n");
len += tmp_len;
}

tmp_len = snprintf(buf + len, sizeof(buf) - len, "\r\n\r\n");
len += tmp_len;

tmp_len = snprintf(buf + len, sizeof(buf) - len, "%s%d%s area%s found.\r\n", QYEL, zcount, QNRM, zcount == 1 ? "" : "s");
len += tmp_len;

Expand All @@ -5653,8 +5717,15 @@ ACMD(do_areas)
len += tmp_len;
}

#if defined(CAMPAIGN_DL)
tmp_len = snprintf(buf + len, sizeof(buf) - len, "To show all areas type 'areas all', or to filter zones by level see HELP AREAS.\r\n");
len += tmp_len;
tmp_len = snprintf(buf + len, sizeof(buf) - len, "To show more information on a specific zone, type HELP (zone name as shown in areas command).\r\n");
len += tmp_len;
#else
tmp_len = snprintf(buf + len, sizeof(buf) - len, "More areas are listed in HELP ZONES");
len += tmp_len;
#endif

if (zcount == 0)
send_to_char(ch, "No areas found.\r\n");
Expand Down Expand Up @@ -6917,6 +6988,9 @@ ACMD(do_flightlist)
#else
i = 0;
text_line(ch, "\tYOverland Flight Spell Destinations\tC", 80, '-', '-');
#if defined(CAMPAIGN_DL)
text_line(ch, "\tYCarriage Stops:\tC", 80, '-', '-');
#endif
while (atoi(carriage_locales[i][1]) != 0)
{
send_to_char(ch, "%-39s ", carriage_locales[i][0]);
Expand All @@ -6925,8 +6999,22 @@ ACMD(do_flightlist)
i++;
}
if ((i % 2) != 1)
send_to_char(ch, "\r\n");
send_to_char(ch, "\r\n");
send_to_char(ch, "\r\n");
i = 0;
#if defined(CAMPAIGN_DL)
text_line(ch, "\tYSailing Ports\tC", 80, '-', '-');
while (atoi(sailing_locales[i][1]) != 0)
{
send_to_char(ch, "%-39s ", sailing_locales[i][0]);
if ((i % 2) == 1)
send_to_char(ch, "\r\n");
i++;
}
if ((i % 2) != 1)
send_to_char(ch, "\r\n");
send_to_char(ch, "\r\n");
#endif
#endif
}

Expand Down
17 changes: 14 additions & 3 deletions act.item.c
Original file line number Diff line number Diff line change
Expand Up @@ -1874,8 +1874,8 @@ static void perform_put(struct char_data *ch, struct obj_data *obj, struct obj_d
return;
}

#ifdef CAMPAIGN_FR
if (GET_OBJ_TYPE(cont) == ITEM_CONTAINER && num_obj_in_obj(cont) >= 10)
#if defined(CAMPAIGN_FR) || defined(CAMPAIGN_DL)
if (GET_OBJ_TYPE(cont) == ITEM_CONTAINER && num_obj_in_obj(cont) >= 10 && !is_crafting_kit(cont))
{
send_to_char(ch, "Containers can only fit 10 items. Please use the 'sort' command to organize your inventory.\r\n");
return;
Expand Down Expand Up @@ -7062,14 +7062,25 @@ ACMDU(do_tinker)
{
send_to_char(ch, "You can only tinker on armor chest pieces and weapons.\r\n");
return;
}
}

if (obj->tinker_bonus > 0)
{
send_to_char(ch, "This item has already been tinkered with.\r\n");
return;
}

#if defined(CAMPAIGN_DL)
if (dice(1, 4) == 1)
{
act("You botched your tinkering on $p, destroying it!", TRUE, ch, obj, 0, TO_CHAR);
act("$n botched $s tinkering on $p, destroying it!", TRUE, ch, obj, 0, TO_ROOM);
obj_from_char(obj);
extract_obj(obj);
return;
}
#endif

send_to_char(ch, "You have successfully tinkered with %s, improving it.\r\n", obj->short_description);
if (GET_OBJ_TYPE(obj) == ITEM_WEAPON)
send_to_char(ch, "This weapon will now get a +1 to attack roll and +1 to damage, or +2 to damage if wielded two handed.\r\n");
Expand Down
37 changes: 30 additions & 7 deletions act.movement.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,10 @@ EVENTFUNC(event_falling)
dam -= 21;
dam -= dice((HAS_FEAT(ch, FEAT_SLOW_FALL) * 4), 6);
}
if (HAS_FEAT(ch, FEAT_DRACONIAN_CONTROLLED_FALL))
{
dam /= 2;
}

if (dam <= 0)
{ /* woo! avoided damage */
Expand Down Expand Up @@ -1097,12 +1101,13 @@ int do_simple_move(struct char_data *ch, int dir, int need_specials_check)
break;
}

if (block && !IS_NPC(ch) && !PRF_FLAGGED(ch, PRF_NOHASSLE))
{
act("$N blocks your from travelling in that direction.", FALSE, ch, 0, mob, TO_CHAR);
act("$n tries to leave the room, but $N blocks $m from travelling in their direction.", FALSE, ch, 0, mob, TO_ROOM);
return 0;
}
// this is removed until we can fix blocker mobs
// if (block && !IS_NPC(ch) && !PRF_FLAGGED(ch, PRF_NOHASSLE))
// {
// act("$N blocks your from travelling in that direction.", FALSE, ch, 0, mob, TO_CHAR);
// act("$n tries to leave the room, but $N blocks $m from travelling in their direction.", FALSE, ch, 0, mob, TO_ROOM);
// return 0;
// }

// acrobatics check

Expand Down Expand Up @@ -2366,7 +2371,12 @@ static void do_doorcmd(struct char_data *ch, struct obj_data *obj, int door, int
send_to_char(ch, "That item cannot be picked.\r\n");
return;
}
if (GET_SKILL(ch, ABILITY_DISABLE_DEVICE) > 0 && skill_check(ch, ABILITY_DISABLE_DEVICE, 15))
if (GET_SKILL(ch, ABILITY_DISABLE_DEVICE) <= 0)
{
send_to_char(ch, "You do not know how to pick locks.\r\n");
return;
}
if (skill_check(ch, ABILITY_DISABLE_DEVICE, 15))
{
TOGGLE_LOCK(IN_ROOM(ch), obj, door);
send_to_char(ch, "The lock quickly yields to your skills.\r\n");
Expand Down Expand Up @@ -3151,6 +3161,19 @@ ACMD(do_rest)
change_position(ch, POS_RESTING);
break;
}

if (PRF_FLAGGED(ch, PRF_AUTO_PREP))
{
if (count_spellcasting_classes(ch) == 1)
{
do_gen_preparation(ch, "autoprep", 0, class_to_spell_prep_scmd(get_spellcasting_class(ch)));
}
else if (count_spellcasting_classes(ch) > 1)
{
send_to_char(ch, "Since you have multiple classes that can cast spells, you must prepare those spells manually. See 'class info (class name)' to see spell prep commands for your classes.\r\n");
}
}

}

ACMD(do_recline)
Expand Down
Loading

0 comments on commit eb233a5

Please sign in to comment.