Yeah, looking at the movement code, I think in stock TBA it is assumed that everyone can swim, no specific skill needed.
You can find the checks for movement in act.movement.c under the (kind of big) function do_simple_move().
github.com/tbamud/tbamud/blob/master/src/act.movement.c#L113
(link to the comments before the function cause if you plan to change something you should read all of those eheh)
Movement to 'Water (Swim)' is allowed for everyone but movement to 'Water (No Swim)' sectors require the character to have a boat.
github.com/tbamud/tbamud/blob/master/src/act.movement.c#L176
You could add a similar if but checking instead if the player has the swim skill
Code:
if ((SECT(was_in) == SECT_WATER_SWIM) ||
(SECT(going_to) == SECT_WATER_SWIM))
{
if (!IS_NPC(ch) && !GET_SKILL(ch, SKILL_SWIMMING)) /* note that this skill doesn't exist on stock code and needs to be created */
{
send_to_char(ch, "You don't know how to swim.\r\n");
return (0);
}
}
Or simply an added movement cost if the player doesn't know the skill (code added after cost is set in need_movement):
Code:
need_movement = (movement_loss[SECT(was_in)] +
movement_loss[SECT(going_to)]) / 2;
if (!IS_NPC(ch) && !GET_SKILL(ch, SKILL_SWIMMING))
{
need_movement += 2; /* completely arbitrary number lol */
}
Anyway, just some ideas! Hope it helps!