Skip to content

Commit

Permalink
Added knight of the lily class.
Browse files Browse the repository at this point in the history
  • Loading branch information
GickerLDS committed May 2, 2024
1 parent cdce670 commit 38bd840
Show file tree
Hide file tree
Showing 17 changed files with 401 additions and 29 deletions.
14 changes: 14 additions & 0 deletions act.informative.c
Original file line number Diff line number Diff line change
Expand Up @@ -2040,6 +2040,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, eSOULOFKNIGHTHOOD)))
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 (GET_SETCLOAK_TIMER(ch) > 0)
send_to_char(ch, "Vampire 'Setcloak' Cooldown - Duration: %d seconds\r\n", GET_SETCLOAK_TIMER(ch) * 6);
Expand All @@ -2065,6 +2067,8 @@ void perform_cooldowns(struct char_data *ch, struct char_data *k)
send_to_char(ch, "Mission Ready Cooldown - Duration: %d seconds\r\n", GET_MISSION_COOLDOWN(k) * 6);
if (GET_KAPAK_SALIVA_HEALING_COOLDOWN(k) > 0)
send_to_char(ch, "Kapak Saliva Healing - Duration: %d seconds\r\n", GET_KAPAK_SALIVA_HEALING_COOLDOWN(k) * 6);
if (GET_FIGHT_TO_THE_DEATH_COOLDOWN(k) > 0)
send_to_char(ch, "Fight to the Death - Duration: %d seconds\r\n", GET_FIGHT_TO_THE_DEATH_COOLDOWN(k) * 6);
if (ch->char_specials.terror_cooldown > 0)
send_to_char(ch, "Aura of Terror Immunity - Duration: %d seconds\r\n", ch->char_specials.terror_cooldown * 6);

Expand Down Expand Up @@ -4083,6 +4087,16 @@ ACMD(do_who)
clan_name[20] = ' ';
}
send_to_char(ch, "\tC[ %20.20s ]\tn %s", clan_name, GET_TITLE(tch));

// num_can_see++;
if (GET_LEVEL(tch) >= LVL_IMMORT)
{
staff++;
}
else
{
mortals++;
}
#else
if (short_list)
{
Expand Down
9 changes: 8 additions & 1 deletion act.offensive.c
Original file line number Diff line number Diff line change
Expand Up @@ -3437,6 +3437,9 @@ int perform_intimidate(struct char_data *ch, struct char_data *vict)
else
resist += (GET_LEVEL(vict) / 2);

if (HAS_FEAT(vict, FEAT_DEMORALIZE))
resist += 2;

/* Should last one round, plus one second for every point over the resist */
if (attempt >= resist)
{
Expand All @@ -3455,7 +3458,11 @@ int perform_intimidate(struct char_data *ch, struct char_data *vict)
if (!FIGHTING(vict))
hit(vict, ch, TYPE_UNDEFINED, DAM_RESERVED_DBC, 0, FALSE);

if (HAS_FEAT(ch, FEAT_IMPROVED_INTIMIDATION))
if (HAS_FEAT(ch, FEAT_IMPROVED_INTIMIDATION) && HAS_FEAT(ch, FEAT_DEMORALIZE))
{
USE_SWIFT_ACTION(ch);
}
if (HAS_FEAT(ch, FEAT_IMPROVED_INTIMIDATION) || HAS_FEAT(ch, FEAT_DEMORALIZE))
{
USE_MOVE_ACTION(ch);
}
Expand Down
9 changes: 8 additions & 1 deletion act.other.c
Original file line number Diff line number Diff line change
Expand Up @@ -2588,7 +2588,7 @@ ACMD(do_respec)
}

/* level advancement, with multi-class support */
ACMD(do_gain)
ACMDU(do_gain)
{
char arg[MAX_INPUT_LENGTH] = {'\0'};
int is_altered = FALSE, num_levels = 0;
Expand Down Expand Up @@ -2661,7 +2661,14 @@ ACMD(do_gain)
}

if (GET_PREMADE_BUILD_CLASS(ch) < 0)
{
skip_spaces(&argument);
for (i = 0; i < strlen(argument); i++)
if (argument[i] == ' ') argument[i] = '-';
one_argument(argument, arg, sizeof(arg));
for (i = 0; i < strlen(arg); i++)
if (arg[i] == '-') arg[i] = ' ';
}
else
snprintf(arg, MAX_INPUT_LENGTH, "%s", class_list[GET_PREMADE_BUILD_CLASS(ch)].name);

Expand Down
203 changes: 186 additions & 17 deletions class.c

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,21 +653,22 @@ const char *class_names[] = {
"Alchemist",
"Arcane Shadow",
"Sacred Fist",
"Eldritch Knight",
"Eldritch Knight", // 20
"Psionicist",
"Spellsword",
"Shadow Dancer",
"Blackguard",
"Assassin",
"Assassin", // 25
"Inquisitor",
"Summoner",
"Warlock",
"Necromancer",
"Knight of the Crown",
"Knight of the Crown", // 30
"Knight of the Sword",
"Knight of the Rose",
"Knight of the Thorn",
"Knight of the Skull",
"Knight of the Lily", // 35
// "unfinished",
// "unfinished",
// "unfinished",
Expand Down Expand Up @@ -4609,6 +4610,7 @@ const char *spell_prep_dict[][4] = {
{"", "", "", ""}, // knight of the rose 32
{"", "", "", ""}, // knight of the thorn 33
{"", "", "", ""}, // knight of the skull 34
{"", "", "", ""}, // knight of the lily 35
// {"", "", "", "" }, /* psion */
// {"", "", "", "" }, /* psy warr */
// {"", "", "", "" }, /* soul knife */
Expand Down Expand Up @@ -4655,6 +4657,7 @@ const char *spell_consign_dict[][4] = {
{"", "", "", ""}, // knight of the rose 32
{"", "", "", ""}, // knight of the thorn 33
{"", "", "", ""}, // knight of the skull 34
{"", "", "", ""}, // knight of the lily 35
// {"", "", "", "" }, /* psion 18 */
// {"", "", "", "" }, /* psy warr 19 */
// {"", "", "", "" }, /* soul knife 20 */
Expand Down Expand Up @@ -5221,6 +5224,7 @@ const char *class_short_descriptions[] = {
"The third order of the Knights of Solamnia, bound by the tenets of nobility, bravery and leadership.", // knight of the Rose
"The arcane order of the Knights of Takhisis, clad in armor and adhering to a strict code of honor.", // knight of the thorn
"The clerical order of the Knights of Takhisis, they serve as diplomats and internal enforcers.", // knight of the skull
"The rank and file of the Knights of Takhisis and main force of their military.", // knight of the lily
""};
CHECK_TABLE_SIZE(class_short_descriptions, NUM_CLASSES + 1);

Expand Down
2 changes: 1 addition & 1 deletion depend
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ interpreter.o: interpreter.c conf.h sysdep.h structs.h bool.h protocol.h \
domains_schools.h grapple.h assign_wpn_armor.h bardic_performance.h \
spell_prep.h crafts.h new_mail.h alchemy.h staff_events.h \
premadebuilds.h missions.h transport.h hunts.h fight.h char_descs.h \
evolutions.h deities.h
evolutions.h deities.h mudlim.h
kdtree.o: kdtree.c kdtree.h
limits.o: limits.c conf.h sysdep.h structs.h bool.h protocol.h lists.h \
campaign.h utils.h db.h helpers.h perfmon.h spells.h comm.h handler.h \
Expand Down
31 changes: 31 additions & 0 deletions feats.c
Original file line number Diff line number Diff line change
Expand Up @@ -4687,6 +4687,22 @@ feato(FEAT_MOON_ELF_RACIAL_ADJUSTMENT, "moon elf racial adjustment", TRUE, FALSE
feato(FEAT_FAVOR_OF_DARKNESS, "favor of darkness", TRUE, FALSE, FALSE, FEAT_TYPE_CLASS_ABILITY,
"All weapon attacks gain +1 to hit and damage, and also deal 3d6 unholy damage per hit, and 3d10 unholy damage on a critical hit.",
"All weapon attacks gain +1 to hit and damage, and also deal 3d6 unholy damage per hit, and 3d10 unholy damage on a critical hit.");

// Knight of the Lily
feato(FEAT_UNBREAKABLE_WILL, "unbreakable will", TRUE, FALSE, FALSE, FEAT_TYPE_CLASS_ABILITY,
"Makes you immune to fear and gain +2 bonus to saves against mind affecting spells. +4 with a second rank in this feat.",
"Makes you immune to fear and gain +2 bonus to saves against mind affecting spells. +4 with a second rank in this feat.");
feato(FEAT_DEMORALIZE, "demoralize", TRUE, FALSE, FALSE, FEAT_TYPE_CLASS_ABILITY,
"Gain a +2 on intimidate checks, or on concentration checks to avoid being intimidated. Using the indimidate command uses a move "
"action instead of a standard action. If also has improved intimidate feat, uses a swift action.",
"Gain a +2 on intimidate checks, or on concentration checks to avoid being intimidated. Using the indimidate command uses a move "
"action instead of a standard action. If also has improved intimidate feat, uses a swift action.");
feato(FEAT_FIGHT_TO_THE_DEATH, "fight to the death", TRUE, FALSE, FALSE, FEAT_TYPE_CLASS_ABILITY,
"When receiving sufficient damage to be killed, the knight is instead restored to 10% of their maximum hit points. This affect has a several minute cooldown.",
"When receiving sufficient damage to be killed, the knight is instead restored to 10% of their maximum hit points. This affect has a several minute cooldown.");
feato(FEAT_ONE_THOUGHT, "one thought", TRUE, FALSE, FALSE, FEAT_TYPE_CLASS_ABILITY,
"When grouped, cannot be flanked, flat footed or surprised. All group members also receive a +1 insight bonus to AC, attack rolls and saving throws.",
"When grouped, cannot be flanked, flat footed or surprised. All group members also receive a +1 insight bonus to AC, attack rolls and saving throws.");

/* Shadow Dancer (ShadowDancer) */
/* feat-number | name | in game? | learnable? | stackable? | feat-type | short-descrip | long descrip */
Expand Down Expand Up @@ -7561,6 +7577,21 @@ 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_UNBREAKABLE_WILL)
{
if (mode == 1)
{
snprintf(buf3, sizeof(buf3), "%s (+%d)", feat_list[i].name, HAS_FEAT(ch, FEAT_UNBREAKABLE_WILL)*2);
snprintf(buf, sizeof(buf), "\tW%-30s\tC:\tn %s\r\n", buf3, feat_list[i].short_description);
}
else
{
snprintf(buf3, sizeof(buf3), "%s (+%d)", feat_list[i].name, HAS_FEAT(ch, FEAT_UNBREAKABLE_WILL)*2);
snprintf(buf, sizeof(buf), "%-40s ", buf3);
}
strlcat(buf2, buf, sizeof(buf2));
none_shown = FALSE;
}
else if (i == FEAT_LEADERSHIP)
{
if (mode == 1)
Expand Down
23 changes: 22 additions & 1 deletion fight.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ bool is_flanked(struct char_data *attacker, struct char_data *ch)
if (!ch)
return FALSE;

if (!IS_NPC(ch) && HAS_FEAT(ch, FEAT_ONE_THOUGHT) && is_grouped_in_room(ch))
return FALSE;

if (affected_by_spell(ch, PSIONIC_UBIQUITUS_VISION))
return FALSE;

Expand Down Expand Up @@ -1147,6 +1150,9 @@ int compute_armor_class(struct char_data *attacker, struct char_data *ch,
if (attacker && has_teamwork_feat(ch, FEAT_DUCK_AND_COVER) && teamwork_using_shield(ch, FEAT_DUCK_AND_COVER) &&
is_using_ranged_weapon(attacker, TRUE))
bonuses[BONUS_TYPE_INSIGHT] += 2;

if (has_one_thought(ch))
bonuses[BONUS_TYPE_INSIGHT] += 1;

if (has_teamwork_feat(ch, FEAT_PHALANX_FIGHTER) && attacker)
{
Expand Down Expand Up @@ -1246,6 +1252,12 @@ void update_pos_dam(struct char_data *victim)
act("$n pushes through with $s relentless endurance.", FALSE, victim, 0, 0, TO_ROOM);
GET_HIT(victim) = 1;
}
if (HAS_REAL_FEAT(victim, FEAT_FIGHT_TO_THE_DEATH) && GET_FIGHT_TO_THE_DEATH_COOLDOWN(victim) == 0)
{
act("\tYYou reach deep within and renew your resolve to fight!\tn", FALSE, victim, 0, 0, TO_CHAR);
act("$n reaches deep within and renews $s resolve to fight!", FALSE, victim, 0, 0, TO_ROOM);
GET_HIT(victim) = MAX(1, GET_MAX_HIT(victim) / 10);
}
else if (HAS_REAL_FEAT(victim, FEAT_DIEHARD) && dice(1, 3) == 1)
{
act("\tYYour die hard toughness let's you push through.\tn", FALSE, victim, 0, 0, TO_CHAR);
Expand Down Expand Up @@ -1423,7 +1435,13 @@ bool set_fighting(struct char_data *ch, struct char_data *vict)
/* The char is flat footed until they take an action,
* but only if they are not currently fighting. */
if (!FIGHTING(ch))
SET_BIT_AR(AFF_FLAGS(ch), AFF_FLAT_FOOTED);
{
if (!IS_NPC(ch) && HAS_FEAT(ch, FEAT_ONE_THOUGHT) && is_grouped_in_room(ch))
; // cannot be flat footed
else
SET_BIT_AR(AFF_FLAGS(ch), AFF_FLAT_FOOTED);
}

FIGHTING(ch) = vict;

if (!CONFIG_PK_ALLOWED)
Expand Down Expand Up @@ -8052,6 +8070,9 @@ int compute_attack_bonus(struct char_data *ch, /* Attacker */
{
bonuses[BONUS_TYPE_INSIGHT] = MIN((affected_by_spell(ch, PSIONIC_ABILITY_PSIONIC_FOCUS) ? 10 : 5), GET_INT_BONUS(ch));
}

if (has_one_thought(ch))
bonuses[BONUS_TYPE_INSIGHT] += 1;

/* Luck bonus */

Expand Down
1 change: 1 addition & 0 deletions handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ void compute_char_cap(struct char_data *ch, int mode)
break;
case CLASS_WARRIOR:
case CLASS_KNIGHT_OF_THE_CROWN:
case CLASS_KNIGHT_OF_THE_LILY:
case CLASS_WEAPON_MASTER:
str_cap += class_level / 4 + 1;
con_cap += class_level / 4 + 1;
Expand Down
5 changes: 5 additions & 0 deletions interpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ cpp_extern const struct command_info cmd_info[] = {
{"combatroll", "combatroll", POS_DEAD, do_gen_tog, 0, SCMD_COMBATROLL, TRUE, ACTION_NONE, {0, 0}, NULL},
{"coordconvert", "coordconvert", POS_SLEEPING, do_coordconvert, LVL_IMMORT, 0, TRUE, ACTION_NONE, {0, 0}, NULL},
{"cmdlev", "cmdlev", POS_DEAD, do_cmdlev, LVL_BUILDER, 0, FALSE, ACTION_NONE, {0, 0}, NULL},
#if !defined(CAMPAIGN_DL)
{"cexchange", "cexchange", POS_RECLINING, do_cexchange, 0, 0, TRUE, ACTION_NONE, {0, 0}, NULL},
#endif
{"createspawn", "createspawn", POS_STANDING, do_create_vampire_spawn, 1, 0, FALSE, ACTION_STANDARD, {0, 0}, can_create_vampire_spawn},
{"crownofknighthood", "crownofknighthood", POS_FIGHTING, do_crown_of_knighthood, 0, 0, TRUE, ACTION_NONE, {0, 0}, NULL},
{"cruelties", "cruelties", POS_RECLINING, do_cruelties, 0, 0, TRUE, ACTION_NONE, {0, 0}, NULL},
Expand Down Expand Up @@ -3192,6 +3194,9 @@ switch (load_result)
case CLASS_KNIGHT_OF_THE_SKULL:
perform_help(d, "class-knightoftheskull");
break;
case CLASS_KNIGHT_OF_THE_LILY:
perform_help(d, "class-knightofthelily");
break;
case CLASS_WARRIOR:
perform_help(d, "class-warrior");
break;
Expand Down
21 changes: 21 additions & 0 deletions limits.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,17 @@ int gain_exp(struct char_data *ch, int gain, int mode)
if (HAS_FEAT(ch, FEAT_ADAPTABILITY))
gain += (int)((float)gain * .05);

#if defined(CAMPAIGN_DL)
/* flat rate for now! (halfed the rate for testing purposes) */
if (rand_number(0, 1) && ch && ch->desc && ch->desc->account)
{
if (gain >= 1000 && GET_ACCEXP_DESC(ch) <= 99999999)
{
send_to_char(ch, "You gain %d account experience points!\r\n", (gain / 1000));
change_account_xp(ch, (gain / 1000));
}
}
#else
/* flat rate for now! (halfed the rate for testing purposes) */
if (rand_number(0, 1) && ch && ch->desc && ch->desc->account)
{
Expand All @@ -1061,6 +1072,7 @@ int gain_exp(struct char_data *ch, int gain, int mode)
change_account_xp(ch, (gain / 3000));
}
}
#endif

/* some limited xp cap conditions */
switch (mode)
Expand Down Expand Up @@ -2333,6 +2345,15 @@ void self_buffing(void)
if (!IS_BUFFING(ch))
continue;

if (GET_FIGHT_TO_THE_DEATH_COOLDOWN(ch) > 0)
{
GET_FIGHT_TO_THE_DEATH_COOLDOWN(ch)--;
if (GET_FIGHT_TO_THE_DEATH_COOLDOWN(ch) == 0)
{
send_to_char(ch, "You can now fight to the death again.\r\n");
}
}

while (GET_BUFF(ch, GET_CURRENT_BUFF_SLOT(ch), 0) == 0 && GET_CURRENT_BUFF_SLOT(ch) < (MAX_BUFFS + 1))
{
GET_CURRENT_BUFF_SLOT(ch)++;
Expand Down
4 changes: 4 additions & 0 deletions magic.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ int compute_mag_saves(struct char_data *vict, int type, int modifier)
if (AFF_FLAGGED(vict, AFF_SHAKEN))
saves -= 2;
saves += get_shield_ally_bonus(vict);
if (has_one_thought(vict))
saves += 1;

/* determine base, add/minus bonus/penalty and return */
if (IS_NPC(vict))
Expand Down Expand Up @@ -2575,6 +2577,8 @@ int mag_damage(int level, struct char_data *ch, struct char_data *victim,
{
if (victim && HAS_REAL_FEAT(victim, FEAT_STUBBORN_MIND))
dc_mod -= 2;
if (victim && HAS_REAL_FEAT(victim, FEAT_UNBREAKABLE_WILL))
dc_mod -= 2 * HAS_REAL_FEAT(victim, FEAT_UNBREAKABLE_WILL);
if (victim && HAS_REAL_FEAT(victim, FEAT_HONORBOUND))
dc_mod -= 2;
if (victim && HAS_REAL_FEAT(victim, FEAT_HONORABLE_WILL))
Expand Down
7 changes: 7 additions & 0 deletions players.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ int load_char(const char *name, struct char_data *ch)
SITTING(ch) = NULL;
NEXT_SITTING(ch) = NULL;
GET_QUESTPOINTS(ch) = PFDEF_QUESTPOINTS;
GET_FIGHT_TO_THE_DEATH_COOLDOWN(ch) = 0;

for (i = 0; i < MAX_CURRENT_QUESTS; i++)
{ /* loop through all the character's quest slots */
Expand Down Expand Up @@ -881,6 +882,8 @@ int load_char(const char *name, struct char_data *ch)
FEY_SHADOW_WALK_USES(ch) = atoi(line);
else if (!strcmp(tag, "FstH"))
GET_FAST_HEALING_MOD(ch) = atoi(line);
else if (!strcmp(tag, "FttD"))
GET_FIGHT_TO_THE_DEATH_COOLDOWN(ch) = atoi(line);

break;

Expand Down Expand Up @@ -1820,6 +1823,8 @@ void save_char(struct char_data *ch, int mode)
fprintf(fl, "GTCU: %d\n", GRAVE_TOUCH_USES(ch));
if (GRAVE_TOUCH_TIMER(ch) != PFDEF_GRAVE_TOUCH_TIMER)
fprintf(fl, "GTCT: %d\n", GRAVE_TOUCH_TIMER(ch));
if (GET_FIGHT_TO_THE_DEATH_COOLDOWN(ch) != 0)
fprintf(fl, "FttD: %d\n", GET_FIGHT_TO_THE_DEATH_COOLDOWN(ch));

if (GRASP_OF_THE_DEAD_USES(ch) != PFDEF_GRASP_OF_THE_DEAD_USES)
fprintf(fl, "GODU: %d\n", GRASP_OF_THE_DEAD_USES(ch));
Expand Down Expand Up @@ -2357,6 +2362,8 @@ void save_char(struct char_data *ch, int mode)
fprintf(fl, "%d %ld\n", pMudEvent->iId, event_time(pMudEvent->pEvent));
if ((pMudEvent = char_has_mud_event(ch, eRALLYINGCRY)))
fprintf(fl, "%d %ld\n", pMudEvent->iId, event_time(pMudEvent->pEvent));
if ((pMudEvent = char_has_mud_event(ch, eCOSMICUNDERSTANDING)))
fprintf(fl, "%d %ld\n", pMudEvent->iId, event_time(pMudEvent->pEvent));

fprintf(fl, "-1 -1\n");
}
Expand Down
3 changes: 3 additions & 0 deletions spec_procs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,9 @@ int compute_ability_full(struct char_data *ch, int abilityNum, bool recursive)
/* Unnamed bonus */
value += 2;
}
if (HAS_FEAT(ch, FEAT_DEMORALIZE))
value += 2;

if (HAS_FEAT(ch, FEAT_AUTHORITATIVE))
{
/* Unnamed bonus */
Expand Down
Loading

0 comments on commit 38bd840

Please sign in to comment.