 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
79 && (*params ==
'\0' || !strncmp(params,
spell->name, strlen(params)))) {
81 snprintf(spell_sort[num_found++],
sizeof(spell_sort[0]),
82 "%s:%-30s %3s %3s",
spell->skill ?
spell->skill :
"generic",
83 spell->name,
"den",
"den");
85 snprintf(spell_sort[num_found++],
sizeof(spell_sort[0]),
86 "%s:%-30s %3d %3d",
spell->skill ?
spell->skill :
"generic",
95 "You know no spells like '%s'.", params);
98 "You know no spells.");
105 "You know the following '%s' spells:", params);
108 "You know the following spells:");
115 qsort(spell_sort, num_found,
MAX_BUF, (
int (*)(
const void *,
const void *))strcmp);
116 strcpy(tmp,
"asdfg");
117 for (i = 0; i < num_found; i++) {
119 if (strncmp(tmp, spell_sort[i], strlen(tmp))) {
120 strcpy(tmp, spell_sort[i]);
121 cp = strchr(tmp,
':');
125 "\n[b][fixed]%s spells %.*s <lvl> <sp>",
126 tmp, (
int)(20-strlen(tmp)),
" ");
130 strchr(spell_sort[i],
':')+1);
153 tag_t spellnumber = 0;
154 if ((spellnumber = atoi(cpy)) != 0)
165 cp = strchr(cpy,
' ');
168 if (!strncmp(cp,
"of ", 3))
171 }
else if (strlen(cpy) > strlen(spob->
name)) {
172 cp = cpy+strlen(spob->
name);
175 if (!strncmp(cp,
"of ", 3))
182 "You need the skill %s to cast %s!",
215 "You ready the spell %s%s%s",
216 spob->
name, required ?
" which consumes for each invocation " :
"", required ? required :
"");
294 "No ranged attack chosen.");
299 "You regain control of your golem.");
305 "Switched to %s and %s.",
312 "Switched to spells (%s).",
326 "Switched to skill: %s",
344 int dir = ((*params ==
'\0') || (params[0] ==
'+')) ? 1 : -1;
395 if (*params ==
'\0') {
396 for (ix = 0; lookup[ix].shoottype !=
range_size; ix++) {
399 "shoottype is set to %s", lookup[ix].range);
408 for (ix = 0; lookup[ix].shoottype !=
range_size; ix++) {
409 if (!strcmp(params, lookup[ix].range)) {
416 "shoottype not readied: %s", lookup[ix].range);
425 "shoottype: Unknown shoottype option %s", params);
void remove_friendly_object(object *op)
Removes the specified object from the linked list of friendly objects.
#define MSG_TYPE_COMMAND_SUCCESS
Successful result from command.
#define NROFREALSPELLS
Number of spells.
uint32_t golem_count
To track the golem.
#define MSG_TYPE_SKILL
Messages related to skill use.
int cast_spell(object *op, object *caster, int dir, object *spell_ob, char *stringarg)
Main dispatch when someone casts a spell.
@ range_none
No range selected.
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
tag_t count
Unique object number for this object.
#define MSG_TYPE_COMMAND_ERROR
Bad syntax/can't use command.
@ range_golem
Control golem.
#define MSG_TYPE_COMMAND
Responses to commands, eg, who.
Plugin animator file specs[Config] name
uint32_t path_denied
Paths the object is denied access to.
@ range_builder
Map builder.
void object_free_drop_inventory(object *ob)
Frees everything allocated by an object, removes it from the list of used objects,...
struct player * contr
Pointer to the player which control this object.
static void show_matching_spells(object *op, const char *params)
Shows all spells that op knows.
void command_cast_spell(object *op, const char *params, int cast_now)
Sets up to cast a spell.
object * chosen_skill
The skill chosen to use.
@ range_size
Maximum, exclusive, value.
void query_name(const object *op, char *buf, size_t size)
Describes an item.
object * ranges[range_size]
Object for each range.
object * spell
Spell that was being cast.
static void send_updated_shoottype(object *op)
Sends the updated range attack to the client.
object * lookup_spell_by_name(object *op, const char *spname)
Look at object 'op' and see if they know the spell spname.
uint8_t type
PLAYER, BULLET, etc.
object * object_find_by_tag(const object *who, tag_t tag)
Find object in inventory.
with a maximum of six This is not so if you are wearing plate you receive no benefit Armour is additive with all the supplementry forms of which means that it lasts until the next semi permanent spell effect is cast upon the character spell
#define FOR_INV_FINISH()
Finishes FOR_INV_PREPARE().
#define MSG_TYPE_SKILL_MISSING
Don't have the skill.
@ range_bottom
Minimum, exclusive, value.
rangetype
What range is currently selected by the player.
uint32_t tag_t
Object tag, unique during the whole game.
rangetype shoottype
Which range-attack is being used by player.
int16_t SP_level_spellpoint_cost(object *caster, object *spell, int flags)
Scales the spellpoint cost of a spell by it's increased effectiveness.
sstring race
Human, goblin, dragon, etc.
int8_t facing
Object is oriented/facing that way.
object * find_skill_by_name(object *who, const char *name)
This returns the skill pointer of the given name (the one that accumulates exp, has the level,...
#define MAX_BUF
Used for all kinds of things.
int legal_range(object *op, int r)
Check for the validity of a player range.
void command_invoke(object *op, const char *params)
'invoke' command, fires a spell immediately.
#define NDI_UNIQUE
Print immediately, don't buffer.
sstring name
The name of the object, obviously...
const typedef char * sstring
sstring skill
Name of the skill this object uses/grants.
sstring object_get_value(const object *op, const char *const key)
Get an extra value by key.
#define MSG_TYPE_COMMAND_CONFIG
bowmode, petmode, applymode
void command_shoottype(object *op, const char *params)
'shoottype' command, set range attack.
void object_remove(object *op)
This function removes the object op from the linked list of objects which it is currently tied to.
void command_cast(object *op, const char *params)
'cast' command, prepares a spell for laster casting.
void query_base_name(const object *op, int plural, char *buf, size_t size)
Query a short name for the item.
void command_rotateshoottype(object *op, const char *params)
'rotateshoottype' command, switch range attack.
char spellparam[MAX_BUF]
What param to add to spells.
#define FOR_INV_PREPARE(op_, it_)
Constructs a loop iterating over the inventory of an object.