nightmare3_fluffos_v2/
nightmare3_fluffos_v2/bin/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/ChangeLog.old/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/Win32/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/compat/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/compat/simuls/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/include/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/clone/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/command/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/data/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/etc/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/include/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/inherit/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/inherit/master/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/log/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/tests/compiler/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/tests/efuns/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/single/tests/operators/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/testsuite/u/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/tmp/
nightmare3_fluffos_v2/fluffos-2.9-ds2.08/windows/
nightmare3_fluffos_v2/lib/cmds/ambassador/
nightmare3_fluffos_v2/lib/cmds/database/
nightmare3_fluffos_v2/lib/cmds/hm/
nightmare3_fluffos_v2/lib/cmds/soul/
nightmare3_fluffos_v2/lib/daemon/cfg/
nightmare3_fluffos_v2/lib/daemon/cfg/mon_races/
nightmare3_fluffos_v2/lib/daemon/cfg/races/
nightmare3_fluffos_v2/lib/daemon/include/
nightmare3_fluffos_v2/lib/daemon/save/
nightmare3_fluffos_v2/lib/daemon/services/
nightmare3_fluffos_v2/lib/daemon/soul/
nightmare3_fluffos_v2/lib/doc/
nightmare3_fluffos_v2/lib/doc/TestPlans/
nightmare3_fluffos_v2/lib/doc/approval/
nightmare3_fluffos_v2/lib/doc/approval/QC/
nightmare3_fluffos_v2/lib/doc/approval/balance/
nightmare3_fluffos_v2/lib/doc/build/
nightmare3_fluffos_v2/lib/doc/build/armours/
nightmare3_fluffos_v2/lib/doc/build/economy/
nightmare3_fluffos_v2/lib/doc/build/etc/
nightmare3_fluffos_v2/lib/doc/build/monster/
nightmare3_fluffos_v2/lib/doc/build/room/
nightmare3_fluffos_v2/lib/doc/build/virtual/
nightmare3_fluffos_v2/lib/doc/build/weapon/
nightmare3_fluffos_v2/lib/doc/classes/
nightmare3_fluffos_v2/lib/doc/efun/
nightmare3_fluffos_v2/lib/doc/etc/
nightmare3_fluffos_v2/lib/doc/help/creator/
nightmare3_fluffos_v2/lib/doc/help/hm/
nightmare3_fluffos_v2/lib/doc/law/
nightmare3_fluffos_v2/lib/doc/lpc/basic/
nightmare3_fluffos_v2/lib/doc/lpc/data_types/
nightmare3_fluffos_v2/lib/doc/lpc/etc/
nightmare3_fluffos_v2/lib/doc/lpc/intermediate/
nightmare3_fluffos_v2/lib/doc/lpc/types/
nightmare3_fluffos_v2/lib/doc/mudlib/
nightmare3_fluffos_v2/lib/doc/mudlib/features/
nightmare3_fluffos_v2/lib/domains/Examples/etc/
nightmare3_fluffos_v2/lib/domains/Examples/room/
nightmare3_fluffos_v2/lib/domains/Examples/virtual/
nightmare3_fluffos_v2/lib/domains/Examples/virtual/exaA/
nightmare3_fluffos_v2/lib/domains/Examples/virtual/exaB/
nightmare3_fluffos_v2/lib/domains/Examples/weapon/
nightmare3_fluffos_v2/lib/domains/Praxis/
nightmare3_fluffos_v2/lib/domains/Praxis/adm/
nightmare3_fluffos_v2/lib/domains/Praxis/attic/
nightmare3_fluffos_v2/lib/domains/Praxis/cemetary/
nightmare3_fluffos_v2/lib/domains/Praxis/cemetary/mon/
nightmare3_fluffos_v2/lib/domains/Praxis/data/
nightmare3_fluffos_v2/lib/domains/Praxis/death/
nightmare3_fluffos_v2/lib/domains/Praxis/mountains/
nightmare3_fluffos_v2/lib/domains/Praxis/obj/armour/
nightmare3_fluffos_v2/lib/domains/Praxis/obj/magic/
nightmare3_fluffos_v2/lib/domains/Praxis/obj/weapon/
nightmare3_fluffos_v2/lib/domains/Praxis/orc_valley/
nightmare3_fluffos_v2/lib/domains/Praxis/quests/
nightmare3_fluffos_v2/lib/domains/Praxis/standardOld/
nightmare3_fluffos_v2/lib/include/
nightmare3_fluffos_v2/lib/log/
nightmare3_fluffos_v2/lib/log/errors/
nightmare3_fluffos_v2/lib/log/reports/
nightmare3_fluffos_v2/lib/log/watch/
nightmare3_fluffos_v2/lib/news/
nightmare3_fluffos_v2/lib/secure/cfg/
nightmare3_fluffos_v2/lib/secure/cmds/ambassador/
nightmare3_fluffos_v2/lib/secure/cmds/mortal/
nightmare3_fluffos_v2/lib/secure/save/users/d/
nightmare3_fluffos_v2/lib/secure/std/
nightmare3_fluffos_v2/lib/std/hm/
nightmare3_fluffos_v2/lib/std/living/
nightmare3_fluffos_v2/lib/std/room/
nightmare3_fluffos_v2/lib/std/user/
nightmare3_fluffos_v2/lib/std/virtual/
nightmare3_fluffos_v2/lib/www/
nightmare3_fluffos_v2/lib/www/errors/
nightmare3_fluffos_v2/lib/www/gateways/
nightmare3_fluffos_v2/win32/
//	/adm/daemon/skills_d.c
//	from the Nightmare mudlib
//	contains code that would be very memory wasteful if in the user object
//	created by Descartes of Borg 14 february 1993

mapping init_skills(string cl) {
    mapping skills;
    if(!skills) skills = ([]);
    if(!cl) {
	skills["melee"] = ([ "level": 1, "points": 0, "max": 1 ]);
	skills["attack"] = ([ "level":0, "points":0, "max":0 ]);
	skills["defense"] = ([]);
 	skills["double wielding"] = ([]);
	skills["knife"] = ([]);
	skills["blunt"] = ([]);
	skills["projectile"] = ([]);
	skills["blade"] = ([]);
	skills["two handed"] = ([]);
	skills["murder"] = ([]);
	skills["stealing"] = ([]);
	skills["bargaining"] = ([]);
	skills["locks"] = ([]);
	skills["magic defense"] = ([]);
	skills["magic attack"] = ([]);
	skills["healing"] = ([]);
	skills["faith"] = ([]);
	skills["conjuring"] = ([]);
    }
    else {
	switch(cl) {
	    case "fighter":
		skills["melee"] = ([ "level": 1, "points": 0, "max": 100 ]);
		skills["attack"] = ([ "level": 5, "points": 0, "max": 100]);
	  	skills["defense"] = ([ "level": 2, "points":0, "max": 90 ]);
		skills["double wielding"] = (["level": 0, "points":0, "max":100]);
		skills["knife"] = ([ "level": 1, "points":0, "max":70 ]);
		skills["blunt"] = (["level": 1, "points":0, "max": 75 ]);
		skills["projectile"] = (["level":0, "points":0, "max": 60 ]);
		skills["blade"] = (["level":10, "points":0, "max":100 ]);
		skills["two handed"] = (["level":1, "points":0, "max":100 ]);
		skills["murder"] = (["level":0, "points":0, "max": 10 ]);
		skills["stealing"] = (["level":0, "points":0, "max": 10 ]);
		skills["bargaining"] = (["level":1, "points":0, "max":100 ]);
		skills["locks"] = (["level":0, "points":0, "max":5 ]);
                skills["stealth"] = ([ "level":0, "points":0, "max":10 ]);
		skills["magic defense"] = (["level":0, "points":0, "max":0 ]);
		skills["magic attack"] = (["level":0, "points":0, "max":0 ]);
		skills["healing"] = (["level":0, "points":0, "max":0 ]);
		skills["faith"] = (["level":0, "points":0, "max":0 ]);
		skills["conjuring"] = (["level":0, "points":0, "max":0 ]);
		break;
            case "kataan":
                skills["melee"] = (["level":2, "points":0, "max":50]);
                skills["attack"]= (["level":1, "points":0, "max":75]);
                skills["defense"]= (["level":1, "points":0, "max":40]);
                skills["double wielding"]=(["level":5, "points":0, "max":80]);
                skills["knife"]=(["level":0, "points":0, "max":40]);
                skills["blunt"]=(["level":0, "points":0, "max":100]);
                skills["blade"]=(["level":1, "points":0, "max":60]);
                skills["two handed"]=(["level":1, "points":0, "max":100]);
                skills["projectile"]=(["level":5, "points":0, "max":110]);
                skills["bargaining"]=(["level":1, "points":0, "max":50]);
                skills["stealth"]=(["level":1, "points":0, "max":67]);
                skills["stealing"]=(["level":0, "points":0, "max":5]);
                skills["locks"]=(["level":10, "points":0, "max":83]);
                skills["murder"]=(["level":1, "points":0, "max":100]);
                skills["magic attack"]=(["level":3, "points":0, "max":50]);
                skills["faith"]=(["level":5, "points":0, "max":110]);
                skills["healing"]=(["level":2, "points":0, "max":50]);
                skills["magic defense"]=(["level":0, "points":0, "max":0]);
                skills["conjuring"]=(["level":1, "points":0, "max":32]);
                break;
	    case "rogue":
		skills["melee"] = (["level": 1, "points":0, "max": 100 ]);
		skills["attack"] = (["level": 1, "points":0, "max": 100 ]);
		skills["defense"] = (["level":5, "points":0, "max":100 ]);
		skills["double wielding"] = (["level":0, "points":0, "max":10 ]);
		skills["knife"] = (["level":10, "points":0, "max": 100 ]);
		skills["blunt"] = (["level":2, "points":0, "max":100 ]);
		skills["projectile"] = (["level":7, "points":0, "max":100]);
		skills["blade"] = (["level":0, "points":0, "max": 40]);
		skills["two handed"] = (["level":0, "points":0, "max":75 ]);
		skills["murder"] = (["level":3, "points":0, "max":100 ]);
                skills["stealth"] = (["level":10, "points":0, "max":100 ]);
		skills["stealing"] = (["level":7, "points":0, "max":100 ]);
		skills["bargaining"] = (["level":10, "points":0, "max":100 ]);
		skills["locks"] = (["level":10, "points":0, "max":100 ]);
		skills["magic defense"] = ([ "level": 0, "points":0, "max":0 ]);
		skills["magic attack"] = (["level":0, "points":0, "max":0 ]);
		skills["healing"] = (["level":0, "points":0, "max":0 ]);
		skills["faith"] = (["level":0, "points":0, "max":0 ]);
		skills["conjuring"] = (["level":0, "points":0, "max":0 ]);
		break;
	    case "mage":
		skills["melee"] = (["level":1, "points":0, "max":50 ]);
		skills["attack"] = (["level":0, "points":0, "max": 30 ]);
		skills["defense"] = (["level":1, "points":0, "max":60 ]);
		skills["double wielding"] = (["level":0, "points":0, "max":10 ]);
		skills["knife"] = (["level":1, "points":0, "max":50 ]);
	 	skills["blunt"] = (["level":5, "points":0, "max":90 ]);
		skills["projectile"] = (["level":0, "points":0, "max":53 ]);
		skills["blade"] = (["level":0, "points":0, "max":20 ]);
		skills["two handed"] = (["level":0, "points":0, "max":17 ]);
		skills["murder"] = (["level":0, "points":0, "max":5 ]);
		skills["stealing"] = (["level":0, "points":0, "max":5 ]);
		skills["bargaining"] = (["level":1, "points":0, "max":79 ]);
		skills["locks"] = (["level":0, "points":0, "max":28 ]);
		skills["magic defense"] = (["level" :1, "points":0, "max":61 ]);
		skills["magic attack"] = (["level": 10, "points": 0, "max":100 ]);
		skills["healing"] = (["level":0, "points":0, "max":20 ]);
		skills["faith"] = (["level":0, "points":0, "max":0 ]);
		skills["conjuring"] = (["level":7, "points":0, "max":100 ]);
		break;
	    case "monk":
		skills["melee"] = (["level":10, "points":0, "max":100 ]);
		skills["attack"] = (["level":1, "points":0, "max":70 ]);
		skills["defense"] = (["level":10, "points":0, "max":100]);
		skills["double wielding"] = (["level":0, "points":0, "max":0 ]);
		skills["knife"] = (["level":0, "points":0, "max":30 ]);
		skills["blunt"] = (["level":3, "points":0, "max": 95 ]);
		skills["projectile"] = (["level":7, "points":0, "max":100 ]);
		skills["blade"] = (["level":0, "points":0, "max":3 ]);
		skills["two handed"] = (["level":0, "points":0, "max":0 ]);
		skills["murder"] = (["level":0, "points":0, "max":0 ]);
		skills["stealing"] = (["level":0, "points":0, "max":0 ]);
		skills["bargaining"] = (["level":0, "points":0, "max": 55 ]);
		skills["locks"] = (["level":0, "points":0, "max":0 ]);
		skills["magic defense"] = (["level":3, "points":0, "max":100 ]);
		skills["magic attack"] = (["level":1, "points":0, "max": 25 ]);
		skills["healing"] = (["level":0, "points":0, "max": 37 ]);
		skills["faith"] = (["level":7, "points":0, "max":100 ]);
		skills["conjuring"] = (["level":0, "points":0, "max": 15 ]);
		break;
	    case "cleric":
		skills["melee"] = ([ "level": 1, "points":0, "max": 50 ]);
		skills["attack"] = ([ "level":0, "points":0, "max": 10 ]);
		skills["defense"] = ([ "level":1, "points":0, "max":20 ]);
		skills["double wielding"] = (["level":0, "points":0, "max": 1 ]);
		skills["knife"] = ([ "level":5, "points":0, "max": 90 ]);
		skills["blunt"] = ([ "level":1, "points":0, "max":70 ]);
		skills["projectile"] = (["level":0, "points":0, "max": 20]);
		skills["blade"] = (["level":0, "points":0, "max":15 ]);
		skills["two handed"] = (["level":0, "points":0, "max":1 ]);
		skills["murder"] = ([ "level":0, "points":0, "max":0 ]);
		skills["stealing"] = ([ "level":0, "points":0, "max":0 ]);
		skills["locks"] = (["level":0, "points":0, "max":0 ]);
		skills["bargaining"] = ([ "level":0, "points":0, "max": 55 ]);
		skills["magic defense"] = ([ "level":0, "points":0, "max": 80 ]);
		skills["magic attack"] = ([ "level":0, "points":0, "max": 7 ]);
		skills["healing"] = ([ "level":10, "points":0, "max":100 ]);
		skills["faith"] = (["level":5, "points":0, "max":90 ]);
		skills["conjuring"] = ([ "level":0, "points":0, "max":22 ]);
		break;
	    case "child": init_skills(0);
		break;
	    default: init_skills(0);
	}
    }
    return skills;
}

int training_formula(string cl, int lvl, string skill) {
    if(cl == "fighter") {
	switch(skill) {
	    case "melee": case "attack": case "defense": case "double wielding":
	    case "two handed": case "blade":
		return lvl * lvl; break;
            case "knife": case "blunt": case "projectile":
              return (lvl * lvl * lvl)/2; break;
            case "bargaining": case "murder":
	    case "stealing":
	  	return lvl * lvl * lvl; break;
	    default: return lvl * lvl * lvl * lvl; break;
	}
    }
    else if(cl == "cleric") {
	switch(skill) {
	    case "magic defense": case "healing": case "faith": 
		return lvl * lvl; break;
	    case "melee": case "defense": case "knife": case "blunt": 
            case "conjuring":
		return lvl * lvl * lvl; break;
	    default: return lvl * lvl * lvl * lvl; break;
	}
    }
    else if(cl == "mage") {
	switch(skill) {
	    case "magic attack": case "magic defense": case "conjuring": case "blunt":
		return lvl * lvl; break;
	    case "projectile": case "melee": case "attack": case "knife":
	    case "bargaining":
		return lvl * lvl * lvl; break;
	    default: return lvl * lvl * lvl * lvl; break;
	}
    }
    else if(cl == "kataan") {
        switch(skill) {
            case "projectile": case "stealth": case "attack": case "faith":
              return lvl * lvl; break;
            case "two handed": case "double wielding": case "murder":
            case "locks": case "magic attack":
              return lvl * lvl * lvl; break;
            default: return lvl * lvl * lvl * lvl; break;
        }
    }
    else if(cl == "monk") {
	switch(skill) {
	    case "melee": case "defense": case "blunt": case "projectile":
	    case "bargaining": case "magic defense": case "faith":
		return lvl * lvl; break;
	    case "knife": case "attack": case "conjuring":
		return lvl * lvl * lvl; break;
	    default: return lvl * lvl * lvl * lvl; break;
	}
    }
    else {
	switch(skill) {
	    case "stealth": case "melee": case "attack": case "defense": case "knife":
	    case "bargaining": case "murder": case "stealing": case "locks":
	        return lvl * lvl; break;
	    case "blunt": case "projectile": case "double wielding":
		return lvl * lvl * lvl; break;
	    default: return lvl * lvl * lvl * lvl; break;
	}
    }
}

int query_melee_ac(string cl) {
    switch(cl) {
	case "fighter": return 15; break;
	case "monk": return 20; break;
        case "kataan": return 11; break;
	case "rogue": return 20; break;
	case "cleric": return 5; break;
	case "mage": return 8; break;
	default: return 1;
    }
}