mirror of
https://github.com/tbamud/tbamud.git
synced 2025-09-22 05:50:48 +02:00
Comment fixes, clarification, and warning cleanup. (thanks Kyle) --Rumble
This commit is contained in:
parent
39ed48f03c
commit
6240083445
16 changed files with 37 additions and 51 deletions
|
@ -35,11 +35,13 @@ export (QQ's a zone into a tarball)
|
|||
Xlist (mlist, olist, rlist, zlist, slist, tlist, qlist)
|
||||
(lots of major bugfixes too)
|
||||
@
|
||||
[Aug 25 2011] - Rumble
|
||||
Comment fixes, clarification, and warning cleanup. (thanks Kyle)
|
||||
[Sep 11 2011] - Fizban
|
||||
Added MXP, MSP, MSSP, MSDP, ATCP, CHARSET, NAWS, TTYPE, 256-color protocols. (Thanks KaVir)
|
||||
Added MXP, MSP, MSSP, MSDP, ATCP, CHARSET, NAWS, TTYPE, 256-color protocols. (Thanks KaVir)
|
||||
[Aug 18 2011] - Fizban
|
||||
Added hitroll and damroll fields to DG Scripts. Also made them editable via scripts.
|
||||
Made do_stat_character show scripts attached to players.
|
||||
Added hitroll and damroll fields to DG Scripts. Also made them editable via scripts.
|
||||
Made do_stat_character show scripts attached to players.
|
||||
[Mar 31 2011] - Rumble
|
||||
Fixed several typos and formatting issues. (Thanks Kyle)
|
||||
Added check to prevent immortals from getting poisoned.
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
Text couldnt find 2nd floor's moongate in ultima~
|
||||
Body couldn't find 2nd floor's moongate in ultima
|
||||
~
|
||||
Name Neptune~
|
||||
Level 30
|
||||
Room 55524
|
||||
Flags 0 0 0 0
|
||||
End
|
||||
Text still about the 2nd moongate in ultima~
|
||||
Body I found that there's a trigger in some room that handles the command
|
||||
"open shelf" -- there should be a hint somewhere in the descriptions.
|
||||
~
|
||||
Name Neptune~
|
||||
Level 30
|
||||
Room 55571
|
||||
Flags 0 0 0 0
|
||||
End
|
|
@ -595,7 +595,7 @@ D3
|
|||
~
|
||||
0 0 55533
|
||||
E
|
||||
shelf shelves bookshelf bookshelves~
|
||||
shelf shelves bookshelves bookcases~
|
||||
Secret Door: Open Shelf
|
||||
~
|
||||
S
|
||||
|
@ -1298,22 +1298,22 @@ D0
|
|||
You see trees.
|
||||
~
|
||||
~
|
||||
0 0 55570
|
||||
0 0 55576
|
||||
D1
|
||||
You see trees.
|
||||
~
|
||||
~
|
||||
0 0 55576
|
||||
0 0 55572
|
||||
D2
|
||||
You see trees.
|
||||
~
|
||||
~
|
||||
0 0 55572
|
||||
0 0 55581
|
||||
D3
|
||||
You see trees.
|
||||
~
|
||||
~
|
||||
0 0 55581
|
||||
0 0 55570
|
||||
S
|
||||
T 55571
|
||||
#55572
|
||||
|
|
|
@ -931,7 +931,7 @@ ACMD(do_drink)
|
|||
act("$n chokes and utters some strange sounds.", TRUE, ch, 0, 0, TO_ROOM);
|
||||
|
||||
new_affect(&af);
|
||||
af.type = SPELL_POISON;
|
||||
af.spell = SPELL_POISON;
|
||||
af.duration = amount * 3;
|
||||
SET_BIT_AR(af.bitvector, AFF_POISON);
|
||||
affect_join(ch, &af, FALSE, FALSE, FALSE, FALSE);
|
||||
|
@ -1006,7 +1006,7 @@ ACMD(do_eat)
|
|||
act("$n coughs and utters some strange sounds.", FALSE, ch, 0, 0, TO_ROOM);
|
||||
|
||||
new_affect(&af);
|
||||
af.type = SPELL_POISON;
|
||||
af.spell = SPELL_POISON;
|
||||
af.duration = amount * 2;
|
||||
SET_BIT_AR(af.bitvector, AFF_POISON);
|
||||
affect_join(ch, &af, FALSE, FALSE, FALSE, FALSE);
|
||||
|
|
|
@ -118,7 +118,7 @@ ACMD(do_sneak)
|
|||
return;
|
||||
|
||||
new_affect(&af);
|
||||
af.type = SKILL_SNEAK;
|
||||
af.spell = SKILL_SNEAK;
|
||||
af.duration = GET_LEVEL(ch);
|
||||
SET_BIT_AR(af.bitvector, AFF_SNEAK);
|
||||
affect_to_char(ch, &af);
|
||||
|
|
|
@ -901,7 +901,7 @@ void do_stat_character(struct char_data *ch, struct char_data *k)
|
|||
/* Routine to show what spells a char is affected by */
|
||||
if (k->affected) {
|
||||
for (aff = k->affected; aff; aff = aff->next) {
|
||||
send_to_char(ch, "SPL: (%3dhr) %s%-21s%s ", aff->duration + 1, CCCYN(ch, C_NRM), skill_name(aff->type), CCNRM(ch, C_NRM));
|
||||
send_to_char(ch, "SPL: (%3dhr) %s%-21s%s ", aff->duration + 1, CCCYN(ch, C_NRM), skill_name(aff->spell), CCNRM(ch, C_NRM));
|
||||
|
||||
if (aff->modifier)
|
||||
send_to_char(ch, "%+d to %s", aff->modifier, apply_types[(int) aff->location]);
|
||||
|
|
|
@ -1101,7 +1101,8 @@ const char CCODE[] = "@nNdbgcrmywDBGCRMYW01234567luoe!";
|
|||
|
||||
static size_t proc_colors(char *txt, size_t maxlen, int parse)
|
||||
{
|
||||
char *d, *s, *c, *p;
|
||||
char *d, *s, *p;
|
||||
const char *c;
|
||||
int i;
|
||||
|
||||
if (!txt || !strchr(txt, '@')) /* skip out if no color codes */
|
||||
|
|
|
@ -228,7 +228,7 @@ void do_dg_affect(void *go, struct script_data *sc, trig_data *trig,
|
|||
|
||||
/* add the affect */
|
||||
new_affect(&af);
|
||||
af.type = SPELL_DG_AFFECT;
|
||||
af.spell = SPELL_DG_AFFECT;
|
||||
af.duration = duration -1;
|
||||
af.modifier = value;
|
||||
|
||||
|
|
|
@ -373,7 +373,7 @@ WCMD(do_wpurge)
|
|||
{
|
||||
char arg[MAX_INPUT_LENGTH];
|
||||
char_data *ch, *next_ch;
|
||||
obj_data *obj, *next_obj;
|
||||
obj_data *obj = NULL, *next_obj;
|
||||
|
||||
one_argument(argument, arg);
|
||||
|
||||
|
@ -399,7 +399,7 @@ WCMD(do_wpurge)
|
|||
ch = get_char_in_room(room, arg);
|
||||
|
||||
if (!ch) {
|
||||
if (*arg == UID_CHAR)
|
||||
if (obj && *arg == UID_CHAR)
|
||||
obj = get_obj(arg);
|
||||
else
|
||||
obj = get_obj_in_room(room, arg);
|
||||
|
|
|
@ -416,7 +416,7 @@ static void group_gain(struct char_data *ch, struct char_data *victim)
|
|||
if (AFF_FLAGGED(f->follower, AFF_GROUP) && IN_ROOM(f->follower) == IN_ROOM(ch))
|
||||
tot_members++;
|
||||
|
||||
/* round up to the next highest tot_members */
|
||||
/* round up to the nearest tot_members */
|
||||
tot_gain = (GET_EXP(victim) / 3) + tot_members - 1;
|
||||
|
||||
/* prevent illegal xp creation when killing players */
|
||||
|
|
|
@ -309,14 +309,14 @@ void affect_remove(struct char_data *ch, struct affected_type *af)
|
|||
affect_total(ch);
|
||||
}
|
||||
|
||||
/* Call affect_remove with every spell of spelltype "skill" */
|
||||
/* Call affect_remove with every affect from the spell "type" */
|
||||
void affect_from_char(struct char_data *ch, int type)
|
||||
{
|
||||
struct affected_type *hjp, *next;
|
||||
|
||||
for (hjp = ch->affected; hjp; hjp = next) {
|
||||
next = hjp->next;
|
||||
if (hjp->type == type)
|
||||
if (hjp->spell == type)
|
||||
affect_remove(ch, hjp);
|
||||
}
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ bool affected_by_spell(struct char_data *ch, int type)
|
|||
struct affected_type *hjp;
|
||||
|
||||
for (hjp = ch->affected; hjp; hjp = hjp->next)
|
||||
if (hjp->type == type)
|
||||
if (hjp->spell == type)
|
||||
return (TRUE);
|
||||
|
||||
return (FALSE);
|
||||
|
@ -343,7 +343,7 @@ void affect_join(struct char_data *ch, struct affected_type *af,
|
|||
for (hjp = ch->affected; !found && hjp; hjp = next) {
|
||||
next = hjp->next;
|
||||
|
||||
if ((hjp->type == af->type) && (hjp->location == af->location)) {
|
||||
if ((hjp->spell == af->spell) && (hjp->location == af->location)) {
|
||||
if (add_dur)
|
||||
af->duration += hjp->duration;
|
||||
else if (avg_dur)
|
||||
|
|
10
src/magic.c
10
src/magic.c
|
@ -67,11 +67,11 @@ void affect_update(void)
|
|||
else if (af->duration == -1) /* No action */
|
||||
;
|
||||
else {
|
||||
if ((af->type > 0) && (af->type <= MAX_SPELLS))
|
||||
if (!af->next || (af->next->type != af->type) ||
|
||||
if ((af->spell > 0) && (af->spell <= MAX_SPELLS))
|
||||
if (!af->next || (af->next->spell != af->spell) ||
|
||||
(af->next->duration > 0))
|
||||
if (spell_info[af->type].wear_off_msg)
|
||||
send_to_char(i, "%s\r\n", spell_info[af->type].wear_off_msg);
|
||||
if (spell_info[af->spell].wear_off_msg)
|
||||
send_to_char(i, "%s\r\n", spell_info[af->spell].wear_off_msg);
|
||||
affect_remove(i, af);
|
||||
}
|
||||
}
|
||||
|
@ -318,7 +318,7 @@ void mag_affects(int level, struct char_data *ch, struct char_data *victim,
|
|||
|
||||
for (i = 0; i < MAX_SPELL_AFFECTS; i++) {
|
||||
new_affect(&(af[i]));
|
||||
af[i].type = spellnum;
|
||||
af[i].spell = spellnum;
|
||||
}
|
||||
|
||||
switch (spellnum) {
|
||||
|
|
|
@ -724,12 +724,12 @@ void save_char(struct char_data * ch)
|
|||
}
|
||||
|
||||
/* Save affects */
|
||||
if (tmp_aff[0].type > 0) {
|
||||
if (tmp_aff[0].spell > 0) {
|
||||
fprintf(fl, "Affs:\n");
|
||||
for (i = 0; i < MAX_AFFECT; i++) {
|
||||
aff = &tmp_aff[i];
|
||||
if (aff->type)
|
||||
fprintf(fl, "%d %d %d %d %d %d %d %d\n", aff->type, aff->duration,
|
||||
if (aff->spell)
|
||||
fprintf(fl, "%d %d %d %d %d %d %d %d\n", aff->spell, aff->duration,
|
||||
aff->modifier, aff->location, aff->bitvector[0], aff->bitvector[1], aff->bitvector[2], aff->bitvector[3]);
|
||||
}
|
||||
fprintf(fl, "0 0 0 0 0 0 0 0\n");
|
||||
|
@ -742,7 +742,7 @@ void save_char(struct char_data * ch)
|
|||
|
||||
/* More char_to_store code to add spell and eq affections back in. */
|
||||
for (i = 0; i < MAX_AFFECT; i++) {
|
||||
if (tmp_aff[i].type)
|
||||
if (tmp_aff[i].spell)
|
||||
affect_to_char(ch, &tmp_aff[i]);
|
||||
}
|
||||
|
||||
|
@ -898,7 +898,7 @@ static void load_affects(FILE *fl, struct char_data *ch)
|
|||
get_line(fl, line);
|
||||
n_vars = sscanf(line, "%d %d %d %d %d %d %d %d", &num, &num2, &num3, &num4, &num5, &num6, &num7, &num8);
|
||||
if (num > 0) {
|
||||
af.type = num;
|
||||
af.spell = num;
|
||||
af.duration = num2;
|
||||
af.modifier = num3;
|
||||
af.location = num4;
|
||||
|
|
|
@ -278,7 +278,7 @@ ASPELL(spell_charm)
|
|||
add_follower(victim, ch);
|
||||
|
||||
new_affect(&af);
|
||||
af.type = SPELL_CHARM;
|
||||
af.spell = SPELL_CHARM;
|
||||
af.duration = 24 * 2;
|
||||
if (GET_CHA(ch))
|
||||
af.duration *= GET_CHA(ch);
|
||||
|
|
|
@ -1024,7 +1024,7 @@ struct mob_special_data
|
|||
/** An affect structure. */
|
||||
struct affected_type
|
||||
{
|
||||
sh_int type; /**< The type of spell that caused this */
|
||||
sh_int spell; /**< The spell that caused this */
|
||||
sh_int duration; /**< For how long its effects will last */
|
||||
sbyte modifier; /**< Added/subtracted to/from apropriate ability */
|
||||
byte location; /**< Tells which ability to change(APPLY_XXX). */
|
||||
|
|
|
@ -1474,7 +1474,7 @@ char *strpaste(char *str1, char *str2, char *joiner)
|
|||
void new_affect(struct affected_type *af)
|
||||
{
|
||||
int i;
|
||||
af->type = 0;
|
||||
af->spell = 0;
|
||||
af->duration = 0;
|
||||
af->modifier = 0;
|
||||
af->location = APPLY_NONE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue