Skip to content

Commit

Permalink
Finished base code for summoner. Still needs both testing
Browse files Browse the repository at this point in the history
and premade build set up.  NOT YET READY FOR PLAYERS.
  • Loading branch information
GickerLDS committed Apr 11, 2023
1 parent f5e6918 commit aa56567
Show file tree
Hide file tree
Showing 33 changed files with 2,596 additions and 217 deletions.
2 changes: 2 additions & 0 deletions act.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ ACMD_DECL(do_sleep);
ACMD_DECL(do_stand);
ACMD_DECL(do_wake);
ACMD_DECL(do_pullswitch);
ACMD_DECL(do_transposition);

/* Switch info */
#define SWITCH_UNHIDE 0
Expand Down Expand Up @@ -711,6 +712,7 @@ ACMD_DECL(do_racefix);
#define SCMD_NORAGE 51
#define SCMD_SHADOWFORM 52
#define SCMD_SICKENING_AURA 53
#define SCMD_LIFE_BOND 54

/* do_quit */
ACMD_DECL(do_quit);
Expand Down
29 changes: 19 additions & 10 deletions act.informative.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void lore_id_vict(struct char_data *ch, struct char_data *tch)
{
int i = 0;
size_t len = 0;
int count = 0;
int count = 0, dcount = 0;
bool has_subrace = false;
char subraces[MEDIUM_STRING] = {'\0'};

Expand Down Expand Up @@ -179,10 +179,15 @@ void lore_id_vict(struct char_data *ch, struct char_data *tch)
text_line(ch, "\tYDamage Type Resistance / Vulnerability\tC", 80, '-', '-');
for (i = 0; i < NUM_DAM_TYPES - 1; i++)
{
send_to_char(ch, " %-15s: %-4d%% (%-2d) ", damtype_display[i + 1],
compute_damtype_reduction(tch, i + 1), compute_energy_absorb(tch, i + 1));
if (i % 2)
send_to_char(ch, "\r\n");
if (can_dam_be_resisted(i+1))
{
send_to_char(ch, " %-15s: %-4d%% (%-2d) ", damtype_display[i + 1],
compute_damtype_reduction(tch, i + 1), compute_energy_absorb(tch, i + 1));
dcount++;
if (dcount % 2)
send_to_char(ch, "\r\n");
}

}
}

Expand Down Expand Up @@ -2027,7 +2032,7 @@ void perform_damage_reduction(struct char_data *ch, struct char_data *k)

void perform_resistances(struct char_data *ch, struct char_data *k)
{
int i = 0;
int i = 0, dcount = 0;
// char buf[MAX_STRING_LENGTH] = {'\0'};

send_to_char(ch, "\tC");
Expand All @@ -2036,10 +2041,14 @@ void perform_resistances(struct char_data *ch, struct char_data *k)

for (i = 0; i < NUM_DAM_TYPES - 1; i++)
{
send_to_char(ch, " %-15s: %-4d%% (%-2d) ", damtype_display[i + 1],
compute_damtype_reduction(k, i + 1), compute_energy_absorb(k, i + 1));
if (i % 2)
send_to_char(ch, "\r\n");
if (can_dam_be_resisted(i+1))
{
send_to_char(ch, " %-15s: %-4d%% (%-2d) ", damtype_display[i + 1],
compute_damtype_reduction(k, i + 1), compute_energy_absorb(k, i + 1));
dcount++;
if (dcount % 2)
send_to_char(ch, "\r\n");
}
}

send_to_char(ch, "\r\n\tC");
Expand Down
80 changes: 80 additions & 0 deletions act.movement.c
Original file line number Diff line number Diff line change
Expand Up @@ -3922,6 +3922,86 @@ int get_speed(struct char_data *ch, sbyte to_display)
return speed;
}

ACMD(do_transposition)
{
if (!HAS_FEAT(ch, FEAT_TRANSPOSITION))
{
send_to_char(ch, "You do not have the transposition feat.\r\n");
return;
}

struct follow_type *f = NULL;
struct char_data *mob = NULL, *eidolon = NULL;
room_rnum chRoom = NULL, eidolonRoom = NULL;

for (f = ch->followers; f; f = f->next)
{
mob = f->follower;
if (!mob) continue;
if (!IS_NPC(mob)) continue;
if (!MOB_FLAGGED(mob, MOB_EIDOLON)) continue;
eidolon = mob;
break;
}

if (!eidolon)
{
send_to_char(ch, "Your eidolon does not seem to be summoned.\r\n");
return;
}

chRoom = IN_ROOM(ch);
eidolonRoom = IN_ROOM(eidolon);

if (chRoom == NOWHERE || eidolonRoom == NOWHERE)
{
send_to_char(ch, "You are unable to transposition yourself and your eidolon.\r\n");
return;
}

if (!valid_mortal_tele_dest(eidolon, chRoom, true) || !valid_mortal_tele_dest(ch, eidolonRoom, true))
{
send_to_char(ch, "You are unable to transposition yourself and your eidolon.\r\n");
return;
}

// send eidolon to ch's location
act("$n disappears suddenly.", TRUE, eidolon, 0, 0, TO_ROOM);
char_from_room(eidolon);
if (ZONE_FLAGGED(GET_ROOM_ZONE(chRoom), ZONE_WILDERNESS))
{
X_LOC(eidolon) = world[chRoom].coords[0];
Y_LOC(eidolon) = world[chRoom].coords[1];
}
char_to_room(eidolon, chRoom);

act("$n arrives suddenly.", TRUE, eidolon, 0, 0, TO_ROOM);
act("$n has transpoisitoned locations with you!", FALSE, ch, 0, eidolon, TO_VICT);
look_at_room(eidolon, 0);
entry_memory_mtrigger(eidolon);
greet_mtrigger(eidolon, -1);
greet_memory_mtrigger(eidolon);

// send ch to eidolon's location
act("$n disappears suddenly.", TRUE, ch, 0, 0, TO_ROOM);
char_from_room(ch);
if (ZONE_FLAGGED(GET_ROOM_ZONE(eidolonRoom), ZONE_WILDERNESS))
{
X_LOC(ch) = world[eidolonRoom].coords[0];
Y_LOC(ch) = world[eidolonRoom].coords[1];
}
char_to_room(ch, chRoom);

act("$n arrives suddenly.", TRUE, ch, 0, 0, TO_ROOM);
act("$N has transpoisitoned locations with you!", FALSE, ch, 0, eidolon, TO_VICT);
look_at_room(ch, 0);
entry_memory_mtrigger(ch);
greet_mtrigger(ch, -1);
greet_memory_mtrigger(ch);

USE_STANDARD_ACTION(ch);
}

/* undefines */
#undef PRISONER_KEY_1
#undef PRISONER_KEY_2
Expand Down
6 changes: 3 additions & 3 deletions act.offensive.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ bool perform_knockdown(struct char_data *ch, struct char_data *vict, int skill,
attack_check -= 2;
// if target is not smaller at all, can't be done
else if ((GET_SIZE(ch) - GET_SIZE(vict)) <= 0)
return;
return FALSE;
// three or more sizes smaller is no penalty
break;
case SPELL_BANISHING_BLADE:
Expand Down Expand Up @@ -9706,7 +9706,7 @@ ACMD(do_pushaway)
if (GET_PUSHED_TIMER(vict) > 0)
{
send_to_char(ch, "That subject is on a pushaway timer and is temporarily immune.\r\n");
return false;
return;
}

GET_PUSHED_TIMER(vict) = 10;
Expand Down Expand Up @@ -9734,7 +9734,7 @@ ACMD(do_pushaway)
ACMD(do_evoweb)
{
char arg[200];
struct chat_data *vict = NULL;
struct char_data *vict = NULL;

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

Expand Down
Loading

0 comments on commit aa56567

Please sign in to comment.