chance = get_skill (victim, gsn_sneak);chance = 70
chance += get_curr_stat (victim, STAT_DEX) * 3/2;chance += 27 so chance = 97
chance -= get_curr_stat (ch, STAT_INT) *2;chance -= 36 so chance = 61
chance -= ch->level - victim->level * 3/2;chance -= -2 so chance = 63 (i think, my math might be backwards on this one).
// This part at the start of act_move.c
extern bool check_awareness (CHAR_DATA * ch);
//then down in move_char()
if (IS_AFFECTED (ch, AFF_SNEAK) && (ch->invis_level < LEVEL_HERO))
{
CHAR_DATA *vch;
for (vch = ch->in_room->people; vch != NULL; vch = vch->next_in_room)
{
if ((vch != ch)
&& (IS_IMMORTAL(vch)
|| (check_awareness(vch) && vch->level >= ch->level -7)))
act ("$n sneaks in.", ch, NULL, vch, TO_VICT);
else
continue;
}
}
The first thing I'd like to ask is:
Could someone please help me understand this piece of code:
// handler.c Under: 'bool can_see'
In particular the 'chance' function/concept, and what '=' '+=' '-=' mean.