Statistics


Please note that there are many cases where a slight modification has been counted as an entirely original line of code. Here are some examples:

Example 1: act_soc.c

This is Merc:
    if ( !IS_NPC(ch) && IS_SET(ch->specials.act, PLR_NOEMOTE) )
    {
	send_to_char( "You are anti-social!\n\r", ch );
	return TRUE;
    }
This is Medievia:
    if ( !IS_NPC(ch) && IS_SET(ch->specials.act, PLR_NOEMOTE) )
    {
		send_to_char( "You are anti-social!\n\r", ch );
		return TRUE;
    }
Both lines of code within the braces have been counted as "original" (they have extra indentation, using two tabs rather than one).

Example 2: fight.c

This is Merc:
    /*
     * Second attack.
     */
    chance  = IS_NPC(ch) ? 2 * GET_LEVEL(ch)
                         : ch->skills[SKILL_SECOND_ATTACK].learned * 2 / 5;
This is Medievia:
    /*
     * Second attack.
     */
    chance=IS_NPC(ch) ? 2 * GET_LEVEL(ch)
                       : ch->skills[SKILL_SECOND_ATTACK].learned * 2 / 3;
Both lines of code have been counted as "original" (the first has had the white spaces around the '=' removed, the second line has '3' instead of '5' and has two less white spaces indentation).

Example 3: fight.c

This is Merc:
    struct obj_data *wielded;
    int w_type;
    int victim_ac, calc_thaco;
    int dam;
    byte diceroll;
This is Medievia:
    struct obj_data *wielded=NULL;
    int w_type;
    int victim_ac, calc_thaco=0;
    int dam;
    int diceroll;
Lines 1, 3 and 5 have been counted as "original".

As you can see, my statistics are heavily biased in favour of Medievia - even a tiny change will register as a fully original line of code. Unfortunately there isn't a great deal I can do about this, unless anyone can suggest a better tool than diff for comparing the files.