Skills are just spells that don't use the mana casting bits and pieces..
I'd just plagiarize the earthquake spell like this:
Browser code!
Code:
void awesome_barbarian_skill(int level, struct char_data *ch)
{
struct char_data *tch, *next_tch;
const char *to_char = NULL, *to_room = NULL;
if (ch == NULL)
return;
to_char = "You channel the power of Crom and unleash a violent forcewave!";
to_room ="The veins on $n's head and neck bulge as the power of Crom explodes from $e!";
if (to_char != NULL)
act(to_char, FALSE, ch, 0, 0, TO_CHAR);
if (to_room != NULL)
act(to_room, FALSE, ch, 0, 0, TO_ROOM);
for (tch = world[IN_ROOM(ch)].people; tch; tch = next_tch)
{
next_tch = tch->next_in_room;
/* The skips: 1: the caster
* 2: immortals
* 3: if no pk on this mud, skips over all players
* 4: pets (charmed NPCs)
* 5: other players in the same group (if the spell is 'violent') */
if (tch == ch)
continue;
if (!IS_NPC(tch) && GET_LEVEL(tch) >= LVL_IMMORT)
continue;
if (!CONFIG_PK_ALLOWED && !IS_NPC(ch) && !IS_NPC(tch))
continue;
if (!IS_NPC(ch) && IS_NPC(tch) && AFF_FLAGGED(tch, AFF_CHARM))
continue;
if (!IS_NPC(tch) && GROUP(ch) && GROUP(ch) == GROUP(tch))
continue;
/* Doesn't matter if they die here so we don't check. -gg 6/24/98 */
damage(whatever the stock damage code is);
// whatever other cool stuff should happen
}
}
That's the guts of the damage-to-all-in-room, just tidy up the damage() call - I can't remember what stock damage is haha..
Then add in skill checks and definitions like the other skills have