Skip to content

Commit

Permalink
Changelog May 28, 2024
Browse files Browse the repository at this point in the history
-Added Dragon Rider class and associated abilites.
-Account experience cost to unlock prestige classes temporarily reduced by 90%.
-Added autogroup toggle so that any NPC that is added as a follower is automatically added to the party's group.
-The staff command 'last' will now show race/class/level info for the characters listed.
-Changed resistance names for slicing, punture and force to the more relevant names: slashing, piercing, bludgeoning.
-Fixed aggro_align flags to only trigger against the proper alignment.
-Fixed a bug that wasn't saving certain ability uses over game sessions.
-The shop flag 'HAS_UNLIMITE_CASH' should now work properly. This has been set on the Palanthas and Sanction pawn shops.
  • Loading branch information
GickerLDS committed May 28, 2024
1 parent 38bd840 commit d85c19c
Show file tree
Hide file tree
Showing 36 changed files with 1,124 additions and 135 deletions.
8 changes: 8 additions & 0 deletions account.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,11 @@ ACMD(do_accexp)
{
if (has_unlocked_class(ch, i) || !CLSLIST_LOCK(i))
continue;
#if defined(CAMPAIGN_DL)
cost = CLSLIST_COST(i) / 10;
#else
cost = CLSLIST_COST(i);
#endif
send_to_char(ch, "%s (%d account experience)\r\n", CLSLIST_NAME(i), cost);
}
return;
Expand All @@ -295,7 +299,11 @@ ACMD(do_accexp)
if (is_abbrev(arg2, CLSLIST_NAME(i)) && !has_unlocked_class(ch, i) &&
CLSLIST_LOCK(i))
{
#if defined(CAMPAIGN_DL)
cost = CLSLIST_COST(i) / 10;
#else
cost = CLSLIST_COST(i);
#endif
break;
}
}
Expand Down
5 changes: 5 additions & 0 deletions act.h
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ ACMD_DECL(do_racefix);
#define SCMD_AUTO_AUGMENT 57
#define SCMD_AUTOSORT 58
#define SCMD_AUTOSTORE 59
#define SCMD_AUTOGROUP 60

/* do_quit */
ACMD_DECL(do_quit);
Expand Down Expand Up @@ -1002,6 +1003,10 @@ ACMDCHECK(can_psionic_focus);
ACMD_DECL(do_double_manifest);
ACMDCHECK(can_double_manifest);

// dragon riders
ACMD_DECL(do_deadly_power);
ACMD_DECL(do_gloryscall);

// deities.c
ACMD_DECL(do_devote);

Expand Down
18 changes: 18 additions & 0 deletions act.informative.c
Original file line number Diff line number Diff line change
Expand Up @@ -1936,6 +1936,8 @@ void perform_cooldowns(struct char_data *ch, struct char_data *k)
send_to_char(ch, "Purify Cooldown - Duration: %d seconds\r\n", (int)(event_time(pMudEvent->pEvent) / 10));
if ((pMudEvent = char_has_mud_event(k, eC_ANIMAL)))
send_to_char(ch, "Call Companion Cooldown - Duration: %d seconds\r\n", (int)(event_time(pMudEvent->pEvent) / 10));
if ((pMudEvent = char_has_mud_event(k, eC_DRAGONMOUNT)))
send_to_char(ch, "Call Dragon Cooldown - Duration: %d seconds\r\n", (int)(event_time(pMudEvent->pEvent) / 10));
if ((pMudEvent = char_has_mud_event(k, eC_EIDOLON)))
send_to_char(ch, "Call Eidolon Cooldown - Duration: %d seconds\r\n", (int)(event_time(pMudEvent->pEvent) / 10));
if ((pMudEvent = char_has_mud_event(k, eC_FAMILIAR)))
Expand Down Expand Up @@ -2042,6 +2044,8 @@ void perform_cooldowns(struct char_data *ch, struct char_data *k)
send_to_char(ch, "Crown of Knighthood Cooldown - Duration: %d seconds\r\n", (int)(event_time(pMudEvent->pEvent) / 10));
if ((pMudEvent = char_has_mud_event(k, eCOSMICUNDERSTANDING)))
send_to_char(ch, "Cosmic Understanding Cooldown - Duration: %d seconds\r\n", (int)(event_time(pMudEvent->pEvent) / 10));
if ((pMudEvent = char_has_mud_event(k, eDRAGOONPOINTS)))
send_to_char(ch, "Dragoon Points Cooldown - Duration: %d seconds\r\n", (int)(event_time(pMudEvent->pEvent) / 10));

if (GET_SETCLOAK_TIMER(ch) > 0)
send_to_char(ch, "Vampire 'Setcloak' Cooldown - Duration: %d seconds\r\n", GET_SETCLOAK_TIMER(ch) * 6);
Expand Down Expand Up @@ -3456,6 +3460,20 @@ ACMD(do_score)

send_to_char(ch, "\tC");
draw_line(ch, line_length, '-', '-');
if (CLASS_LEVEL(ch, CLASS_DRAGONRIDER) && GET_DRAGON_RIDER_DRAGON_TYPE(ch))
{
send_to_char(ch, "\tc");
send_to_char(ch, "Dragon Mount Type: %s (%s damage) ",
DRCHRTLIST_NAME(GET_DRAGON_RIDER_DRAGON_TYPE(ch)),
DRCHRT_ENERGY_TYPE(GET_DRAGON_RIDER_DRAGON_TYPE(ch)));
if (GET_DRAGON_BOND_TYPE(ch))
{
send_to_char(ch, "Dragon Bond Type: %s", dragon_bond_types[GET_DRAGON_BOND_TYPE(ch)]);
}
send_to_char(ch, "\r\n");
send_to_char(ch, "\tC");
draw_line(ch, line_length, '-', '-');
}
}

send_to_char(ch, "\tDType 'attacks' or 'defenses' to see your melee offense and defense\tn\r\n");
Expand Down
45 changes: 45 additions & 0 deletions act.offensive.c
Original file line number Diff line number Diff line change
Expand Up @@ -10627,6 +10627,51 @@ ACMD(do_prescience)
USE_SWIFT_ACTION(ch);
}

ACMD(do_gloryscall)
{

int uses_remaining = 0;

if (!HAS_DRAGON_BOND_ABIL(ch, 7, DRAGON_BOND_KIN))
{
send_to_char(ch, "You do not have the glory's call ability.\r\n");
return;
}

if (affected_by_spell(ch, AFFECT_GLORYS_CALL))
{
send_to_char(ch, "You are already benefitting from glory's call.\r\n");
return;
}

if ((uses_remaining = daily_uses_remaining(ch, FEAT_DRAGOON_POINTS)) == 0)
{
send_to_char(ch, "You need to recover dragoon points in order to use this ability again.\r\n");
return;
}

if (uses_remaining < 0)
{
send_to_char(ch, "You have no uses in this ability.\r\n");
return;
}

if (!is_action_available(ch, atSWIFT, TRUE))
{
send_to_char(ch, "Glory's call requires a swift action available to use.\r\n");
return;
}

send_to_char(ch, "You raise your voice and call your allies to glory!\r\n");

call_magic(ch, ch, 0, AFFECT_GLORYS_CALL, 0, GET_LEVEL(ch), CAST_INNATE);

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

USE_SWIFT_ACTION(ch);
}

/* cleanup! */
#undef RAGE_AFFECTS
#undef D_STANCE_AFFECTS
Expand Down
95 changes: 94 additions & 1 deletion act.other.c
Original file line number Diff line number Diff line change
Expand Up @@ -1701,6 +1701,26 @@ void perform_call(struct char_data *ch, int call_type, int level)
if (!(mob_num = GET_ANIMAL_COMPANION(ch)))
mob_num = 63; // meant for npc's

break;
case MOB_C_DRAGON:
/* do they even have a valid selection yet? */
if (!IS_NPC(ch) && GET_DRAGON_RIDER_DRAGON_TYPE(ch) <= 0)
{
send_to_char(ch, "You have to select your dragon mount type via the 'study' command.\r\n");
return;
}

/* is the ability on cooldown? */
if (char_has_mud_event(ch, eC_DRAGONMOUNT))
{
send_to_char(ch, "You must wait longer before you can use this ability again.\r\n");
return;
}

/* todo: seriously, fix this */
if (!(mob_num = (GET_DRAGON_RIDER_DRAGON_TYPE(ch) + 40400)))
mob_num = 39; // meant for npc's

break;
case MOB_C_FAMILIAR:
/* do they even have a valid selection yet? */
Expand Down Expand Up @@ -1833,6 +1853,10 @@ void perform_call(struct char_data *ch, int call_type, int level)
GET_REAL_MAX_HIT(mob) += 20;
GET_HIT(mob) = GET_REAL_MAX_HIT(mob);
break;
case MOB_C_DRAGON:
GET_LEVEL(mob) = MIN(25, level);
autoroll_mob(mob, true, true);
break;
case MOB_SHADOW:
GET_LEVEL(mob) = MIN(25, level);
autoroll_mob(mob, true, true);
Expand Down Expand Up @@ -1902,6 +1926,10 @@ void perform_call(struct char_data *ch, int call_type, int level)
{
attach_mud_event(new_mud_event(eC_ANIMAL, ch, NULL), 4 * SECS_PER_MUD_DAY);
}
if (call_type == MOB_C_DRAGON)
{
attach_mud_event(new_mud_event(eC_DRAGONMOUNT, ch, NULL), 4 * SECS_PER_MUD_DAY);
}
else if (call_type == MOB_C_FAMILIAR)
{
attach_mud_event(new_mud_event(eC_FAMILIAR, ch, NULL), 4 * SECS_PER_MUD_DAY);
Expand Down Expand Up @@ -1959,6 +1987,23 @@ ACMD(do_call)
}
call_type = MOB_C_ANIMAL;
}
else if (is_abbrev(argument, "dragon"))
{
level = MIN(256, GET_LEVEL(ch));

if (!HAS_FEAT(ch, FEAT_DRAGON_BOND))
{
send_to_char(ch, "You do not have an dragon mount.\r\n");
return;
}

if (level <= 0)
{
send_to_char(ch, "You are too inexperienced to use this ability!\r\n");
return;
}
call_type = MOB_C_DRAGON;
}
else if (is_abbrev(argument, "familiar"))
{
level = CLASS_LEVEL(ch, CLASS_SORCERER) + CLASS_LEVEL(ch, CLASS_WIZARD);
Expand Down Expand Up @@ -2044,7 +2089,7 @@ ACMD(do_call)
}
else
{
send_to_char(ch, "Usage: call <companion/familiar/mount/shadow/eidolon/cohort>\r\n Lost followers can be retrieved via 'summon' command.\r\n");
send_to_char(ch, "Usage: call <companion/familiar/mount/shadow/eidolon/cohort/dragon>\r\n Lost followers can be retrieved via 'summon' command.\r\n");
return;
}

Expand Down Expand Up @@ -2157,6 +2202,14 @@ ACMD(do_dismiss)
change_event_duration(ch, eC_ANIMAL, (59 * PASSES_PER_SEC));
}
}
if (MOB_FLAGGED(vict, MOB_C_DRAGON))
{
if ((pMudEvent = char_has_mud_event(ch, eC_DRAGONMOUNT)) &&
event_time(pMudEvent->pEvent) > (59 * PASSES_PER_SEC))
{
change_event_duration(ch, eC_DRAGONMOUNT, (59 * PASSES_PER_SEC));
}
}
else if (MOB_FLAGGED(vict, MOB_C_FAMILIAR))
{
if ((pMudEvent = char_has_mud_event(ch, eC_FAMILIAR)) &&
Expand Down Expand Up @@ -7103,6 +7156,9 @@ ACMD(do_gen_tog)
// 59
{"Autostore disabled.\r\n",
"Autostore enabled.\r\n"},
// 60
{"Autogroup disabled.\r\n",
"Autogroup enabled.\r\n"},
};

if (IS_NPC(ch))
Expand Down Expand Up @@ -7173,6 +7229,9 @@ ACMD(do_gen_tog)
case SCMD_AUTOSORT:
result = PRF_TOG_CHK(ch, PRF_AUTO_SORT);
break;
case SCMD_AUTOGROUP:
result = PRF_TOG_CHK(ch, PRF_AUTO_GROUP);
break;
case SCMD_AUTOSTORE:
result = PRF_TOG_CHK(ch, PRF_AUTO_STORE);
break;
Expand Down Expand Up @@ -9245,6 +9304,40 @@ ACMDU(do_weapon_touch)
do_gen_cast(ch, argument, cmd, SCMD_WEAPON_TOUCH);
}

ACMD(do_deadly_power)
{
if (IS_NPC(ch))
{
send_to_char(ch, "This can be done by player characters only.\r\n");
return;
}

if (!HAS_DRAGON_BOND_ABIL(ch, 10, DRAGON_BOND_MAGE))
{
send_to_char(ch, "You don't have access to the deadly power ability.\r\n");
return;
}

if (!is_action_available(ch, atSWIFT, TRUE))
{
send_to_char(ch, "You need a swift action to use this ability.\r\n");
return;
}

int hp_cost = GET_MAX_HIT(ch) / 3;

if (GET_HIT(ch) < hp_cost)
{
send_to_char(ch, "You don't have enough hit points to do this right now. You need %d and have %d.\r\n", hp_cost, GET_HIT(ch));
return;
}

send_to_char(ch, "You spend %d hit points to regain a random spell slot or prepared spell.\r\n", hp_cost);
GET_HIT(ch) -= hp_cost;
star_circlet_proc(ch, 1);
USE_SWIFT_ACTION(ch);
}

/* undefines */
#undef DEBUG_MODE

Expand Down
18 changes: 12 additions & 6 deletions act.wizard.c
Original file line number Diff line number Diff line change
Expand Up @@ -2654,15 +2654,16 @@ void show_full_last_command(struct char_data *ch)
MYSQL_RES *res;
MYSQL_ROW row;

send_to_char(ch, "%-20s %-20s %s\r\n", "ACCOUNT", "NAME", "LAST ONLINE (SERVER TIME)");
snprintf(query, sizeof(query), "SELECT a.name, a.last_online, b.name AS account_name FROM player_data a LEFT JOIN account_data b ON a.account_id=b.id ORDER BY a.last_online DESC LIMIT 40;");
send_to_char(ch, "%-20s %-20s %-25s %s\r\n", "ACCOUNT", "NAME", "LAST ONLINE (SERVER TIME)", "CHARACTER INFO");
snprintf(query, sizeof(query), "SELECT a.name, a.last_online, a.character_info, b.name AS account_name FROM player_data a "
"LEFT JOIN account_data b ON a.account_id=b.id ORDER BY a.last_online DESC LIMIT 40;");
mysql_query(conn, query);
res = mysql_use_result(conn);
if (res != NULL)
{
while ((row = mysql_fetch_row(res)) != NULL)
{
send_to_char(ch, "%-20s %-20s %-15s\r\n", row[2], row[0], row[1]);
send_to_char(ch, "%-20s %-20s %-25s %s\r\n", row[3], row[0], row[1], row[2]);
}
}
mysql_free_result(res);
Expand All @@ -2675,15 +2676,16 @@ void show_full_last_command_unique(struct char_data *ch)
MYSQL_RES *res;
MYSQL_ROW row;

send_to_char(ch, "%-20s %-20s %s\r\n", "ACCOUNT", "NAME", "LAST ONLINE (SERVER TIME)");
snprintf(query, sizeof(query), "SELECT a.name, a.last_online, b.name AS account_name FROM player_data a LEFT JOIN account_data b ON a.account_id=b.id GROUP BY b.name ORDER BY a.last_online DESC LIMIT 40;");
send_to_char(ch, "%-20s %-20s %-25s %s\r\n", "ACCOUNT", "NAME", "LAST ONLINE (SERVER TIME)", "CHARACTER INFO");
snprintf(query, sizeof(query), "SELECT a.name, a.last_online, b.name AS account_name, a.character_info FROM player_data a "
"LEFT JOIN account_data b ON a.account_id=b.id GROUP BY b.name ORDER BY a.last_online DESC LIMIT 40;");
mysql_query(conn, query);
res = mysql_use_result(conn);
if (res != NULL)
{
while ((row = mysql_fetch_row(res)) != NULL)
{
send_to_char(ch, "%-20s %-20s %-15s\r\n", row[2], row[0], row[1]);
send_to_char(ch, "%-20s %-20s %-25s %s\r\n", row[2], row[0], row[1], row[3]);
}
}
mysql_free_result(res);
Expand Down Expand Up @@ -5930,6 +5932,10 @@ break;
{
event_cancel_specific(och, eC_ANIMAL);
}
if (char_has_mud_event(och, eC_DRAGONMOUNT))
{
event_cancel_specific(och, eC_DRAGONMOUNT);
}
if (char_has_mud_event(och, eC_FAMILIAR))
{
event_cancel_specific(och, eC_FAMILIAR);
Expand Down
Loading

0 comments on commit d85c19c

Please sign in to comment.