Index: src/common/mmo.h
===================================================================
--- src/common/mmo.h (revision 23)
+++ src/common/mmo.h (revision 24)
@@ -11,5 +11,5 @@
 
 //Remove/Comment this line to disable sc_data saving. [Skotlex]
-#define ENABLE_SC_SAVING
+#define ENABLE_SC_SAVING 
 //Remove/Comment this line to disable server-side hot-key saving support [Skotlex]
 //Note that newer clients no longer save hotkeys in the registry!
@@ -31,5 +31,5 @@
 #define MAX_FAME 1000000000
 #define MAX_CART 100
-#define MAX_SKILL 1600 //1600 now, for necromancer skills overstepping bounds.
+#define MAX_SKILL 1100 // Bumped to 1100 for new quest skills, will need to further increase one day... [DracoRPG]
 #define GLOBAL_REG_NUM 96
 #define ACCOUNT_REG_NUM 64
@@ -117,5 +117,5 @@
 	IT_AMMO,    //10
 	IT_DELAYCONSUME,//11
-	IT_MAX
+	IT_MAX 
 };
 
@@ -309,5 +309,5 @@
 	int buyer_id;
 	char buyer_name[NAME_LENGTH];
-
+	
 	struct item item;
 	// This data is required for searching, as itemdb is not read by char server
@@ -526,8 +526,7 @@
 	JOB_XMAS,
 	JOB_SUMMER,
-    JOB_ADEPT = 30, // [Brain]
+    JOB_ADEPT = 30, // [Brain] 
     JOB_NECROMANCER, // [Brain]
-    JOB_WARLOCK,
-    
+    JOB_WARLOCK, // Warlock [Brain]
 	JOB_MAX_BASIC,
 
@@ -583,5 +582,4 @@
 	JOB_STAR_GLADIATOR2,
 	JOB_SOUL_LINKER,
-	
 	JOB_MAX,
 };
Index: src/map/atcommand.c
===================================================================
--- src/map/atcommand.c (revision 19)
+++ src/map/atcommand.c (revision 24)
@@ -1263,10 +1263,10 @@
 			{ "supernovice",	23 },
 			{ "gunslinger",	24 },
+			{ "gunner",	24 },
+			{ "ninja",	25 },
 			{ "adept",	30 },//New job classes [Brainstorm]
 			{ "necromancer",	31 },
 			{ "necro",	31 },
 			{ "warlock",	32 },
-			{ "gunner",	24 },
-			{ "ninja",	25 },
 			{ "high novice",	4001 },
 			{ "swordsman high",	4002 },
@@ -7818,15 +7818,13 @@
 {
 	if (sd->state.showsummon) {
-	sd->state.showsummon = 0;
-	clif_displaymessage(fd, "Summon Stats will not be shown.");
-	return 0;
+		sd->state.showsummon = 0;
+		clif_displaymessage(fd, "Summon Stats will not be shown.");
+		return 0;
 	}
 
 	sd->state.showsummon = 1;
-	clif_displaymessage(fd, "Summon Stats are now shown.");
-	return 0;
-}
-
-
+	clif_displaymessage(fd, "Summon Stats is now shown.");
+	return 0;
+}
 /*==========================================
  * Barricade Build
@@ -8592,5 +8590,5 @@
 	{ "killbarricade",     60,     atcommand_barricade_destroy },
 	//Vanaheim Commands
-	{ "showsummon",	 0, atcommand_showsummon}, //Brainstorm
+	{ "showsummon",         0, atcommand_showsummon}, //Brainstorm
 };
 
Index: src/map/itemdb.c
===================================================================
--- src/map/itemdb.c (revision 19)
+++ src/map/itemdb.c (revision 24)
@@ -242,11 +242,12 @@
 	if (jobmask & 1<<JOB_NINJA)
 		bclass[0] |= 1<<MAPID_NINJA;
+//why does it have job masks as 26 27 28? wasnt it 29 30 31 or something?
 	//Custom Classes
 	if (jobmask & 1<<26) // Adept [Brain]
-	bclass[0] |= 1<<MAPID_ADEPT;
+		bclass[0] |= 1<<MAPID_ADEPT;
 	if (jobmask & 1<<27) // Necromancer [Brain]
-	bclass[1] |= 1<<MAPID_ADEPT;
+		bclass[1] |= 1<<MAPID_ADEPT;
 	if (jobmask & 1<<28) // Warlock [Brain]
-	bclass[2] |= 1<<MAPID_ADEPT;
+		bclass[2] |= 1<<MAPID_ADEPT;
 }
 
Index: src/map/script.c
===================================================================
--- src/map/script.c (revision 23)
+++ src/map/script.c (revision 24)
@@ -7486,5 +7486,5 @@
 	int allflag=va_arg(ap,int);
 
-	md->npc_killmonster = 1;
+	md->state.npc_killmonster = 1;
 	
 	if(!allflag){
@@ -7495,5 +7495,5 @@
 			status_kill(bl);
 	}
-	md->npc_killmonster = 0;
+	md->state.npc_killmonster = 0;
 	return 0;
 }
Index: src/map/battle.c
===================================================================
--- src/map/battle.c (revision 19)
+++ src/map/battle.c (revision 24)
@@ -73,5 +73,5 @@
 		return 1;
 	}
-	return 0;
+	return 0;	
 }
 
@@ -123,5 +123,5 @@
 		return 1;
 	}
-	return 0;
+	return 0;	
 }
 
@@ -205,5 +205,5 @@
 		amotion = 1000; //Aegis places a damage-delay cap of 1 sec to non player attacks. [Skotlex]
 	add_timer(tick+amotion, battle_delay_damage_sub, src->id, (int)dat);
-
+	
 	return 0;
 }
@@ -211,5 +211,5 @@
 int battle_attr_ratio(int atk_elem,int def_type, int def_lv)
 {
-
+	
 	if (atk_elem < 0 || atk_elem >= ELE_MAX)
 		return 100;
@@ -222,5 +222,5 @@
 
 /*==========================================
- * Does attribute fix modifiers.
+ * Does attribute fix modifiers. 
  * Added passing of the chars so that the status changes can affect it. [Skotlex]
  * Note: Passing src/target == NULL is perfectly valid, it skips SC_ checks.
@@ -230,8 +230,8 @@
 	struct status_change *sc=NULL, *tsc=NULL;
 	int ratio;
-
+	
 	if (src) sc = status_get_sc(src);
 	if (target) tsc = status_get_sc(target);
-
+	
 	if (atk_elem < 0 || atk_elem >= ELE_MAX)
 		atk_elem = rand()%ELE_MAX;
@@ -277,5 +277,5 @@
 	if (!damage)
 		return 0;
-
+	
 	if( mob_ksprotected(src, bl) )
 		return 0;
@@ -295,5 +295,5 @@
 		if(!damage) return 0;
 	}
-
+	
 	if (skill_num == PA_PRESSURE)
 		return damage; //This skill bypass everything else.
@@ -344,5 +344,5 @@
 			return 0;
 		}
-
+		
 		if(sc->data[SC_DODGE] && !sc->opt1 &&
 			(flag&BF_LONG || sc->data[SC_SPURT])
@@ -372,32 +372,31 @@
 			return 0;
 		}
-
-	//Display red flashing aura effect of Adept Blood Lust [Brain]
-	if(sc->data[SC_LUST] && damage > 0){
-		clif_specialeffect(bl, 548, AREA);
-		if(rand()%100 < 10) clif_specialeffect(bl, 455, AREA); //Red Lightnings, 1/10 attacks will show to prevent spam
-	};
-	//Display blue flashing aura effect of Warlock Overwhelming Evil [Brain]
-	if(sc->data[SC_OVERWHELMING] && damage > 0)
-		clif_specialeffect(bl, 73, AREA);
-
-	// AT-Field [Brainstorm]
-	if(sc->data[SC_ATFIELD] &&
-		rand()%100 < sc->data[SC_ATFIELD]->val2)
-	{	//Blocks all skills.
-		clif_specialeffect(bl, 438, AREA);
-		//Shouldn't end until Breaker's non-weapon part connects.
-		if (skill_num == ASC_BREAKER ||
-		skill_num == LK_SPIRALPIERCE ||
-		skill_num == CG_ARROWVULCAN ||
-		skill_num == SN_SHARPSHOOTING)
-		if (--sc->data[SC_ATFIELD]->val3 <= 0) //We make it work like Safety Wall
-		status_change_end(bl, SC_ATFIELD, -1);
-		return 0;
-	}
-
+		
+		//Display red flashing aura effect of Adept Blood Lust [Brain]
+		if(sc->data[SC_LUST] && damage > 0){
+			clif_specialeffect(bl, 548, AREA);
+			if(rand()%100 < 10) clif_specialeffect(bl, 455, AREA); //Red Lightnings, 1/10 attacks will show to prevent spam
+		};
+		//Display blue flashing aura effect of Warlock Overwhelming Evil [Brain]
+		if(sc->data[SC_OVERWHELMING] && damage > 0)
+			clif_specialeffect(bl, 73, AREA);
+ //AT Field is Irrelevant, I believe.
+		// AT-Field [Brainstorm]
+		if(sc->data[SC_ATFIELD] &&
+			rand()%100 < sc->data[SC_ATFIELD]->val2)
+		{	//Blocks all skills.
+			clif_specialeffect(bl, 438, AREA);
+			//Shouldn't end until Breaker's non-weapon part connects.
+			if (skill_num == ASC_BREAKER ||
+				skill_num == LK_SPIRALPIERCE ||
+				skill_num == CG_ARROWVULCAN ||
+				skill_num == SN_SHARPSHOOTING)
+				if (--sc->data[SC_ATFIELD]->val3 <= 0) //We make it work like Safety Wall
+				status_change_end(bl, SC_ATFIELD, -1);
+			return 0;
+		}
 
 		if (((sce=sc->data[SC_UTSUSEMI]) || sc->data[SC_BUNSINJYUTSU])
-		&&
+		&& 
 			flag&BF_WEAPON && !(skill_get_nk(skill_num)&NK_NO_CARDFIX_ATK))
 		{
@@ -501,9 +500,9 @@
 	}
 	//SC effects from caster side. Currently none.
-/*
+/*	
 	sc = status_get_sc(src);
 	if (sc && sc->count) {
 	}
-*/
+*/	
 	if (battle_config.pk_mode && sd && bl->type == BL_PC && damage)
   	{
@@ -553,10 +552,10 @@
 	if (!damage) //No reductions to make.
 		return 0;
-
+	
 	class_ = status_get_class(bl);
 
 	if (bl->type == BL_MOB)
 		md=(struct mob_data *)bl;
-
+	
 	if(md && md->guardian_data) {
 		if(class_ == MOBID_EMPERIUM && flag&BF_SKILL)
@@ -640,5 +639,6 @@
 
 	if((skill = pc_checkskill(sd,AL_DEMONBANE)) > 0 &&
-		(status->race==RC_UNDEAD || status->race==RC_DEMON) )
+		target->type == BL_MOB && //This bonus doesnt work against players.
+		(battle_check_undead(status->race,status->def_ele) || status->race==RC_DEMON) )
 		damage += (skill*(int)(3+(sd->status.base_level+1)*0.05));	// submitted by orn
 		//damage += (skill * 3);
@@ -649,8 +649,8 @@
 			damage += sd->status.str;
 	}
-
+//AMIDOINITRITE?! V seems okay.	
 	//Warlock Touch of Corruption (Mage-Monster Killer passive skill) [Brainstorm]
 	if((skill = pc_checkskill(sd,WL_CORRUPTION)) > 0 && target->type==BL_MOB )
-	damage += (skill * (status->int_/10));
+		damage += (skill * (status->int_/10));
 
 	if(type == 0)
@@ -737,5 +737,5 @@
 	{	//Mobs/Pets
 		if(flag&4)
-		{
+		{		  
 			atkmin = status->matk_min;
 			atkmax = status->matk_max;
@@ -753,5 +753,5 @@
 		{	//Normal attacks
 			atkmin = status->dex;
-
+			
 			if (sd->equip_index[type] >= 0 && sd->inventory_data[sd->equip_index[type]])
 				atkmin = atkmin*(80 + sd->inventory_data[sd->equip_index[type]]->wlv*20)/100;
@@ -759,5 +759,5 @@
 			if (atkmin > atkmax)
 				atkmin = atkmax;
-
+			
 			if(flag&2 && !(flag&16))
 			{	//Bows
@@ -768,14 +768,14 @@
 		}
 	}
-
+	
 	if (sc && sc->data[SC_MAXIMIZEPOWER])
 		atkmin = atkmax;
-
+	
 	//Weapon Damage calculation
 	if (!(flag&1))
 		damage = (atkmax>atkmin? rand()%(atkmax-atkmin):0)+atkmin;
-	else
+	else 
 		damage = atkmax;
-
+	
 	if (sd)
 	{
@@ -790,5 +790,5 @@
 				sd->right_weapon.atkmods[t_size])/100;
 	}
-
+	
 	//Finally, add baseatk
 	if(flag&4)
@@ -796,5 +796,5 @@
 	else
 		damage += status->batk;
-
+	
 	//rodatazone says that Overrefine bonuses are part of baseatk
 	//Here we also apply the weapon_atk_rate bonus so it is correctly applied on left/right hands.
@@ -823,5 +823,5 @@
 	if (!battle_config.arrow_decrement)
 		return;
-
+	
 	if (skill)
 	{
@@ -891,5 +891,5 @@
 		unsigned idef2 : 1;	//Ignore defense (left weapon)
 		unsigned pdef : 2;	//Pierces defense (Investigate/Ice Pick)
-		unsigned pdef2 : 2;	//1: Use def+def2/100, 2: Use def+def2/50
+		unsigned pdef2 : 2;	//1: Use def+def2/100, 2: Use def+def2/50	
 		unsigned infdef : 1;	//Infinite defense (plants)
 		unsigned arrow : 1;	//Attack is arrow-based
@@ -897,5 +897,5 @@
 		unsigned lh : 1;		//Attack considers left hand (wd.damage2)
 		unsigned weapon : 1; //It's a weapon attack (consider VVS, and all that)
-	}	flag;
+	}	flag;	
 
 	memset(&wd,0,sizeof(wd));
@@ -944,5 +944,5 @@
 	)
 		flag.arrow = 1;
-
+	
 	if(skill_num){
 		wd.flag |= battle_range_type(src, target, skill_num, skill_lv);
@@ -975,5 +975,5 @@
 				wd.type = 0x08;
 				break;
-
+				
 			case GS_GROUNDDRIFT:
 			case KN_SPEARSTAB:
@@ -994,5 +994,5 @@
 	} else //Range for normal attacks.
 		wd.flag |= flag.arrow?BF_LONG:BF_SHORT;
-
+	
 	if (!skill_num && tstatus->flee2 && rand()%1000 < tstatus->flee2)
 	{	//Check for Lucky Dodge
@@ -1046,5 +1046,5 @@
 		//Therefore, we use the old value 3 on cases when an sd gets attacked by a mob
 		cri -= tstatus->luk*(!sd&&tsd?3:2);
-
+		
 		if(tsc)
 		{
@@ -1114,5 +1114,5 @@
 		if(battle_config.agi_penalty_type &&
 			battle_config.agi_penalty_target&target->type)
-		{
+		{	
 			unsigned char attacker_count; //256 max targets should be a sane max
 			attacker_count = unit_counttargeted(target,battle_config.agi_penalty_count_lv);
@@ -1172,5 +1172,5 @@
 			hitrate += hitrate * ( 2 * skill ) / 100;
 
-		hitrate = cap_value(hitrate, battle_config.min_hitrate, battle_config.max_hitrate);
+		hitrate = cap_value(hitrate, battle_config.min_hitrate, battle_config.max_hitrate); 
 
 		if(rand()%100 >= hitrate)
@@ -1323,5 +1323,5 @@
 				)
 				skillratio += sd->random_attack_increase_add;
-
+		
 			ATK_RATE(skillratio);
 		} else {	//Skills
@@ -1329,5 +1329,5 @@
 			{
 				case NC_DEATHHAND: // Necro Death Hand [Brain]
-					skillratio += -25+25*skill_lv;
+					skillratio += -25+25*skill_lv; //I wonder if it will accept that?
 					break;
 				case SM_BASH:
@@ -1335,5 +1335,5 @@
 					break;
 				case SM_MAGNUM:
-					skillratio += 20*skill_lv;
+					skillratio += 20*skill_lv; 
 					break;
 				case MC_MAMMONITE:
@@ -1592,5 +1592,5 @@
 					int k = (wflag-1)/3; //+100% every 3 cells of distance
 					if( k > 2 ) k = 2; // ...but hard-limited to 300%.
-					skillratio += 100 * k;
+					skillratio += 100 * k; 
 					}
 					break;
@@ -1607,11 +1607,4 @@
 					skillratio += 100 *(skill_lv-1);
 					break;
-		/*Mercenary Skills [Brainstorm]
-		case MS_BASH:
-			skillratio += 30*skill_lv;
-			break;
-		case MER_CRASH:
-			skillratio += 10*skill_lv;
-			break;*/
 			}
 
@@ -1675,5 +1668,5 @@
 				break;
 		}
-
+		
 		if(sd)
 		{
@@ -1747,11 +1740,11 @@
 				if(def2 < 1) def2 = 1;
 			}
-			//Vitality reduction from rodatazone: http://rodatazone.simgaming.net/mechanics/substats.php#def
+			//Vitality reduction from rodatazone: http://rodatazone.simgaming.net/mechanics/substats.php#def	
 			if (tsd)	//Sd vit-eq
 			{	//[VIT*0.5] + rnd([VIT*0.3], max([VIT*0.3],[VIT^2/150]-1))
 				vit_def = def2*(def2-15)/150;
 				vit_def = def2/2 + (vit_def>0?rand()%vit_def:0);
-
-				if((sstatus->race==RC_UNDEAD || sstatus->race==RC_DEMON) &&
+				
+				if((battle_check_undead(sstatus->race,sstatus->def_ele) || sstatus->race==RC_DEMON) && //This bonus already doesnt work vs players
 					src->type == BL_MOB && (skill=pc_checkskill(tsd,AL_DP)) > 0)
 					vit_def += skill*(int)(3 +(tsd->status.base_level+1)*0.04);   // submitted by orn
@@ -1761,5 +1754,5 @@
 				vit_def = def2 + (vit_def>0?rand()%vit_def:0);
 			}
-
+			
 			if (battle_config.weapon_defense_type) {
 				vit_def += def1*battle_config.weapon_defense_type;
@@ -1784,5 +1777,5 @@
 		if (sc && skill_num != LK_SPIRALPIERCE)
 		{	//SC skill damages
-			if(sc->data[SC_AURABLADE])
+			if(sc->data[SC_AURABLADE]) 
 				ATK_ADD(20*sc->data[SC_AURABLADE]->val1);
 		}
@@ -1821,5 +1814,5 @@
 			else
 			ARR_FIND(0, 3, i, t_class == sd->hate_mob[i]);
-			if (i < 3 && (skill=pc_checkskill(sd,sg_info[i].anger_id)))
+			if (i < 3 && (skill=pc_checkskill(sd,sg_info[i].anger_id))) 
 			{
 				skillratio = sd->status.base_level + sstatus->dex + sstatus->luk;
@@ -1836,10 +1829,10 @@
 	} //Here ends flag.hit section, the rest of the function applies to both hitting and missing attacks
   	else if(wd.div_ < 0) //Since the attack missed...
-		wd.div_ *= -1;
+		wd.div_ *= -1; 
 
 	if(skill_num == CR_GRANDCROSS || skill_num == NPC_GRANDDARKNESS)
 		return wd; //Enough, rest is not needed.
 
-	if(sd && (skill=pc_checkskill(sd,BS_WEAPONRESEARCH)) > 0)
+	if(sd && (skill=pc_checkskill(sd,BS_WEAPONRESEARCH)) > 0) 
 		ATK_ADD(skill*2);
 
@@ -1883,5 +1876,5 @@
 		{
 			int cardfix = 1000, cardfix_ = 1000;
-			int t_race2 = status_get_race2(target);
+			int t_race2 = status_get_race2(target);	
 			if(sd->state.arrow_atk)
 			{
@@ -1943,5 +1936,5 @@
 				ATK_RATE2(cardfix/10, cardfix_/10);	//What happens if you use right-to-left and there's no right weapon, only left?
 		}
-
+		
 		if (skill_num == CR_SHIELDBOOMERANG || skill_num == PA_SHIELDCHAIN) { //Refine bonus applies after cards and elements.
 			short index= sd->equip_index[EQI_HAND_L];
@@ -1997,5 +1990,5 @@
 		if (flag.lh && (flag.hit || wd.damage2>0))
 			wd.damage2 = 1;
-		if (!(battle_config.skill_min_damage&1))
+		if (!(battle_config.skill_min_damage&1)) 
 			//Do not return if you are supposed to deal greater damage to plants than 1. [Skotlex]
 			return wd;
@@ -2027,5 +2020,5 @@
 	if (sd)
 	{
-		if (!flag.rh && flag.lh)
+		if (!flag.rh && flag.lh) 
 		{	//Move lh damage to the rh
 			wd.damage = wd.damage2;
@@ -2118,5 +2111,5 @@
 					breakrate[1] += sc->data[SC_MELTDOWN]->val3;
 				}
-			}
+			}	
 			if (breakrate[0])
 				skill_break_equip(target, EQP_WEAPON, breakrate[0], BCT_ENEMY);
@@ -2189,5 +2182,5 @@
 	else if (s_ele == -2) //Use status element
 		s_ele = status_get_attack_sc_element(src,status_get_sc(src));
-
+	
 	//Set miscellaneous data that needs be filled
 	if(sd) {
@@ -2199,5 +2192,5 @@
 	ad.flag |= battle_range_type(src, target, skill_num, skill_lv);
 	flag.infdef=(tstatus->mode&MD_PLANT?1:0);
-
+		
 	switch(skill_num)
 	{
@@ -2226,6 +2219,7 @@
 		{	//Calc base damage according to skill
 			case AL_HEAL:
-			case PR_BENEDICTIO:
+			case PR_BENEDICTIO: //Accidentally deleted the :, replaced it. No difference, so dont worry about this.
 			case AD_DARKHEAL: // Adept Dark Heal
+			//Is this a good place for dark heal, i wonder? Seems fine though.
 				ad.damage = skill_calc_heal(src, target, skill_lv)/2;
 				break;
@@ -2346,33 +2340,36 @@
 						skillratio += 100 +100*skill_lv +100*(skill_lv/2);
 						break;
-			case NC_DRAINLIFE: // Necro Drain Life [Brain]
-			skillratio += 25*skill_lv;
-			break;
-			case WL_HELLFIRE: // Warlock Hellfire [Brain]
-			skillratio += 25*skill_lv;
-			break;
-			case WL_SHADOWBURN: // Warlock Shadow Burn [Brain]
-			skillratio += 20*skill_lv;
-			break;
-			case WL_CURSEDOOM: // Warlock Curse of Doom [Brain]
-			skillratio += 400 + 300*skill_lv; //max 20*matk dmg after 60 seconds
-			break;
-			case WL_SEARING: // Warlock Searing Pain [Brain]
-			if(status_get_sc(target)->data[SC_SEARING])
-				skillratio = 10*pc_checkskill(sd,WL_SEARING);//10% * skilllv
-			break; //Else 100% Matk
-			case WL_IMMOLATE: // Warlock Immolate [Brain]
-			if(status_get_sc(target)->data[SC_IMMOLATE])
-				skillratio += 10*pc_checkskill(sd,WL_SEARING);//100% +10 * searing lv
-			else skillratio += -20 + 20*skill_lv;// Else 80% + 20% * skill lv
-			break;
-			case WL_CONFLAGRATE: // Warlock Conflagrate [Brain]
-			skillratio += 100 + 60*skill_lv + //damage bonus from other fire skills
-				10*pc_checkskill(sd,WL_SEARING) + 10*pc_checkskill(sd,WL_IMMOLATE);
-			break;
+						
+//NOTE: All the skills below here did NOT work before, may have been a stupid mistake but this is for reference.
+					case NC_DRAINLIFE: // Necro Drain Life [Brain]
+						skillratio += 25*skill_lv;
+						break;
+					case WL_HELLFIRE: // Warlock Hellfire [Brain]
+						skillratio += 25*skill_lv;
+						break;
+					case WL_SHADOWBURN: // Warlock Shadow Burn [Brain]
+						skillratio += 20*skill_lv;
+						break;
+					case WL_CURSEDOOM: // Warlock Curse of Doom [Brain]
+						skillratio += 400 + 300*skill_lv; //max 20*matk dmg after 60 seconds
+						break;
+					case WL_SEARING: // Warlock Searing Pain [Brain]
+						if(status_get_sc(target)->data[SC_SEARING])
+							skillratio = 10*pc_checkskill(sd,WL_SEARING);//10% * skilllv
+						break; //Else 100% Matk
+					case WL_IMMOLATE: // Warlock Immolate [Brain]
+						if(status_get_sc(target)->data[SC_IMMOLATE])
+							skillratio += 10*pc_checkskill(sd,WL_SEARING);//100% +10 * searing lv
+						else skillratio += -20 + 20*skill_lv;// Else 80% + 20% * skill lv
+						break;
+					case WL_CONFLAGRATE: // Warlock Conflagrate [Brain]
+						skillratio += 100 + 60*skill_lv + //damage bonus from other fire skills
+							10*pc_checkskill(sd,WL_SEARING) + 10*pc_checkskill(sd,WL_IMMOLATE);
+						break;
+
 				}
 
 				MATK_RATE(skillratio);
-
+			
 				//Constant/misc additions from skills
 				if (skill_num == WZ_FIREPILLAR)
@@ -2426,5 +2423,5 @@
 			}
 		}
-
+		
 		if (skill_num == NPC_EARTHQUAKE)
 		{	//Adds atk2 to the damage, should be influenced by number of hits and skill-ratio, but not mdef reductions. [Skotlex]
@@ -2441,14 +2438,12 @@
 		if (!(nk&NK_NO_ELEFIX))
 			ad.damage=battle_attr_fix(src, target, ad.damage, s_ele, tstatus->def_ele, tstatus->ele_lv);
-
-
-	if(skill_num == WL_SHADOWBURN) { // Warlock Shadow Burn [Brain]
-		// This is where we calculate the secondary damage
-		if(ad.damage<1) ad.damage=1;
-		struct Damage md = battle_calc_misc_attack(src,target,skill_num,skill_lv, mflag);
-		if(md.damage<1) md.damage=1; //Changed MD = WD
-		ad.damage += md.damage; // Same as above
-	}
-
+//Take this into account for errors. It looks out of place/outdated but I will not look further into it until I know.
+		if(skill_num == WL_SHADOWBURN) { // Warlock Shadow Burn [Brain]
+			// This is where we calculate the secondary damage
+			if(ad.damage<1) ad.damage=1;
+			struct Damage md = battle_calc_misc_attack(src,target,skill_num,skill_lv, mflag);
+			if(md.damage<1) md.damage=1;
+			ad.damage += md.damage;
+		}
 		if (sd && !(nk&NK_NO_CARDFIX_ATK)) {
 			short t_class = status_get_class(target);
@@ -2505,8 +2500,8 @@
 
 	damage_div_fix(ad.damage, ad.div_);
-
+	
 	if (flag.infdef && ad.damage)
 		ad.damage = ad.damage>0?1:-1;
-
+		
 	ad.damage=battle_calc_damage(src,target,ad.damage,ad.div_,skill_num,skill_lv,ad.flag);
 	if (map_flag_gvg2(target->m))
@@ -2545,8 +2540,8 @@
 
 	nk = skill_get_nk(skill_num);
-
+	
 	sd = BL_CAST(BL_PC, src);
 	tsd = BL_CAST(BL_PC, target);
-
+	
 	if(sd) {
 		sd->state.arrow_atk = 0;
@@ -2579,10 +2574,10 @@
 		if(mflag > 1) //Autocasted Blitz.
 			nk|=NK_SPLASHSPLIT;
-
+		
 		if (skill_num == SN_FALCONASSAULT)
 		{
 			//Div fix of Blitzbeat
 			skill = skill_get_num(HT_BLITZBEAT, 5);
-			damage_div_fix(md.damage, skill);
+			damage_div_fix(md.damage, skill); 
 
 			//Falcon Assault Modifier
@@ -2650,9 +2645,16 @@
 	case NPC_EVILLAND:
 		md.damage = (skill_lv>6)?666:skill_lv*100;
-		//break;
+//Why the hell is this supposed to be above the break?
 	case WL_SHADOWBURN: // Warlock ShadowBurn dark element damage [Brain]
 		s_ele = ELE_DARK;
 		md.damage = ((300 + 20*skill_lv)/100)*((sstatus->int_*(rand()%300+500))/100); //Fixed between min and max matk for now
 		break;
+		
+// Wouldn't this work better?
+
+/*	case WL_SHADOWBURN: // Warlock ShadowBurn dark element damage [Brain]
+		s_ele = ELE_DARK;
+		md.damage = ((300 + 20*skill_lv)/100)*((sstatus->int_*(rand()%300+500))/100); //Fixed between min and max matk for now
+break;*/
 	}
 
@@ -2665,5 +2667,5 @@
 
 	damage_div_fix(md.damage, md.div_);
-
+	
 	if (!(nk&NK_IGNORE_FLEE))
 	{
@@ -2677,7 +2679,7 @@
 				hitrate=80; //Default hitrate
 
-			if(battle_config.agi_penalty_type &&
+			if(battle_config.agi_penalty_type && 
 				battle_config.agi_penalty_target&target->type)
-			{
+			{	
 				unsigned char attacker_count; //256 max targets should be a sane max
 				attacker_count = unit_counttargeted(target,battle_config.agi_penalty_count_lv);
@@ -2814,9 +2816,9 @@
 		if (*damage <= 0) continue;
 		//First and Third iterations: race, other two boss/nonboss state
-		if (i == 0 || i == 2)
+		if (i == 0 || i == 2) 
 			type = race;
 		else
 			type = boss?RC_BOSS:RC_NONBOSS;
-
+		
 		hp = wd->hp_drain[type].value;
 		if (wd->hp_drain[type].rate)
@@ -2841,22 +2843,24 @@
 	if (sd->sp_vanish_rate && rand()%1000 < sd->sp_vanish_rate)
 		status_percent_damage(&sd->bl, tbl, 0, (unsigned char)sd->sp_vanish_per, false);
-// Adept Blood Pact drains 5% damage per hit [FlavioJS/Brain]
+//I don't know about this. But it looks like it fits fine
+	// Adept Blood Pact drains 5% damage per hit [FlavioJS/Brain]
 	if( pc_checkskill(sd, AD_BLOODPACT) > 0 )
-	thp += battle_calc_drain(rdamage,1000,5);
+		thp += battle_calc_drain(rdamage,1000,5);
 
 	// Warlock Soul Steal drains 1%*skilllv damage per hit [Brain]
 	if( pc_checkskill(sd, WL_SOULSTEAL) > 0 )
-	tsp += battle_calc_drain(rdamage,1000,pc_checkskill(sd,WL_SOULSTEAL));
+		tsp += battle_calc_drain(rdamage,1000,pc_checkskill(sd,WL_SOULSTEAL));
 	// Warlock Touch of Corruption burns 1%*skilllv damage as SP per hit [Brain]
-	if( pc_checkskill(sd, WL_CORRUPTION) > 0 ) {
-	int corrupt_sp;
-	corrupt_sp = battle_calc_drain(rdamage,1000,pc_checkskill(sd,WL_CORRUPTION));
-	if(status_damage(NULL, tbl, 0, corrupt_sp, 0, 3))
-		rhp += corrupt_sp;//If SP damage was caused, increase HP damage too
-	}
+	if( pc_checkskill(sd, WL_CORRUPTION) > 0 ) {// This is the opener, whoops lol.
+		int corrupt_sp;
+		corrupt_sp = battle_calc_drain(rdamage,1000,pc_checkskill(sd,WL_CORRUPTION));
+		if(status_damage(NULL, tbl, 0, corrupt_sp, 0, 3))
+			rhp += corrupt_sp;//If SP damage was caused, increase HP damage too
+	}// Where does this bracket open?
+
 	if (!thp && !tsp) return;
 
 	status_heal(&sd->bl, thp, tsp, battle_config.show_hp_sp_drain?3:1);
-
+	
 	if (rhp || rsp)
 		status_zap(tbl, rhp, rsp);
@@ -2894,5 +2898,5 @@
 	if (tsc && !tsc->count)
 		tsc = NULL;
-
+	
 	if (sd)
 	{
@@ -3057,5 +3061,5 @@
 
 	if (tsc) {
-		if (tsc->data[SC_POISONREACT] &&
+		if (tsc->data[SC_POISONREACT] && 
 			(rand()%100 < tsc->data[SC_POISONREACT]->val3
 			|| sstatus->def_ele == ELE_POISON) &&
@@ -3078,12 +3082,12 @@
 	return wd.dmg_lv;
 }
-
+//new battle check code, i speculate it. But it looks like it just calls other races and elements into one big one.
 int battle_check_living(int race,int element)// Living creature check [Brain]
 {
 	if(element == ELE_UNDEAD || race == RC_UNDEAD // Undead element and race check
-	|| race == RC_DEMON		// Demon race check
-	|| race == RC_FORMLESS		// Formless race check
-	|| element == ELE_GHOST){	// Ghost element check
-	return 0;
+		|| race == RC_DEMON			// Demon race check
+		|| race == RC_FORMLESS			// Formless race check
+		|| element == ELE_GHOST){		// Ghost element check
+		return 0;
 	}
 	else {
@@ -3091,5 +3095,4 @@
 	}
 }
-
 int battle_check_undead(int race,int element)
 {
@@ -3219,5 +3222,5 @@
 			break;
 		//All else not specified is an invalid target.
-		default:
+		default:	
 			return 0;
 	}
@@ -3336,6 +3339,6 @@
 			break;
 	}
-
-	if ((flag&BCT_ALL) == BCT_ALL) { //All actually stands for all attackable chars
+	
+	if ((flag&BCT_ALL) == BCT_ALL) { //All actually stands for all attackable chars 
 		if (target->type&BL_CHAR)
 			return 1;
@@ -3345,5 +3348,5 @@
 	if (flag == BCT_NOONE) //Why would someone use this? no clue.
 		return -1;
-
+	
 	if (t_bl == s_bl)
 	{	//No need for further testing.
@@ -3353,5 +3356,5 @@
 		return (flag&state)?1:-1;
 	}
-
+	
 	if (map_flag_vs(m)) { //Check rivalry settings.
 		if (flag&(BCT_PARTY|BCT_ENEMY)) {
@@ -3403,5 +3406,5 @@
 		}
 	}
-
+	
 	if (!state) //If not an enemy, nor a guild, nor party, nor yourself, it's neutral.
 		state = BCT_NEUTRAL;
@@ -3733,5 +3736,5 @@
 	{ "require_glory_guild",                &battle_config.require_glory_guild,             0,      0,      1,              },
 	{ "idle_no_share",                      &battle_config.idle_no_share,                   0,      0,      INT_MAX,        },
-	{ "party_even_share_bonus",             &battle_config.party_even_share_bonus,          0,      0,      INT_MAX,        },
+	{ "party_even_share_bonus",             &battle_config.party_even_share_bonus,          0,      0,      INT_MAX,        }, 
 	{ "delay_battle_damage",                &battle_config.delay_battle_damage,             1,      0,      1,              },
 	{ "hide_woe_damage",                    &battle_config.hide_woe_damage,                 0,      0,      1,              },
@@ -3806,9 +3809,10 @@
 	{ "auction_feeperhour",                 &battle_config.auction_feeperhour,              12000,  0,      INT_MAX,        },
 	{ "auction_maximumprice",               &battle_config.auction_maximumprice,            500000000, 0,   MAX_ZENY,       },
+//battle conf declarations, does this mean we add new lines to battle.conf?
 	//Vanaheim battle settings [Brainstorm]
-	{ "necro_retaliation",		  &battle_config.necro_retaliation,		   1,	  0,	  1,		  },
-	{ "disp_summon_stats",		  &battle_config.disp_summon_stats,		   0,	  0,	  1,		  },
-
+	{ "necro_retaliation",                  &battle_config.necro_retaliation,               1,      0,      1,              },
+	{ "disp_summon_stats",                  &battle_config.disp_summon_stats,               0,      0,      1,              },
 	{ "gm_viewequip_min_lv",                &battle_config.gm_viewequip_min_lv,             0,      0,      99,             },
+	{ "homunculus_auto_vapor",              &battle_config.homunculus_auto_vapor,           0,      0,      1,              },
 };
 
@@ -3854,7 +3858,7 @@
 	battle_config.monster_max_aspd = 2000 - battle_config.monster_max_aspd*10;
 	battle_config.max_aspd = 2000 - battle_config.max_aspd*10;
-	battle_config.max_walk_speed = 100*DEFAULT_WALK_SPEED/battle_config.max_walk_speed;
+	battle_config.max_walk_speed = 100*DEFAULT_WALK_SPEED/battle_config.max_walk_speed;	
 	battle_config.max_cart_weight *= 10;
-
+	
 	if(battle_config.max_def > 100 && !battle_config.weapon_defense_type)	 // added by [Skotlex]
 		battle_config.max_def = 100;
@@ -3862,13 +3866,13 @@
 	if(battle_config.min_hitrate > battle_config.max_hitrate)
 		battle_config.min_hitrate = battle_config.max_hitrate;
-
+		
 	if(battle_config.pet_max_atk1 > battle_config.pet_max_atk2)	//Skotlex
 		battle_config.pet_max_atk1 = battle_config.pet_max_atk2;
-
+	
 	if (battle_config.day_duration && battle_config.day_duration < 60000) // added by [Yor]
 		battle_config.day_duration = 60000;
 	if (battle_config.night_duration && battle_config.night_duration < 60000) // added by [Yor]
 		battle_config.night_duration = 60000;
-
+	
 #ifndef CELL_NOSTACK
 	if (battle_config.cell_stack_limit != 1)
Index: src/map/skill.c
===================================================================
--- src/map/skill.c (revision 23)
+++ src/map/skill.c (revision 24)
@@ -42,5 +42,5 @@
 #define GD_SKILLRANGEMIN 900
 #define GD_SKILLRANGEMAX GD_SKILLRANGEMIN+MAX_GUILDSKILL
-#define HM_SKILLRANGEMIN 1000
+#define HM_SKILLRANGEMIN 1100 //I know for a fact this will cause authok problems where it is, but perhaps it's changed now.
 #define HM_SKILLRANGEMAX HM_SKILLRANGEMIN+MAX_HOMUNSKILL
 
@@ -283,5 +283,5 @@
 	struct status_change* sc;
 	sc = status_get_sc(bl);
-
+	
 	// Never copy NPC/Wedding Skills
 	if (skill_get_inf2(skillid)&(INF2_NPC_SKILL|INF2_WEDDING_SKILL))
@@ -300,5 +300,5 @@
 	if ((skillid == AL_INCAGI || skillid == AL_BLESSING))
 		return 0;
-
+		
 	return 1;
 }
@@ -306,13 +306,13 @@
 // [MouseJstr] - skill ok to cast? and when?
 int skillnotok (int skillid, struct map_session_data *sd)
-{
+{	
 	int i,m;
 	nullpo_retr (1, sd);
 	m = sd->bl.m;
 	i = skill_get_index(skillid);
-
+	
 	if (i == 0)
 		return 1; // invalid skill id
-
+	
 	if (battle_config.gm_skilluncond && pc_isGM(sd) >= battle_config.gm_skilluncond)
 		return 0;  // GMs can do any damn thing they want
@@ -354,5 +354,5 @@
 				return 1;
 			}
-			break;
+			break;	
 		case MC_VENDING:
 		case MC_IDENTIFY:
@@ -387,5 +387,5 @@
 	if (i == 0)
 		return 1; // invalid skill id
-
+	
 	if (hd->blockskill[i] > 0)
 		return 1;
@@ -396,5 +396,5 @@
 
 struct s_skill_unit_layout* skill_get_unit_layout (int skillid, int skilllv, struct block_list* src, int x, int y)
-{
+{	
 	int pos = skill_get_unit_layout_type(skillid,skilllv);
 	int dir;
@@ -420,5 +420,5 @@
 
 /*==========================================
- *
+ * 
  *------------------------------------------*/
 int skill_additional_effect (struct block_list* src, struct block_list *bl, int skillid, int skilllv, int attack_type, unsigned int tick)
@@ -450,5 +450,5 @@
 	if (!tsc) //skill additional effect is about adding effects to the target...
 		//So if the target can't be inflicted with statuses, this is pointless.
-		return 0;
+		return 0;	
 
 	switch(skillid)
@@ -482,5 +482,5 @@
 						(2000 - 4*sstatus->agi - 2*sstatus->dex)))
 					; //Stance triggered
-				else if(sc->data[SC_READYTURN] &&
+				else if(sc->data[SC_READYTURN] && 
 					sc_start(src,SC_COMBO, 15, TK_TURNKICK,
 						(2000 - 4*sstatus->agi - 2*sstatus->dex)))
@@ -492,5 +492,5 @@
 						rate += rate*sc->data[SC_SKILLRATE_UP]->val2/100;
 						status_change_end(src,SC_SKILLRATE_UP,-1);
-					}
+					} 
 					sc_start4(src,SC_COMBO, rate, TK_COUNTER, bl->id,0,0,
 						(2000 - 4*sstatus->agi - 2*sstatus->dex));
@@ -610,5 +610,6 @@
 	case CR_GRANDCROSS:
 	case NPC_GRANDDARKNESS:
-		if(tstatus->race == RC_UNDEAD || tstatus->race == RC_DEMON)
+		//Chance to cause blind status vs demon and undead element, but not against players
+		if(!dstsd && (battle_check_undead(tstatus->race,tstatus->def_ele) || tstatus->race == RC_DEMON))
 			sc_start(bl,SC_BLIND,100,skilllv,skill_get_time2(skillid,skilllv));
 		break;
@@ -662,5 +663,5 @@
 	case NPC_PETRIFYATTACK:
 		sc_start4(bl,status_skill2sc(skillid),50+10*skilllv,
-			skilllv,0,0,skill_get_time(skillid,skilllv),
+			skilllv,0,0,skill_get_time(skillid,skilllv), 
 			skill_get_time2(skillid,skilllv));
 		break;
@@ -680,5 +681,5 @@
 		sc_start(bl,SC_BLEEDING,(20*skilllv),skilllv,skill_get_time2(skillid,skilllv));
 		break;
-	case NPC_MENTALBREAKER:
+	case NPC_MENTALBREAKER: 
 	{	//Based on observations by Tharis, Mental Breaker should do SP damage
 	  	//equal to Matk*skLevel.
@@ -785,5 +786,5 @@
 			if (tsc->data[SC_ADRENALINE2])
 				status_change_end(bl, SC_ADRENALINE2, -1);
-		}
+		}		
 		break;
 	case TK_TURNKICK:
@@ -821,33 +822,28 @@
 		sc_start(bl,SC_CRITICALWOUND,100,skilllv,skill_get_time2(skillid,skilllv));
 		break;
+//This has weird Structure compared to the other stuff here.
 	case NC_GHOULTOUCH:	//Necro Ghoul Touch [Brain]
-	if (battle_check_living(tstatus->race, tstatus->def_ele)) //Check if target is a living creature before proceed
-		sc_start(bl,SC_POISON,10000,skilllv,skill_get_time2(skillid,skilllv));
-	break;
+		if (battle_check_living(tstatus->race, tstatus->def_ele)) //Check if target is a living creature before proceed
+			sc_start(bl,SC_POISON,10000,skilllv,skill_get_time2(skillid,skilllv));
+		break;
 	case NC_PWSUFFER:	//Necro Power Word: Suffer [Brain]
 	case WL_PWAGONY:	//Warlock Power Word: Agony [Brain]
-	if (battle_check_living(tstatus->race, tstatus->def_ele)) //Check if target is a living creature before proceed
-		sc_start(bl,skillid==NC_PWSUFFER?SC_SUFFER:SC_AGONY,1000,skilllv,skill_get_time2(skillid,skilllv));
-	break;
+		if (battle_check_living(tstatus->race, tstatus->def_ele)) //Check if target is a living creature before proceed
+			sc_start(bl,skillid==NC_PWSUFFER?SC_SUFFER:SC_AGONY,1000,skilllv,skill_get_time2(skillid,skilllv));
+		break;
 	case WL_SEARING:	//Warlock Searing Pain [Brain]
-	//The DoT is only initiated if target isnt burning already.
-	if(!tsc->data[SC_SEARING] && !tsc->data[SC_IMMOLATE])
-		sc_start(bl,SC_SEARING,10000,skilllv,skill_get_time2(skillid,skilllv));
-	break;
+		//The DoT is only initiated if target isnt burning already.
+		if(!tsc->data[SC_SEARING] && !tsc->data[SC_IMMOLATE])
+			sc_start(bl,SC_SEARING,10000,skilllv,skill_get_time2(skillid,skilllv));
+		break;
 	case WL_IMMOLATE:	//Warlock Immolate [Brain]
-	//The DoT is only initiated if target isnt in immolate, but must be in searing pain status
-	if(tsc->data[SC_SEARING] && !tsc->data[SC_IMMOLATE])
-		sc_start(bl,SC_IMMOLATE,10000,skilllv,skill_get_time2(skillid,skilllv));
-	break;
+		//The DoT is only initiated if target isnt in immolate, but must be in searing pain status
+		if(tsc->data[SC_SEARING] && !tsc->data[SC_IMMOLATE])
+			sc_start(bl,SC_IMMOLATE,10000,skilllv,skill_get_time2(skillid,skilllv));
+		break;
 	case WL_SHADOWBURN:	//Warlock Shadow Burn [Brain]
-	sc_start(bl,SC_STUN,10000,skilllv,skill_get_time(skillid,skilllv));
-	break;
-	//Mercenary Skills [Brainstorm]
-/*	case MS_BASH:
-	sc_start(bl,SC_STUN,5*(skilllv-5),skilllv,skill_get_time(skillid,skilllv));
-	break;
-	case MER_CRASH:
-	sc_start(bl,SC_STUN,6*skilllv,skilllv,skill_get_time(skillid,skilllv));
-	break;*/
+		sc_start(bl,SC_STUN,10000,skilllv,skill_get_time(skillid,skilllv));
+		break;
+
 	}
 
@@ -961,5 +957,5 @@
 	if(sd && sd->classchange && attack_type&BF_WEAPON &&
 		dstmd && !(tstatus->mode&MD_BOSS) &&
-		(rand()%10000 < sd->classchange))
+		(rand()%10000 < sd->classchange)) 
 	{
 		struct mob_db *mob;
@@ -970,5 +966,5 @@
 				class_ = rand() % MAX_MOB_DB;
 			} while (!mobdb_checkid(class_));
-
+			
 			rate = rand() % 1000000;
 			mob = mob_db(class_);
@@ -984,8 +980,8 @@
 
 /* Splitted off from skill_additional_effect, which is never called when the
- * attack skill kills the enemy. Place in this function counter status effects
- * when using skills (eg: Asura's sp regen penalty, or counter-status effects
+ * attack skill kills the enemy. Place in this function counter status effects 
+ * when using skills (eg: Asura's sp regen penalty, or counter-status effects 
  * from cards) that will take effect on the source, not the target. [Skotlex]
- * Note: Currently this function only applies to Extremity Fist and BF_WEAPON
+ * Note: Currently this function only applies to Extremity Fist and BF_WEAPON 
  * type of skills, so not every instance of skill_additional_effect needs a call
  * to this one.
@@ -997,5 +993,5 @@
 	struct map_session_data *dstsd=NULL;
 	struct status_change *tsc;
-
+	
 	nullpo_retr(0, src);
 	nullpo_retr(0, bl);
@@ -1015,5 +1011,5 @@
 		if(tsc && tsc->data[SC_KAAHI] && tsc->data[SC_KAAHI]->val4 == -1)
 			tsc->data[SC_KAAHI]->val4 = add_timer(
-				tick+skill_get_time2(SL_KAAHI,tsc->data[SC_KAAHI]->val1),
+				tick+skill_get_time2(SL_KAAHI,tsc->data[SC_KAAHI]->val1), 
 				kaahi_heal_timer, bl->id, SC_KAAHI); //Activate heal.
 		break;
@@ -1047,14 +1043,14 @@
 		status_heal(src, 0, status_get_lv(bl)*(95+15*rate)/100, 2);
 	}
-
+//was hard to pinpoint this place.
 	// Warlock Soul Steal [Brain]
-	if(sd && skillid && attack_type&BF_MAGIC && status_isdead(bl)
-	&& !(skill_get_inf(skillid)&(INF_GROUND_SKILL|INF_SELF_SKILL))
-	&& (rate=pc_checkskill(sd,WL_SOULSTEAL))>0){// Wont work with area/ground spells (hellfire)
-	if (pc_issit(sd)) pc_setstand(sd);
-	clif_skill_nodamage(src,bl,WL_SOULSTEAL,rate,1);
-	clif_specialeffect(src, 253, AREA); // Absorb Mana effect on caster
-	status_heal(src, 0, status_get_lv(bl)*(90+10*rate)/100, 2);
-	if(rand()%100 < rate) skill_additem(src,src,15020,1); //Chance to "steal" the target soul
+	if(sd && skillid && attack_type&BF_MAGIC && status_isdead(bl) 
+		&& !(skill_get_inf(skillid)&(INF_GROUND_SKILL|INF_SELF_SKILL))
+		&& (rate=pc_checkskill(sd,WL_SOULSTEAL))>0){// Wont work with area/ground spells (hellfire)
+		if (pc_issit(sd)) pc_setstand(sd);
+		clif_skill_nodamage(src,bl,WL_SOULSTEAL,rate,1);
+		clif_specialeffect(src, 253, AREA); // Absorb Mana effect on caster
+		status_heal(src, 0, status_get_lv(bl)*(90+10*rate)/100, 2);
+		if(rand()%100 < rate) skill_additem(src,src,15020,1); //Chance to "steal" the target soul
 	}
 
@@ -1069,5 +1065,5 @@
 				rate+=dstsd->addeff2[i].arrow_rate;
 			if (!rate) continue;
-
+			
 			if ((dstsd->addeff2[i].flag&(ATF_LONG|ATF_SHORT)) != (ATF_LONG|ATF_SHORT))
 			{	//Trigger has range consideration.
@@ -1078,8 +1074,8 @@
 			type = dstsd->addeff2[i].id;
 			time = skill_get_time2(status_sc2skill(type),7);
-
+			
 			if (dstsd->addeff2[i].flag&ATF_TARGET)
 				status_change_start(src,type,rate,7,0,0,0,time,0);
-
+			
 			if (dstsd->addeff2[i].flag&ATF_SELF && !status_isdead(bl))
 				status_change_start(bl,type,rate,7,0,0,0,time,0);
@@ -1089,5 +1085,5 @@
 	// Trigger counter-spells to retaliate against damage causing skills.
 	if(dstsd && !status_isdead(bl) && src != bl && dstsd->autospell2[0].id &&
-		!(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE))
+		!(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE)) 
 	{
 		struct block_list *tbl;
@@ -1109,5 +1105,5 @@
 			if (attack_type&BF_LONG)
 				 rate>>=1;
-
+			
 			if (skillnotok(skillid, dstsd))
 				continue;
@@ -1118,5 +1114,5 @@
 			else
 				tbl = src;
-
+			
 			switch (skill_get_casttype(skillid)) {
 				case CAST_GROUND:
@@ -1142,5 +1138,5 @@
 	//Auto-script when attacked
 	if(dstsd && !status_isdead(bl) && src != bl && dstsd->autoscript2[0].script &&
-		!(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE))
+		!(skillid && skill_get_nk(skillid)&NK_NO_DAMAGE)) 
 	{
 		int i;
@@ -1166,5 +1162,5 @@
    (BCT_ENEMY/BCT_PARTY/BCT_SELF) are the valid values.
 --------------------------------------------------------------------------*/
-int skill_break_equip (struct block_list *bl, unsigned short where, int rate, int flag)
+int skill_break_equip (struct block_list *bl, unsigned short where, int rate, int flag) 
 {
 	const int where_list[4]     = {EQP_WEAPON, EQP_ARMOR, EQP_SHIELD, EQP_HELM};
@@ -1268,5 +1264,5 @@
 	for (i = 0; i < ARRAYLENGTH(pos); i++) {
 		if (where&pos[i] && sc->data[sc_def[i]])
-			where&=~pos[i];
+			where&=~pos[i]; 
 	}
 	if (!where) return 0;
@@ -1298,5 +1294,5 @@
 	if (count == 0)
 		return 0; //Actual knockback distance is 0.
-
+	
 	switch (target->type)
 	{
@@ -1333,5 +1329,5 @@
 
 	if (!su)
-		unit_stop_walking(target,0);
+		unit_stop_walking(target,0); 
 
 	dx = nx - target->x;
@@ -1350,5 +1346,5 @@
 	map_foreachinmovearea(clif_insight, target, AREA_SIZE, -dx, -dy, target->type == BL_PC ? BL_ALL : BL_PC, target);
 
-	if(!(flag&0x1))
+	if(!(flag&0x1)) 
 		clif_blown(target);
 
@@ -1398,5 +1394,5 @@
  * flag&0xFFF is passed to the underlying battle_calc_attack for processing
  *      (usually holds number of targets, or just 1 for simple splash attacks)
- * flag&0x1000 is used to tag that this is a splash-attack (so the damage
+ * flag&0x1000 is used to tag that this is a splash-attack (so the damage 
  *      packet shouldn't display a skill animation)
  * flag&0x2000 is used to signal that the skilllv should be passed as -1 to the
@@ -1499,5 +1495,5 @@
 			}
 		}
-
+	
 		if(sc && sc->data[SC_MAGICROD] && src == dsrc) {
 			int sp = skill_get_sp(skillid,skilllv);
@@ -1513,5 +1509,5 @@
 
 	damage = dmg.damage + dmg.damage2;
-
+	
 	if( (skillid == AL_INCAGI || skillid == AL_BLESSING) && tsd->sc.data[SC_CHANGEUNDEAD] )
 		damage = 1;
@@ -1524,5 +1520,5 @@
 	type=(skillid==0)?5:skill_get_hit(skillid);
 
-	if(damage < dmg.div_
+	if(damage < dmg.div_ 
 		//Only skills that knockback even when they miss. [Skotlex]
 		&& skillid != CH_PALMSTRIKE)
@@ -1653,5 +1649,5 @@
 		break;
 	}
-
+	
 	map_freeblock_lock();
 
@@ -1686,6 +1682,6 @@
 		}
 	}
-	if (skillid != WZ_SIGHTRASHER &&
-		skillid != WZ_SIGHTBLASTER &&
+	if (skillid != WZ_SIGHTRASHER && 
+		skillid != WZ_SIGHTBLASTER && 
 		skillid != AC_SHOWER &&
 		skillid != SM_MAGNUM &&
@@ -1709,5 +1705,5 @@
 			if (!status_isdead(bl))
 				skill_additional_effect(src,bl,skillid,skilllv,attack_type,tick);
-			//Counter status effects [Skotlex]
+			//Counter status effects [Skotlex] 
 			skill_counter_additional_effect(dsrc,bl,skillid,skilllv,attack_type,tick);
 		}
@@ -1727,5 +1723,5 @@
 		skill_blown(dsrc,bl,dmg.blewcount,direction,0);
 	}
-
+	
 	//Delayed damage must be dealt after the knockback (it needs to know actual position of target)
 	if (dmg.amotion)
@@ -1759,5 +1755,5 @@
 
 	if (!(flag&2) &&
-		(
+		(	
 			skillid == MG_COLDBOLT || skillid == MG_FIREBOLT || skillid == MG_LIGHTNINGBOLT
 		) &&
@@ -1933,5 +1929,5 @@
 	struct map_session_data *sd;
 	int gid, id, strvit, agidex;
-
+	
 	sd = (struct map_session_data *)bl;
 
@@ -1973,5 +1969,5 @@
 	int i,j,hp,sp,hp_rate,sp_rate,state,mhp ;
 	int itemid[10],amount[ARRAYLENGTH(itemid)],index[ARRAYLENGTH(itemid)];
-
+	
 	nullpo_retr(0, hd);
 	sd = hd->master;
@@ -2108,5 +2104,5 @@
 				target = src; //Required since it has to warp.
 			if(target == NULL)
-				break;
+				break;	
 			if(target->prev == NULL)
 				break;
@@ -2151,38 +2147,37 @@
 					}
 					break;
-
-		case NC_PWSUFFER: //Necro Power Word: Suffer [Brain]
-			if (!status_isdead(target) && status_get_sc(target)->data[SC_SUFFER]){
-			skill_attack(BF_MAGIC,src,src,target,skl->skill_id,skl->skill_lv,tick,skl->flag|SD_ANIMATION|SD_LEVEL);
-			clif_specialeffect(target, 180, AREA); //Shadow Hit Effect on target
-			if (skl->type>1 && !status_isdead(target))
-				skill_addtimerskill(src,tick+3000,target->id,0,0,skl->skill_id,skl->skill_lv,skl->type-1,skl->flag|SD_ANIMATION);
-			}
-			break;
-		case WL_SEARING: //Warlock Searing Pain [Brain]
-			if (!status_isdead(target) && status_get_sc(target)->data[SC_SEARING]){
-			skill_attack(BF_MAGIC,src,target,target,skl->skill_id,skl->skill_lv,tick,skl->flag|SD_ANIMATION|SD_LEVEL);
-			clif_specialeffect(target, 49, AREA); //Fire Hit Effect on target
-			if (skl->type>1 && !status_isdead(target))
-				skill_addtimerskill(src,tick+3000,target->id,0,0,skl->skill_id,skl->skill_lv,skl->type-1,skl->flag|SD_ANIMATION);
-			}
-			break;
-		case WL_IMMOLATE: //Warlock Immolate [Brain]
-			if (!status_isdead(target) && status_get_sc(target)->data[SC_IMMOLATE]){
-			skill_attack(BF_MAGIC,src,target,target,skl->skill_id,skl->skill_lv,tick,skl->flag|SD_ANIMATION|SD_LEVEL);
-			clif_specialeffect(target, 97, AREA); //Firepillar Hit Effect on target
-			if (skl->type>1 && !status_isdead(target))
-				skill_addtimerskill(src,tick+3000,target->id,0,0,skl->skill_id,skl->skill_lv,skl->type-1,skl->flag|SD_ANIMATION);
-			}
-			break;
-		case WL_PWAGONY: //Warlock Power Word: Agony [Brain]
-			if (!status_isdead(target) && status_get_sc(target)->data[SC_AGONY]){
-			skill_attack(BF_MAGIC,src,target,target,skl->skill_id,skl->skill_lv,tick,skl->flag|SD_ANIMATION|SD_LEVEL);
-			clif_specialeffect(target, 587, AREA); //Big Purple Flame Effect on target
-			if (skl->type>1 && !status_isdead(target))
-				skill_addtimerskill(src,tick+3000,target->id,0,0,skl->skill_id,skl->skill_lv,skl->type-1,skl->flag|SD_ANIMATION);
-			}
-			break;
-
+//Could be confusing to find the right place.
+				case NC_PWSUFFER: //Necro Power Word: Suffer [Brain]
+					if (!status_isdead(target) && status_get_sc(target)->data[SC_SUFFER]){
+						skill_attack(BF_MAGIC,src,src,target,skl->skill_id,skl->skill_lv,tick,skl->flag|SD_ANIMATION|SD_LEVEL);
+						clif_specialeffect(target, 180, AREA); //Shadow Hit Effect on target
+						if (skl->type>1 && !status_isdead(target))
+							skill_addtimerskill(src,tick+3000,target->id,0,0,skl->skill_id,skl->skill_lv,skl->type-1,skl->flag|SD_ANIMATION);
+					}
+					break;
+				case WL_SEARING: //Warlock Searing Pain [Brain]
+					if (!status_isdead(target) && status_get_sc(target)->data[SC_SEARING]){
+						skill_attack(BF_MAGIC,src,target,target,skl->skill_id,skl->skill_lv,tick,skl->flag|SD_ANIMATION|SD_LEVEL);
+						clif_specialeffect(target, 49, AREA); //Fire Hit Effect on target
+						if (skl->type>1 && !status_isdead(target))
+							skill_addtimerskill(src,tick+3000,target->id,0,0,skl->skill_id,skl->skill_lv,skl->type-1,skl->flag|SD_ANIMATION);
+					}
+					break;
+				case WL_IMMOLATE: //Warlock Immolate [Brain]
+					if (!status_isdead(target) && status_get_sc(target)->data[SC_IMMOLATE]){
+						skill_attack(BF_MAGIC,src,target,target,skl->skill_id,skl->skill_lv,tick,skl->flag|SD_ANIMATION|SD_LEVEL);
+						clif_specialeffect(target, 97, AREA); //Firepillar Hit Effect on target
+						if (skl->type>1 && !status_isdead(target))
+							skill_addtimerskill(src,tick+3000,target->id,0,0,skl->skill_id,skl->skill_lv,skl->type-1,skl->flag|SD_ANIMATION);
+					}
+					break;
+				case WL_PWAGONY: //Warlock Power Word: Agony [Brain]
+					if (!status_isdead(target) && status_get_sc(target)->data[SC_AGONY]){
+						skill_attack(BF_MAGIC,src,target,target,skl->skill_id,skl->skill_lv,tick,skl->flag|SD_ANIMATION|SD_LEVEL);
+						clif_specialeffect(target, 587, AREA); //Big Purple Flame Effect on target
+						if (skl->type>1 && !status_isdead(target))
+							skill_addtimerskill(src,tick+3000,target->id,0,0,skl->skill_id,skl->skill_lv,skl->type-1,skl->flag|SD_ANIMATION);
+					}
+					break;
 				default:
 					skill_attack(skl->type,src,src,target,skl->skill_id,skl->skill_lv,tick,skl->flag);
@@ -2220,8 +2215,8 @@
 	ud = unit_bl2ud(src);
 	nullpo_retr(1, ud);
-
+	
 	ARR_FIND( 0, MAX_SKILLTIMERSKILL, i, ud->skilltimerskill[i] == 0 );
 	if( i == MAX_SKILLTIMERSKILL ) return 1;
-
+	
 	ud->skilltimerskill[i] = ers_alloc(skill_timer_ers, struct skill_timerskill);
 	ud->skilltimerskill[i]->timer = add_timer(tick, skill_timerskill, src->id, i);
@@ -2248,5 +2243,5 @@
 	ud = unit_bl2ud(src);
 	nullpo_retr(0, ud);
-
+		
 	for(i=0;i<MAX_SKILLTIMERSKILL;i++) {
 		if(ud->skilltimerskill[i]) {
@@ -2285,5 +2280,5 @@
 
 	nullpo_retr(1, src);
-	nullpo_retr(1, bl);
+	nullpo_retr(1, bl);	
 
 	if (src->m != bl->m)
@@ -2292,5 +2287,5 @@
 	if (bl->prev == NULL)
 		return 1;
-
+	
 	sd = BL_CAST(BL_PC, src);
 	tsd = BL_CAST(BL_PC, bl);
@@ -2308,5 +2303,5 @@
 	}
 
-	sc = status_get_sc(src);
+	sc = status_get_sc(src);	
 	if (sc && !sc->count)
 		sc = NULL; //Unneeded
@@ -2397,29 +2392,24 @@
 	case NPC_BLEEDING:
 	case NPC_CRITICALWOUND:
-	/*Mercenary Skills [Brainstorm]
-	case MS_BASH:
-	case MA_DOUBLE:
-	case MA_CHARGEARROW:
-	case ML_PIERCE:
-	case ML_SPIRALPIERCE:
-	case MER_CRASH:
 		skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
-		break;*/
+		break;
+		
+//... something doesn't fit about this. Seriously.
 	case NC_GHOULTOUCH:	//Necro Ghoul Touch [Brain]
-	skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
-	clif_specialeffect(bl, 124, AREA); //Venom Dust Effect on target
-	break;
-	case NC_DEATHHAND:	 //Necro Death Hand [Brain]
-	skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag|SD_LEVEL);//Hide skill yell
-	clif_specialeffect(bl, 65, AREA); //Power absorb Effect on target
-	if (battle_check_living(tstatus->race, tstatus->def_ele)){ //Check if target is a living creature before proceed
-		int chance = (10+(skilllv*2)+(status_get_luk(src)-status_get_luk(bl))/5);
-		//10% chance + 2% per skilllv + (caster luk - target luk)/5 %
-		if (rand()%100 < chance) {
-			clif_skill_nodamage(src,bl,skillid,-1,flag|SD_LEVEL);//Hide skill yell
-			status_percent_damage(src, bl, 100, 0, true); //Instant kill our target
-		} else clif_skill_fail(sd,skillid,0,0);
-	}
-	break;
+		skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
+		clif_specialeffect(bl, 124, AREA); //Venom Dust Effect on target
+		break;
+	case NC_DEATHHAND: 	//Necro Death Hand [Brain]
+		skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag|SD_LEVEL);//Hide skill yell
+		clif_specialeffect(bl, 65, AREA); //Power absorb Effect on target
+		if (battle_check_living(tstatus->race, tstatus->def_ele)){ //Check if target is a living creature before proceed
+			int chance = (10+(skilllv*2)+(status_get_luk(src)-status_get_luk(bl))/5); 
+			//10% chance + 2% per skilllv + (caster luk - target luk)/5 %
+				if (rand()%100 < chance) {
+					clif_skill_nodamage(src,bl,skillid,-1,flag|SD_LEVEL);//Hide skill yell
+					status_percent_damage(src, bl, 100, 0, true); //Instant kill our target
+				} else clif_skill_fail(sd,skillid,0,0);
+		}
+		break;
 
 
@@ -2455,5 +2445,5 @@
 		map_foreachinrange(skill_attack_area, src,
 			skill_get_splash(skillid, skilllv), splash_target(src),
-			BF_WEAPON, src, src, skillid, skilllv, tick, flag, BCT_ENEMY);
+			BF_WEAPON, src, src, skillid, skilllv, tick, flag, BCT_ENEMY);	
 		break;
 
@@ -2597,5 +2587,5 @@
 	//Splash attack skills.
 	case AS_GRIMTOOTH:
-	case MC_CARTREVOLUTION:
+	case MC_CARTREVOLUTION:	
 	case NPC_SPLASHATTACK:
 		flag |= SD_PREAMBLE; // a fake packet will be sent for the first target to be hit
@@ -2603,5 +2593,5 @@
 	case SM_MAGNUM:
 	case HT_BLITZBEAT:
-	case AC_SHOWER:
+	case AC_SHOWER:	
 	case MG_NAPALMBEAT:
 	case MG_FIREBALL:
@@ -2660,5 +2650,5 @@
 		if (skill_area_temp[1] != bl->id)
 			skill_attack(skill_get_type(skillid), src, src, bl, skillid, skilllv, tick, flag|SD_ANIMATION);
-		else
+		else 
 			skill_attack(skill_get_type(skillid), src, src, bl, skillid, skilllv, tick, flag);
 		break;
@@ -2725,10 +2715,10 @@
 				skill_castend_nodamage_id);
 	}
-		break;
+		break;	
 	case CH_PALMSTRIKE: //	Palm Strike takes effect 1sec after casting. [Skotlex]
 	//	clif_skill_nodamage(src,bl,skillid,skilllv,0); //Can't make this one display the correct attack animation delay :/
 		clif_damage(src,bl,tick,status_get_amotion(src),0,-1,1,4,0); //Display an absorbed damage attack.
 		skill_addtimerskill(src, tick + 1000, bl->id, 0, 0, skillid, skilllv, BF_WEAPON, flag);
-		break;
+		break;	
 
 	case PR_TURNUNDEAD:
@@ -2758,81 +2748,81 @@
 		skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
 		break;
+//another thing in a weird place.
 	case AD_DARKHEAL: // Adept Dark Heal [Brain]
-	clif_specialeffect(bl, 656, AREA); //Blinking Green Sprite Effect on target
-	skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag); //Exception because we must add the effect manually =/
-	break;
+		clif_specialeffect(bl, 656, AREA); //Blinking Green Sprite Effect on target
+		skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag); //Exception because we must add the effect manually =/
+		break;
 	case NC_PWSUFFER: //Necro Power Word: Suffer [Brain]
-	if(battle_check_living(tstatus->race,tstatus->def_ele)){
-		skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+		if(battle_check_living(tstatus->race,tstatus->def_ele)){
+			skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+			clif_specialeffect(bl, 180, AREA); //Shadow hit Effect on target
+			clif_specialeffect(src, 454, AREA); //Black Cast Effect on caster
+			//If target is on suffering status already, just cause damage, no extra DoT
+			if(!status_get_sc(bl)->data[SC_SUFFER])
+				skill_addtimerskill(src,tick+3000,bl->id,0,0,skillid,skilllv,skilllv,flag);
+		}
+		else clif_skill_fail(sd,skillid,0,0);
+		break;
+	case NC_DRAINLIFE: // Necromancer Drain Life [Brain]
+		{
+			int heal = skill_attack(BF_MAGIC, src, src, bl, skillid, skilllv, tick, flag)/2;
+			if (heal > 0 && (battle_check_living(tstatus->race,tstatus->def_ele))){
+				clif_skill_nodamage(NULL, src, AL_HEAL, heal, 1);
+				status_heal(src, heal, 0, 0);
+			}
+		}
 		clif_specialeffect(bl, 180, AREA); //Shadow hit Effect on target
 		clif_specialeffect(src, 454, AREA); //Black Cast Effect on caster
-		//If target is on suffering status already, just cause damage, no extra DoT
-		if(!status_get_sc(bl)->data[SC_SUFFER])
-		skill_addtimerskill(src,tick+3000,bl->id,0,0,skillid,skilllv,skilllv,flag);
-	}
-	else clif_skill_fail(sd,skillid,0,0);
-	break;
-	case NC_DRAINLIFE: // Necromancer Drain Life [Brain]
-	{
-		int heal = skill_attack(BF_MAGIC, src, src, bl, skillid, skilllv, tick, flag)/2;
-		if (heal > 0 && (battle_check_living(tstatus->race,tstatus->def_ele))){
-		clif_skill_nodamage(NULL, src, AL_HEAL, heal, 1);
-		status_heal(src, heal, 0, 0);
-		}
-	}
-	clif_specialeffect(bl, 180, AREA); //Shadow hit Effect on target
-	clif_specialeffect(src, 454, AREA); //Black Cast Effect on caster
-	break;
+		break;
 	case WL_SHADOWBOLT: // Warlock Shadowbolt [Brain]
-	clif_specialeffect(bl, 180, AREA); //Shadow hit Effect on target
-	clif_specialeffect(src, 454, AREA); //Black Cast Effect on caster
-	skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag); //Again, the effect...cursed effects...
-	break;
+		clif_specialeffect(bl, 180, AREA); //Shadow hit Effect on target
+		clif_specialeffect(src, 454, AREA); //Black Cast Effect on caster
+		skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag); //Again, the effect...cursed effects...
+		break;
 	case WL_SHADOWBURN: // Warlock Shadow Burn [Brain]
-	clif_specialeffect(bl, 180, AREA); //Shadow hit Effect on target
-	clif_specialeffect(bl, 32, AREA); //Flame Engulf Effect on target
-	clif_specialeffect(src, 454, AREA); //Black Cast Effect on caster
-	skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
-	break;
+		clif_specialeffect(bl, 180, AREA); //Shadow hit Effect on target
+		clif_specialeffect(bl, 32, AREA); //Flame Engulf Effect on target
+		clif_specialeffect(src, 454, AREA); //Black Cast Effect on caster
+		skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+		break;
 	case WL_SEARING: // Warlock Searing Pain [Brain]
-	clif_specialeffect(bl, 406, AREA); //Fire on Head Effect on target
-	clif_specialeffect(src, 55, AREA); //Red Cast Effect on caster
-	skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
-	//if target is on searing status already, just cause damage, no extra DoT
-	if(!status_get_sc(bl)->data[SC_SEARING])
-		skill_addtimerskill(src,tick+3000,bl->id,0,0,skillid,skilllv,4,flag);
-	break;
-	case WL_CONFLAGRATE: // Warlock Conflagrate [Brain]
-	if(status_get_sc(bl)->data[SC_IMMOLATE]) { // Can only be casted if target is immolating status
-		clif_specialeffect(bl, 183, AREA); //Explosion Effect on target
+		clif_specialeffect(bl, 406, AREA); //Fire on Head Effect on target
 		clif_specialeffect(src, 55, AREA); //Red Cast Effect on caster
 		skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
-		status_change_end(bl,SC_IMMOLATE,-1); //End Immolating status
-	} else clif_skill_fail(sd,skillid,0,0);
-	break;
+		//if target is on searing status already, just cause damage, no extra DoT
+		if(!status_get_sc(bl)->data[SC_SEARING])
+			skill_addtimerskill(src,tick+3000,bl->id,0,0,skillid,skilllv,4,flag);
+		break;
+	case WL_CONFLAGRATE: // Warlock Conflagrate [Brain]
+		if(status_get_sc(bl)->data[SC_IMMOLATE]) { // Can only be casted if target is immolating status
+			clif_specialeffect(bl, 183, AREA); //Explosion Effect on target
+			clif_specialeffect(src, 55, AREA); //Red Cast Effect on caster
+			skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+			status_change_end(bl,SC_IMMOLATE,-1); //End Immolating status
+		} else clif_skill_fail(sd,skillid,0,0);
+		break;
 	case WL_IMMOLATE: // Warlock Immolate [Brain]
-	clif_specialeffect(bl, 635, AREA); //Dragon Fire Effect on target
-	clif_specialeffect(src, 55, AREA); //Red Cast Effect on caster
-	skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
-	//If Target is on searing pain status, will change immolating status instead
-	if(!status_get_sc(bl)->data[SC_IMMOLATE])
-		skill_addtimerskill(src,tick+3000,bl->id,0,0,skillid,skilllv,5,flag);
-	break;
+		clif_specialeffect(bl, 635, AREA); //Dragon Fire Effect on target
+		clif_specialeffect(src, 55, AREA); //Red Cast Effect on caster
+		skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+		//If Target is on searing pain status, will change immolating status instead
+		if(!status_get_sc(bl)->data[SC_IMMOLATE])
+			skill_addtimerskill(src,tick+3000,bl->id,0,0,skillid,skilllv,5,flag);
+		break;
 	case WL_CURSEDOOM: // Warlock Curse of Doom [Brain]
-	clif_specialeffect(bl, 183, AREA); //Explosion Effect on target
-	skill_attack(BF_MAGIC,src,bl,bl,skillid,skilllv,tick,flag|SD_ANIMATION);
-	break;
+		clif_specialeffect(bl, 183, AREA); //Explosion Effect on target
+		skill_attack(BF_MAGIC,src,bl,bl,skillid,skilllv,tick,flag|SD_ANIMATION);
+		break;
 	case WL_PWAGONY: // Warlock Power Word: Agony [Brain]
-	if(battle_check_living(tstatus->race,tstatus->def_ele)){
-		skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
-		clif_specialeffect(bl, 587, AREA); //Big Purple Flame Effect on target
-		clif_specialeffect(src, 454, AREA); //Black Cast Effect on caster
-		//If target is on Agonizing status already, just cause damage, no extra DoT
-		if(!status_get_sc(bl)->data[SC_AGONY])
-		skill_addtimerskill(src,tick+3000,bl->id,0,0,skillid,skilllv,skilllv,flag);
-	}
-	else clif_skill_fail(sd,skillid,0,0);
-	break;
-
+		if(battle_check_living(tstatus->race,tstatus->def_ele)){
+			skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
+			clif_specialeffect(bl, 587, AREA); //Big Purple Flame Effect on target
+			clif_specialeffect(src, 454, AREA); //Black Cast Effect on caster
+			//If target is on Agonizing status already, just cause damage, no extra DoT
+			if(!status_get_sc(bl)->data[SC_AGONY])
+				skill_addtimerskill(src,tick+3000,bl->id,0,0,skillid,skilllv,skilllv,flag);
+		}
+		else clif_skill_fail(sd,skillid,0,0);
+		break;
 
 	case NPC_MAGICALATTACK:
@@ -2872,5 +2862,5 @@
 					count++; // natural water cell
 				else
-				if( (unit = map_find_skill_unit_oncell(src,x,y,SA_DELUGE,NULL)) != NULL
+				if( (unit = map_find_skill_unit_oncell(src,x,y,SA_DELUGE,NULL)) != NULL 
 				||  (unit = map_find_skill_unit_oncell(src,x,y,NJ_SUITON,NULL)) != NULL )
 				{
@@ -2937,5 +2927,5 @@
 				skill_attack(BF_MAGIC,src,src,src,skillid,skilllv,tick,flag);
 			status_percent_damage(src, src, 0, 100, false);
-		}
+		}		
 		if (sd) skill_blockpc_start (sd, skillid, (skilllv < 5 ? 10000: 15000));
 		break;
@@ -2998,5 +2988,5 @@
 	}
 
-	map_freeblock_unlock();
+	map_freeblock_unlock();	
 
 	if (sd && !(flag&1) && sd->state.arrow_atk) //Consume arrow on last invocation to this skill.
@@ -3006,5 +2996,5 @@
 
 /*==========================================
- *
+ * 
  *------------------------------------------*/
 int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, int skillid, int skilllv, unsigned int tick, int flag)
@@ -3020,5 +3010,5 @@
 	int i;
 	enum sc_type type;
-
+	
 	if(skillid > 0 && skilllv <= 0) return 0;	// celest
 
@@ -3041,4 +3031,6 @@
 		return 1;
 
+	// Added DEATHPACT [Brain]
+	//if(src!=bl && status_isdead(bl) && skillid != ALL_RESURRECTION && skillid != PR_REDEMPTIO)
 	if(src!=bl && status_isdead(bl) && skillid != ALL_RESURRECTION && skillid != PR_REDEMPTIO && skillid != NC_DEATHPACT)
 		return 1;
@@ -3046,5 +3038,5 @@
 	tstatus = status_get_status_data(bl);
 	sstatus = status_get_status_data(src);
-
+	
 	//Check for undead skills that convert a no-damage skill into a damage one. [Skotlex]
 	switch (skillid) {
@@ -3067,17 +3059,18 @@
 			}
 			break;
-	case AD_DARKHEAL:	// Adept Dark Heal [Brain]
-		// Only player casted spells can be offensive (copyed from AL_HEAL code above)
-		if (sd && (battle_check_living(tstatus->race,tstatus->def_ele)) //Check if target is a living creature
-		&& !pc_checkskill(dstsd,NC_PHYLACTERY) //Or he doesnt have Phylactery (non-perma undead)
-		&& !status_get_sc(bl)->data[SC_OVERWHELMING]) { //Or Overwhelming Evil is off (most cases)
-		if (battle_check_target(src, bl, BCT_ENEMY) < 1) {
-			  //Offensive heal does not works on non-enemies.
-			clif_skill_fail(sd,skillid,0,0);
-			return 0;
-		}
-		return skill_castend_damage_id(src, bl, skillid, skilllv, tick, flag);
-		}
-		break;
+//right place?
+		case AD_DARKHEAL:	// Adept Dark Heal [Brain]
+			// Only player casted spells can be offensive (copyed from AL_HEAL code above)
+			if (sd && (battle_check_living(tstatus->race,tstatus->def_ele)) //Check if target is a living creature
+				&& !pc_checkskill(dstsd,NC_PHYLACTERY) //Or he doesnt have Phylactery (non-perma undead)
+				&& !status_get_sc(bl)->data[SC_OVERWHELMING]) { //Or Overwhelming Evil is off (most cases)
+				if (battle_check_target(src, bl, BCT_ENEMY) < 1) {
+				  	//Offensive heal does not works on non-enemies.
+					clif_skill_fail(sd,skillid,0,0);
+					return 0;
+				}
+				return skill_castend_damage_id(src, bl, skillid, skilllv, tick, flag);
+			}
+			break;
 
 		case NPC_SMOKING: //Since it is a self skill, this one ends here rather than in damage_id. [Skotlex]
@@ -3107,13 +3100,14 @@
 			int heal = skill_calc_heal(src, bl, skilllv);
 			int heal_get_jobexp;
-
+	
 			if (status_isimmune(bl) || (dstmd && dstmd->class_ == MOBID_EMPERIUM))
 				heal=0;
-		// Profane Soul reduces the healed recieved by 3% per skilllv [Brain]
-		if(dstsd) {
-		heal = heal * (100 - pc_checkskill(dstsd,AD_PROFANE)*3)/100;
-		//Wont heal even if he got elemental armors [Brain]
-		if(pc_checkskill(dstsd,NC_PHYLACTERY)) heal = skilllv;
-		}
+//To not allow heal for joo
+			// Profane Soul reduces the healed recieved by 3% per skilllv [Brain]
+			if(dstsd) {
+				heal = heal * (100 - pc_checkskill(dstsd,AD_PROFANE)*3)/100;
+				//Wont heal even if he got elemental armors [Brain]
+				if(pc_checkskill(dstsd,NC_PHYLACTERY)) heal = skilllv;
+			}
 			if (sd) {
 				if ((i = pc_skillheal_bonus(sd, skillid)))
@@ -3151,24 +3145,22 @@
 		}
 		break;
-
 	case AD_DARKHEAL: // Adept Dark Heal [Brain]
-	{
-		int heal = skill_calc_heal(src, bl, skilllv);
-		if (status_isimmune(bl) || (dstmd && dstmd->class_ == MOBID_EMPERIUM))
-		heal=0;
-		if(battle_check_undead(tstatus->race,tstatus->def_ele) || tstatus->race==RC_UNDEAD // Check if our target is undead or demon
-		|| tstatus->race==RC_DEMON || pc_checkskill(dstsd,NC_PHYLACTERY)//Or has a phylactery
-		|| status_get_sc(bl)->data[SC_OVERWHELMING]) { //Or is on OverWhelm status, checking again...
-		clif_skill_nodamage(src, bl, skillid, heal, 1);
-		clif_skill_nodamage(NULL, bl, AL_HEAL, heal, 1); //Subtle way to show heal numbers AND effect =D
-		status_heal(bl, heal, 0, 0);
-		} else {
-		clif_skill_nodamage(src, bl, skillid, 0, 1);
-		clif_skill_nodamage(NULL, bl, AL_HEAL, 0, 1);
-		}
-	clif_specialeffect(bl, 656, AREA); //Blinking Green Sprite Effect on target
-	}
-	break;
-
+		{
+			int heal = skill_calc_heal(src, bl, skilllv);
+			if (status_isimmune(bl) || (dstmd && dstmd->class_ == MOBID_EMPERIUM))
+				heal=0;
+			if(battle_check_undead(tstatus->race,tstatus->def_ele) || tstatus->race==RC_UNDEAD // Check if our target is undead or demon
+				|| tstatus->race==RC_DEMON || pc_checkskill(dstsd,NC_PHYLACTERY)//Or has a phylactery
+				|| status_get_sc(bl)->data[SC_OVERWHELMING]) { //Or is on OverWhelm status, checking again...
+				clif_skill_nodamage(src, bl, skillid, heal, 1);
+				clif_skill_nodamage(NULL, bl, AL_HEAL, heal, 1); //Subtle way to show heal numbers AND effect =D
+				status_heal(bl, heal, 0, 0);
+			} else {
+				clif_skill_nodamage(src, bl, skillid, 0, 1);
+				clif_skill_nodamage(NULL, bl, AL_HEAL, 0, 1);
+			}
+		clif_specialeffect(bl, 656, AREA); //Blinking Green Sprite Effect on target
+		}
+		break;
 
 	case PR_REDEMPTIO:
@@ -3202,7 +3194,7 @@
 		} else //Invalid target, skip resurrection.
 			break;
-
+		
 	case ALL_RESURRECTION:
-	case NC_DEATHPACT: // Necro Death Pact [Brain]
+ 	case NC_DEATHPACT: // Necro Death Pact [Brain] (Seems fine)
 		if(sd && map_flag_gvg(bl->m))
 		{	//No reviving in WoE grounds!
@@ -3212,5 +3204,5 @@
 		if (!status_isdead(bl))
 			break;
-		{
+		{	
 			int per = 0, sper = 0;
 			if (map[bl->m].flag.pvp && dstsd && dstsd->pvp_point < 0)
@@ -3223,17 +3215,19 @@
 			case 4: per=80; break;
 			case 5: per=100; break; //Added a 5th level because NC_DEATHPACT got 5 lvs [Brain]
-			}
-			if(dstsd && dstsd->special_state.restart_full_recover)
+//above seems ok
+			}
+			if(dstsd && dstsd->special_state.restart_full_recover) 
 				per = sper = 100;
 			if (status_revive(bl, per, sper))
 			{
 				clif_skill_nodamage(src,bl,ALL_RESURRECTION,skilllv,1); //Both Redemptio and Res show this skill-animation.
-						if(skillid==NC_DEATHPACT) { // Necro Death Pact [Brain]
-			clif_skill_nodamage(src, bl, skillid, skilllv,
-			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
-			break;
-		}
-
-				if(sd && dstsd && battle_config.resurrection_exp > 0)
+//Seriously, how is this right? It just doesnt look right but i may be ignoring something.
+				if(skillid==NC_DEATHPACT) { // Necro Death Pact [Brain]
+					clif_skill_nodamage(src, bl, skillid, skilllv, 
+						sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
+					break;
+				}
+
+				if(sd && dstsd && battle_config.resurrection_exp > 0) 
 				{
 					int exp = 0,jexp = 0;
@@ -3253,95 +3247,94 @@
 		}
 		break;
-
+//Huge lump of code here.
 	case AD_PWBLIND: // Adept Power Word: Blind [Brain]
-	if(!tsc->data[type]) {
-		clif_skill_nodamage(src, bl, skillid, skilllv,1);
-		if(sc_start(bl, type,(30 + skilllv * 10 + (status_get_lv(src) - sstatus->int_)/5),
-		skilllv, skill_get_time(skillid,skilllv)))
-		{
-		if(dstmd) mob_unlocktarget(dstmd,tick);  //Removes current target
-		clif_specialeffect(bl, 379, AREA); //379.Soul Drain (2nd Part)
-		break;
-		}
-	} else clif_skill_fail(sd,skillid,0,0);
-	break;
-
+		if(!tsc->data[type]) {
+			clif_skill_nodamage(src, bl, skillid, skilllv,1);
+			if(sc_start(bl, type,(30 + skilllv * 10 + (status_get_lv(src) - sstatus->int_)/5),
+				skilllv, skill_get_time(skillid,skilllv))) 
+			{
+				if(dstmd) mob_unlocktarget(dstmd,tick);  //Removes current target
+				clif_specialeffect(bl, 379, AREA); //379.Soul Drain (2nd Part)
+				break;
+			}
+		} else clif_skill_fail(sd,skillid,0,0);
+		break;
 	case AD_PWFEAR: // Adept Power Word: Fear [Brain]
-	if(!tsc->data[type]) {
-		clif_skill_nodamage(src, bl, skillid, skilllv,1);
-		if(dstsd)
-		type = SC_CONFUSION; //Players cant be affected by SC_FEAR
-		if(sc_start(bl, type, (30 + skilllv * 10), skilllv, skill_get_time(skillid,skilllv)))
-		{
-		clif_specialeffect(bl, 372, AREA); //372.Death
-		unit_escape(bl, bl, 30);
-		}
-	} else clif_skill_fail(sd,skillid,0,0);
-	break;
+		if(!tsc->data[type]) {
+			clif_skill_nodamage(src, bl, skillid, skilllv,1);
+			if(dstsd)
+				type = SC_CONFUSION; //Players cant be affected by SC_FEAR
+			if(sc_start(bl, type, (30 + skilllv * 10), skilllv, skill_get_time(skillid,skilllv)))
+			{
+				clif_specialeffect(bl, 372, AREA); //372.Death
+				unit_escape(bl, bl, 30);
+			}
+		} else clif_skill_fail(sd,skillid,0,0);
+		break;
 	case WL_HOWLOFPAIN: // Warlock Howl of Pain [Brain]
-	//These must be here first or else the code wont execute them.
-	clif_specialeffect(src, 670, AREA); // Monster skill SCREAM effect on caster (no sound)
-	clif_soundeffectall(bl, "wraith_die.wav", 0, AREA); //Wraith Laugh Sound
-	if (flag & 1) {
-		//Check if target is a living creature AND a valid enemy
-		if (battle_check_target(src, bl, BCT_ENEMY) && battle_check_living(tstatus->race,tstatus->def_ele))
-		{
-		if(sc_start(bl,type,10+skilllv*10,skilllv,skill_get_time(skillid,skilllv)))
-		{
-			if(dstmd) //PROVOKE Effect on mobs
-			mob_target(dstmd,src,skill_get_range2(src,skillid,skilllv));
-			// Breaks Frozen and Sleep status
-			if(tsc && tsc->count){
-			if(tsc->data[SC_FREEZE])
-				status_change_end(bl,SC_FREEZE,-1);
-			if(tsc->data[SC_SLEEP])
-				status_change_end(bl,SC_SLEEP,-1);
-			}
-			clif_emotion(bl,6); //anger emote on target
-			break;
-		} else { //What will happen if the status fail:
+		//These must be here first or else the code wont execute them.
+		clif_specialeffect(src, 670, AREA); // Monster skill SCREAM effect on caster (no sound)
+		clif_soundeffectall(bl, "wraith_die.wav", 0, AREA); //Wraith Laugh Sound
+		if (flag & 1) {
+			//Check if target is a living creature AND a valid enemy
+			if (battle_check_target(src, bl, BCT_ENEMY) && battle_check_living(tstatus->race,tstatus->def_ele))
 			{
-			if (sd) //If is a player
-				clif_skill_fail(sd,skillid,0,0);
-			map_freeblock_unlock(); //Else is a mob
-			return 0;
-			}
-			unit_skillcastcancel(bl, 2); //In any case, will cancel casting
-		}
-		}
-	} else {
-		map_foreachinrange(skill_area_sub, src,
-		skill_get_splash(skillid, skilllv), BL_CHAR,
-		src, skillid, skilllv, tick, flag|BCT_ENEMY|1,
-		skill_castend_nodamage_id);
-		clif_skill_nodamage(src, bl, skillid, skilllv, 1);
-		map_freeblock_unlock();
-		return 1;
-	}
-	break;
+				if(sc_start(bl,type,10+skilllv*10,skilllv,skill_get_time(skillid,skilllv)))
+				{
+					if(dstmd) //PROVOKE Effect on mobs
+						mob_target(dstmd,src,skill_get_range2(src,skillid,skilllv));
+					// Breaks Frozen and Sleep status
+					if(tsc && tsc->count){
+						if(tsc->data[SC_FREEZE])
+							status_change_end(bl,SC_FREEZE,-1);
+						if(tsc->data[SC_SLEEP])
+							status_change_end(bl,SC_SLEEP,-1);
+					}
+					clif_emotion(bl,6); //anger emote on target
+					break;
+				} else { //What will happen if the status fail:
+					{
+						if (sd) //If is a player
+							clif_skill_fail(sd,skillid,0,0);
+						map_freeblock_unlock(); //Else is a mob
+						return 0;
+					}
+					unit_skillcastcancel(bl, 2); //In any case, will cancel casting
+				}
+			}
+		} else {
+			map_foreachinrange(skill_area_sub, src,
+				skill_get_splash(skillid, skilllv), BL_CHAR,
+				src, skillid, skilllv, tick, flag|BCT_ENEMY|1,
+				skill_castend_nodamage_id);
+			clif_skill_nodamage(src, bl, skillid, skilllv, 1);
+			map_freeblock_unlock();
+			return 1;
+		}
+		break;
 	case WL_HOWLOFTERROR: // Warlock Howl of Terror [Brain]
-	if (flag & 1) {
-		int rate;
-		//Check if target is a living creature AND a valid enemy
-		if (battle_check_target(src, bl, BCT_ENEMY)
-		&& battle_check_living(tstatus->race,tstatus->def_ele)) {
-		rate = 10 + skilllv*5 + pc_checkskill(sd,AD_PWFEAR)*3;
-		if(dstsd) {
-			rate -= 10; // 10% less chance on players
-			type = SC_CONFUSION; //Players cant be affected by SC_FEAR
-		}
-		if(sc_start(bl,type,rate,skilllv,skill_get_time(skillid,skilllv)))
-			clif_specialeffect(bl, 372, AREA); //Same as PW: Fear
-		}
-	} else {
-		map_foreachinrange(skill_area_sub, src,
-		skill_get_splash(skillid, skilllv), BL_CHAR,
-		src, skillid, skilllv, tick, flag|BCT_ENEMY|1,
-		skill_castend_nodamage_id);
-		clif_skill_nodamage(src, bl, skillid, skilllv, 1);
-	}
-	clif_specialeffect(src, 668, AREA); // Monster skill SCREAM effect on caster (with sound)
-	break;
-
+		if (flag & 1) {
+			int rate;
+			//Check if target is a living creature AND a valid enemy
+			if (battle_check_target(src, bl, BCT_ENEMY)
+				&& battle_check_living(tstatus->race,tstatus->def_ele)) {
+				rate = 10 + skilllv*5 + pc_checkskill(sd,AD_PWFEAR)*3;
+				if(dstsd) { 
+					rate -= 10; // 10% less chance on players
+					type = SC_CONFUSION; //Players cant be affected by SC_FEAR
+				}
+				if(sc_start(bl,type,rate,skilllv,skill_get_time(skillid,skilllv)))
+					clif_specialeffect(bl, 372, AREA); //Same as PW: Fear
+			}
+		} else {
+			map_foreachinrange(skill_area_sub, src,
+				skill_get_splash(skillid, skilllv), BL_CHAR,
+				src, skillid, skilllv, tick, flag|BCT_ENEMY|1,
+				skill_castend_nodamage_id);
+			clif_skill_nodamage(src, bl, skillid, skilllv, 1);
+		}
+		clif_specialeffect(src, 668, AREA); // Monster skill SCREAM effect on caster (with sound)
+		break;
+// Would be easy to screw up in that.
 
 	case AL_DECAGI:
@@ -3361,70 +3354,69 @@
 		}
 		break;
-
+//another huge lump
 	case NC_DARKMOON: //Necro Dark Moon [Brain]
-	if (flag&1) {
-		//Check my enemies
-		if (battle_check_target(src, bl, BCT_ENEMY) &&
-		battle_check_living(tstatus->race,tstatus->def_ele))
-		{
-		if(sc_start(bl,SC_BLIND,50,skilllv,skill_get_time(skillid,skilllv)))
-			clif_specialeffect(bl, 580, AREA); //Box of Rain effect on target
-		}
-		else { //Now my Party members
-		if (sd == NULL || sd->status.party_id == 0 || (flag & 1)) {
-			clif_skill_nodamage(bl,bl,skillid,skilllv,
-			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
-			clif_specialeffect(bl, 521, AREA); //Red Flashing Aura Sprite effect on target
-		} else if (sd) {
-			party_foreachsamemap(skill_area_sub, sd,skill_get_splash(skillid, skilllv),
-			src,skillid,skilllv,tick, flag|BCT_ALL|1,skill_castend_nodamage_id);
-		}
-		}
-	} else {
-		map_foreachinrange(skill_area_sub, src, skill_get_splash(skillid, skilllv), BL_CHAR,
-		src, skillid, skilllv, tick, flag|BCT_ALL|1, skill_castend_nodamage_id);
-		clif_skill_nodamage(src, bl, skillid, skilllv, 1);
-	}
-	clif_specialeffect(src, 407, AREA); //Soul Change Effect on caster
-	clif_soundeffectall(bl, "se_wolf1.wav", 0, AREA); //Wolf Howl Sound
-	break;
+		if (flag&1) {
+			//Check my enemies
+			if (battle_check_target(src, bl, BCT_ENEMY) &&
+				battle_check_living(tstatus->race,tstatus->def_ele))
+			{
+				if(sc_start(bl,SC_BLIND,50,skilllv,skill_get_time(skillid,skilllv)))
+					clif_specialeffect(bl, 580, AREA); //Box of Rain effect on target
+			}
+			else { //Now my Party members
+				if (sd == NULL || sd->status.party_id == 0 || (flag & 1)) {
+					clif_skill_nodamage(bl,bl,skillid,skilllv,
+					sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
+					clif_specialeffect(bl, 521, AREA); //Red Flashing Aura Sprite effect on target
+				} else if (sd) {
+					party_foreachsamemap(skill_area_sub, sd,skill_get_splash(skillid, skilllv),
+						src,skillid,skilllv,tick, flag|BCT_ALL|1,skill_castend_nodamage_id);
+				}
+			}
+		} else {
+			map_foreachinrange(skill_area_sub, src, skill_get_splash(skillid, skilllv), BL_CHAR,
+				src, skillid, skilllv, tick, flag|BCT_ALL|1, skill_castend_nodamage_id);
+			clif_skill_nodamage(src, bl, skillid, skilllv, 1);
+		}
+		clif_specialeffect(src, 407, AREA); //Soul Change Effect on caster
+		clif_soundeffectall(bl, "se_wolf1.wav", 0, AREA); //Wolf Howl Sound
+		break;
 	case NC_REQUIEM: //Necro Requiem [Brain]
-	if (flag&1) {
-		//Check my enemies
-		if (battle_check_target(src, bl, BCT_ENEMY) &&
-			battle_check_living(tstatus->race,tstatus->def_ele))
-		{
-		if(sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)))
-			clif_specialeffect(bl, 578, AREA); //Box of Curse effect on target
-		}
-		else { //Now my Party members
-		if (sd == NULL || sd->status.party_id == 0 || (flag & 1)) {
-			clif_skill_nodamage(bl,bl,skillid,skilllv,
-			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
-			clif_specialeffect(bl, 572, AREA); //Warmth Soul effect on target
-		} else if (sd) {
-			party_foreachsamemap(skill_area_sub, sd,skill_get_splash(skillid, skilllv),
-			src,skillid,skilllv,tick, flag|BCT_ALL|1,skill_castend_nodamage_id);
-		}
-		}
-	} else {
-		map_foreachinrange(skill_area_sub, src, skill_get_splash(skillid, skilllv), BL_CHAR,
-		src, skillid, skilllv, tick, flag|BCT_ALL|1, skill_castend_nodamage_id);
-		clif_skill_nodamage(src, bl, skillid, skilllv, 1);
-	}
-	int rnds = rand()%3;
-	switch(rnds) {
-		case 1:
-		clif_soundeffectall(bl, "chant1.wav", 0, AREA); //Chanting Sound
-		break;
-		case 2:
-		clif_soundeffectall(bl, "chant2.wav", 0, AREA); //Chanting Sound
-		break;
-		case 3:
-		clif_soundeffectall(bl, "chant3.wav", 0, AREA); //Chanting Sound
-		break;
-	}
-	break;
-
+		if (flag&1) {
+			//Check my enemies
+			if (battle_check_target(src, bl, BCT_ENEMY) &&
+					battle_check_living(tstatus->race,tstatus->def_ele))
+			{
+				if(sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)))
+					clif_specialeffect(bl, 578, AREA); //Box of Curse effect on target
+			}
+			else { //Now my Party members
+				if (sd == NULL || sd->status.party_id == 0 || (flag & 1)) {
+					clif_skill_nodamage(bl,bl,skillid,skilllv,
+					sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
+					clif_specialeffect(bl, 572, AREA); //Warmth Soul effect on target
+				} else if (sd) {
+					party_foreachsamemap(skill_area_sub, sd,skill_get_splash(skillid, skilllv),
+						src,skillid,skilllv,tick, flag|BCT_ALL|1,skill_castend_nodamage_id);
+				}
+			}
+		} else {
+			map_foreachinrange(skill_area_sub, src, skill_get_splash(skillid, skilllv), BL_CHAR,
+				src, skillid, skilllv, tick, flag|BCT_ALL|1, skill_castend_nodamage_id);
+			clif_skill_nodamage(src, bl, skillid, skilllv, 1);
+		}
+		int rnds = rand()%3;
+		switch(rnds) {
+			case 1:
+				clif_soundeffectall(bl, "chant1.wav", 0, AREA); //Chanting Sound
+				break;
+			case 2:
+				clif_soundeffectall(bl, "chant2.wav", 0, AREA); //Chanting Sound
+				break;
+			case 3:
+				clif_soundeffectall(bl, "chant3.wav", 0, AREA); //Chanting Sound
+				break;
+		}
+		break;
 
 	case PR_LEXDIVINA:
@@ -3432,6 +3424,6 @@
 			status_change_end(bl,type, -1);
 			clif_skill_nodamage (src, bl, skillid, skilllv, 1);
-		} else
-			clif_skill_nodamage (src, bl, skillid, skilllv,
+		} else 
+			clif_skill_nodamage (src, bl, skillid, skilllv, 
 				sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
 		break;
@@ -3449,5 +3441,5 @@
 			abra_skilllv = min(skilllv, skill_get_max(abra_skillid));
 			clif_skill_nodamage (src, bl, skillid, skilllv, 1);
-
+			
 			if( sd )
 			{// player-casted
@@ -3463,9 +3455,9 @@
 				int target_id = 0;
 				if (!ud) break;
-				if (inf&INF_SELF_SKILL || inf&INF_SUPPORT_SKILL) {
+				if (inf&INF_SELF_SKILL || inf&INF_SUPPORT_SKILL) { 
 					if (src->type == BL_PET)
 						bl = (struct block_list*)((TBL_PET*)src)->msd;
 					if (!bl) bl = src;
-					unit_skilluse_id(src, bl->id, abra_skillid, abra_skilllv);
+					unit_skilluse_id(src, bl->id, abra_skillid, abra_skilllv); 
 				} else {	//Assume offensive skills
 					if (ud->target)
@@ -3480,5 +3472,5 @@
 						bl = map_id2bl(target_id);
 						if (!bl) bl = src;
-						unit_skilluse_pos(src, bl->x, bl->y, abra_skillid, abra_skilllv);
+						unit_skilluse_pos(src, bl->x, bl->y, abra_skillid, abra_skilllv); 
 					} else
 						unit_skilluse_id(src, target_id, abra_skillid, abra_skilllv);
@@ -3554,5 +3546,5 @@
 	case CR_PROVIDENCE:
 		if(sd && dstsd){ //Check they are not another crusader [Skotlex]
-			if ((dstsd->class_&MAPID_UPPERMASK) == MAPID_CRUSADER) {
+			if ((dstsd->class_&MAPID_UPPERMASK) == MAPID_CRUSADER) {	
 				clif_skill_fail(sd,skillid,0,0);
 				map_freeblock_unlock();
@@ -3563,5 +3555,5 @@
 			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
 		break;
-
+		
 	case CG_MARIONETTE:
 		{
@@ -3661,5 +3653,5 @@
 
 		sc_start(bl,SC_SEVENWIND,100,skilllv,skill_get_time(skillid,skilllv));
-
+			
 		break;
 
@@ -3692,5 +3684,5 @@
 	case LK_BERSERK:
 	case KN_AUTOCOUNTER:
-	case KN_TWOHANDQUICKEN:
+	case KN_TWOHANDQUICKEN:	
 	case KN_ONEHAND:
 	case CR_SPEARQUICKEN:
@@ -3703,5 +3695,5 @@
 	case MO_BLADESTOP:
 	case LK_AURABLADE:
-	case LK_PARRYING:
+	case LK_PARRYING:	
 	case LK_CONCENTRATION:
 	case WS_CARTBOOST:
@@ -3729,55 +3721,57 @@
 	case NPC_DEFENDER:
 	case NPC_MAGICMIRROR:
-	case ALL_ATFIELD:
+	case ALL_ATFIELD:	//AT Field [Brain] ( still dont think this belongs.)
 		clif_skill_nodamage(src,bl,skillid,skilllv,
 			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
 		break;
+//ANOTHER large lump but it really doesnt feel like it fits here.
 	case AD_LUST:	// Adept Blood Lust [Brain]
-	clif_specialeffect(src, 220, AREA); //Berserk Pot effect
-	clif_specialeffect(src, 455, AREA); //Red Lightnings
-	clif_skill_nodamage(src,bl,skillid,skilllv,
-		sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
-	break;
+		clif_specialeffect(src, 220, AREA); //Berserk Pot effect
+		clif_specialeffect(src, 455, AREA); //Red Lightnings
+		clif_skill_nodamage(src,bl,skillid,skilllv,
+			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
+		break;
 	case NC_DECREPIFY: //Necro Decrepify [Brain]
-	if(battle_check_living(tstatus->race,tstatus->def_ele)){
-		clif_specialeffect(bl, 403, AREA); //Mind Breaker Effect on target
-		clif_specialeffect(src, 454, AREA); //Black Cast Effect on caster
-		clif_skill_nodamage(src,bl,skillid,skilllv,
-		sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
-	}
-	else clif_skill_fail(sd,skillid,0,0);
-	break;
+		if(battle_check_living(tstatus->race,tstatus->def_ele)){
+			clif_specialeffect(bl, 403, AREA); //Mind Breaker Effect on target
+			clif_specialeffect(src, 454, AREA); //Black Cast Effect on caster
+			clif_skill_nodamage(src,bl,skillid,skilllv,
+				sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
+		}
+		else clif_skill_fail(sd,skillid,0,0);
+		break;
 	case WL_CURSEWEAKNESS: // Warlock Curse of Weakness [Brain]
-	clif_specialeffect(bl, 656, AREA); //Blinking Green Sprite effect on target
-	clif_specialeffect(src, 59, AREA); //Purple Cast Effect on caster
-	clif_skill_nodamage(src,bl,skillid,skilllv,
-		sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
-	break;
-	case WL_CURSEEXHAUST: // Warlock Curse of Exhaustion [Brain]
-	clif_specialeffect(bl, 135, AREA); //Ice Breaking effect on target
-	clif_specialeffect(src, 59, AREA); //Purple Cast Effect on caster
-	clif_skill_nodamage(src,bl,skillid,skilllv,
-		sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
-	break;
-	case WL_CURSETONGUES: // Warlock Curse of Tongues [Brain]
-	clif_specialeffect(bl, 72, AREA); //Spinning Lights effect on target
-	clif_specialeffect(src, 59, AREA); //Purple Cast Effect on caster
-	clif_skill_nodamage(src,bl,skillid,skilllv,
-		sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
-	break;
-	case WL_CURSEDOOM: // Warlock Curse of Doom (temp) [Brain]
-	if(!tsc->data[type]) {
-		clif_specialeffect(bl, 196, AREA); //Small Curse Reaper effect on target
+		clif_specialeffect(bl, 656, AREA); //Blinking Green Sprite effect on target
 		clif_specialeffect(src, 59, AREA); //Purple Cast Effect on caster
 		clif_skill_nodamage(src,bl,skillid,skilllv,
-		sc_start4(bl,type,100,
-			skilllv,skillid,src->id,skill_get_time(skillid,skilllv),1000));
-	} else clif_skill_fail(sd,skillid,0,0);
-	break;
+			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
+		break;
+	case WL_CURSEEXHAUST: // Warlock Curse of Exhaustion [Brain]
+		clif_specialeffect(bl, 135, AREA); //Ice Breaking effect on target
+		clif_specialeffect(src, 59, AREA); //Purple Cast Effect on caster
+		clif_skill_nodamage(src,bl,skillid,skilllv,
+			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
+		break;
+	case WL_CURSETONGUES: // Warlock Curse of Tongues [Brain]
+		clif_specialeffect(bl, 72, AREA); //Spinning Lights effect on target
+		clif_specialeffect(src, 59, AREA); //Purple Cast Effect on caster
+		clif_skill_nodamage(src,bl,skillid,skilllv,
+			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
+		break;
+	case WL_CURSEDOOM: // Warlock Curse of Doom (temp) [Brain]
+		if(!tsc->data[type]) {
+			clif_specialeffect(bl, 196, AREA); //Small Curse Reaper effect on target
+			clif_specialeffect(src, 59, AREA); //Purple Cast Effect on caster
+			clif_skill_nodamage(src,bl,skillid,skilllv,
+				sc_start4(bl,type,100,
+					skilllv,skillid,src->id,skill_get_time(skillid,skilllv),1000));
+		} else clif_skill_fail(sd,skillid,0,0);
+		break;
 	case WL_OVERWHELMING: // Warlock Overwhelming Evil [Brain]
-	clif_specialeffect(src, 348, AREA); //1000 Blades Trespassing effect on caster
-	clif_skill_nodamage(src,bl,skillid,skilllv,
-		sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
-	break;
+		clif_specialeffect(src, 348, AREA); //1000 Blades Trespassing effect on caster
+		clif_skill_nodamage(src,bl,skillid,skilllv,
+			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
+		break;
+
 	case MG_SIGHT:
 	case AL_RUWACH:
@@ -3894,5 +3888,5 @@
 		if (!i)
 		{
-			if (sd)
+			if (sd) 
 				clif_skill_fail(sd,skillid,0,0);
 			map_freeblock_unlock();
@@ -3980,5 +3974,5 @@
 			skill_additional_effect(src,bl,skillid,skilllv,BF_MISC,tick); //Use Misc rather than weapon to signal passive pushback
 		}
-		break;
+		break;	
 
 	case MO_ABSORBSPIRITS:
@@ -3996,29 +3990,28 @@
 		clif_skill_nodamage(src,bl,skillid,skilllv,i?1:0);
 		break;
-
+//this feels more like it fits.
 	case WL_DRAINSOUL: // Warlock Drain Soul [Brain]
-	i = 0;
-	if (dstsd && (sd == dstsd || map_flag_vs(src->m)))
-	{	//check if target is a player and we are in versus map
-		i = tstatus->max_sp * skilllv/100;//i = SkillLv% of player Max SP
-		if(dstsd->spiritball && (dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER) {
-		i += dstsd->spiritball * 5;//will drain Monk Spirits and regain 5 SP per Spirit
-		pc_delspiritball(dstsd,dstsd->spiritball,0);
-		}
-	} else if (dstmd && !(tstatus->mode&MD_BOSS) && battle_check_living(tstatus->race,tstatus->def_ele))
-	{	// check if target is a monster and not a Boss
-		i = dstmd->level/5 * skilllv;//i = mob level/5 * Skill Lvl
-		mob_target(dstmd,src,0);//This will turn the mob agressive against the caster
-	}
-	if(i < skilllv) i = skilllv; //Minimum 1 sp per skill lvl
-	if (i) {
-		clif_specialeffect(src, 253, AREA); //Absorb Mana effect on caster
-		clif_specialeffect(bl, 52, AREA); //Lightning Hit effect on target
-		status_heal(src, 0, i, 3); //caster drains sp
-		status_zap(bl, 0, i*skilllv); //target lost sp equal to 1*SkillLv the amount drained
-	}
-	clif_skill_nodamage(src,bl,skillid,skilllv,i?1:0);
-	break;
-
+		i = 0;
+		if (dstsd && (sd == dstsd || map_flag_vs(src->m)))
+		{	//check if target is a player and we are in versus map
+			i = tstatus->max_sp * skilllv/100;//i = SkillLv% of player Max SP
+			if(dstsd->spiritball && (dstsd->class_&MAPID_BASEMASK)!=MAPID_GUNSLINGER) {
+				i += dstsd->spiritball * 5;//will drain Monk Spirits and regain 5 SP per Spirit
+				pc_delspiritball(dstsd,dstsd->spiritball,0);
+			}
+		} else if (dstmd && !(tstatus->mode&MD_BOSS) && battle_check_living(tstatus->race,tstatus->def_ele))
+		{	// check if target is a monster and not a Boss
+			i = dstmd->level/5 * skilllv;//i = mob level/5 * Skill Lvl
+			mob_target(dstmd,src,0);//This will turn the mob agressive against the caster
+		}
+		if(i < skilllv) i = skilllv; //Minimum 1 sp per skill lvl
+		if (i) {
+			clif_specialeffect(src, 253, AREA); //Absorb Mana effect on caster
+			clif_specialeffect(bl, 52, AREA); //Lightning Hit effect on target
+			status_heal(src, 0, i, 3); //caster drains sp
+			status_zap(bl, 0, i*skilllv); //target lost sp equal to 1*SkillLv the amount drained
+		}
+		clif_skill_nodamage(src,bl,skillid,skilllv,i?1:0);
+		break;
 
 	case AC_MAKINGARROW:
@@ -4113,5 +4106,5 @@
 		}
 		break;
-
+	
 	case WZ_SIGHTRASHER:
 		//Passive side of the attack.
@@ -4221,5 +4214,5 @@
 	case SM_AUTOBERSERK:	// Celest
 		if (tsce)
-			i = status_change_end(bl, type, -1);
+			i = status_change_end(bl, type, -1);				
 		else
 			i = sc_start(bl,type,100,skilllv,60000);
@@ -4235,5 +4228,5 @@
 		break;
 	case TK_RUN:
-			if (tsce)
+			if (tsce) 
 				clif_skill_nodamage(src,bl,skillid,skilllv,
 					status_change_end(bl, type, -1));
@@ -4331,5 +4324,5 @@
 			if (dstmd)
 				mob_target(dstmd,src,skill_get_range2(src,skillid,skilllv));
-
+			
 			if (tsc->data[SC_STONE]) {
 				status_change_end(bl,SC_STONE,-1);
@@ -4482,5 +4475,5 @@
 		}
 		break;
-
+		
 	case TF_PICKSTONE:
 		if(sd) {
@@ -4539,5 +4532,5 @@
 		//Note that Full Strip autospell doesn't use a duration
 		if (!clif_skill_nodamage(src,bl,skillid,skilllv,
-				skill_strip_equip(bl, location, i, skilllv,
+				skill_strip_equip(bl, location, i, skilllv, 
 				sd&&skillid==ST_FULLSTRIP&&!pc_checkskill(sd, skillid)?0:skill_get_time(skillid,skilllv)))
 			&& sd)
@@ -4695,5 +4688,5 @@
 					continue;
 				switch (i) {
-				case SC_WEIGHT50:    case SC_WEIGHT90:    case SC_HALLUCINATION:
+				case SC_WEIGHT50:    case SC_WEIGHT90:    case SC_HALLUCINATION: 
 				case SC_STRIPWEAPON: case SC_STRIPSHIELD: case SC_STRIPARMOR:
 				case SC_STRIPHELM:   case SC_CP_WEAPON:   case SC_CP_SHIELD:
@@ -4745,5 +4738,5 @@
 				y = src->y + diry[dir]*skilllv*2;
 			}
-
+			
 			clif_skill_nodamage(src,bl,TK_HIGHJUMP,skilllv,1);
 			if(!map_count_oncell(src->m,x,y,BL_PC|BL_NPC|BL_MOB) && map_getcell(src->m,x,y,CELL_CHKREACH)) {
@@ -4789,5 +4782,5 @@
 				} else if (!dstsd || map_flag_vs(bl->m)) //HP damage only on pvp-maps when against players.
 					hp = tstatus->max_hp/50; //Recover 2% HP [Skotlex]
-
+				
 				clif_skill_nodamage(src,bl,skillid,skilllv,1);
 				unit_skillcastcancel(bl,0);
@@ -4799,5 +4792,5 @@
 				else
 					hp = 0;
-
+				
 				if (sp) //Recover some of the SP used
 					sp = sp*(25*(skilllv-1))/100;
@@ -4875,5 +4868,5 @@
 	case NPC_CHANGETELEKINESIS:
 		clif_skill_nodamage(src,bl,skillid,skilllv,
-			sc_start2(bl, type, 100, skilllv, skill_get_ele(skillid,skilllv),
+			sc_start2(bl, type, 100, skilllv, skill_get_ele(skillid,skilllv), 
 				skill_get_time(skillid, skilllv)));
 		break;
@@ -4883,5 +4876,5 @@
 		if(tstatus->def_ele==ELE_UNDEAD || tstatus->def_ele==ELE_DARK) break;
 		clif_skill_nodamage(src,bl,skillid,skilllv,
-			sc_start2(bl, type, 100, skilllv, skill_get_ele(skillid,skilllv),
+			sc_start2(bl, type, 100, skilllv, skill_get_ele(skillid,skilllv), 
 				skill_get_time(skillid, skilllv)));
 		break;
@@ -4900,5 +4893,5 @@
 					sc_start(bl,type,100,skilllv,skill_time))
 			&& ud) {	//Disable attacking/acting/moving for skill's duration.
-				ud->attackabletime =
+				ud->attackabletime = 
 				ud->canact_tick =
 				ud->canmove_tick = tick + skill_time;
@@ -4944,5 +4937,5 @@
 		}
 		break;
-
+	
 	case NPC_SPEEDUP:
 		{
@@ -5017,5 +5010,5 @@
 			sc_start(bl,type,100,100,skill_get_time(skillid, skilllv)));
 		break;
-
+		
 	case NPC_AGIUP:
 		sc_start(bl,SC_SPEEDUP1,100,skilllv,skill_get_time(skillid, skilllv));
@@ -5029,5 +5022,5 @@
 			sc_start4(bl,type,100,skilllv,0,0,6,skill_get_time(skillid,skilllv)));
 		break;
-
+		
 	case NPC_SIEGEMODE:
 		// not sure what it does
@@ -5179,5 +5172,5 @@
 				return 1;
 			}
-
+	
 			if (tsce)
 			{	//HelloKitty2 (?) explained that this silently fails when target is
@@ -5190,5 +5183,5 @@
 			if (!clif_skill_nodamage(src,bl,skillid,skilllv,
 				sc_start(bl,type,55+5*skilllv,skilllv,skill_get_time(skillid,skilllv))))
-			{
+			{	
 				if (sd) clif_skill_fail(sd,skillid,0,0);
 				map_freeblock_unlock();
@@ -5371,6 +5364,6 @@
 					break;
 				default:
-					break;
-				}
+					break;			
+				}			
 			} while ((--count) > 0);
 			clif_skill_nodamage(src,bl,skillid,skilllv,1);
@@ -5432,10 +5425,10 @@
 			clif_skill_nodamage(src,bl,skillid,skilllv,
 				sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
-
+		
 		if (skillid == SL_SKE)
 			sc_start(src,SC_SMA,100,skilllv,skill_get_time(SL_SMA,skilllv));
 
 		break;
-
+		
 	// New guild skills [Celest]
 	case GD_BATTLEORDER:
@@ -5515,5 +5508,5 @@
 				clif_feel_info(sd, skilllv-1, 1);
 		}
-		break;
+		break;	
 
 	case SG_HATE:
@@ -5595,5 +5588,5 @@
 			static const int per[5][2]={{20,50},{50,60},{25,75},{60,64},{34,67}};
 			int rnd = rand()%100;
-			i = (skilllv-1)%5;
+			i = (skilllv-1)%5; 
 			if(rnd<per[i][0]) //Self
 				bl = src;
@@ -5662,5 +5655,5 @@
 		mobskill_event(dstmd, src, tick, MSC_SKILLUSED|(skillid<<16));
 	}
-
+	
 	if (sd && !(flag&1) && sd->state.arrow_atk) //Consume arrow on last invocation to this skill.
 		battle_consume_ammo(sd, skillid, skilllv);
@@ -5694,5 +5687,6 @@
 	}
 
-	if(ud->skillid != SA_CASTCANCEL ) {
+	if(ud->skillid != SA_CASTCANCEL )
+	{// otherwise handled in unit_skillcastcancel()
 		if( ud->skilltimer != tid ) {
 			ShowError("skill_castend_id: Timer mismatch %d!=%d!\n", ud->skilltimer, tid);
@@ -5700,7 +5694,12 @@
 			return 0;
 		}
-		if( sd && ud->skilltimer != -1 && pc_checkskill(sd,SA_FREECAST))
-			status_freecast_switch(sd);
-		ud->skilltimer=-1;
+
+		if( sd && ud->skilltimer != -1 && pc_checkskill(sd,SA_FREECAST) > 0 )
+		{// restore original walk speed
+			ud->skilltimer = -1;
+			status_calc_bl(&sd->bl, SCB_SPEED);
+		}
+
+		ud->skilltimer = -1;
 	}
 
@@ -5765,5 +5764,5 @@
 			if(inf2 & (INF2_PARTY_ONLY|INF2_GUILD_ONLY) && src != target)
 			{
-				inf |=
+				inf |= 	
 					(inf2&INF2_PARTY_ONLY?BCT_PARTY:0)|
 					(inf2&INF2_GUILD_ONLY?BCT_GUILD:0);
@@ -5807,5 +5806,5 @@
 		if(sd && !skill_check_condition(sd,ud->skillid, ud->skilllv,1))
 			break;
-
+			
 		if(hd && !skill_check_condition_hom(hd,ud->skillid, ud->skilllv,1))	//[orn]
 			break;
@@ -5816,10 +5815,10 @@
 		if (ud->walktimer != -1 && ud->skillid != TK_RUN)
 			unit_stop_walking(src,1);
-
+		
 		ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv);
-
+	
 		if (skill_get_state(ud->skillid) != ST_MOVE_ENABLE)
 			unit_set_walkdelay(src, tick, battle_config.default_walk_delay+skill_get_walkdelay(ud->skillid, ud->skilllv), 1);
-
+		
 		if(battle_config.skill_log && battle_config.skill_log&src->type)
 			ShowInfo("Type %d, ID %d skill castend id [id =%d, lv=%d, target ID %d]\n",
@@ -5876,5 +5875,5 @@
 			if (dy > 0) dy++;
 			else if(dy < 0) dy--;
-
+			
 			if (unit_movepos(src, src->x+dx, src->y+dy, 1, 1))
 			{	//Display movement + animation.
@@ -5897,5 +5896,5 @@
 
 /*==========================================
- *
+ * 
  *------------------------------------------*/
 int skill_castend_pos(int tid, unsigned int tick, int id, intptr data)
@@ -5918,5 +5917,5 @@
 		return 0;
 	}
-
+	
 	if( ud->skilltimer != tid )
 	{
@@ -5926,8 +5925,11 @@
 	}
 
-	if(sd && ud->skilltimer != -1 && pc_checkskill(sd,SA_FREECAST))
-		status_freecast_switch(sd);
-
+	if( sd && ud->skilltimer != -1 && pc_checkskill(sd,SA_FREECAST) > 0 )
+	{// restore original walk speed
+		ud->skilltimer=-1;
+		status_calc_bl(&sd->bl, SCB_SPEED);
+	}
 	ud->skilltimer=-1;
+
 	do {
 		if(status_isdead(src))
@@ -5937,5 +5939,5 @@
 			skill_get_unit_flag(ud->skillid)&UF_NOREITERATION &&
 			skill_check_unit_range(src,ud->skillx,ud->skilly,ud->skillid,ud->skilllv)
-		  )
+		  ) 
 		{
 			if (sd) clif_skill_fail(sd,ud->skillid,0,0);
@@ -5976,5 +5978,5 @@
 			}
 		}
-
+			
 		if(sd && !skill_check_condition(sd,ud->skillid, ud->skilllv, 1))
 			break;
@@ -6062,5 +6064,5 @@
 		skill_area_temp[1] = src->id;
 		i = skill_get_splash(skillid, skilllv);
-		map_foreachinarea(skill_area_sub,
+		map_foreachinarea(skill_area_sub, 
 			src->m, x-i, y-i, x+i, y+i, BL_PC,
 			src, skillid, skilllv, tick, flag|BCT_ALL|1,
@@ -6089,15 +6091,13 @@
 			src->m, x-i, y-i, x+i,y+i,BL_SKILL);
 		break;
-
+//the code changed alot and jumped around.
 	case WL_HELLFIRE: // Warlock Hellfire [Brain]
-	//clif_specialeffect(sd, 92, AREA); //Meteor Effect on caster, cant set on ground
-	clif_skill_poseffect(src,WZ_METEOR,skilllv,x,y,tick); //Meteor Effect
-	clif_skill_nodamage(src, src, skillid, 0, 1); //Lalala, just to show the skill yell correctly
-	clif_specialeffect(src, 55, AREA); //Red Cast Effect on caster
-	// Continue reading because skill_unitsetting is bellow
-
-
+		//clif_specialeffect(sd, 92, AREA); //Meteor Effect on caster, cant set on ground
+		clif_skill_poseffect(src,WZ_METEOR,skilllv,x,y,tick); //Meteor Effect
+		clif_skill_nodamage(src, src, skillid, 0, 1); //Lalala, just to show the skill yell correctly
+		clif_specialeffect(src, 55, AREA); //Red Cast Effect on caster
+		// Continue reading because skill_unitsetting is bellow
 	case MG_SAFETYWALL:
-	case MG_FIREWALL:
+	case MG_FIREWALL:	
 	case MG_THUNDERSTORM:
 	case AL_PNEUMA:
@@ -6256,58 +6256,62 @@
 				md->deletetimer = add_timer (gettick() + skill_get_time(skillid,skilllv), mob_timer_delete, md->bl.id, 0);
 				mob_spawn (md); //Now it is ready for spawning.
-                // @showsummon command implementation [Brainstorm]
-		if(sd->state.showsummon){
-			char output[256];
-			sprintf(output,
-			"[Summon] HP : %d | STR : %d DEX : %d VIT : %d INT : %d AGI : %d LUK : %d",
-			md->status.max_hp,md->status.str,md->status.dex,md->status.vit,md->status.int_,md->status.agi,md->status.luk);
-			clif_disp_onlyself(sd,output,strlen(output));
-			sprintf(output,
-			"[%s] ATK : %d~%d | DEF: %d+%d MDEF: %d+%d | HIT: %d FLEE: %d",
-			md->name,md->status.rhw.atk,md->status.rhw.atk2,md->status.def,md->status.def2,md->status.mdef,md->status.mdef2,md->status.hit,md->status.flee);
-			clif_disp_onlyself(sd,output,strlen(output));
-		}
-
-			}
-		}
-		break;
-
+//Does this really belong here?
+				// @showsummon command implementation [Brainstorm]
+				if(sd->state.showsummon){
+					char output[256];
+					sprintf(output,
+						"[Summon] HP : %d | STR : %d DEX : %d VIT : %d INT : %d AGI : %d LUK : %d",
+						md->status.max_hp,md->status.str,md->status.dex,md->status.vit,md->status.int_,md->status.agi,md->status.luk);
+					clif_disp_onlyself(sd,output,strlen(output));
+					sprintf(output,
+						"[%s] ATK : %d~%d | DEF: %d+%d MDEF: %d+%d | HIT: %d FLEE: %d",
+						md->name,md->status.rhw.atk,md->status.rhw.atk2,md->status.def,md->status.def2,md->status.mdef,md->status.mdef2,md->status.hit,md->status.flee);
+					clif_disp_onlyself(sd,output,strlen(output));
+				}
+
+			}
+		}
+		break;
+		
+//HUGE lump of code!
+//Some of the code repeats itself, Unless it just recites it for other classes it may be a problem
 	case AD_FAMILIAR: // Adept Summon Familiar [Brain]
-	if( sd )
-	{
-		int id;
-		int mob_class;
-		struct mob_data* md;
-		mob_class = pc_readglobalreg(sd, "ADEPT_FAMILIAR");
-		if( mob_class == 0 )
+		if( sd )
 		{
-		mob_class = mob_get_random_id(4, 0x1, 0);
-		pc_setglobalreg(sd, "ADEPT_FAMILIAR", mob_class);
-		}
-		id = mob_once_spawn(sd,src->m,src->x,src->y,"--en--",mob_class,1,"");
-		md = (struct mob_data *)map_id2bl(id);
-		if( md != NULL )
-		{
-		md->master_id = sd->bl.id;
-		md->special_state.ai = 1;
-		md->status.mode = md->status.mode|MD_AGGRESSIVE;
-		status_calc_mob(md,0); //Recalc their stats based on passive bonus
-		md->status.hp = md->status.max_hp; //Must be here or the code wont update it
-		// @showsummon command implementation [Brainstorm]
-		if(sd->state.showsummon){
-			char output[256];
-			sprintf(output,
-			"[Summon] HP : %d | STR : %d DEX : %d VIT : %d INT : %d AGI : %d LUK : %d",
-			md->status.max_hp,md->status.str,md->status.dex,md->status.vit,md->status.int_,md->status.agi,md->status.luk);
-			clif_disp_onlyself(sd,output,strlen(output));
-			sprintf(output,
-			"[%s] ATK : %d~%d | DEF: %d+%d MDEF: %d+%d | HIT: %d FLEE: %d",
-			md->name,md->status.rhw.atk,md->status.rhw.atk2,md->status.def,md->status.def2,md->status.mdef,md->status.mdef2,md->status.hit,md->status.flee);
-			clif_disp_onlyself(sd,output,strlen(output));
-		}
-		md->deletetimer = add_timer(gettick() + skill_get_time(skillid,skilllv), mob_timer_delete, id, 0);
-		}
-	}
-	break;
+			int id;
+			int mob_class;
+			struct mob_data* md;
+
+			mob_class = pc_readglobalreg(sd, "ADEPT_FAMILIAR");
+			if( mob_class == 0 )
+			{
+				mob_class = mob_get_random_id(4, 0x1, 0);
+				pc_setglobalreg(sd, "ADEPT_FAMILIAR", mob_class);
+			}
+			id = mob_once_spawn(sd,src->m,src->x,src->y,"--en--",mob_class,1,"");
+			md = (struct mob_data *)map_id2bl(id);
+			if( md != NULL )
+			{
+				md->master_id = sd->bl.id;
+				md->special_state.ai = 1;
+				md->status.mode = md->status.mode|MD_AGGRESSIVE;
+				status_calc_mob(md,0); //Recalc their stats based on passive bonus
+				md->status.hp = md->status.max_hp; //Must be here or the code wont update it
+				// @showsummon command implementation [Brainstorm]
+				if(sd->state.showsummon){
+					char output[256];
+					sprintf(output,
+						"[Summon] HP : %d | STR : %d DEX : %d VIT : %d INT : %d AGI : %d LUK : %d",
+						md->status.max_hp,md->status.str,md->status.dex,md->status.vit,md->status.int_,md->status.agi,md->status.luk);
+					clif_disp_onlyself(sd,output,strlen(output));
+					sprintf(output,
+						"[%s] ATK : %d~%d | DEF: %d+%d MDEF: %d+%d | HIT: %d FLEE: %d",
+						md->name,md->status.rhw.atk,md->status.rhw.atk2,md->status.def,md->status.def2,md->status.mdef,md->status.mdef2,md->status.hit,md->status.flee);
+					clif_disp_onlyself(sd,output,strlen(output));
+				}
+				md->deletetimer = add_timer(gettick() + skill_get_time(skillid,skilllv), mob_timer_delete, id, 0);
+			}
+		}
+		break;
 	case NC_SKELETON: // Raise Skeleton [Brain]
 	case NC_ARCHER: // Raise Archer Skeleton
@@ -6317,56 +6321,55 @@
 	case NC_SHADOW: // Raise Shadow
 	case NC_WRAITH: // Raise Wraith
-	if( sd )
-	{
-		static const int mob_skeleton[5]={ 3201, 3202, 3203, 3204, 3205 }; // Skeleton, Orc Skeleton, Soldier Skeleton, Pirate Skeleton, Skeleton General
-		static const int mob_archer[5]={ 3206, 3207, 3208, 3209, 3210 }; // Archer Skeleton, Firelock Soldier
-		static const int mob_zombie[5]={ 3211, 3212, 3213, 3214, 3215 }; // Zombie, Ghoul, Zombie Master
-		static const int mob_mummy[5]={ 3216, 3217, 3218, 3219, 3220 }; // Mummy, Ancient Mummy
-		static const int mob_ghost[5]={ 3221, 3222, 3223, 3224, 3225 }; // Whisper, Nightmare, Nightmare Terror
-		static const int mob_shadow[5]={ 3226, 3227, 3228, 3229, 3230 }; // Injustice, Raydric, Dullahan
-		static const int mob_wraith[5]={ 3231, 3232, 3233, 3234, 3235 }; // Wraith, Wraith Dead
-		int id;
-		int mob_class;
-		struct mob_data *md;
-
-		switch( skillid )
+		if( sd )
 		{
-		case NC_SKELETON: mob_class = mob_skeleton[skilllv-1]; break;
-		case NC_ARCHER:   mob_class = mob_archer[skilllv-1]; break;
-		case NC_ZOMBIE:   mob_class = mob_zombie[skilllv-1]; break;
-		case NC_MUMMY:	mob_class = mob_mummy[skilllv-1]; break;
-		case NC_GHOST:	mob_class = mob_ghost[skilllv-1]; break;
-		case NC_SHADOW:   mob_class = mob_shadow[skilllv-1]; break;
-		case NC_WRAITH:   mob_class = mob_wraith[skilllv-1]; break;
-		default:
-			mob_class = 1002; // poring
-			ShowDebug("skill_castend_pos2: undefined skill #%d used to raise mobs, defaulting to poring\n");
-			break;
-		}
-		id = mob_once_spawn(sd,src->m,src->x,src->y,"--ja--",mob_class,1,"");
-		if((md=(struct mob_data *)map_id2bl(id)))
-		{
-		md->master_id=sd->bl.id;
-		md->special_state.ai=1;
-		md->status.mode=md->db->status.mode|MD_AGGRESSIVE;
-		status_calc_mob(md,0); //Recalc their stats based on passive bonus
-		md->status.hp = md->status.max_hp; //Must be here or the code wont update it
-		// @showsummon command implementation [Brainstorm]
-		if(sd->state.showsummon){
-			char output[256];
-			sprintf(output,
-			"[Summon] HP : %d | STR : %d DEX : %d VIT : %d INT : %d AGI : %d LUK : %d",
-			md->status.max_hp,md->status.str,md->status.dex,md->status.vit,md->status.int_,md->status.agi,md->status.luk);
-			clif_disp_onlyself(sd,output,strlen(output));
-			sprintf(output,
-			"[%s] ATK : %d~%d | DEF: %d+%d MDEF: %d+%d | HIT: %d FLEE: %d",
-			md->name,md->status.rhw.atk,md->status.rhw.atk2,md->status.def,md->status.def2,md->status.mdef,md->status.mdef2,md->status.hit,md->status.flee);
-			clif_disp_onlyself(sd,output,strlen(output));
-		}
-		md->deletetimer = add_timer(gettick() + skill_get_time(skillid,skilllv), mob_timer_delete, id, 0);
-		}
-	}
-	break;
-
+			static const int mob_skeleton[5]={ 3201, 3202, 3203, 3204, 3205 }; // Skeleton, Orc Skeleton, Soldier Skeleton, Pirate Skeleton, Skeleton General
+			static const int mob_archer[5]={ 3206, 3207, 3208, 3209, 3210 }; // Archer Skeleton, Firelock Soldier
+			static const int mob_zombie[5]={ 3211, 3212, 3213, 3214, 3215 }; // Zombie, Ghoul, Zombie Master
+			static const int mob_mummy[5]={ 3216, 3217, 3218, 3219, 3220 }; // Mummy, Ancient Mummy
+			static const int mob_ghost[5]={ 3221, 3222, 3223, 3224, 3225 }; // Whisper, Nightmare, Nightmare Terror
+			static const int mob_shadow[5]={ 3226, 3227, 3228, 3229, 3230 }; // Injustice, Raydric, Dullahan
+			static const int mob_wraith[5]={ 3231, 3232, 3233, 3234, 3235 }; // Wraith, Wraith Dead
+			int id;
+			int mob_class;
+			struct mob_data *md;
+
+			switch( skillid )
+			{
+				case NC_SKELETON: mob_class = mob_skeleton[skilllv-1]; break;
+				case NC_ARCHER:   mob_class = mob_archer[skilllv-1]; break;
+				case NC_ZOMBIE:   mob_class = mob_zombie[skilllv-1]; break;
+				case NC_MUMMY:    mob_class = mob_mummy[skilllv-1]; break;
+				case NC_GHOST:    mob_class = mob_ghost[skilllv-1]; break;
+				case NC_SHADOW:   mob_class = mob_shadow[skilllv-1]; break;
+				case NC_WRAITH:   mob_class = mob_wraith[skilllv-1]; break;
+				default:
+					mob_class = 1002; // poring
+					ShowDebug("skill_castend_pos2: undefined skill #%d used to raise mobs, defaulting to poring\n");
+					break;
+			}
+			id = mob_once_spawn(sd,src->m,src->x,src->y,"--ja--",mob_class,1,"");
+			if((md=(struct mob_data *)map_id2bl(id)))
+			{
+				md->master_id=sd->bl.id;
+				md->special_state.ai=1;
+				md->status.mode=md->db->status.mode|MD_AGGRESSIVE;
+				status_calc_mob(md,0); //Recalc their stats based on passive bonus
+				md->status.hp = md->status.max_hp; //Must be here or the code wont update it
+//I bet this should NOT be here -- Critical
+				if(sd->state.showsummon){
+					char output[256];
+					sprintf(output,
+						"[Summon] HP : %d | STR : %d DEX : %d VIT : %d INT : %d AGI : %d LUK : %d",
+						md->status.max_hp,md->status.str,md->status.dex,md->status.vit,md->status.int_,md->status.agi,md->status.luk);
+					clif_disp_onlyself(sd,output,strlen(output));
+					sprintf(output,
+						"[%s] ATK : %d~%d | DEF: %d+%d MDEF: %d+%d | HIT: %d FLEE: %d",
+						md->name,md->status.rhw.atk,md->status.rhw.atk2,md->status.def,md->status.def2,md->status.mdef,md->status.mdef2,md->status.hit,md->status.flee);
+					clif_disp_onlyself(sd,output,strlen(output));
+				}
+				md->deletetimer = add_timer(gettick() + skill_get_time(skillid,skilllv), mob_timer_delete, id, 0);
+			}
+		}
+		break;
 
 
@@ -6395,5 +6398,5 @@
 			potion_hp = potion_hp * (100+i)/100;
 			potion_sp = potion_sp * (100+i)/100;
-
+			
 			if(potion_hp > 0 || potion_sp > 0) {
 				i = skill_get_splash(skillid, skilllv);
@@ -6417,5 +6420,5 @@
 			potion_hp = potion_hp * (100+i)/100;
 			potion_sp = potion_sp * (100+i)/100;
-
+			
 			if(potion_hp > 0 || potion_sp > 0) {
 				i = skill_get_splash(skillid, skilllv);
@@ -6439,5 +6442,5 @@
 		}
 		break;
-
+	
 	case HW_GRAVITATION:
 		if ((sg = skill_unitsetting(src,skillid,skilllv,x,y,0)))
@@ -6521,10 +6524,10 @@
 	if (sd && !(flag&1) && sd->state.arrow_atk) //Consume arrow if a ground skill was not invoked. [Skotlex]
 		battle_consume_ammo(sd, skillid, skilllv);
-
+		
 	return 0;
 }
 
 /*==========================================
- *
+ * 
  *------------------------------------------*/
 int skill_castend_map (struct map_session_data *sd, short skill_num, const char *map)
@@ -6534,5 +6537,5 @@
 //Simplify skill_failed code.
 #define skill_failed(sd) { sd->menuskill_id = sd->menuskill_val = 0; }
-	if(skill_num != sd->menuskill_id)
+	if(skill_num != sd->menuskill_id) 
 		return 0;
 
@@ -6569,5 +6572,5 @@
 		return 0;
 	}
-
+	
 	switch(skill_num)
 	{
@@ -6610,10 +6613,10 @@
 				}
 			}
-
+		
 			//When it's an item-used warp-portal, the skill-lv used is lost.. assume max level.
 			lv = sd->skillitem==skill_num?skill_get_max(skill_num):pc_checkskill(sd,skill_num);
 			wx = sd->menuskill_val>>16;
 			wy = sd->menuskill_val&0xffff;
-
+			
 			if( lv <= 0 ) return 0;
 			if( lv > 4 ) lv = 4; // crash prevention
@@ -6634,5 +6637,5 @@
 				return 0;
 			}
-
+			
 			// This makes Warp Portal fail if the cell is not empty
 			//if(skill_check_unit_range2(&sd->bl,wx,wy,skill_num,lv) > 0) {
@@ -6693,10 +6696,10 @@
 		return 0; //Nothing to remove, this unit is not overlapped.
 
-	if (unit->val1 != unit->group->skill_id)
+	if (unit->val1 != unit->group->skill_id) 
 	{	//Reset state
 		unit->val1 = unit->group->skill_id;
 		unit->val2 &= ~UF_ENSEMBLE;
 	}
-
+	
 	return map_foreachincell(skill_dance_overlap_sub, unit->bl.m,unit->bl.x,unit->bl.y,BL_SKILL, unit,flag);
 }
@@ -6782,7 +6785,8 @@
 	switch(skillid)
 	{
+//seems good.
 	case WL_HELLFIRE: // Warlock Hellfire [Brain]
-	if(map_flag_vs(src->m)) target = BCT_ALL;
-	break;
+		if(map_flag_vs(src->m)) target = BCT_ALL;
+		break;
 	case MG_SAFETYWALL:
 		val2=skilllv+1;
@@ -6860,5 +6864,5 @@
 			{	//Use the previous limit (minus the elapsed time) [Skotlex]
 				limit = old_sg->limit - DIFF_TICK(gettick(), old_sg->tick);
-				if (limit < 0)	//This can happen...
+				if (limit < 0)	//This can happen... 
 					limit = skill_get_time(skillid,skilllv);
 			}
@@ -7107,5 +7111,5 @@
 		return NULL;
 	}
-
+	
 
 	if (skillid == NJ_TATAMIGAESHI) //Store number of tiles.
@@ -7116,5 +7120,5 @@
 
 /*==========================================
- *
+ * 
  *------------------------------------------*/
 static int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned int tick)
@@ -7129,5 +7133,5 @@
 	nullpo_retr(0, src);
 	nullpo_retr(0, bl);
-
+	
 	if(bl->prev==NULL || !src->alive || status_isdead(bl))
 		return 0;
@@ -7139,10 +7143,10 @@
 			&& !skill_get_inf2(sg->skill_id) == INF2_TRAP) //Traps work on top of land protector, magical or not [Brain]
 		return 0; //AoE skills are ineffective. [Skotlex]
-
+	
 	sc = status_get_sc(bl);
-
+	
 	if (sc && sc->option&OPTION_HIDE && sg->skill_id != WZ_HEAVENDRIVE)
 		return 0; //Hidden characters are immune to AoE skills except Heaven's Drive. [Skotlex]
-
+	
 	type = status_skill2sc(sg->skill_id);
 	sce = (sc && type != -1)?sc->data[type]:NULL;
@@ -7240,5 +7244,5 @@
 		}
 		break;
-
+	
 	case UNT_FOGWALL:
 		if (!sce)
@@ -7261,5 +7265,5 @@
 //			src->limit = DIFF_TICK(tick+700,sg->tick);
 //		break;
-
+	
 	case UNT_MOONLIT:
 		//Knockback out of area if affected char isn't in Moonlit effect
@@ -7275,5 +7279,5 @@
 
 /*==========================================
- *
+ * 
  *------------------------------------------*/
 int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, unsigned int tick)
@@ -7302,5 +7306,5 @@
 	tsc = status_get_sc(bl);
 	tstatus = status_get_status_data(bl);
-	if (sg->state.magic_power)  //For magic power.
+	if (sg->state.magic_power)  //For magic power. 
 	{
 		sc = status_get_sc(ss);
@@ -7331,5 +7335,5 @@
 			return 0;
 		ts->tick = tick+sg->interval;
-
+		
 		if ((skillid==CR_GRANDCROSS || skillid==NPC_GRANDDARKNESS) && !battle_config.gx_allhit)
 			ts->tick += sg->interval*(map_count_oncell(bl->m,bl->x,bl->y,BL_CHAR)-1);
@@ -7382,11 +7386,11 @@
 				if (status_isimmune(bl))
 					heal = 0;	/* é»éè²ã«ãŒãïŒããŒã«éïŒïŒ */
-		// Profane Soul reduces the healed recieved by 3% per skilllv [Brain]
-		if(tsd) {
-			heal = heal * (100 - pc_checkskill(tsd,AD_PROFANE)*3)/100;
-			//Wont heal even if he got elemental armors [Brain]
-			if(pc_checkskill(tsd,NC_PHYLACTERY)) heal = sg->skill_lv;
-		}
-
+//Okay?
+				// Profane Soul reduces the healed recieved by 3% per skilllv [Brain]
+				if(tsd) {
+					heal = heal * (100 - pc_checkskill(tsd,AD_PROFANE)*3)/100;
+					//Wont heal even if he got elemental armors [Brain]
+					if(pc_checkskill(tsd,NC_PHYLACTERY)) heal = sg->skill_lv;
+				}
 				clif_skill_nodamage(&src->bl, bl, AL_HEAL, heal, 1);
 				status_heal(bl, heal, 0, 0);
@@ -7399,5 +7403,6 @@
 
 		case UNT_EVILLAND:
-			if (tstatus->race!=RC_UNDEAD && tstatus->race!=RC_DEMON)
+			//Will heal demon and undead element monsters, but not players.
+			if (bl->type != BL_PC && !battle_check_undead(tstatus->race, tstatus->def_ele) && tstatus->race!=RC_DEMON)
 			{	//Damage enemies
 				if(battle_check_target(&src->bl,bl,BCT_ENEMY)>0)
@@ -7423,5 +7428,5 @@
 
 		case UNT_ATTACK_SKILLS:
-			switch (sg->skill_id)
+			switch (sg->skill_id) 
 			{
 				case SG_SUN_WARM: //SG skills [Komurka]
@@ -7461,5 +7466,5 @@
 				break;
 				default:
-					skill_attack(skill_get_type(sg->skill_id),ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
+					skill_attack(skill_get_type(sg->skill_id),ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);			
 			}
 			break;
@@ -7485,5 +7490,5 @@
 				if (status_change_start(bl,type,10000,sg->skill_lv,sg->group_id,0,0,sec, 8))
 				{
-					struct TimerData* td = tsc->data[type]?get_timer(tsc->data[type]->timer):NULL;
+					struct TimerData* td = tsc->data[type]?get_timer(tsc->data[type]->timer):NULL; 
 					if (td) sec = DIFF_TICK(td->tick, tick);
 					map_moveblock(bl, src->bl.x, src->bl.y, tick);
@@ -7556,5 +7561,5 @@
 			clif_skill_nodamage(&src->bl, bl, AL_HEAL, heal, 1);
 			status_heal(bl, heal, 0, 0);
-			break;
+			break;	
 		}
 
@@ -7731,5 +7736,5 @@
 			status_change_end(bl,type,-1);
 		break;
-
+		
 	case UNT_SPIDERWEB:
 		{
@@ -7759,5 +7764,5 @@
 	if (sc && !sc->count)
 		sc = NULL;
-
+	
 	type = status_skill2sc(skill_id);
 	sce = (sc && type != -1)?sc->data[type]:NULL;
@@ -7776,5 +7781,5 @@
 		case BD_ETERNALCHAOS:
 		case BD_DRUMBATTLEFIELD:
-		case BD_RINGNIBELUNGEN:
+		case BD_RINGNIBELUNGEN:	
 		case BD_ROKISWEIL:
 		case BD_INTOABYSS:
@@ -7785,5 +7790,5 @@
 				//FIXME: This code is not perfect, it doesn't checks for the real ensemble's owner,
 				//it only checks if you are doing the same ensemble. So if there's two chars doing an ensemble
-				//which overlaps, by stepping outside of the other parther's ensemble will cause you to cancel
+				//which overlaps, by stepping outside of the other parther's ensemble will cause you to cancel 
 				//your own. Let's pray that scenario is pretty unlikely and noone will complain too much about it.
 				skill_stop_dancing(bl);
@@ -7800,5 +7805,5 @@
 				status_change_end(bl, type, -1);
 			break;
-
+			
 		case BA_POEMBRAGI:
 		case BA_WHISTLE:
@@ -7807,5 +7812,5 @@
 		case DC_HUMMING:
 		case DC_DONTFORGETME:
-		case DC_FORTUNEKISS:
+		case DC_FORTUNEKISS:	
 		case DC_SERVICEFORYOU:
 			if (sce)
@@ -7857,5 +7862,5 @@
 
 	nullpo_retr(0, group);
-
+  	
 	dissonance = skill_dance_switch(unit, 0);
 
@@ -7942,5 +7947,5 @@
 	if ((skillid != PR_BENEDICTIO && *c >=1) || *c >=2)
 		return 0; //Partner found for ensembles, or the two companions for Benedictio. [Skotlex]
-
+	
 	if (bl == src)
 		return 0;
@@ -7951,5 +7956,5 @@
 	if (tsd->sc.data[SC_SILENCE] || tsd->sc.opt1)
 		return 0;
-
+	
 	switch(skillid)
 	{
@@ -8036,5 +8041,5 @@
 
 /*==========================================
- *
+ * 
  *------------------------------------------*/
 static int skill_check_condition_mob_master_sub (struct block_list *bl, va_list ap)
@@ -8059,5 +8064,5 @@
 
 /*==========================================
- * Determines if a given skill should be made to consume ammo
+ * Determines if a given skill should be made to consume ammo 
  * when used by the player. [Skotlex]
  *------------------------------------------*/
@@ -8098,5 +8103,5 @@
 		sd->skillitem = sd->skillitemlv = 0;
 		//Need to do arrow state check.
-		sd->state.arrow_atk = skill_get_ammotype(skill)?1:0;
+		sd->state.arrow_atk = skill_get_ammotype(skill)?1:0; 
 		//Need to do Spiritball check.
 		sd->spiritball_old = sd->spiritball;
@@ -8108,5 +8113,5 @@
 	if (!sc->count)
 		sc = NULL;
-
+	
 	if(pc_is90overweight(sd)) {
 		clif_skill_fail(sd,skill,9,0);
@@ -8132,5 +8137,5 @@
 	if (sd->menuskill_id == AM_PHARMACY &&
 		(skill == AM_PHARMACY || skill == AC_MAKINGARROW || skill == BS_REPAIRWEAPON ||
-		skill == AM_TWILIGHT1 || skill == AM_TWILIGHT2  || skill == AM_TWILIGHT3
+		skill == AM_TWILIGHT1 || skill == AM_TWILIGHT2  || skill == AM_TWILIGHT3 
 	)) {
 		sd->skillitem = sd->skillitemlv = 0;
@@ -8356,5 +8361,5 @@
 		}
 		break;
-
+		
 	case TK_READYCOUNTER:
 	case TK_READYDOWN:
@@ -8384,8 +8389,8 @@
 				status_change_end(&sd->bl, SC_COMBO, -1);
 				sd->skillid_old = sd->skilllv_old = 0;
-				return 0; //Can't repeat previous combo skill.
+				return 0; //Can't repeat previous combo skill.				
 			}
 			break;
-		} else
+		} else 
 		if(sc->data[SC_COMBO]->val1 == skill)
 			break; //Combo ready.
@@ -8446,17 +8451,18 @@
 		}
 		break;
+//Weird to me.
 	case AD_FAMILIAR: //Adept Familiar [Flavio]
-	{
-		short familiar[1] ={ pc_readglobalreg(sd, "ADEPT_FAMILIAR") };
-		int maxcount = skill_get_maxcount(skill,lv);
-		int count = 0;
-		count = mob_countslave_class(&sd->bl, 1, familiar );
-		if( count >= maxcount )
 		{
-		clif_skill_fail(sd,skill,0,0);
-		return 0;
-		}
-	}
-	break;
+			short familiar[1] ={ pc_readglobalreg(sd, "ADEPT_FAMILIAR") };
+			int maxcount = skill_get_maxcount(skill,lv);
+			int count = 0;
+			count = mob_countslave_class(&sd->bl, 1, familiar );
+			if( count >= maxcount )
+			{
+				clif_skill_fail(sd,skill,0,0);
+				return 0;
+			}
+		}
+		break;
 	case NC_SKELETON: // Raise Skeleton [Brain]
 	case NC_ARCHER: // Raise Archer Skeleton
@@ -8466,32 +8472,31 @@
 	case NC_SHADOW: // Raise Shadow
 	case NC_WRAITH: // Raise Wraith
-	{// corrigido o limite de spawns [Flavio]
-		short summon1[5]={ 3201, 3202, 3203, 3204, 3205 }; // Skeleton, Orc Skeleton, Soldier Skeleton, Pirate Skeleton, Skeleton General
-		short summon2[5]={ 3206, 3207, 3208, 3209, 3210 }; // Archer Skeleton, Firelock Soldier
-		short summon3[5]={ 3211, 3212, 3213, 3214, 3215 }; // Zombie, Ghoul, Zombie Master
-		short summon4[5]={ 3216, 3217, 3218, 3219, 3220 }; // Mummy, Ancient Mummy
-		short summon5[5]={ 3221, 3222, 3223, 3224, 3225 }; // Whisper, Nightmare, Nightmare Terror
-		short summon6[5]={ 3226, 3227, 3228, 3229, 3230 }; // Injustice, Raydric, Dullahan
-		short summon7[5]={ 3231, 3232, 3233, 3234, 3235 }; // Wraith, Wraith Dead
-		int maxcount = skill_get_maxcount(skill,lv);
-		int count = 0;
-		switch( skill )
-		{
-		case NC_SKELETON: count = mob_countslave_class(&sd->bl, 5, summon1); break;
-		case NC_ARCHER: count = mob_countslave_class(&sd->bl, 5, summon2); break;
-		case NC_ZOMBIE: count = mob_countslave_class(&sd->bl, 5, summon3); break;
-		case NC_MUMMY: count = mob_countslave_class(&sd->bl, 5, summon4); break;
-		case NC_GHOST: count = mob_countslave_class(&sd->bl, 5, summon5); break;
-		case NC_SHADOW: count = mob_countslave_class(&sd->bl, 5, summon6); break;
-		case NC_WRAITH: count = mob_countslave_class(&sd->bl, 5, summon7); break;
-		}
-		if( count >= maxcount )
-		{
-		clif_skill_fail(sd,skill,0,0);
-		return 0;
-		}
-	}
-	break;
-
+		{// corrigido o limite de spawns [Flavio]
+			short summon1[5]={ 3201, 3202, 3203, 3204, 3205 }; // Skeleton, Orc Skeleton, Soldier Skeleton, Pirate Skeleton, Skeleton General
+			short summon2[5]={ 3206, 3207, 3208, 3209, 3210 }; // Archer Skeleton, Firelock Soldier
+			short summon3[5]={ 3211, 3212, 3213, 3214, 3215 }; // Zombie, Ghoul, Zombie Master
+			short summon4[5]={ 3216, 3217, 3218, 3219, 3220 }; // Mummy, Ancient Mummy
+			short summon5[5]={ 3221, 3222, 3223, 3224, 3225 }; // Whisper, Nightmare, Nightmare Terror
+			short summon6[5]={ 3226, 3227, 3228, 3229, 3230 }; // Injustice, Raydric, Dullahan
+			short summon7[5]={ 3231, 3232, 3233, 3234, 3235 }; // Wraith, Wraith Dead
+			int maxcount = skill_get_maxcount(skill,lv);
+			int count = 0;
+			switch( skill )
+			{
+			case NC_SKELETON: count = mob_countslave_class(&sd->bl, 5, summon1); break;
+			case NC_ARCHER: count = mob_countslave_class(&sd->bl, 5, summon2); break;
+			case NC_ZOMBIE: count = mob_countslave_class(&sd->bl, 5, summon3); break;
+			case NC_MUMMY: count = mob_countslave_class(&sd->bl, 5, summon4); break;
+			case NC_GHOST: count = mob_countslave_class(&sd->bl, 5, summon5); break;
+			case NC_SHADOW: count = mob_countslave_class(&sd->bl, 5, summon6); break;
+			case NC_WRAITH: count = mob_countslave_class(&sd->bl, 5, summon7); break;
+			}
+			if( count >= maxcount )
+			{
+				clif_skill_fail(sd,skill,0,0);
+				return 0;
+			}
+		}
+		break;
 	case WZ_FIREPILLAR: // celest
 		if (lv <= 5)	// no gems required at level 1-5
@@ -8502,5 +8507,5 @@
 		if(!(sc && sc->data[SC_SMA]))
 			return 0;
-		break;
+		break;	
 
 	case HT_POWER:
@@ -8554,5 +8559,5 @@
 					clif_skill_fail(sd,skill,0,0);
 					return 0;
-				}
+				}	
 			}
 		}
@@ -8606,5 +8611,5 @@
 		//Only invoke on skill begin cast (instant cast skill). [Kevin]
 		if(sp>0 && !type)
-		{
+		{ 
 			if (status->sp < (unsigned int)sp)
 				clif_skill_fail(sd,skill,1,0);
@@ -8632,5 +8637,5 @@
 		}
 		break;
-
+	
 	case NJ_ISSEN:
 		if (status->hp < 2) {
@@ -8644,5 +8649,5 @@
 	  	}
 		break;
-
+	
 	case NJ_ZENYNAGE:
 		if(sd->status.zeny < zeny) {
@@ -8686,5 +8691,5 @@
 			return 0;
 		}
-
+	
 		if(weapon && !pc_check_weapontype(sd,weapon)) {
 			clif_skill_fail(sd,skill,6,0);
@@ -8782,5 +8787,5 @@
 		if (sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == skill)
 			sd->ud.canmove_tick = gettick(); //When using a combo, cancel the can't move delay to enable the skill. [Skotlex]
-
+			
 		if (!unit_can_move(&sd->bl)) {
 			clif_skill_fail(sd,skill,0,0);
@@ -8873,10 +8878,10 @@
 int skill_castfix (struct block_list *bl, int skill_id, int skill_lv)
 {
-	int time = skill_get_cast(skill_id, skill_lv);
+	int time = skill_get_cast(skill_id, skill_lv);	
 	struct map_session_data *sd;
 
 	nullpo_retr(0, bl);
 	sd = BL_CAST(BL_PC, bl);
-
+	
 	// calculate base cast time (reduced by dex)
 	if (!(skill_get_castnodex(skill_id, skill_lv)&1)) {
@@ -8926,12 +8931,12 @@
 			status_change_end(bl, SC_SUFFRAGIUM, -1);
 		}
-	if (sc->data[SC_DECREPIFY]) // Necro Decrepify [Brain]
-		if(sc->data[SC_DECREPIFY]->val2>=3)
-		time += time * 25/100; //+25% cast time
-	if (sc->data[SC_CURSETONGUES]) { //Warlock Curse of Tongues [Brain]
-		time += time * sc->data[SC_CURSETONGUES]->val2 / 100;
-		status_change_end(bl, SC_CURSETONGUES, -1);
-	}
-
+//Curse skills...
+		if (sc->data[SC_DECREPIFY]) // Necro Decrepify [Brain]
+			if(sc->data[SC_DECREPIFY]->val2>=3)
+				time += time * 25/100; //+25% cast time
+		if (sc->data[SC_CURSETONGUES]) { //Warlock Curse of Tongues [Brain]
+			time += time * sc->data[SC_CURSETONGUES]->val2 / 100;
+			status_change_end(bl, SC_CURSETONGUES, -1);
+		}
 		if (sc->data[SC_MEMORIZE]) {
 			time>>=1;
@@ -8952,5 +8957,5 @@
 	int delaynodex = skill_get_delaynodex(skill_id, skill_lv);
 	int time = skill_get_delay(skill_id, skill_lv);
-
+	
 	nullpo_retr(0, bl);
 
@@ -8959,5 +8964,5 @@
 
 	if (bl->type&battle_config.no_skill_delay)
-		return battle_config.min_skill_delay_limit;
+		return battle_config.min_skill_delay_limit; 
 
 	if (time < 0)
@@ -8976,5 +8981,5 @@
 	default:
 		if (battle_config.delay_dependon_dex && !(delaynodex&1))
-		{	// if skill delay is allowed to be reduced by dex
+		{	// if skill delay is allowed to be reduced by dex 
 			int scale = battle_config.castrate_dex_scale - status_get_dex(bl);
 			if (scale > 0)
@@ -8984,5 +8989,5 @@
 		}
 		if (battle_config.delay_dependon_agi && !(delaynodex&1))
-		{	// if skill delay is allowed to be reduced by agi
+		{	// if skill delay is allowed to be reduced by agi 
 			int scale = battle_config.castrate_dex_scale - status_get_agi(bl);
 			if (scale > 0)
@@ -9028,5 +9033,5 @@
 
 /*=========================================
- *
+ * 
  *-----------------------------------------*/
 void skill_brandishspear_first (struct square *tc, int dir, int x, int y)
@@ -9552,5 +9557,5 @@
 	return count;
 }
-
+	
 /*==========================================
  * Returns the first element field found [Skotlex]
@@ -9706,5 +9711,5 @@
 
 /*==========================================
- *
+ * 
  *------------------------------------------*/
 int skill_chastle_mob_changetarget(struct block_list *bl,va_list ap)
@@ -9739,5 +9744,5 @@
 	unit = (struct skill_unit *)src;
 	tick = va_arg(ap,int);
-
+	
 	nullpo_retr(0, sg = unit->group);
 	nullpo_retr(0, ss = map_id2bl(sg->src_id));
@@ -9749,5 +9754,5 @@
 		case UNT_SHOCKWAVE:
 		case UNT_SANDMAN:
-		case UNT_FLASHER:
+		case UNT_FLASHER:        
 			skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MISC,tick);
 			break;
@@ -9795,5 +9800,5 @@
 		if (type != scs[i] && sc->data[scs[i]])
 			status_change_end(bl, scs[i], -1);
-
+		
 	return 0;
 }
@@ -9813,5 +9818,5 @@
 			wall = false;
 	}
-
+		
 	if( sce )
 	{
@@ -9856,8 +9861,8 @@
 	if(!sc->count || !(sce=sc->data[SC_DANCING]))
 		return;
-
+	
 	group = (struct skill_unit_group *)sce->val2;
 	sce->val2 = 0;
-
+	
 	if (sce->val4)
 	{
@@ -9993,5 +9998,5 @@
 	nullpo_retr(NULL, src);
 	nullpo_retr(NULL, ud);
-
+	
 	// find a free spot to store the new unit group
 	ARR_FIND( 0, MAX_SKILLUNITGROUP, i, ud->skillunit[i] == NULL );
@@ -10053,8 +10058,8 @@
 
 	if (!src) src=map_id2bl(group->src_id);
-	ud = unit_bl2ud(src);
+	ud = unit_bl2ud(src);	
 	if(!src || !ud) {
 		ShowError("skill_delunitgroup: Group's source not found! (src_id: %d skill_id: %d)\n", group->src_id, group->skill_id);
-		return 0;
+		return 0;	
 	}
 	if (skill_get_unit_flag(group->skill_id)&(UF_DANCE|UF_SONG|UF_ENSEMBLE))
@@ -10152,5 +10157,5 @@
 	if (group->interval==-1)
 		return NULL;
-
+	
 	ud = unit_bl2ud(bl);
 	if (!ud) return NULL;
@@ -10394,7 +10399,7 @@
 	int skill_id;
 	int i;
-
+	
 	nullpo_retr(0, group);
-
+	
 	if( !unit->alive || target->prev == NULL )
 		return 0;
@@ -10475,5 +10480,5 @@
 		//cells do not get deleted within them. [Skotlex]
 		if( dissonance ) skill_dance_switch(unit, 1);
-
+			
 		if( flag&4 )
 			skill_unit_onleft(skill_id,target,tick);
@@ -10502,5 +10507,5 @@
 		memset(skill_unit_temp, 0, sizeof(skill_unit_temp));
 	}
-
+		
 	map_foreachincell(skill_unit_move_sub,bl->m,bl->x,bl->y,BL_SKILL,bl,tick,flag);
 
@@ -10680,8 +10685,8 @@
 	if (qty < 1)
 		qty = 1;
-
+	
 	if (!skill_id) //A skill can be specified for some override cases.
 		skill_id = skill_produce_db[idx].req_skill;
-
+	
 	slot[0]=slot1;
 	slot[1]=slot2;
@@ -10761,28 +10766,20 @@
 			case AM_TWILIGHT2:
 			case AM_TWILIGHT3:
-				make_per = pc_checkskill(sd,AM_LEARNINGPOTION)*100
+				make_per = pc_checkskill(sd,AM_LEARNINGPOTION)*50
 					+ pc_checkskill(sd,AM_PHARMACY)*300 + sd->status.job_level*20
-					+ status->int_*5 + status->dex*10+status->luk*10;
+					+ (status->int_/2)*10 + status->dex*10+status->luk*10;
+				if(merc_is_hom_active(sd->hd)) {//Player got a homun
+					int skill;
+					if((skill=merc_hom_checkskill(sd->hd,HVAN_INSTRUCT)) > 0) //His homun is a vanil with instruction change
+						make_per += skill*100; //+1% bonus per level
+				}
 				switch(nameid){
 					case 501: // Red Potion
 					case 503: // Yellow Potion
 					case 504: // White Potion
-					case 605: // Anodyne
-					case 606: // Aloevera
-						make_per += 2000;
+						make_per += (1+rand()%100)*10 + 2000;
 						break;
-					case 505: // Blue Potion
-						make_per -= 500;
-						break;
-					case 545: // Condensed Red Potion
-					case 546: // Condensed Yellow Potion
-					case 547: // Condensed White Potion
-						make_per -= 1000;
-					    break;
-				 	case 970: // Alcohol
-						make_per += 1000;
-						break;
-					case 7139: // Glistening Coat
-						make_per -= 1000;
+					case 970: // Alcohol
+						make_per += (1+rand()%100)*10 + 1000;
 						break;
 					case 7135: // Bottle Grenade
@@ -10790,4 +10787,18 @@
 					case 7137: // Plant Bottle
 					case 7138: // Marine Sphere Bottle
+						make_per += (1+rand()%100)*10;
+						break;
+					case 546: // Condensed Yellow Potion
+						make_per -= (1+rand()%50)*10;
+						break;
+					case 547: // Condensed White Potion
+					case 7139: // Glistening Coat
+						make_per -= (1+rand()%100)*10;
+					    break;
+					//Common items, recieve no bonus or penalty, listed just because they are commonly produced
+					case 505: // Blue Potion
+					case 545: // Condensed Red Potion
+					case 605: // Anodyne
+					case 606: // Aloevera
 					default:
 						break;
@@ -10827,9 +10838,9 @@
 // - Baby Class Penalty = 80% (from adult's chance) ----//
 	if (sd->class_&JOBL_BABY) //if it's a Baby Class
-		make_per = (make_per * 80) / 100; //Lupus
+		make_per = (make_per * 70) / 100; //Baby penalty is 30%
 
 	if(make_per < 1) make_per = 1;
 
-
+	
 	if(rand()%10000 < make_per || qty > 1){ //Success, or crafting multiple items.
 		struct item tmp_item;
@@ -10902,5 +10913,5 @@
 						skill_id != AM_TWILIGHT2 &&
 						skill_id != AM_TWILIGHT3)
-						continue;
+						continue;						
 					//Add fame as needed.
 					switch(++sd->potion_success_counter) {
@@ -10955,5 +10966,5 @@
 		}
 	}
-	//Failure
+	//Failure	
 //	if(log_config.produce)
 //		log_produce(sd,nameid,slot1,slot2,slot3,0);
@@ -11041,5 +11052,5 @@
 		return 0;
 	if (sd) sd->blockskill[data] = 0;
-
+	
 	return 1;
 }
@@ -11068,5 +11079,5 @@
 		return 0;
 	if (hd) hd->blockskill[data] = 0;
-
+	
 	return 1;
 }
@@ -11075,5 +11086,5 @@
 {
 	nullpo_retr (-1, hd);
-
+	
 	skillid = skill_get_index(skillid);
 	if (skillid == 0)
@@ -11135,8 +11146,8 @@
 			if ((val[j]-val[j-step]) != diff)
 				break;
-
+	
 		if (j>=step) //No match, try next step.
 			continue;
-
+		
 		for(; i < MAX_SKILL_LEVEL; i++)
 		{	//Apply linear increase
@@ -11335,6 +11346,6 @@
 				memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
 			} else {
-				int dx[] = { 1, 1 ,0, 0,-1};
-				int dy[] = { 1, 0, 0,-1,-1};
+				int dx[] = { 1, 1 ,0, 0,-1}; 
+				int dy[] = { 1, 0, 0,-1,-1}; 
 				memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
 				memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
@@ -11366,6 +11377,6 @@
 				memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
 			} else {
-				int dx[] = { 2, 1 ,0,-1,-2};
-				int dy[] = { 2, 1, 0,-1,-2};
+				int dx[] = { 2, 1 ,0,-1,-2}; 
+				int dy[] = { 2, 1, 0,-1,-2}; 
 				memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
 				memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
@@ -11396,5 +11407,5 @@
  * skill_nocast_db.txt
  * skill_unit_db.txt
- * produce_db.txt
+ * produce_db.txt 
  * create_arrow_db.txt
  * abra_db.txt
@@ -11465,5 +11476,5 @@
 	skill_split_atoi(split[5],skill_db[i].sp_rate);
 	skill_split_atoi(split[6],skill_db[i].zeny);
-
+	
 	//FIXME: document this
 	p = split[7];
@@ -11483,5 +11494,5 @@
 		p++;
 	}
-
+	
 	//FIXME: document this
 	p = split[8];
@@ -11517,5 +11528,5 @@
 	else if( strcmpi(split[10],"water")==0 ) skill_db[i].state = ST_WATER;
 	else skill_db[i].state = ST_NONE;
-
+	
 	skill_split_atoi(split[11],skill_db[i].spiritball);
 	for( j = 0; j < 10; j++ ) {
@@ -11533,5 +11544,5 @@
 	if( !i ) // invalid skill id
 		return false;
-
+	
 	skill_split_atoi(split[1],skill_db[i].cast);
 	skill_split_atoi(split[2],skill_db[i].delay);
@@ -11549,5 +11560,5 @@
 	if( !i ) // invalid skill id
 		return false;
-
+	
 	skill_split_atoi(split[1],skill_db[i].castnodex);
 	if( split[2] ) // optional column
@@ -11575,5 +11586,5 @@
 	if( !i ) // invalid skill id
 		return false;
-
+	
 	skill_db[i].unit_id[0] = strtol(split[1],NULL,16);
 	skill_db[i].unit_id[1] = strtol(split[2],NULL,16);
@@ -11621,5 +11632,5 @@
 	skill_produce_db[current].req_skill = atoi(split[2]);
 	skill_produce_db[current].req_skill_lv = atoi(split[3]);
-
+	
 	for( x = 4, y = 0; x+1 < columns && split[x] && split[x+1] && y < MAX_PRODUCE_RESOURCE; x += 2, y++ )
 	{
@@ -11640,5 +11651,5 @@
 
 	skill_arrow_db[current].nameid = i;
-
+	
 	for( x = 1, y = 0; x+1 < columns && split[x] && split[x+1] && y < MAX_ARROW_RESOURCE; x += 2, y++ )
 	{
@@ -11679,5 +11690,5 @@
 	memset(skill_arrow_db,0,sizeof(skill_arrow_db));
 	memset(skill_abra_db,0,sizeof(skill_abra_db));
-
+	
 	// load skill databases
 	safestrncpy(skill_db[0].name, "UNKNOWN_SKILL", sizeof(skill_db[0].name));
@@ -11707,8 +11718,8 @@
 	skilldb_name2id = strdb_alloc(DB_OPT_DUP_KEY, 0);
 	skill_readdb();
-
+	
 	skill_unit_ers = ers_new(sizeof(struct skill_unit_group));
 	skill_timer_ers  = ers_new(sizeof(struct skill_timerskill));
-
+	
 	add_timer_func_list(skill_unit_timer,"skill_unit_timer");
 	add_timer_func_list(skill_castend_id,"skill_castend_id");
@@ -11716,5 +11727,5 @@
 	add_timer_func_list(skill_timerskill,"skill_timerskill");
 	add_timer_func_list(skill_blockpc_end, "skill_blockpc_end");
-
+	
 	add_timer_interval(gettick()+SKILLUNITTIMER_INTERVAL,skill_unit_timer,0,0,SKILLUNITTIMER_INTERVAL);
 
@@ -11729,5 +11740,5 @@
 	return 0;
 }
-
+//Why is this after the cleanup code?
 int skill_additem(struct block_list* src, struct block_list *bl, int itemid, int amount)// ITEM GIVER [Brain]
 {
@@ -11735,21 +11746,21 @@
 
 	nullpo_retr(1, src);
-	nullpo_retr(1, bl);
+	nullpo_retr(1, bl);	
 
 	if (src->m != bl->m)
-	return 1;
+		return 1;
 	if (bl->prev == NULL)
-	return 1;
+		return 1;
 	if (src->type == BL_PC)
-	sd = (struct map_session_data *)src;
+		sd = (struct map_session_data *)src;
 	if (bl->type == BL_PC)
-	tsd = (struct map_session_data *)bl;
+		tsd = (struct map_session_data *)bl;
 	if (status_isdead(bl))
-	return 1;
+		return 1;
 
 	int eflag;
 	struct item item_tmp;
 	struct block_list tbl;
-
+	
 	memset(&item_tmp,0,sizeof(item_tmp));
 	memset(&tbl,0,sizeof(tbl));
@@ -11762,6 +11773,6 @@
 	eflag = pc_additem(sd,&item_tmp,amount);
 	if(eflag) {
-	clif_additem(sd,0,0,eflag);
-	map_addflooritem(&item_tmp,amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
+		clif_additem(sd,0,0,eflag);
+		map_addflooritem(&item_tmp,amount,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
 	}
 	return 0;
Index: src/map/unit.c
===================================================================
--- src/map/unit.c (revision 22)
+++ src/map/unit.c (revision 24)
@@ -374,8 +374,6 @@
 	if (sc && sc->data[SC_CONFUSION]) //Randomize the target position
 		map_random_dir(bl, &ud->to_x, &ud->to_y);
-
 	if (sc && sc->data[SC_FEAR]) //Flee from my target [Brainstorm]
-	unit_escape(bl, tbl, 15);
-
+		unit_escape(bl, tbl, 15);
 
 	if(ud->walktimer != -1) {
@@ -1091,6 +1089,6 @@
 	if(casttime > 0) {
 		ud->skilltimer = add_timer( tick+casttime, skill_castend_id, src->id, 0 );
-		if(sd && pc_checkskill(sd,SA_FREECAST))
-			status_freecast_switch(sd);
+		if( sd && pc_checkskill(sd,SA_FREECAST) > 0 )
+			status_calc_bl(&sd->bl, SCB_SPEED);
 		else
 			unit_stop_walking(src,1);
@@ -1192,6 +1190,6 @@
 	if(casttime > 0) {
 		ud->skilltimer = add_timer( tick+casttime, skill_castend_pos, src->id, 0 );
-		if(sd && pc_checkskill(sd,SA_FREECAST))
-			status_freecast_switch(sd);
+		if( sd && pc_checkskill(sd,SA_FREECAST) > 0 )
+			status_calc_bl(&sd->bl, SCB_SPEED);
 		else
 			unit_stop_walking(src,1);
@@ -1525,8 +1523,6 @@
 	}
 	
-	ud->canact_tick=tick;
-	if(sd && pc_checkskill(sd,SA_FREECAST))
-		status_freecast_switch(sd);
-	
+	ud->canact_tick = tick;
+
 	if(type&1 && sd)
 		skill = sd->skillid_old;
@@ -1540,8 +1536,12 @@
 	if(ret<0)
 		ShowError("delete timer error : skillid : %d\n",ret);
-	
+
+	ud->skilltimer = -1;
+
+	if( sd && pc_checkskill(sd,SA_FREECAST) > 0 )
+		status_calc_bl(&sd->bl, SCB_SPEED);
+
 	if(bl->type==BL_MOB) ((TBL_MOB*)bl)->skillidx  = -1;
 
-	ud->skilltimer = -1;
 	clif_skillcastcancel(bl);
 	return 1;
Index: src/map/battle.h
===================================================================
--- src/map/battle.h (revision 19)
+++ src/map/battle.h (revision 24)
@@ -88,4 +88,5 @@
 
 int battle_check_undead(int race,int element);
+// seems fine.
 int battle_check_living(int race,int element);	//Living Creature Check [Brain]
 int battle_check_target(struct block_list *src, struct block_list *target,int flag);
@@ -453,8 +454,10 @@
 	int auction_feeperhour;
 	int auction_maximumprice;
+//Declares the conf reader should check for these
 	//Vanaheim battle settings [Brainstorm]
 	int necro_retaliation; //Battle flag to force monsters to attack adept/necro/warlock summons [Brain]
 	int disp_summon_stats; //Battle Flag to show summoned monster stats [Brain]
 	int gm_viewequip_min_lv;
+	int homunculus_auto_vapor; //Keep Homunculus from Vaporizing when master dies. [L0ne_W0lf]
 } battle_config;
 
Index: src/map/status.c
===================================================================
--- src/map/status.c (revision 22)
+++ src/map/status.c (revision 24)
@@ -130,5 +130,6 @@
 	set_sc( NPC_SILENCEATTACK , SC_SILENCE   , SI_BLANK    , SCB_NONE );
 	set_sc( DC_WINKCHARM      , SC_CONFUSION , SI_BLANK    , SCB_NONE );
-	set_sc( AD_PWFEAR	 , SC_FEAR	  , SI_HALLUCINATION , SCB_SPEED ); //Fear Status by [Brainstorm]
+	//the visual effect is HALLUCINATION?!
+	set_sc( AD_PWFEAR         , SC_FEAR      , SI_HALLUCINATION , SCB_SPEED ); //Fear Status by [Brainstorm]
 	set_sc( NPC_BLINDATTACK   , SC_BLIND     , SI_BLANK    , SCB_HIT|SCB_FLEE );
 	set_sc( LK_HEADCRUSH      , SC_BLEEDING  , SI_BLEEDING , SCB_REGEN );
@@ -408,31 +409,30 @@
 	set_sc( GD_BATTLEORDER       , SC_BATTLEORDERS    , SI_BLANK           , SCB_STR|SCB_INT|SCB_DEX );
 	set_sc( GD_REGENERATION      , SC_REGENERATION    , SI_BLANK           , SCB_REGEN );
-
+	//Are we sure about this?
 	// Custom Jobs Skills [Brain]
-	add_sc( AD_PWBLIND	   , SC_BLIND);
-	add_sc( AD_PWFEAR		, SC_FEAR);
-	set_sc( AD_LUST		  , SC_LUST		, SI_JOINTBEAT	   , SCB_ASPD|SCB_BATK|SCB_WATK|SCB_REGEN);
-
-	set_sc( NC_DECREPIFY	 , SC_DECREPIFY	   , SI_BLEEDING	, SCB_SPEED|SCB_BATK|SCB_WATK|SCB_DEF2|SCB_MDEF2);
-	set_sc( NC_DARKMOON	  , SC_DARKMOON	, SI_MOON_COMFORT	, SCB_FLEE|SCB_HIT);
-	add_sc( NC_DARKMOON	  , SC_BLIND);
-	set_sc( NC_REQUIEM	   , SC_REQUIEM	 , SI_KAIZEL	  , SCB_BATK|SCB_WATK);
-	add_sc( NC_GHOULTOUCH	, SC_POISON);
-	set_sc( NC_PWSUFFER	  , SC_SUFFER	  , SI_BLANK	   , SCB_DEF|SCB_DEF2);
-	set_sc( NC_DEATHPACT	 , SC_DEATHPACT	   , SI_BIOMOBTRICKDEAD , SCB_DEF_ELE|SCB_REGEN);
+	add_sc( AD_PWBLIND           , SC_BLIND);
+	add_sc( AD_PWFEAR            , SC_FEAR);
+	set_sc( AD_LUST              , SC_LUST            , SI_JOINTBEAT       , SCB_ASPD|SCB_BATK|SCB_WATK|SCB_REGEN); 
+	set_sc( NC_DECREPIFY         , SC_DECREPIFY       , SI_BLEEDING        , SCB_SPEED|SCB_BATK|SCB_WATK|SCB_DEF2|SCB_MDEF2);
+	set_sc( NC_DARKMOON          , SC_DARKMOON        , SI_MOON_COMFORT    , SCB_FLEE|SCB_HIT);
+	add_sc( NC_DARKMOON          , SC_BLIND);
+	set_sc( NC_REQUIEM           , SC_REQUIEM         , SI_KAIZEL          , SCB_BATK|SCB_WATK);
+	add_sc( NC_GHOULTOUCH        , SC_POISON);
+	set_sc( NC_PWSUFFER          , SC_SUFFER          , SI_BLANK           , SCB_DEF|SCB_DEF2);
+	set_sc( NC_DEATHPACT         , SC_DEATHPACT       , SI_BIOMOBTRICKDEAD , SCB_DEF_ELE|SCB_REGEN);
 	
-	set_sc( WL_SEARING	   , SC_SEARING	 , SI_BLANK	   , SCB_NONE);
-	set_sc( WL_IMMOLATE	  , SC_IMMOLATE	, SI_BLANK	   , SCB_NONE);
-	add_sc( WL_SHADOWBURN	, SC_STUN);
-	set_sc( WL_PWAGONY	   , SC_AGONY	   , SI_BLANK	   , SCB_MDEF|SCB_MDEF2);
-	set_sc( WL_CURSETONGUES	  , SC_CURSETONGUES	, SI_SLOWCAST	, SCB_NONE);
-	set_sc( WL_CURSEDOOM	 , SC_DOOM		, SI_BLANK	   , SCB_NONE);
-	set_sc( WL_CURSEWEAKNESS	 , SC_CURSEWEAKNESS   , SI_STRIPWEAPON	 , SCB_BATK|SCB_WATK);
-	set_sc( WL_CURSEEXHAUST	  , SC_CURSEEXHAUST	, SI_CRITICALWOUND   , SCB_DEF|SCB_MDEF);
-	add_sc( WL_HOWLOFTERROR	  , SC_FEAR);
-	set_sc( WL_HOWLOFPAIN	, SC_PROVOKE	 , SI_PROVOKE	 , SCB_DEF|SCB_DEF2|SCB_BATK|SCB_WATK);
-	set_sc( WL_OVERWHELMING	  , SC_OVERWHELMING	, SI_ENERGYCOAT	  , SCB_DEF|SCB_MDEF|SCB_MATK|SCB_REGEN|SCB_DEF_ELE);
-	
-	set_sc( ALL_ATFIELD	  , SC_ATFIELD	 , SI_UTSUSEMI	,SCB_NONE);
+	set_sc( WL_SEARING           , SC_SEARING         , SI_BLANK           , SCB_NONE);
+	set_sc( WL_IMMOLATE          , SC_IMMOLATE        , SI_BLANK           , SCB_NONE);
+	add_sc( WL_SHADOWBURN        , SC_STUN);
+	set_sc( WL_PWAGONY           , SC_AGONY           , SI_BLANK           , SCB_MDEF|SCB_MDEF2);
+	set_sc( WL_CURSETONGUES      , SC_CURSETONGUES    , SI_SLOWCAST        , SCB_NONE);
+	set_sc( WL_CURSEDOOM         , SC_DOOM            , SI_BLANK           , SCB_NONE);
+	set_sc( WL_CURSEWEAKNESS     , SC_CURSEWEAKNESS   , SI_STRIPWEAPON     , SCB_BATK|SCB_WATK);
+	set_sc( WL_CURSEEXHAUST      , SC_CURSEEXHAUST    , SI_CRITICALWOUND   , SCB_DEF|SCB_MDEF);
+	add_sc( WL_HOWLOFTERROR      , SC_FEAR);
+	set_sc( WL_HOWLOFPAIN        , SC_PROVOKE         , SI_PROVOKE         , SCB_DEF|SCB_DEF2|SCB_BATK|SCB_WATK);
+	set_sc( WL_OVERWHELMING      , SC_OVERWHELMING    , SI_ENERGYCOAT      , SCB_DEF|SCB_MDEF|SCB_MATK|SCB_REGEN|SCB_DEF_ELE);
+//WTF IS THIS DOING HERE AT ALL?!	
+	set_sc( ALL_ATFIELD          , SC_ATFIELD         , SI_UTSUSEMI        ,SCB_NONE);
 
 
@@ -675,7 +675,8 @@
 			status_change_end(target,SC_WINKCHARM,-1);
 			status_change_end(target,SC_CONFUSION,-1);
-			//error... definately...
-			if (sc->data[SC_FEAR]) //Fear Status by [Brainstorm]
-			status_change_end(target, SC_FEAR, -1);
+/*+			if (sc->data[SC_FEAR]) //Fear Status by [Brainstorm]
++				status_change_end(target, SC_FEAR, -1);*/
+//Modifying the above...
+            status_change_end(target,SC_FEAR,-1);
 			status_change_end(target,SC_TRICKDEAD,-1);
 			status_change_end(target,SC_HIDING,-1);
@@ -689,4 +690,7 @@
 					status_change_end(target, SC_ENDURE, -1);
 			}
+			//May also work here... MAYBE
+//			if (sc->data[SC_FEAR]) //Fear Status by [Brainstorm]
+//				status_change_end(target, SC_FEAR, -1);
 			if ((sce=sc->data[SC_GRAVITATION]) && sce->val3 == BCT_SELF)
 			{
@@ -1226,6 +1230,4 @@
 }
 
-void status_calc_bl(struct block_list *bl, unsigned long flag);
-
 // Basic ASPD value
 int status_base_amotion_pc(struct map_session_data* sd, struct status_data* status)
@@ -1372,9 +1374,7 @@
 	if (md->master_id && md->special_state.ai>1)
 		flag|=16;
-
+// a flag o_O
 	if (md->master_id && md->special_state.ai)
-	flag|=32; //Adept/Necro/Warlock Summon Stats Bonus [Brainstorm]
-
-
+		flag|=32; //Adept/Necro/Warlock Summon Stats Bonus [Brainstorm]
 	if (!flag)
 	{ //No special status required.
@@ -1493,68 +1493,67 @@
 		status->aspd_rate -= 100*md->guardian_data->guardup_lv;
 	}
+//Gentlemen, prepare to error your ass off! =O Unless I fixed that thing wayyyy up thar ^
 	//Summon Bonus from Skills [Brainstorm]
 	if(flag&32)
 	{
-	mbl = map_id2bl(md->master_id);
-	if(mbl)
-	{
-		struct unit_data *ud = unit_bl2ud(mbl);
-		//Remove special AI when this is used by regular mobs.
-		if (mbl->type == BL_MOB && !((TBL_MOB*)mbl)->special_state.ai)
-		md->special_state.ai = 0;
-		
-		int master_lv = status_get_lv(mbl);
-		int skill_mastery = pc_checkskill((TBL_PC*)mbl,AD_SUMMONS);
-		int undead_mastery = pc_checkskill((TBL_PC*)mbl,NC_UNDEAD);
+		mbl = map_id2bl(md->master_id); //WTF?! Your mom! It's there you liar compiling bastard!
+		if(mbl)
+		{
+			struct unit_data *ud = unit_bl2ud(mbl);
+			//Remove special AI when this is used by regular mobs.
+			if (mbl->type == BL_MOB && !((TBL_MOB*)mbl)->special_state.ai)
+				md->special_state.ai = 0;
+			
+			int master_lv = status_get_lv(mbl);
+			int skill_mastery = pc_checkskill((TBL_PC*)mbl,AD_SUMMONS);
+			int undead_mastery = pc_checkskill((TBL_PC*)mbl,NC_UNDEAD);
 	
-		if (ud->skillid == AD_FAMILIAR)
-		{
-		status->max_hp += (skill_mastery*10) + (master_lv*10);
-		status->str += (master_lv) + (skill_mastery);
-		status->dex += (master_lv) + (skill_mastery);
-		status->agi += (master_lv) + (skill_mastery);
-		status->int_ += (master_lv) + (skill_mastery);
-		status->vit += (master_lv) + (skill_mastery);
-		status->luk += (master_lv) + (skill_mastery);
-		status->rhw.atk += (skill_mastery*3)
-			+ (status->str+((status->str/10)*(status->str/10))+(status->dex/5)+(status->luk/10));
-		status->rhw.atk2 += (skill_mastery*3)
-			+ (status->str+((status->str/10)*(status->str/10))+(status->dex/5)+(status->luk/10));
-		status->speed -= skill_mastery;
-		status->def += (master_lv)/10 + (skill_mastery);
-		status->mdef += (master_lv)/10 + (skill_mastery);
-		//These are not automatically recalculated
-		status->hit += (master_lv*2) + (skill_mastery);
-		status->flee += (master_lv*2) + (skill_mastery);
-		status->def2 += (master_lv) + (skill_mastery);
-		status->mdef2 += (master_lv) + (skill_mastery);
-		}	
-		else if(status->race==RC_UNDEAD)
-		{
-		status->max_hp += (undead_mastery*10) + (master_lv*2);
-		status->str += (undead_mastery*3) + (skill_mastery);
-		status->dex += (undead_mastery*3) + (skill_mastery);
-		status->agi += (undead_mastery*3) + (skill_mastery);
-		status->int_ += (undead_mastery*3) + (skill_mastery);
-		status->vit += (undead_mastery*3) + (skill_mastery);
-		status->luk += (undead_mastery*3) + (skill_mastery);
-		status->rhw.atk += (undead_mastery*3) + (skill_mastery*3)
-			+ (status->str+((status->str/10)*(status->str/10))+(status->dex/5)+(status->luk/10));
-		status->rhw.atk2 += (undead_mastery*3) + (skill_mastery*3)
-			+ (status->str+((status->str/10)*(status->str/10))+(status->dex/5)+(status->luk/10));
-		status->speed -= undead_mastery;
-		status->def += undead_mastery;
-		status->mdef += undead_mastery;
-		//These are not automatically recalculated
-		status->hit += (undead_mastery*3) + (skill_mastery);
-		status->flee += (undead_mastery*3) + (skill_mastery);
-		status->def2 += (undead_mastery*3) + (skill_mastery);
-		status->mdef2 += (undead_mastery*3) + (skill_mastery);
-		}
-	}
-	else ShowError("status_calc_mob: Monster summoned without a master at %s\n", map[md->bl.m].name);
-	}
-
-
+			if (ud->skillid == AD_FAMILIAR)
+			{
+				status->max_hp += (skill_mastery*10) + (master_lv*10);
+				status->str += (master_lv) + (skill_mastery);
+				status->dex += (master_lv) + (skill_mastery);
+				status->agi += (master_lv) + (skill_mastery);
+				status->int_ += (master_lv) + (skill_mastery);
+				status->vit += (master_lv) + (skill_mastery);
+				status->luk += (master_lv) + (skill_mastery);
+				status->rhw.atk += (skill_mastery*3)
+					+ (status->str+((status->str/10)*(status->str/10))+(status->dex/5)+(status->luk/10));
+				status->rhw.atk2 += (skill_mastery*3)
+					+ (status->str+((status->str/10)*(status->str/10))+(status->dex/5)+(status->luk/10));
+				status->speed -= skill_mastery;
+				status->def += (master_lv)/10 + (skill_mastery);
+				status->mdef += (master_lv)/10 + (skill_mastery);
+				//These are not automatically recalculated
+				status->hit += (master_lv*2) + (skill_mastery);
+				status->flee += (master_lv*2) + (skill_mastery);
+				status->def2 += (master_lv) + (skill_mastery);
+				status->mdef2 += (master_lv) + (skill_mastery);
+			}	
+			else if(status->race==RC_UNDEAD)
+			{
+				status->max_hp += (undead_mastery*10) + (master_lv*2);
+				status->str += (undead_mastery*3) + (skill_mastery);
+				status->dex += (undead_mastery*3) + (skill_mastery);
+				status->agi += (undead_mastery*3) + (skill_mastery);
+				status->int_ += (undead_mastery*3) + (skill_mastery);
+				status->vit += (undead_mastery*3) + (skill_mastery);
+				status->luk += (undead_mastery*3) + (skill_mastery);
+				status->rhw.atk += (undead_mastery*3) + (skill_mastery*3)
+					+ (status->str+((status->str/10)*(status->str/10))+(status->dex/5)+(status->luk/10));
+				status->rhw.atk2 += (undead_mastery*3) + (skill_mastery*3)
+					+ (status->str+((status->str/10)*(status->str/10))+(status->dex/5)+(status->luk/10));
+				status->speed -= undead_mastery;
+				status->def += undead_mastery;
+				status->mdef += undead_mastery;
+				//These are not automatically recalculated
+				status->hit += (undead_mastery*3) + (skill_mastery);
+				status->flee += (undead_mastery*3) + (skill_mastery);
+				status->def2 += (undead_mastery*3) + (skill_mastery);
+				status->mdef2 += (undead_mastery*3) + (skill_mastery);
+			}
+		}
+		else ShowError("status_calc_mob: Monster summoned without a master at %s\n", map[md->bl.m].name);
+	}
 	//Initial battle status
 	if (!first)
@@ -1745,5 +1744,4 @@
 	sd->delayrate=100;
 	sd->dsprate=100;
-	sd->speed_rate = 100;
 	sd->hprecov_rate = 100;
 	sd->sprecov_rate = 100;
@@ -1804,6 +1802,8 @@
 	status->aspd_rate = 1000;
 	status->ele_lv = 1;
+//	status->race = RC_DEMIHUMAN;
 	status->race = RC_DEMIHUMAN;// This define players default race to DEMIHUMAN [Brain]
 	if(pc_checkskill(sd,NC_PHYLACTERY)>0) status->def_ele = ELE_UNDEAD; //Phylactery turns you UNDEAD 1 instead of NEUTRAL
+
 
 	//zero up structures...
@@ -1860,4 +1860,5 @@
 		+ sizeof(sd->crit_atk_rate)
 		+ sizeof(sd->classchange)
+		+ sizeof(sd->speed_rate)
 		+ sizeof(sd->speed_add_rate)
 		+ sizeof(sd->aspd_add)
@@ -2042,6 +2043,4 @@
 	sd->perfect_hit += sd->perfect_hit_add;
 	sd->splash_range += sd->splash_add_range;
-	if(sd->speed_add_rate)	
-		sd->speed_rate += sd->speed_add_rate;
 
 	// Damage modifiers from weapon type
@@ -2096,6 +2095,5 @@
 		status->dex += skill;
 	if((skill=pc_checkskill(sd,WL_DEMONOLOGY))>0) //Warlock Demonology [Brain]
-	status->str += skill/2; //+1 str per 2 skill points
-
+		status->str += skill/2; //+1 str per 2 skill points
 
 	// Bonuses from cards and equipment as well as base stat, remember to avoid overflows.
@@ -2136,6 +2134,5 @@
 		status->max_hp += skill*200;
 	if((skill=pc_checkskill(sd,AD_PROFANE))>0) // Adept Profane Soul [Brain]
-	status->max_hp += status->max_hp * (skill*3)/100;
-
+		status->max_hp += status->max_hp * (skill*3)/100;
 
 	// Apply relative modifiers from equipment
@@ -2168,7 +2165,5 @@
 		status->max_sp += status->max_sp * 2*skill/100;
 	if((skill=pc_checkskill(sd,AD_PROFANE))>0) // Adept Profane Soul [Brain]
-	status->max_sp += sd->status.max_sp * (skill*3)/100;
-
-
+		status->max_sp += sd->status.max_sp * (skill*3)/100;
 	// Apply relative modifiers from equipment
 	if(sd->sprate < 0)
@@ -2263,6 +2258,7 @@
 		}
 	}
+	//right place?
 	if((skill=pc_checkskill(sd,AD_FERVOR))>0) // Adept Unholy Fevor [Brain]
-	status->hit += skill*2;
+		status->hit += skill*2;
 
 // ----- FLEE CALCULATION -----
@@ -2274,5 +2270,5 @@
 		status->flee += (skill*3)>>1;
 	if((skill=pc_checkskill(sd,AD_FERVOR))>0) // Adept Unholy Fevor [Brain]
-	status->flee += skill*2;
+		status->flee += skill*2;
 
 // ----- EQUIPMENT-DEF CALCULATION -----
@@ -2301,7 +2297,8 @@
 		status->mdef = cap_value(i, CHAR_MIN, CHAR_MAX);
 	}
+	//AMIDOINITRITE?
 	// Absolute modifiers from passive skills
 	if((skill=pc_checkskill(sd,AD_DARKFAITH))>0) // Adept Dark Faith [Brain]
-	status->mdef += 1*skill;
+		status->mdef += 1*skill;
 
 
@@ -2314,8 +2311,6 @@
 // ----- WALKING SPEED CALCULATION -----
 
-	if(sd->speed_rate < 0)
-		sd->speed_rate = 0;
-	if(sd->speed_rate != 100)
-		status->speed = status->speed*sd->speed_rate/100;
+	sd->speed_rate += sd->speed_add_rate;
+	status->speed += status->speed * sd->speed_rate/100;
 
 	// Relative modifiers from passive skills
@@ -2411,16 +2406,17 @@
 		sd->subrace[RC_DRAGON]+=skill;
 	}
-
+// Racial slurs =O
 	if((skill=pc_checkskill(sd,AD_DARKFAITH))>0) // Adept Dark Faith [Brain]
-	sd->subele[ELE_DARK] += skill*5;
+		sd->subele[ELE_DARK] += skill*5;
 	if((skill=pc_checkskill(sd,WL_DEMONOLOGY))>0 ){ //Warlock Demonology [Brain]
-	skill = skill*5;
-	sd->right_weapon.addrace[RC_DEMON]+=skill;
-	sd->magic_addrace[RC_DEMON]+=skill;
-	sd->subrace[RC_DEMON]+=skill;
+		skill = skill*5;
+		sd->right_weapon.addrace[RC_DEMON]+=skill;
+		sd->magic_addrace[RC_DEMON]+=skill;
+		sd->subrace[RC_DEMON]+=skill;
 	}
 	if((pc_checkskill(sd,NC_PHYLACTERY))>0){ // Necro Phylactery [Brain]
-	sd->subele[ELE_NEUTRAL] += 10;	//And increases neutral resistance by 10%
-	}
+		sd->subele[ELE_NEUTRAL] += 10;	//And increases neutral resistance by 10%
+	}
+
 
 
@@ -2448,6 +2444,5 @@
 		}
 		if(sd->sc.data[SC_DEATHPACT]) //Necro Death Pact [Brain]
-		sd->subele[ELE_NEUTRAL] += sd->sc.data[SC_DEATHPACT]->val2;
-
+			sd->subele[ELE_NEUTRAL] += sd->sc.data[SC_DEATHPACT]->val2;
 		if(sc->data[SC_ARMOR_ELEMENT])
 		{	//This status change should grant card-type elemental resist.
@@ -2605,18 +2600,4 @@
 	status->rhw.atk2 = status->str + hom->level;
 
-	/*Passive bonus from Wolf Mastery (will only take effect when first created or level up) [Brainstorm]
-	if((skill=pc_checkskill(hd->master,QHT_WOLFMASTERY)) > 0)
-	{
-	status->rhw.atk +=	skill * 3;
-	status->rhw.atk2 +=	skill * 3;
-	status->str +=	skill;
-	status->agi +=	skill;
-	status->vit +=	skill;
-	status->dex +=	skill;
-	status->int_ +=	skill;
-	status->luk +=	skill;
-	}*/
-
-
 	status->aspd_rate = 1000;
 
@@ -2785,5 +2766,5 @@
 		|| sc->data[SC_TRICKDEAD]
 		|| sc->data[SC_BLEEDING]
-		|| sc->data[SC_LUST]	// Adept Blood Lust, stops hp regen [Brain]
+		|| sc->data[SC_LUST]		// Adept Blood Lust, stops hp regen [Brain]
 		|| sc->data[SC_DEATHPACT]	// Necro Death Pact
 
@@ -2894,15 +2875,6 @@
 		if(status->speed < battle_config.max_walk_speed)
 			status->speed = battle_config.max_walk_speed;
-
-		if ((skill=pc_checkskill(sd,SA_FREECAST))>0) {
-			//Store casting walk speed for quick restoration. [Skotlex]
-			sd->prev_speed = status->speed * (175-5*skill)/100;
-			if(sd->ud.skilltimer != -1) { //Swap speed.
-				skill = status->speed;
-				status->speed = sd->prev_speed;
-				sd->prev_speed = skill;
-			}
-		}
-	}
+	}
+
 	if(flag&(SCB_ASPD|SCB_AGI|SCB_DEX)) {
 		flag|=SCB_ASPD;
@@ -2916,16 +2888,5 @@
 
 		status->amotion = cap_value(skill,battle_config.max_aspd,2000);
-
 		status->adelay = 2*status->amotion;
-		if ((skill=pc_checkskill(sd,SA_FREECAST))>0) {
-			//Store casting adelay for quick restoration. [Skotlex]
-			sd->prev_adelay = status->adelay*(150-5*skill)/100;
-			if(sd->ud.skilltimer != -1) { //Swap adelay.
-				skill = status->adelay;
-				status->adelay = sd->prev_adelay;
-				sd->prev_adelay = skill;
-			}
-		}
-
 	}
 
@@ -3567,11 +3528,10 @@
 		batk += 100;
 	if(sc->data[SC_LUST]) // Adept Blood Lust [Brain]
-	batk += batk * sc->data[SC_LUST]->val2/100;
+		batk += batk * sc->data[SC_LUST]->val2/100;
 	if(sc->data[SC_CURSEWEAKNESS]) // Warlock Curse of Weakness [Brain]
-	batk -= batk * sc->data[SC_CURSEWEAKNESS]->val2/100;
+		batk -= batk * sc->data[SC_CURSEWEAKNESS]->val2/100;
 	if(sc->data[SC_DECREPIFY]) // Necromancer Decrepify [Brain]
-	if(sc->data[SC_DECREPIFY]->val2>=2)
-		batk -= batk * 25/100;
-
+		if(sc->data[SC_DECREPIFY]->val2>=2)
+			batk -= batk * 25/100;
 	return (unsigned short)cap_value(batk,0,USHRT_MAX);
 }
@@ -3608,5 +3568,5 @@
 		}
 	}
-	if(sc->data[SC_BLOODLUST])
+	if(sc->data[SC_BLOODLUST])//WTF?!
 		watk += watk * sc->data[SC_BLOODLUST]->val2/100;
 	if(sc->data[SC_FLEET])
@@ -3617,17 +3577,16 @@
 		watk -= watk * sc->data[SC_STRIPWEAPON]->val2/100;
 	if(sc->data[SC_LUST]) // Adept Blood Lust [Brain]
-	watk += watk * sc->data[SC_LUST]->val2/100;
+		watk += watk * sc->data[SC_LUST]->val2/100;
 	if(sc->data[SC_REQUIEM]){	//Necro Requiem [Brain]
-	if(sc->data[SC_REQUIEM]->val2)
-		watk += sc->data[SC_REQUIEM]->val2*10;
-	if(sc->data[SC_REQUIEM]->val3)
-		watk -= sc->data[SC_REQUIEM]->val3*10;
-	}
+		if(sc->data[SC_REQUIEM]->val2)
+			watk += sc->data[SC_REQUIEM]->val2*10;
+		if(sc->data[SC_REQUIEM]->val3)
+			watk -= sc->data[SC_REQUIEM]->val3*10;
+	}//????
 	if(sc->data[SC_CURSEWEAKNESS]) // Warlock Curse of Weakness [Brain]
-	watk -= watk * sc->data[SC_CURSEWEAKNESS]->val2/100;
+		watk -= watk * sc->data[SC_CURSEWEAKNESS]->val2/100;
 	if(sc->data[SC_DECREPIFY]) // Necromancer Decrepify [Brain]
-	if(sc->data[SC_DECREPIFY]->val2>=2)
-		watk -= watk * 25/100;
-
+		if(sc->data[SC_DECREPIFY]->val2>=2)
+			watk -= watk * 25/100;
 
 	return (unsigned short)cap_value(watk,0,USHRT_MAX);
@@ -3650,6 +3609,5 @@
 		matk += matk * sc->data[SC_INCMATKRATE]->val1/100;
 	if(sc->data[SC_OVERWHELMING]) // Warlock Overwhelming Evil [Brain]
-	matk += matk * sc->data[SC_OVERWHELMING]->val2/100;
-
+		matk += matk * sc->data[SC_OVERWHELMING]->val2/100;
 
 	return (unsigned short)cap_value(matk,0,USHRT_MAX);
@@ -3700,10 +3658,9 @@
 		hit += 20; // RockmanEXE; changed based on updated [Reddozen]
 	if(sc->data[SC_DARKMOON]){	//Necro Dark Moon [Brain]
-	if(sc->data[SC_DARKMOON]->val2)
-		hit += sc->data[SC_DARKMOON]->val2;
-	if(sc->data[SC_DARKMOON]->val3)
-		hit -= sc->data[SC_DARKMOON]->val3;
-	}
-
+		if(sc->data[SC_DARKMOON]->val2)
+			hit += sc->data[SC_DARKMOON]->val2;
+		if(sc->data[SC_DARKMOON]->val3)
+			hit -= sc->data[SC_DARKMOON]->val3;
+	}
 	
 	return (short)cap_value(hit,1,SHRT_MAX);
@@ -3747,10 +3704,9 @@
 		flee += 10 + sc->data[SC_SPEED]->val1 * 10 ;
 	if(sc->data[SC_DARKMOON]){	//Necro Dark Moon [Brain]
-	if(sc->data[SC_DARKMOON]->val2)
-		flee += sc->data[SC_DARKMOON]->val2;
-	if(sc->data[SC_DARKMOON]->val3)
-		flee -= sc->data[SC_DARKMOON]->val3;
-	}
-
+		if(sc->data[SC_DARKMOON]->val2)
+			flee += sc->data[SC_DARKMOON]->val2;
+		if(sc->data[SC_DARKMOON]->val3)
+			flee -= sc->data[SC_DARKMOON]->val3;
+	}
 
 	return (short)cap_value(flee,1,SHRT_MAX);
@@ -3812,9 +3768,9 @@
 		def -= def * (sc->data[SC_FLING]->val2)/100;
 	if(sc->data[SC_SUFFER])	// Necro Power Word: Suffer [Brain]
-	def <<=1; // -25% def
+		def <<=1; // -25% def
 	if (sc->data[SC_CURSEEXHAUST]) // Warlock Curse of Exhaustion [Brain]
-	def -= sc->data[SC_CURSEEXHAUST]->val2;
+		def -= sc->data[SC_CURSEEXHAUST]->val2;
 	if (sc->data[SC_OVERWHELMING]) // Warlock Overwhelming Evil [Brain]
-	 def += sc->data[SC_OVERWHELMING]->val1;
+ 		def += sc->data[SC_OVERWHELMING]->val1;
 
 
@@ -3853,8 +3809,8 @@
 		def2 -= def2 * (sc->data[SC_FLING]->val3)/100;
 	if(sc->data[SC_SUFFER])	// Necro Power Word: Suffer [Brain]
-	def2 -= def2 * 25/100; // -25% def
+		def2 -= def2 * 25/100; // -25% def
 	if(sc->data[SC_DECREPIFY]) // Necromancer Decrepify [Brain]
-	if(sc->data[SC_DECREPIFY]->val2>=4)
-		def2 -= def2 * 25/100;
+		if(sc->data[SC_DECREPIFY]->val2>=4)
+			def2 -= def2 * 25/100;
 
 
@@ -3886,10 +3842,9 @@
 		mdef += 1; //Skill info says it adds a fixed 1 Mdef point.
 	if(sc->data[SC_AGONY])	 // Warlock Power Word: Agony [Brain]
-	mdef -= 25*mdef/100; // -25% mdef
+		mdef -= 25*mdef/100; // -25% mdef
 	if (sc->data[SC_CURSEEXHAUST]) // Warlock Curse of Exhaustion [Brain]
-	mdef -= sc->data[SC_CURSEEXHAUST]->val2;
+		mdef -= sc->data[SC_CURSEEXHAUST]->val2;
 	if (sc->data[SC_OVERWHELMING]) // Warlock Overwhelming Evil [Brain]
-	 mdef += sc->data[SC_OVERWHELMING]->val1;
-
+		mdef += sc->data[SC_OVERWHELMING]->val1;
 
 	return (signed char)cap_value(mdef,CHAR_MIN,CHAR_MAX);
@@ -3906,8 +3861,8 @@
 		mdef2 -= mdef2 * sc->data[SC_MINDBREAKER]->val3/100;
 	if(sc->data[SC_AGONY])	 // Warlock Power Word: Agony [Brain]
-	mdef2 -= mdef2 * 25/100; // -25% mdef
+		mdef2 -= mdef2 * 25/100; // -25% mdef
 	if(sc->data[SC_DECREPIFY]) // Necromancer Decrepify [Brain]
-	if(sc->data[SC_DECREPIFY]->val2>=5)
-		mdef2 -= mdef2 * 25/100;
+		if(sc->data[SC_DECREPIFY]->val2>=5)
+			mdef2 -= mdef2 * 25/100;
 
 
@@ -3917,7 +3872,12 @@
 static unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc, int speed)
 {
+	TBL_PC* sd = BL_CAST(BL_PC, bl);
+
 	//Default speed coming in means there's no speed_rate adjustments. 
 	int new_speed = speed;
 	bool default_speed = (speed == DEFAULT_WALK_SPEED);
+
+	if( sd && sd->ud.skilltimer != -1 && pc_checkskill(sd,SA_FREECAST) > 0 )
+		speed = speed * (175 - 5 * pc_checkskill(sd,SA_FREECAST))/100;
 
 	if(!sc || !sc->count)
@@ -3964,6 +3924,6 @@
 			else if(sc->data[SC_WINDWALK])
 				new_speed -= new_speed * sc->data[SC_WINDWALK]->val3/100;
-		else if(sc->data[SC_FEAR]) //Fear Status by [Brainstorm]
-		new_speed -= new_speed * 25/100;
+			else if(sc->data[SC_FEAR]) //Fear Status by [Brainstorm]
+				new_speed -= new_speed * 25/100;
 
 		}
@@ -4011,6 +3971,5 @@
 		speed = speed * 100/75;
 	if(sc->data[SC_DECREPIFY]) // Necromancer Decrepify [Brain]
-	speed = speed * 100/75; //-25% walkspeed
-
+		speed = speed * 100/75; //-25% walkspeed
 	
 	return (short)cap_value(speed,10,USHRT_MAX);
@@ -4083,6 +4042,6 @@
 		else if(sc->data[SC_MADNESSCANCEL])
 			aspd_rate -= 200;
-	else if(sc->data[SC_LUST]) // Adept Blood Lust [Brain]
-		aspd_rate -= sc->data[SC_LUST]->val2*10;
+		else if(sc->data[SC_LUST]) // Adept Blood Lust [Brain]
+			aspd_rate -= sc->data[SC_LUST]->val2*10;
 
 	}
@@ -4180,8 +4139,7 @@
 		return sc->data[SC_ELEMENTALCHANGE]->val2;
 	if( sc->data[SC_DEATHPACT]) // Necro Death Pact [Brain]
-	return ELE_UNDEAD;
+		return ELE_UNDEAD;
 	if( sc->data[SC_OVERWHELMING]) // Warlock Overwhelming Evil [Brain]
-	return ELE_DARK;
-
+		return ELE_DARK;
 	return (unsigned char)cap_value(element,0,UCHAR_MAX);
 }
@@ -4203,7 +4161,7 @@
 		return sc->data[SC_ELEMENTALCHANGE]->val1;
 	if( sc->data[SC_DEATHPACT]) // Necro Death Pact [Brain]
-	return 1;
+		return 1;
 	if( sc->data[SC_OVERWHELMING]) // Warlock Overwhelming Evil [Brain]
-	return 1;
+		return 1;
 
 
@@ -4250,28 +4208,4 @@
 	}
 	return cap_value(mode,0,USHRT_MAX);
-}
-
-/*==========================================
- * Quick swap of adelay/speed when starting ending SA_FREECAST
- *------------------------------------------*/
-void status_freecast_switch(struct map_session_data *sd)
-{
-	struct status_data *status;
-	unsigned short b_speed,tmp;
-
-	status = &sd->battle_status;
-
-	b_speed = status->speed;
-
-	tmp = status->speed;
-	status->speed = sd->prev_speed;
-	sd->prev_speed = tmp;
-
-	tmp = status->adelay;
-	status->adelay = sd->prev_adelay;
-	sd->prev_adelay = tmp;
-
-	if(b_speed != status->speed)
-		clif_updatestatus(sd,SP_SPEED);
 }
 
@@ -4945,5 +4879,4 @@
 	case SC_ASSNCROS:
 	case SC_LUST: // Adept Blood Lust [Brain]
-
 		if (sc->data[SC_QUAGMIRE])
 			return 0;
@@ -5049,5 +4982,5 @@
 		 switch (type) {
 			case SC_BLESSING:
-			  if (status->race!=RC_UNDEAD && status->race!=RC_DEMON)
+			  if (!undead_flag && status->race!=RC_DEMON)
 				  break;
 			case SC_QUAGMIRE:
@@ -5063,13 +4996,14 @@
 			case SC_RICHMANKIM:
 			case SC_ROKISWEIL:
-		//New status [Brainstorm]
-		case SC_FEAR:
-		case SC_DECREPIFY:
-		case SC_DARKMOON:
-		case SC_REQUIEM:
-		case SC_CURSETONGUES:
-		case SC_CURSEWEAKNESS:
-		case SC_CURSEEXHAUST:
-
+ //Not sure if its the right place.
+			//New status [Brainstorm]
+			case SC_FEAR:
+			case SC_DECREPIFY:
+			case SC_DARKMOON:
+			case SC_REQUIEM:
+			case SC_CURSETONGUES:
+			case SC_CURSEWEAKNESS:
+			case SC_CURSEEXHAUST:
+//SC Fogwall Must have been added after he did this?
 			case SC_FOGWALL:
 				return 0;
@@ -5083,53 +5017,52 @@
 		//TO-DO Blessing and Agi up should do 1 damage against players on Undead Status, even on PvM
 		//but cannot be plagiarized (this requires aegis investigation on packets and official behavior) [Brainstorm]
-		if (status->race!=RC_UNDEAD && status->race!=RC_DEMON) {
+		if ((!undead_flag && status->race!=RC_DEMON) || bl->type == BL_PC) {
 			if (sc->data[SC_CURSE])
 				status_change_end(bl,SC_CURSE,-1);
 			if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE)
 				status_change_end(bl,SC_STONE,-1);
-		// Warlock Curses are canceled by blessing [Brain]
+//hell of a time finding this
+			// Warlock Curses are canceled by blessing [Brain]
+			if (sc->data[SC_CURSEWEAKNESS])
+				status_change_end(bl,SC_CURSEWEAKNESS,-1);
+			if (sc->data[SC_CURSETONGUES])
+				status_change_end(bl,SC_CURSETONGUES,-1);
+			if (sc->data[SC_CURSEEXHAUST])
+				status_change_end(bl,SC_CURSEEXHAUST,-1);
+			if (sc->data[SC_DOOM]) // This skill would be way funnier if we could igore this concept, no?
+				status_change_end(bl,SC_DOOM,-1);//But then people would abuse on WoEs
+		}
+		break;
+	case SC_CURSEWEAKNESS: // Warlock Curse of Weakness removes Impositio Manus [Brain]
+		if (sc->data[SC_IMPOSITIO])
+			status_change_end(bl,SC_IMPOSITIO,-1);
+		if (sc->data[SC_BLESSING]) //The opposite is also valid, curses cancel blessing [Brain]
+			status_change_end(bl,SC_BLESSING,-1);
+		break;
+	case SC_CURSETONGUES: // Warlock Curse of Tongues removes Suffragium [Brain]
+		if (sc->data[SC_SUFFRAGIUM])
+			status_change_end(bl,SC_SUFFRAGIUM,-1);
+		if (sc->data[SC_BLESSING])
+			status_change_end(bl,SC_BLESSING,-1);
+		break;
+	case SC_CURSEEXHAUST: // Warlock Curse of Exhaustion removes angelus [Brain]
+		if (sc->data[SC_ANGELUS])
+			status_change_end(bl,SC_ANGELUS,-1);
+	case SC_DOOM:
+		if (sc->data[SC_BLESSING])
+			status_change_end(bl,SC_BLESSING,-1);
+		break;
+	case SC_IMPOSITIO: // Impositio Manus removes Curse of Weakness [Brain]
 		if (sc->data[SC_CURSEWEAKNESS])
-		status_change_end(bl,SC_CURSEWEAKNESS,-1);
+			status_change_end(bl,SC_CURSEWEAKNESS,-1);
+		break;
+	case SC_SUFFRAGIUM: // Suffragium removes Curse of Tongues [Brain]
 		if (sc->data[SC_CURSETONGUES])
-		status_change_end(bl,SC_CURSETONGUES,-1);
+			status_change_end(bl,SC_CURSETONGUES,-1);
+		break;
+	case SC_ANGELUS: // Angelus removes Curse of Exhaustion [Brain]
 		if (sc->data[SC_CURSEEXHAUST])
-		status_change_end(bl,SC_CURSEEXHAUST,-1);
-		if (sc->data[SC_DOOM]) // This skill would be way funnier if we could igore this concept, no?
-		status_change_end(bl,SC_DOOM,-1);//But then people would abuse on WoEs
-
-		}
-		break;
-	case SC_CURSEWEAKNESS: // Warlock Curse of Weakness removes Impositio Manus [Brain]
-	if (sc->data[SC_IMPOSITIO])
-		status_change_end(bl,SC_IMPOSITIO,-1);
-	if (sc->data[SC_BLESSING]) //The opposite is also valid, curses cancel blessing [Brain]
-		status_change_end(bl,SC_BLESSING,-1);
-	break;
-	case SC_CURSETONGUES: // Warlock Curse of Tongues removes Suffragium [Brain]
-	if (sc->data[SC_SUFFRAGIUM])
-		status_change_end(bl,SC_SUFFRAGIUM,-1);
-	if (sc->data[SC_BLESSING])
-		status_change_end(bl,SC_BLESSING,-1);
-	break;
-	case SC_CURSEEXHAUST: // Warlock Curse of Exhaustion removes angelus [Brain]
-	if (sc->data[SC_ANGELUS])
-		status_change_end(bl,SC_ANGELUS,-1);
-	case SC_DOOM:
-	if (sc->data[SC_BLESSING])
-		status_change_end(bl,SC_BLESSING,-1);
-	break;
-	case SC_IMPOSITIO: // Impositio Manus removes Curse of Weakness [Brain]
-	if (sc->data[SC_CURSEWEAKNESS])
-		status_change_end(bl,SC_CURSEWEAKNESS,-1);
-	break;
-	case SC_SUFFRAGIUM: // Suffragium removes Curse of Tongues [Brain]
-	if (sc->data[SC_CURSETONGUES])
-		status_change_end(bl,SC_CURSETONGUES,-1);
-	break;
-	case SC_ANGELUS: // Angelus removes Curse of Exhaustion [Brain]
-	if (sc->data[SC_CURSEEXHAUST])
-		status_change_end(bl,SC_CURSEEXHAUST,-1);
-	break;
-
+			status_change_end(bl,SC_CURSEEXHAUST,-1);
+		break;
 	case SC_INCREASEAGI:
 		status_change_end(bl,SC_DECREASEAGI,-1);
@@ -5150,8 +5083,9 @@
 		status_change_end(bl,SC_TWOHANDQUICKEN,-1);
 		status_change_end(bl,SC_ONEHAND,-1);
+// may need tinkering
 		if(sc->data[SC_LUST])	// Adept Blood Lust [Brain]
-		status_change_end(bl,SC_LUST,-1);
-
-		break;
+			status_change_end(bl,SC_LUST,-1);
+		break;
+//may be in the wrong place.
 	case SC_ONEHAND:
 	  	//Removes the Aspd potion effect, as reported by Vicious. [Skotlex]
@@ -5211,12 +5145,4 @@
 		status_change_end(bl,SC_MADNESSCANCEL,-1);
 		break;
-	case SC_FREEZE: //Frozen status ends immolating AND searing status [Brain]
-	if(sc->data[SC_IMMOLATE])
-		status_change_end(bl,SC_IMMOLATE,-1);
-	case SC_IMMOLATE: // Warlock Immolate [Brain]
-	if(sc->data[SC_SEARING]) //Immolating status ends searing status
-		status_change_end(bl,SC_SEARING,-1);
-	break;
-
 	case SC_MADNESSCANCEL:
 		status_change_end(bl,SC_ADJUSTMENT,-1);
@@ -5227,5 +5153,12 @@
 		status_change_end(bl,SC_INCREASEAGI,-1);
 		break;
-		
+//Code has changed since this
+	case SC_FREEZE: //Frozen status ends immolating AND searing status [Brain]
+		if(sc->data[SC_IMMOLATE])
+			status_change_end(bl,SC_IMMOLATE,-1);
+	case SC_IMMOLATE: // Warlock Immolate [Brain]
+		if(sc->data[SC_SEARING]) //Immolating status ends searing status
+			status_change_end(bl,SC_SEARING,-1);
+		break;
 	}
 
@@ -5250,4 +5183,5 @@
 			case SC_SILENCE:
 			case SC_CONFUSION:
+   //Should Edit depending on the one that will work for the modified ver.
 			case SC_FEAR: //Fear Status by [Brainstorm]
 			case SC_BLIND:
@@ -5560,9 +5494,8 @@
 			clif_emotion(bl,1);
 			break;
-	case SC_FEAR: //Fear Status by [Brainstorm]
-		clif_emotion(bl,16); // e_wah
-		if(sd) tick /= 2;
-		break;
-
+		case SC_FEAR: //Fear Status by [Brainstorm]
+			clif_emotion(bl,16); // e_wah
+			if(sd) tick /= 2;
+			break;
 		case SC_BLEEDING:
 			val4 = tick/10000;
@@ -5941,13 +5874,14 @@
 			}
 			break;
-
-	case SC_ATFIELD: // AT-Field [Brainstorm]
-		val2 = 100; // 100% Block chance
-		val3 = 100; // Dodge 100 attacks total.
-		val4 = tick/1000;
-		tick = 1000;
-		break;
-
-
+			
+//WHAT RELEVENCE DOES THIS HAVE AT ALL DAMNIT?!
+		case SC_ATFIELD: // AT-Field [Brainstorm]
+			val2 = 100; // 100% Block chance
+			val3 = 100; // Dodge 100 attacks total.
+			val4 = tick/1000;
+			tick = 1000;
+			break;
+			
+			
 		case SC_COMBO:
 		{
@@ -5992,24 +5926,24 @@
 			break;
 		case SC_BLESSING:
-			if (status->race!=RC_UNDEAD && status->race!=RC_DEMON)
+			if ((!undead_flag && status->race!=RC_DEMON) || bl->type == BL_PC)
 				val2 = val1;
 			else
 				val2 = 0; //0 -> Half stat.
 			break;
-	case SC_REQUIEM: //Necro Requiem and Dark Moon [Brain]
-	case SC_DARKMOON:
-		if (undead_flag || status->race==RC_UNDEAD || status->race==RC_DEMON)
-		val2 = val1; //Demon and Undead get buffed
-		else if(status->race==RC_FORMLESS || status->def_ele==ELE_GHOST || bl->type == BL_PC)
-		{
-		val1 = 0; //No status change for Formless and Ghosts, and non-undead players
-		tick = 0; //Cancel status to not show requiem icon without a reason
-		}
-		else
-		val3 = val1; //Everything else (living) get negative status (requiem only)
-		break;
-	case SC_DECREPIFY: //Necro Decrepify [Brain]
-		val2 = val1;
-	break;
+		case SC_REQUIEM: //Necro Requiem and Dark Moon [Brain]
+		case SC_DARKMOON:
+			if (undead_flag || status->race==RC_UNDEAD || status->race==RC_DEMON)
+				val2 = val1; //Demon and Undead get buffed
+			else if(status->race==RC_FORMLESS || status->def_ele==ELE_GHOST || bl->type == BL_PC)
+			{
+				val1 = 0; //No status change for Formless and Ghosts, and non-undead players
+				tick = 0; //Cancel status to not show requiem icon without a reason
+			}
+			else
+				val3 = val1; //Everything else (living) get negative status (requiem only)
+			break;
+		case SC_DECREPIFY: //Necro Decrepify [Brain]
+			val2 = val1;
+		break;
 
 		case SC_TRICKDEAD:
@@ -6053,14 +5987,13 @@
 			val2 = 5*val1; //watk increase
 			break;
-	case SC_CURSEWEAKNESS: // Warlock Curse of Weakness [Brain]
-		val2 = 5*val1; //batk/watk decrease
-		break;
-	case SC_CURSEEXHAUST: // Warlock Curse of Exhaustion [Brain]
-		val2 = 2*val1; //def/mdef decrease
-		break;
-	case SC_CURSETONGUES: // Warlock Curse of Tongues [Brain]
-		val2 = 10*val1; //casttime increase
-		break;
-
+		case SC_CURSEWEAKNESS: // Warlock Curse of Weakness [Brain]
+			val2 = 5*val1; //batk/watk decrease
+			break;
+		case SC_CURSEEXHAUST: // Warlock Curse of Exhaustion [Brain]
+			val2 = 2*val1; //def/mdef decrease
+			break;
+		case SC_CURSETONGUES: // Warlock Curse of Tongues [Brain]
+			val2 = 10*val1; //casttime increase
+			break;
 		case SC_MELTDOWN:
 			val2 = 100*val1; //Chance to break weapon
@@ -6119,16 +6052,15 @@
 			break;
 		case SC_LUST: // Adept Blood Lust [Brain]
-		val2 = 5+3*val1; //Aspd/bAtk/wAtk change
-		val3 = tick>0?tick:1000; //Interval at which HP is drained.
-		break;
-	case SC_DEATHPACT: // Necro Death Pact [Brain]
-		val2 = 5*val1; //Neutral property resistance
-		val3 = tick>0?tick:10000; //Interval at which HP is drained.
-		break;
-	case SC_OVERWHELMING: // Warlock Overwhelming Evil [Brain]
-		val2 = 2*val1; //matk bonus
-		val3 = tick>0?tick:1000; //Interval at which SP is drained.
-		break;
-
+			val2 = 5+3*val1; //Aspd/bAtk/wAtk change
+			val3 = tick>0?tick:1000; //Interval at which HP is drained.
+			break;
+		case SC_DEATHPACT: // Necro Death Pact [Brain]
+			val2 = 5*val1; //Neutral property resistance
+			val3 = tick>0?tick:10000; //Interval at which HP is drained.
+			break;
+		case SC_OVERWHELMING: // Warlock Overwhelming Evil [Brain]
+			val2 = 2*val1; //matk bonus
+			val3 = tick>0?tick:1000; //Interval at which SP is drained.
+			break;
 		case SC_MINDBREAKER:
 			val2 = 20*val1; //matk increase.
@@ -6314,10 +6246,7 @@
 				unit_skillcastcancel(bl, 0);
 		break;
-
-	case SC_FEAR: //Fear Status by [Brainstorm]
-		unit_stop_attack(bl);
-	break;
-
-
+		case SC_FEAR: //Fear Status by [Brainstorm]
+			unit_stop_attack(bl);
+		break;
 	}
 
@@ -6765,7 +6694,7 @@
 			}
 			break;
-	case SC_SPLASHER:
-	case SC_DOOM: // Warlock Curse of Doom [Brain]
-	
+		case SC_SPLASHER:
+//Why is Doom here?
+		case SC_DOOM: // Warlock Curse of Doom [Brain]	
 			{
 				struct block_list *src=map_id2bl(sce->val3);
@@ -7135,21 +7064,19 @@
 		sc_timer_next(sce->val2+tick, status_change_timer, bl->id, data);
 		return 0;
-
 	case SC_LUST:	// Adept Blood Lust [Brain]
-	if(!status_charge(bl, status->max_hp/100, 0))
-		break; //Not enough HP to continue.
-	sc_timer_next(sce->val3+tick, status_change_timer, bl->id, data);
-	return 0;
+		if(!status_charge(bl, status->max_hp/100, 0))
+			break; //Not enough HP to continue.
+		sc_timer_next(sce->val3+tick, status_change_timer, bl->id, data);
+		return 0;
 	case SC_DEATHPACT:	// Necro Death Pact [Brain]
-	 // Drains 1 HP every second (status wont kill, but dying will cancel it)
-	status_charge(bl, 1, 0);
-	sc_timer_next(sce->val3+tick, status_change_timer, bl->id, data);
-	return 0;
+		 // Drains 1 HP every second (status wont kill, but dying will cancel it)
+		status_charge(bl, 1, 0);
+		sc_timer_next(sce->val3+tick, status_change_timer, bl->id, data);
+		return 0;
 	case SC_OVERWHELMING:	// Warlock Overwhelming Evil [Brain]
-	if(!status_charge(bl, 0, status->max_sp/100))
-		break; //Not enough SP to continue.
-	sc_timer_next(sce->val3+tick, status_change_timer, bl->id, data);
-	return 0;
-
+		if(!status_charge(bl, 0, status->max_sp/100))
+			break; //Not enough SP to continue.
+		sc_timer_next(sce->val3+tick, status_change_timer, bl->id, data);
+		return 0; 
 
 	case SC_CHASEWALK:
@@ -7387,9 +7314,9 @@
 		break;
 	case SC_DOOM: // Warlock Curse of Doom [Brain]
-	if((sce->val4 -= 500) > 0) {
-		sc_timer_next(500 + tick, status_change_timer, bl->id, data);
-		return 0;
-	}
-	break;
+		if((sce->val4 -= 500) > 0) {
+			sc_timer_next(500 + tick, status_change_timer, bl->id, data);
+			return 0;
+		}
+		break;
 
 	case SC_MARIONETTE:
@@ -7560,5 +7487,4 @@
 			case SC_MATKFOOD:
 			case SC_DOOM: // Warlock Curse of Doom [Brain]
-
 				continue;
 				
Index: src/map/skill.h
===================================================================
--- src/map/skill.h (revision 22)
+++ src/map/skill.h (revision 24)
@@ -320,7 +320,4 @@
 
 int skill_arrow_create( struct map_session_data *sd,int nameid);
-
-int skill_additem(struct block_list* src, struct block_list *bl, int itemid, int amount); // Item giver func [Brain]
-
 
 // mobXLÌœß
@@ -959,4 +956,13 @@
 
 	ALL_INCCARRY = 681,
+	
+//most skills are irrelevant, will block comment them out.
+/*+	GM_SANDMAN = 688,
++	CASH_BLESSING,
++	CASH_INCAGI,
++	CASH_ASSUMPTIO,
++	ALL_CATCRY,*/
+//Up there is irrelevant.
+ 
 	AD_PWBLIND = 700,	// Custom Skills [Brainstorm]
 	AD_PWFEAR,
@@ -987,8 +993,8 @@
 	NC_DRAINLIFE,
 	NC_DEATHPACT,
-
+//Still no idea why that is there.
 	ALL_ATFIELD, //GM SKILL
 
-	WL_CURSETONGUES, //732
+	WL_CURSETONGUES =732, //732
 	WL_CURSEDOOM,
 	WL_CURSEEXHAUST,
@@ -1009,4 +1015,17 @@
 	WL_CORRUPTION, //749
 
+//Irrelevant
+/*+	TD_FISHING = 750,
++	TD_MINING,
++	TD_HERBALISM,
++	TD_LEATHERWORK,
++	TD_TAILORING,
++	TD_BLACKSMITHING,
++	TD_SCRIBESCROLLA,
++	TD_SCRIBESCROLLB,
++	TD_SCRIBESCROLLC,
++	TD_SHIELD,
++	TD_WOODCUTTING,*/
+// STOP! Cant use 800 (homun skills) NOR 900 (guild skills)
 
 	KN_CHARGEATK = 1001,
Index: src/map/status.h
===================================================================
--- src/map/status.h (revision 22)
+++ src/map/status.h (revision 24)
@@ -294,4 +294,6 @@
 	SC_SEVENWIND,
 	SC_DEF_RATE,
+	SC_SPREGEN,
+	SC_WALKSPEED,
 	SC_DECREPIFY, // New status [brain]
 	SC_LUST,
@@ -310,6 +312,4 @@
 	SC_OVERWHELMING,
 	SC_FEAR,
-	SC_SPREGEN,
-	SC_WALKSPEED,
 	SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
 } sc_type;
@@ -823,5 +823,4 @@
 void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, struct status_change *sc);
 
-void status_freecast_switch(struct map_session_data *sd);
 int status_getrefinebonus(int lv,int type);
 int status_check_skilluse(struct block_list *src, struct block_list *target, int skill_num, int flag); // [Skotlex]
Index: src/map/pc.c
===================================================================
--- src/map/pc.c (revision 22)
+++ src/map/pc.c (revision 24)
@@ -133,5 +133,5 @@
 }
 
-void pc_setinvincibletimer(struct map_session_data* sd, int val)
+void pc_setinvincibletimer(struct map_session_data* sd, int val) 
 {
 	nullpo_retv(sd);
@@ -258,5 +258,5 @@
 		case MAPID_TAEKWON: // Taekwon
 			clif_fame_taekwon(sd,count);
-			break;
+			break;	
 	}
 	chrif_updatefamelist(sd);
@@ -267,5 +267,5 @@
 {
 	int i;
-
+	
 	switch(job){
 		case MAPID_BLACKSMITH: // Blacksmith
@@ -330,8 +330,8 @@
 		sd->status.clothes_color=0;
 
-  	//Only copy the Cart/Peco/Falcon options, the rest are handled via
+  	//Only copy the Cart/Peco/Falcon options, the rest are handled via 
 	//status change load/saving. [Skotlex]
 	sd->status.option = sd->sc.option&(OPTION_CART|OPTION_FALCON|OPTION_RIDING);
-
+		
 	if (sd->sc.data[SC_JAILED])
 	{	//When Jailed, do not move last point.
@@ -403,5 +403,5 @@
 	if (!itemdb_isequip2(sd->inventory_data[n]))
 		return 0; //Not equippable by players.
-
+	
 	ep = sd->inventory_data[n]->equip;
 	if(sd->inventory_data[n]->look == W_DAGGER	||
@@ -518,5 +518,5 @@
 	if (itemdb_isspecial(item->card[0]))
 		return 1;
-
+	
 	ARR_FIND( 0, s, i, item->card[i] && (data = itemdb_exists(item->card[i])) != NULL && data->flag.no_equip&flag );
 	return( i < s ) ? 0 : 1;
@@ -535,5 +535,5 @@
 		if( i == EQI_HEAD_MID && sd->equip_index[EQI_HEAD_LOW] == index ) continue;
 		if( i == EQI_HEAD_TOP && (sd->equip_index[EQI_HEAD_MID] == index || sd->equip_index[EQI_HEAD_LOW] == index) ) continue;
-
+	
 		if( !sd->inventory_data[index] ) continue;
 
@@ -568,5 +568,5 @@
 	// Parents need to have their ring equipped
 	if( !pc_isequipped(p1_sd, WEDDING_RING_M) && !pc_isequipped(p1_sd, WEDDING_RING_F) )
-		return false;
+		return false; 
 
 	if( !pc_isequipped(p2_sd, WEDDING_RING_M) && !pc_isequipped(p2_sd, WEDDING_RING_F) )
@@ -603,5 +603,5 @@
 	int job, joblevel;
 	unsigned int jobexp;
-
+	
 	if( !pc_can_Adopt(p1_sd, p2_sd, b_sd) )
 		return false;
@@ -632,5 +632,5 @@
 		pc_skill(p1_sd, WE_CALLBABY, 1, 0);
 		pc_skill(p2_sd, WE_CALLBABY, 1, 0);
-
+		
 		return true;
 	}
@@ -660,5 +660,5 @@
 		return 0;
 	if(map_flag_gvg(sd->bl.m) && ((item->flag.no_equip&2) || !pc_isAllowedCardOn(sd,item->slot,n,2)))
-		return 0;
+		return 0; 
 	if(map[sd->bl.m].flag.restricted)
 	{
@@ -669,5 +669,5 @@
 
 	if (sd->sc.count) {
-
+			
 		if(item->equip & EQP_ARMS && item->type == IT_WEAPON && sd->sc.data[SC_STRIPWEAPON]) // Also works with left-hand weapons [DracoRPG]
 			return 0;
@@ -698,5 +698,5 @@
 	if (!(1<<(sd->class_&MAPID_BASEMASK)&item->class_base[(sd->class_&JOBL_2_1)?1:((sd->class_&JOBL_2_2)?2:0)]))
 		return 0;
-
+	
 	//Not equipable by upper class. [Skotlex]
 	if(!(1<<((sd->class_&JOBL_UPPER)?1:((sd->class_&JOBL_BABY)?2:0))&item->class_upper))
@@ -730,5 +730,5 @@
 		sd->class_ = MAPID_NOVICE;
 	} else
-		sd->class_ = i;
+		sd->class_ = i; 
 	//Initializations to null/0 unneeded since map_session_data was filled with 0 upon allocation.
 	if(!sd->status.hp) pc_setdead(sd);
@@ -739,5 +739,5 @@
 	sd->npc_timer_id = -1;
 	sd->pvp_timer = -1;
-
+	
 	sd->canuseitem_tick = tick;
 	sd->cantalk_tick = tick;
@@ -754,15 +754,18 @@
 	if (battle_config.disp_zeny)
 		sd->state.showzeny = 1;
+//Checks the battleflags to see if player has selected to see summon's stats.
+//I see nothing wrong here.
 	//Vanaheim settings [Brainstorm]
 	if (battle_config.disp_summon_stats) // Battle Flag to Show Summoned Monster Stats [Brain]
-	sd->state.showsummon = 1;
-
+		sd->state.showsummon = 1;
+
+	
 	if (!(battle_config.display_skill_fail&2))
 		sd->state.showdelay = 1;
-
+		
 	// ACe`FbN
 	pc_setinventorydata(sd);
 	pc_checkitem(sd);
-
+	
 	status_change_init(&sd->bl);
 	if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) && (pc_isGM(sd) >= get_atcommand_level(atcommand_hide)))
@@ -819,5 +822,5 @@
 				sd->packet_ver, CONVIP(ip));
 	}
-
+	
 	// Send friends list
 	clif_friendslist_send(sd);
@@ -866,5 +869,5 @@
 }
 
-//Attempts to set a mob.
+//Attempts to set a mob. 
 int pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl)
 {
@@ -898,5 +901,5 @@
 {
 	int i,j;
-
+	
 	sd->change_level = pc_readglobalreg(sd,"jobchange_level");
 	sd->die_counter = pc_readglobalreg(sd,"PC_DIE_COUNTER");
@@ -932,5 +935,5 @@
 			if (i < sd->status.skill[sd->cloneskill_id].lv)
 				sd->status.skill[sd->cloneskill_id].lv = i;
-			sd->status.skill[sd->cloneskill_id].flag = 13;	//cloneskill flag
+			sd->status.skill[sd->cloneskill_id].flag = 13;	//cloneskill flag			
 		}
 	}
@@ -945,5 +948,5 @@
 	if (sd->status.guild_id)
 		guild_member_joined(sd);
-
+	
 	// pet
 	if (sd->status.pet_id > 0)
@@ -1016,11 +1019,11 @@
 	}
 	c = pc_class2idx(c);
-	for(i=0;i<MAX_SKILL;i++){
+	for(i=0;i<MAX_SKILL;i++){ 
 		if (sd->status.skill[i].flag != 13) //Don't touch plagiarized skills
 			sd->status.skill[i].id=0; //First clear skills.
 	}
 
-	for(i=0;i<MAX_SKILL;i++){
-		if (sd->status.skill[i].flag && sd->status.skill[i].flag != 13){ //Restore original level of skills after deleting earned skills.
+	for(i=0;i<MAX_SKILL;i++){ 
+		if (sd->status.skill[i].flag && sd->status.skill[i].flag != 13){ //Restore original level of skills after deleting earned skills.	
 			sd->status.skill[i].lv=(sd->status.skill[i].flag==1)?0:sd->status.skill[i].flag-2;
 			sd->status.skill[i].flag=0;
@@ -1111,5 +1114,5 @@
 				sd->status.skill[id].flag=1; //So it is not saved, and tagged as a "bonus" skill.
 			} else
-				sd->status.skill[id].flag=sd->status.skill[id].lv+2;
+				sd->status.skill[id].flag=sd->status.skill[id].lv+2; 
 			sd->status.skill[id].lv= skill_tree_get_max(id, sd->status.class_);
 		}
@@ -1127,5 +1130,5 @@
 	if(battle_config.skillfree)
 		return; //Function serves no purpose if this is set
-
+	
 	i = pc_calc_skilltree_normalize_job(sd);
 	c = pc_mapid2jobid(i, sd->status.sex);
@@ -1142,5 +1145,5 @@
 			if(sd->status.skill[id].id) //Already learned
 				continue;
-
+			
 			for(j=0;j<5;j++) {
 				if((k=skill_tree[c][i].need[j].id))
@@ -1163,5 +1166,5 @@
 			if (sd->status.job_level < skill_tree[c][i].joblv)
 				continue;
-
+			
 			j = skill_get_inf2(id);
 			if(!sd->status.skill[id].lv && (
@@ -1202,8 +1205,8 @@
 	int skill_point;
 	int c = sd->class_;
-
+	
 	if (!battle_config.skillup_limit)
 		return c;
-
+	
 	skill_point = pc_calc_skillpoint(sd);
 	if(pc_checkskill(sd, NV_BASIC) < 9) //Consider Novice Tree when you don't have NV_BASIC maxed.
@@ -1611,10 +1614,10 @@
 			break;
 		val += (int)status->max_hp;
-		//Negative bonuses will underflow, this will be handled in status_calc_pc through casting
+		//Negative bonuses will underflow, this will be handled in status_calc_pc through casting 
 		//If this is called outside of status_calc_pc, you'd better pray they do not underflow and end with UINT_MAX max_hp.
 		status->max_hp = (unsigned int)val;
 		break;
 	case SP_MAXSP:
-		if(sd->state.lr_flag == 2)
+		if(sd->state.lr_flag == 2) 
 			break;
 		val += (int)status->max_sp;
@@ -1658,13 +1661,7 @@
 		}
 		break;
-	case SP_ADD_SPEED:	//Raw increase
-		if(sd->state.lr_flag != 2) {
-			bonus = status->speed - val;
-			status->speed = cap_value(bonus, 0, USHRT_MAX);
-		}
-		break;
 	case SP_SPEED_RATE:	//Non stackable increase
-		if(sd->state.lr_flag != 2 && sd->speed_rate > 100-val)
-			sd->speed_rate = 100-val;
+		if(sd->state.lr_flag != 2)
+			sd->speed_rate = min(sd->speed_rate, -val);
 		break;
 	case SP_SPEED_ADDRATE:	//Stackable increase
@@ -2674,8 +2671,8 @@
 	if(idx_card < 0 || idx_card >= MAX_INVENTORY || !sd->inventory_data[idx_card])
 		return 0; //Invalid card index.
-
+			
 	if(idx_equip < 0 || idx_equip >= MAX_INVENTORY || !sd->inventory_data[idx_equip])
 		return 0; //Invalid item index.
-
+	
 	nameid=sd->status.inventory[idx_equip].nameid;
 	cardid=sd->status.inventory[idx_card].nameid;
@@ -2902,5 +2899,5 @@
 	if(amount > MAX_AMOUNT)
 		return 5;
-
+	
 	data = itemdb_search(item_data->nameid);
 	w = data->weight*amount;
@@ -2997,10 +2994,10 @@
 		return 0; //Can't drop items in nodrop mapflag maps.
 	}
-
+	
 	if (!pc_candrop(sd,&sd->status.inventory[n])) {
 		clif_displaymessage (sd->fd, msg_txt(263));
 		return 0;
 	}
-
+	
 	//Logs items, dropped by (P)layers [Lupus]
 	if(log_config.enable_logs&0x8)
@@ -3010,5 +3007,5 @@
 	if (!map_addflooritem(&sd->status.inventory[n], amount, sd->bl.m, sd->bl.x, sd->bl.y, 0, 0, 0, 2))
 		return 0;
-
+	
 	pc_delitem(sd, n, amount, 0);
 	return 1;
@@ -3033,5 +3030,5 @@
 	if (sd->status.party_id)
 		p = party_search(sd->status.party_id);
-
+	
 	if(fitem->first_get_charid > 0 && fitem->first_get_charid != sd->status.char_id)
   	{
@@ -3123,5 +3120,5 @@
 	if ((nameid == 605 || nameid == 606) && pc_issit(sd))
 		return 0;
-
+	  
 	//added item_noequip.txt items check by Maya&[Lupus]
 	if (
@@ -3145,5 +3142,5 @@
 	))
 		return 0;
-
+	
 	//Not usable by upper class. [Skotlex]
 	if(!(
@@ -3329,5 +3326,5 @@
 	if (idx < 0 || idx >= MAX_INVENTORY) //Invalid index check [Skotlex]
 		return 1;
-
+	
 	item_data = &sd->status.inventory[idx];
 
@@ -3369,5 +3366,5 @@
 	if (idx < 0 || idx >= MAX_CART) //Invalid index check [Skotlex]
 		return 1;
-
+	
 	item_data=&sd->status.cart[idx];
 
@@ -3421,5 +3418,5 @@
 	if(md->state.steal_flag == UCHAR_MAX || md->sc.opt1) //already stolen from / status change check
 		return 0;
-
+	
 	sd_status= status_get_status_data(&sd->bl);
 	md_status= status_get_status_data(bl);
@@ -3438,5 +3435,5 @@
 	rate = (sd_status->dex - md_status->dex)/2 + lv*6 + 4;
 	rate += sd->add_steal_rate;
-
+		
 	if( rate < 1 )
 		return 0;
@@ -3464,5 +3461,5 @@
 		return 0;
 	}
-
+	
 	if(battle_config.show_steal_in_same_party)
 		party_foreachsamemap(pc_show_steal,sd,AREA_SIZE,sd,tmp_item.nameid);
@@ -3473,5 +3470,5 @@
 		log_pick_pc(sd, "P", itemid, 1, NULL);
 	}
-
+		
 	//A Rare Steal Global Announce by Lupus
 	if(md->db->dropitem[i].p<=battle_config.rare_drop_announce) {
@@ -3604,5 +3601,5 @@
 		//Tag player for rewarping after map-loading is done. [Skotlex]
 		sd->state.rewarp = 1;
-
+	
 	sd->mapindex =  mapindex;
 	sd->bl.m = m;
@@ -3762,5 +3759,5 @@
 	if(!sd->sc.count)
 		return 0;
-
+	
 	for (i = 0; i < ARRAYLENGTH(scw_list); i++)
 	{	// Skills requiring specific weapon types
@@ -3769,9 +3766,9 @@
 			status_change_end(&sd->bl,scw_list[i],-1);
 	}
-
+	
 	if(sd->sc.data[SC_SPURT] && sd->status.weapon)
 		// Spurt requires bare hands (feet, in fact xD)
 		status_change_end(&sd->bl,SC_SPURT,-1);
-
+	
 	if(sd->status.shield <= 0) { // Skills requiring a shield
 		for (i = 0; i < ARRAYLENGTH(scs_list); i++)
@@ -3861,10 +3858,10 @@
 			class_ |= MAPID_THIEF;
 			break;
-
+			
 		case JOB_STAR_GLADIATOR:
 		case JOB_STAR_GLADIATOR2:
 			class_ |= JOBL_2_1;
 			class_ |= MAPID_TAEKWON;
-			break;
+			break;	
 		case JOB_SOUL_LINKER:
 			class_ |= JOBL_2_2;
@@ -3890,9 +3887,9 @@
 			class_ = MAPID_SUMMER;
 			break;
-			//Possible to be in the wrong spot?
+//This is where your errors begin.
 		case JOB_NECROMANCER: // Necromancer [Brain]
 			class_ |= JOBL_2_1;
 			class_ |= MAPID_ADEPT;
-			break;
+			break;	
 		case JOB_WARLOCK: // Warlock [Brain]
 			class_ |= JOBL_2_2;
@@ -3923,4 +3920,5 @@
 		case MAPID_XMAS:            return JOB_XMAS;
 		case MAPID_SUMMER:          return JOB_SUMMER;
+		// double check this too.
 		case MAPID_ADEPT:			return JOB_ADEPT; // Adept [Brain]
 	//2_1 classes
@@ -3933,4 +3931,5 @@
 		case MAPID_ASSASSIN:        return JOB_ASSASSIN;
 		case MAPID_STAR_GLADIATOR:  return JOB_STAR_GLADIATOR;
+		//and this
 		case MAPID_NECROMANCER:		return JOB_NECROMANCER; // Necromancer [Brain]
 	//2_2 classes
@@ -3942,4 +3941,5 @@
 		case MAPID_ROGUE:           return JOB_ROGUE;
 		case MAPID_SOUL_LINKER:     return JOB_SOUL_LINKER;
+		//this too
 		case MAPID_WARLOCK:			return JOB_WARLOCK; // Warlock [Brain]
 	//1-1: advanced
@@ -4007,5 +4007,5 @@
 	case JOB_THIEF:
 		return msg_txt(550 - JOB_NOVICE+class_);
-
+		
 	case JOB_KNIGHT:
 	case JOB_PRIEST:
@@ -4015,8 +4015,8 @@
 	case JOB_ASSASSIN:
 		return msg_txt(557 - JOB_KNIGHT+class_);
-
+		
 	case JOB_KNIGHT2:
 		return msg_txt(557);
-
+		
 	case JOB_CRUSADER:
 	case JOB_MONK:
@@ -4027,8 +4027,8 @@
 	case JOB_DANCER:
 		return msg_txt(563 - JOB_CRUSADER+class_);
-
+			
 	case JOB_CRUSADER2:
 		return msg_txt(563);
-
+		
 	case JOB_WEDDING:
 	case JOB_SUPER_NOVICE:
@@ -4056,8 +4056,8 @@
 	case JOB_ASSASSIN_CROSS:
 		return msg_txt(582 - JOB_LORD_KNIGHT+class_);
-
+		
 	case JOB_LORD_KNIGHT2:
 		return msg_txt(582);
-
+		
 	case JOB_PALADIN:
 	case JOB_CHAMPION:
@@ -4068,5 +4068,5 @@
 	case JOB_GYPSY:
 		return msg_txt(588 - JOB_PALADIN + class_);
-
+		
 	case JOB_PALADIN2:
 		return msg_txt(588);
@@ -4080,5 +4080,5 @@
 	case JOB_BABY_THIEF:
 		return msg_txt(595 - JOB_BABY + class_);
-
+		
 	case JOB_BABY_KNIGHT:
 	case JOB_BABY_PRIEST:
@@ -4088,8 +4088,8 @@
 	case JOB_BABY_ASSASSIN:
 		return msg_txt(602 - JOB_BABY_KNIGHT + class_);
-
+		
 	case JOB_BABY_KNIGHT2:
 		return msg_txt(602);
-
+		
 	case JOB_BABY_CRUSADER:
 	case JOB_BABY_MONK:
@@ -4100,11 +4100,11 @@
 	case JOB_BABY_DANCER:
 		return msg_txt(608 - JOB_BABY_CRUSADER +class_);
-
+		
 	case JOB_BABY_CRUSADER2:
 		return msg_txt(608);
-
+		
 	case JOB_SUPER_BABY:
 		return msg_txt(615);
-
+		
 	case JOB_TAEKWON:
 		return msg_txt(616);
@@ -4114,11 +4114,12 @@
 	case JOB_SOUL_LINKER:
 		return msg_txt(618);
-
+		
 	case JOB_GUNSLINGER:
 		return msg_txt(619);
 	case JOB_NINJA:
 		return msg_txt(620);
+//message display for job change?
 	case JOB_ADEPT: // Adept [Brain]
-		return msg_txt(1000);
+		return msg_txt(1000);//have to add these to the msg_txt in the conf?
 	case JOB_NECROMANCER: // Necromancer [Brain]
 		return msg_txt(1001);
@@ -4126,4 +4127,5 @@
 		return msg_txt(1002);
 
+	
 	default:
 		return msg_txt(650);
@@ -4219,5 +4221,5 @@
 		if (sd->status.status_point > USHRT_MAX - next)
 			sd->status.status_point = USHRT_MAX;
-		else
+		else	
 			sd->status.status_point += next;
 
@@ -4226,5 +4228,5 @@
 	if (battle_config.pet_lv_rate && sd->pd)	//<Skotlex> update pet's level
 		status_calc_pet(sd->pd,0);
-
+	
 	clif_updatestatus(sd,SP_STATUSPOINT);
 	clif_updatestatus(sd,SP_BASELEVEL);
@@ -4296,10 +4298,10 @@
 
 	if (sd->expaddrace[status->race])
-		bonus += sd->expaddrace[status->race];
+		bonus += sd->expaddrace[status->race];	
 	bonus += sd->expaddrace[status->mode&MD_BOSS?RC_BOSS:RC_NONBOSS];
-
-	if (battle_config.pk_mode &&
+	
+	if (battle_config.pk_mode && 
 		(int)(status_get_lv(src) - sd->status.base_level) >= 20)
-		bonus += 15; // pk_mode additional exp if monster >20 levels [Valaris]
+		bonus += 15; // pk_mode additional exp if monster >20 levels [Valaris]	
 
 	if (sd->sc.data[SC_EXPBOOST])
@@ -4308,5 +4310,5 @@
 	if (!bonus)
 	  	return;
-
+	
 	*base_exp += (unsigned int) cap_value((double)*base_exp * bonus/100., 1, UINT_MAX);
 	*job_exp += (unsigned int) cap_value((double)*job_exp * bonus/100., 1, UINT_MAX);
@@ -4337,5 +4339,5 @@
 	nextb = pc_nextbaseexp(sd);
 	nextj = pc_nextjobexp(sd);
-
+		
 	if(sd->state.showexp || battle_config.max_exp_gain_rate){
 		if (nextb > 0)
@@ -4359,5 +4361,5 @@
 		}
 	}
-
+	
 	//Cap exp to the level up requirement of the previous level when you are at max level, otherwise cap at UINT_MAX (this is required for some S. Novice bonuses). [Skotlex]
 	if (base_exp) {
@@ -4525,5 +4527,5 @@
 
 	max = pc_maxparameter(sd);
-
+	
 	switch(type){
 	case SP_STR: sd->status.str = cap_value(sd->status.str + val, 1, max); break;
@@ -4625,5 +4627,5 @@
 	}
 	status_calc_pc(sd,0);
-	//Required because if you could level up all skills previously,
+	//Required because if you could level up all skills previously, 
 	//the update will not be sent as only the lv variable changes.
 	clif_skillinfoblock(sd);
@@ -4722,5 +4724,5 @@
 {
 	nullpo_retr(0, sd);
-
+	
 	if (battle_config.use_statpoint_table)
 	{	// New statpoint table used here - Dexity
@@ -4735,5 +4737,5 @@
 		if (sd->class_&JOBL_UPPER)
 			stat+=52;	// extra 52+48=100 stat points
-
+		
 		if (stat > USHRT_MAX)
 			sd->status.status_point = USHRT_MAX;
@@ -4775,5 +4777,5 @@
 	clif_updatestatus(sd,SP_UDEX);
 	clif_updatestatus(sd,SP_ULUK);	// End Addition
-
+	
 	clif_updatestatus(sd,SP_STATUSPOINT);
 	status_calc_pc(sd,0);
@@ -4810,5 +4812,5 @@
 			merc_hom_vaporize(sd, 0);
 	}
-
+	
 	for (i = 1; i < MAX_SKILL; i++) {
 		lv= sd->status.skill[i].lv;
@@ -4839,5 +4841,5 @@
 		}
 	}
-
+	
 	if (flag&2 || !skill_point) return skill_point;
 
@@ -4945,5 +4947,5 @@
 	if(!src || src == &sd->bl)
 		return;
-
+	
 	if(sd->status.pet_id > 0 && sd->pd && battle_config.pet_damage_support)
 		pet_target_check(sd,src,1);
@@ -4957,5 +4959,5 @@
 	int i=0,j=0,k=0;
 	unsigned int tick = gettick();
-
+		
 	if(sd->vender_id)
 		vending_closevending(sd);
@@ -4981,5 +4983,5 @@
 	}
 
-	if(sd->status.hom_id > 0)	//orn
+	if(sd->status.hom_id > 0 && battle_config.homunculus_auto_vapor)	//orn
 		merc_hom_vaporize(sd, 0);
 
@@ -5052,5 +5054,5 @@
 			// karma going down = more 'good' / more honourable.
 			// The Karma System way...
-
+		
 			if (sd->status.karma > ssd->status.karma) {	// If player killed was more evil
 				sd->status.karma--;
@@ -5059,12 +5061,12 @@
 			else if (sd->status.karma < ssd->status.karma)	// If player killed was more good
 				ssd->status.karma++;
-
+	
 
 			// or the PK System way...
-
+	
 			if (sd->status.karma > 0)	// player killed is dishonourable?
 				ssd->status.karma--; // honour points earned
 			sd->status.karma++;	// honour points lost
-
+		
 			// To-do: Receive exp on certain occasions
 #endif
@@ -5313,5 +5315,5 @@
 				stat += (sd->status.base_level + i + 14) / 5 ;
 			if (sd->status.status_point > USHRT_MAX - stat)
-
+				
 				sd->status.status_point = USHRT_MAX;
 			else
@@ -5515,5 +5517,5 @@
 			status_percent_damage(NULL, &sd->bl, hp, 0, hp==-100);
 	}
-
+	
 	if(sp) {
 		if(sp > 0)
@@ -5547,5 +5549,5 @@
 	switch (upper) {
 		case 1:
-			b_class|= JOBL_UPPER;
+			b_class|= JOBL_UPPER; 
 			break;
 		case 2:
@@ -5554,9 +5556,9 @@
 	}
 	//This will automatically adjust bard/dancer classes to the correct gender
-	//That is, if you try to jobchange into dancer, it will turn you to bard.
+	//That is, if you try to jobchange into dancer, it will turn you to bard.	
 	job = pc_mapid2jobid(b_class, sd->status.sex);
 	if (job == -1)
 		return 1;
-
+	
 	if ((unsigned short)b_class == sd->class_)
 		return 1; //Nothing to change.
@@ -5586,5 +5588,5 @@
 		}
 	}
-
+	
 	sd->status.class_ = job;
 	fame_flag = pc_famerank(sd->status.char_id,sd->class_&MAPID_UPPERMASK);
@@ -5602,5 +5604,5 @@
 	}
 
-	//Change look, if disguised, you need to undisguise
+	//Change look, if disguised, you need to undisguise 
 	//to correctly calculate new job sprite without
 	if (sd->disguise)
@@ -5630,5 +5632,5 @@
 	if(merc_is_hom_active(sd->hd) && !pc_checkskill(sd, AM_CALLHOMUN))
 		merc_hom_vaporize(sd, 0);
-
+	
 	if(sd->status.manner < 0)
 		clif_changestatus(&sd->bl,SP_MANNER,sd->status.manner);
@@ -5789,5 +5791,5 @@
 	else if (!(type&OPTION_FLYING) && p_type&OPTION_FLYING)
 		new_look = -1;
-
+	
 	if (type&OPTION_WEDDING && !(p_type&OPTION_WEDDING))
 		new_look = JOB_WEDDING;
@@ -6023,5 +6025,5 @@
 	struct global_reg *sd_reg;
 	int i,max;
-
+	
 	nullpo_retr(0, sd);
 	switch (type) {
@@ -6100,5 +6102,5 @@
 		return 1;
 	}
-
+	
 	// delete reg
 	if (val == 0) {
@@ -6172,5 +6174,5 @@
 		return 0;
 	}
-
+	
 	// delete reg
 	if (!val || strcmp(val,"")==0)
@@ -6366,5 +6368,5 @@
 	if(pos == EQP_ACC) { //Accesories should only go in one of the two,
 		pos = req_pos&EQP_ACC;
-		if (pos == EQP_ACC) //User specified both slots..
+		if (pos == EQP_ACC) //User specified both slots.. 
 			pos = sd->equip_index[EQI_ACC_R] >= 0 ? EQP_ACC_L : EQP_ACC_R;
 	}
@@ -6551,5 +6553,5 @@
 	clif_unequipitemack(sd,n,sd->status.inventory[n].equip,1);
 
-	if((sd->status.inventory[n].equip & EQP_ARMS) &&
+	if((sd->status.inventory[n].equip & EQP_ARMS) && 
 		sd->weapontype1 == 0 && sd->weapontype2 == 0 && (!sd->sc.data[SC_SEVENWIND] || sd->sc.data[SC_ASPERSIO])) //Check for seven wind (but not level seven!)
 		skill_enchant_elemental_end(&sd->bl,-1);
@@ -6607,5 +6609,5 @@
 	if (sd->vender_id) //Avoid reorganizing items when we are vending, as that leads to exploits (pointed out by End of Exam)
 		return 0;
-
+	
 	// ió«lß
 	for(i=j=0;i<MAX_INVENTORY;i++){
@@ -6852,5 +6854,5 @@
 			hp = sd->battle_status.hp-1; //Script drains cannot kill you.
 	}
-
+	
 	if (sd->sp_loss.value) {
 		sd->sp_loss.tick += diff_tick;
@@ -6881,5 +6883,5 @@
 		}
 	}
-
+	
 	if (sd->sp_regen.value) {
 		sd->sp_regen.tick += diff_tick;
@@ -6987,8 +6989,8 @@
 	if (data == 0 && battle_config.day_duration <= 0)	// if we want a day
 		return 0;
-
+	
 	if (!night_flag)
 		return 0; //Already day.
-
+	
 	night_flag = 0; // 0=day, 1=night [Yor]
 	map_foreachpc(pc_daynight_timer_sub);
@@ -7008,5 +7010,5 @@
 	if (data == 0 && battle_config.night_duration <= 0)	// if we want a night
 		return 0;
-
+	
 	if (night_flag)
 		return 0; //Already nigth.
@@ -7037,9 +7039,9 @@
 	time_t timer;
 	struct tm *t;
-
+	
 	time(&timer);
 	t = localtime(&timer);
-
-	pc_setglobalreg(sd, "PC_LAST_DUEL_TIME", t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min);
+	
+	pc_setglobalreg(sd, "PC_LAST_DUEL_TIME", t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min);	
 	return;
 }
@@ -7050,10 +7052,10 @@
 	time_t timer;
 	struct tm *t;
-
+	
 	time(&timer);
     t = localtime(&timer);
-
+	
 	diff = t->tm_mday*24*60 + t->tm_hour*60 + t->tm_min - pc_readglobalreg(sd, "PC_LAST_DUEL_TIME");
-
+	
 	return !(diff >= 0 && diff < battle_config.duel_time_interval);
 }
@@ -7065,5 +7067,5 @@
 
 	if (sd->duel_group != ssd->duel_group) return 0;
-
+	
 	sprintf(output, "      %d. %s", ++(*p), sd->status.name);
 	clif_disp_onlyself(ssd, output, strlen(output));
@@ -7097,8 +7099,8 @@
 	int i=1;
 	char output[256];
-
+	
 	while(duel_list[i].members_count > 0 && i < MAX_DUEL) i++;
 	if(i == MAX_DUEL) return 0;
-
+	
 	duel_count++;
 	sd->duel_group = i;
@@ -7106,8 +7108,8 @@
 	duel_list[i].invites_count = 0;
 	duel_list[i].max_players_limit = maxpl;
-
+	
 	strcpy(output, msg_txt(372)); // " -- Duel has been created (@invite/@leave) --"
 	clif_disp_onlyself(sd, output, strlen(output));
-
+	
 	clif_set0199(sd, 1);
 	//clif_misceffect2(&sd->bl, 159);
@@ -7125,5 +7127,5 @@
 	target_sd->duel_invite = did;
 	duel_list[did].invites_count++;
-
+	
 	// "Blue -- Player %s invites you to PVP duel (@accept/@reject) --"
 	sprintf(output, msg_txt(374), sd->status.name);
@@ -7143,16 +7145,16 @@
 {
 	char output[256];
-
+	
 	// " <- Player %s has left duel --"
 	sprintf(output, msg_txt(375), sd->status.name);
 	clif_disp_message(&sd->bl, output, strlen(output), DUEL_WOS);
-
+	
 	duel_list[did].members_count--;
-
+	
 	if(duel_list[did].members_count == 0) {
-		map_foreachpc(duel_leave_sub, did);
+		map_foreachpc(duel_leave_sub, did); 
 		duel_count--;
 	}
-
+	
 	sd->duel_group = 0;
 	duel_savetime(sd);
@@ -7164,10 +7166,10 @@
 {
 	char output[256];
-
+	
 	duel_list[did].members_count++;
 	sd->duel_group = sd->duel_invite;
 	duel_list[did].invites_count--;
 	sd->duel_invite = 0;
-
+	
 	// " -> Player %s has accepted duel --"
 	sprintf(output, msg_txt(376), sd->status.name);
@@ -7182,9 +7184,9 @@
 {
 	char output[256];
-
+	
 	// " -- Player %s has rejected duel --"
 	sprintf(output, msg_txt(377), sd->status.name);
 	clif_disp_message(&sd->bl, output, strlen(output), DUEL_WOS);
-
+	
 	duel_list[did].invites_count--;
 	sd->duel_invite = 0;
@@ -7284,5 +7286,5 @@
 		if (pc_split_str(line,split,4) < 4)
 			continue;
-
+		
 		job_count = pc_split_atoi(split[1],jobs,':',CLASS_COUNT);
 		if (job_count < 1)
@@ -7303,5 +7305,5 @@
 			maxlv = MAX_LEVEL;
 		}
-
+		
 		job = jobs[0] = pc_class2idx(job_id);
 		//We send one less and then one more because the last entry in the exp array should hold 0.
@@ -7464,5 +7466,5 @@
 			if (i > MAX_LEVEL)
 				break;
-			statp[i]=j;
+			statp[i]=j;			
 			i++;
 		}
@@ -7473,5 +7475,5 @@
 	for (; i <= MAX_LEVEL; i++) {
 		j += (i+15)/5;
-		statp[i] = j;
+		statp[i] = j;		
 	}
 
@@ -7505,5 +7507,5 @@
 	else
 		ShowWarning("In function pc_read_motd() -> File '"CL_WHITE"%s"CL_RESET"' not found.\n", motd_txt);
-
+	
 	return 0;
 }
Index: src/map/pc.h
===================================================================
--- src/map/pc.h (revision 22)
+++ src/map/pc.h (revision 24)
@@ -114,5 +114,8 @@
 		unsigned short autolootid; // [Zephyrus]
 		unsigned noks : 3; // [Zeph Kill Steal Protection]
+		//Aside from a Space it's fine, but white space has no effect so it's fine.
+		//Vanaheim settings [Brainstorm]
 		unsigned showsummon : 1; //Show summoned monster stats [Brainstorm]
+
 		bool changemap;
 		struct guild *gmaster_flag;
@@ -143,5 +146,4 @@
 	int fd;
 	unsigned short mapindex;
-	unsigned short prev_speed,prev_adelay;
 	unsigned char head_dir; //0: Look forward. 1: Look right, 2: Look left.
 	unsigned int client_tick;
@@ -250,5 +252,5 @@
 	int crit_atk_rate;
 	int classchange; // [Valaris]
-	int speed_add_rate, aspd_add;
+	int speed_rate, speed_add_rate, aspd_add;
 	unsigned int setitem_hash, setitem_hash2; //Split in 2 because shift operations only work on int ranges. [Skotlex]
 	
@@ -266,5 +268,5 @@
 	int castrate,delayrate,hprate,sprate,dsprate;
 	int atk_rate;
-	int speed_rate,hprecov_rate,sprecov_rate;
+	int hprecov_rate,sprecov_rate;
 	int matk_rate;
 	int critical_rate,hit_rate,flee_rate,flee2_rate,def_rate,def2_rate,mdef_rate,mdef2_rate;
Index: src/map/mob.c
===================================================================
--- src/map/mob.c (revision 19)
+++ src/map/mob.c (revision 24)
@@ -2026,13 +2026,12 @@
 			break;
 		//Let players decide whether to retaliate versus the master or the mob. [Skotlex]
-		/*if (md2->master_id && battle_config.retaliate_to_master)
-			md->attacked_id = md2->master_id;*/
-			if (md2->master_id && battle_config.retaliate_to_master)
-	{
-		//necro_retaliation config (same as above, but only works for adept/necro/warlock summons) [Brainstorm]
-		if(!battle_config.necro_retaliation && (md2->class_ >= 3100 && md2->class_ <= 3235))
-		md->attacked_id = src->id;
-		else md->attacked_id = md2->master_id; //All normal summons
-	}
+		if (md2->master_id && battle_config.retaliate_to_master)
+//this is odd... does that mean if you have a pet out it will get attecked instead of you?
+		{
+			//necro_retaliation config (same as above, but only works for adept/necro/warlock summons) [Brainstorm]
+			if(!battle_config.necro_retaliation && (md2->class_ >= 3100 && md2->class_ <= 3235))
+				md->attacked_id = src->id;
+			else md->attacked_id = md2->master_id; //All normal summons
+		}
 
 		else
@@ -2556,5 +2555,5 @@
 		mob_script_callback(md, src, CALLBACK_DEAD);
 	else
-	if(md->npc_event[0] && !md->npc_killmonster)
+	if(md->npc_event[0] && !md->state.npc_killmonster)
 	{
 		md->status.hp = 0; //So that npc_event invoked functions KNOW that I am dead.
@@ -2836,4 +2835,5 @@
 }
 
+//Weird structure, is this in the right place?
 /// Count slaves with a certain master and class. by FlavioJS [Brain]
 static int mob_countslave_class_sub(struct block_list* bl, va_list ap)
@@ -2851,10 +2851,10 @@
 	if( md->master_id == id )
 	{// has the correct master
-	int i;
-	for( i = 0; i < count; ++i )
-	{
-		if( md->class_ == classes[i] )
-		return 1;
-	}
+		int i;
+		for( i = 0; i < count; ++i )
+		{
+			if( md->class_ == classes[i] )
+				return 1;
+		}
 	}
 	return 0;
@@ -4033,6 +4033,6 @@
 		"mob_boss.txt",
 		"mob_pouch.txt",
-		"mob_familiar.txt"
-	};
+		"mob_familiar.txt" // familiar By FlavioJS [Brain]
+		};//mob_familiar.txt make sure the name is right.
 
 	memset(&summon, 0, sizeof(summon));
Index: src/map/clif.c
===================================================================
--- src/map/clif.c (revision 1)
+++ src/map/clif.c (revision 24)
@@ -7062,7 +7062,7 @@
 	clif_weather_check(sd);
 	if( pc_issit(sd) )
-		clif_sitting(&sd->bl);
+		clif_sitting(&sd->bl); // FIXME: just send to self, not area
 	if( pc_isdead(sd) ) //When you refresh, resend the death packet.
-		clif_clearunit_area(&sd->bl,1);
+		clif_clearunit_single(sd->bl.id,1,sd->fd);
 
 #ifndef TXT_ONLY
Index: src/map/map.h
===================================================================
--- src/map/map.h (revision 19)
+++ src/map/map.h (revision 24)
@@ -77,4 +77,5 @@
 	MAPID_XMAS,
 	MAPID_SUMMER,
+	//Bit masking is used here?
 	MAPID_ADEPT = 0x0E,	// Adept [Brain]
 //2_1 classes
@@ -87,4 +88,5 @@
 	MAPID_ASSASSIN,
 	MAPID_STAR_GLADIATOR,
+	//and here and down there
 	MAPID_NECROMANCER = JOBL_2_1|0x0E,	// Necromancer [Brain]
 //2_2 classes
@@ -96,4 +98,5 @@
 	MAPID_ROGUE,
 	MAPID_SOUL_LINKER,
+	//see. why are the bitmasks like this? Xray thing?
 	MAPID_WARLOCK = JOBL_2_2|0x0E, // Warlock [Flavio]
 //1-1, advanced
@@ -293,5 +296,5 @@
 	SP_PERFECT_HIT_RATE,SP_PERFECT_HIT_ADD_RATE,SP_CRITICAL_RATE,SP_GET_ZENY_NUM,SP_ADD_GET_ZENY_NUM, // 1038-1042
 	SP_ADD_DAMAGE_CLASS,SP_ADD_MAGIC_DAMAGE_CLASS,SP_ADD_DEF_CLASS,SP_ADD_MDEF_CLASS, // 1043-1046
-	SP_ADD_MONSTER_DROP_ITEM,SP_DEF_RATIO_ATK_ELE,SP_DEF_RATIO_ATK_RACE,SP_ADD_SPEED, // 1047-1050
+	SP_ADD_MONSTER_DROP_ITEM,SP_DEF_RATIO_ATK_ELE,SP_DEF_RATIO_ATK_RACE,SP_FREE3, // 1047-1050
 	SP_HIT_RATE,SP_FLEE_RATE,SP_FLEE2_RATE,SP_DEF_RATE,SP_DEF2_RATE,SP_MDEF_RATE,SP_MDEF2_RATE, // 1051-1057
 	SP_SPLASH_RANGE,SP_SPLASH_ADD_RANGE,SP_AUTOSPELL,SP_HP_DRAIN_RATE,SP_SP_DRAIN_RATE, // 1058-1062
@@ -320,4 +323,5 @@
 	//2020 (SP_FREE) (previously SP_ADD_DAMAGE_BY_CLASS)
 	//2033 (SP_FREE2) (previously SP_ADDEFF_WHENHIT_SHORT)
+	//1050 (SP_FREE3) (previously SP_ADD_SPEED)
 };
 
Index: src/map/mail.c
===================================================================
--- src/map/mail.c (revision 1)
+++ src/map/mail.c (revision 24)
@@ -56,6 +56,10 @@
 
 	if (flag && sd->mail.zeny > 0)
+	{  //Zeny send
+		if(log_config.zeny)
+			log_zeny(sd, "E", sd, -sd->mail.zeny);
+
 		sd->status.zeny -= sd->mail.zeny;
-
+	}
 	sd->mail.zeny = 0;
 	clif_updatestatus(sd, SP_ZENY);
@@ -147,5 +151,9 @@
 
 	if( zeny > 0 )
+	{  //Zeny recieve
+		if(log_config.zeny)
+			log_zeny(sd, "E", sd, zeny);
 		pc_getzeny(sd, zeny);
+	}
 }
 
@@ -166,4 +174,8 @@
 	nullpo_retv(sd);
 	nullpo_retv(msg);
+
+	// Item  recieve (due to failure)
+	if(log_config.enable_logs&0x2000)
+		log_pick_pc(sd, "E", msg->item.nameid, msg->item.amount, &msg->item);
 
 	pc_additem(sd, &msg->item, msg->item.amount);
@@ -171,4 +183,8 @@
 	if( msg->zeny > 0 )
 	{
+		//Zeny recieve (due to failure)
+		if(log_config.zeny)
+			log_zeny(sd, "E", sd, msg->zeny);
+
 		sd->status.zeny += msg->zeny;
 		clif_updatestatus(sd, SP_ZENY);
Index: src/map/clif.h
===================================================================
--- src/map/clif.h (revision 1)
+++ src/map/clif.h (revision 24)
@@ -176,5 +176,4 @@
 void clif_divorced(struct map_session_data* sd, const char* name);
 //void clif_callpartner(struct map_session_data *sd);
-void clif_adopt_process(struct map_session_data *sd);
 void clif_soundeffect(struct map_session_data* sd, struct block_list* bl, const char* name, int type);
 int clif_soundeffectall(struct block_list* bl, const char *name, int type, enum send_target coverage);
Index: src/map/mob.h
===================================================================
--- src/map/mob.h (revision 19)
+++ src/map/mob.h (revision 24)
@@ -12,11 +12,11 @@
 
 
-#define MAX_RANDOMMONSTER 5
-#define MAX_MOB_RACE_DB 6
+#define MAX_RANDOMMONSTER 5 //seems okay. just makes it so you can hold 5 summons at once.
+#define MAX_MOB_RACE_DB 6 //should this be changed though? I assume since undead was only expanded it's fine but it may fix something later.
 
 // Change this to increase the table size in your mob_db to accomodate a larger mob database.
 // Be sure to note that IDs 4001 to 4048 are reserved for advanced/baby/expanded classes.
 // Notice that the last 1000 entries are used for player clones, so always set this to desired value +1000
-#define MAX_MOB_DB 7000
+#define MAX_MOB_DB 7000 //7000 should work fine.
 
 //The number of drops all mobs have and the max drop-slot that the steal skill will attempt to steal from.
@@ -113,4 +113,5 @@
 		unsigned char attacked_count; //For rude attacked.
 		int provoke_flag; // Celest
+		unsigned npc_killmonster: 1; //for new killmonster behavior
 	} state;
 	struct guardian_data* guardian_data; 
@@ -142,5 +143,4 @@
 	unsigned int skilldelay[MAX_MOBSKILL];
 	char npc_event[50];
-	int npc_killmonster; //for new killmonster behavior
 };
 
@@ -270,4 +270,5 @@
 int mob_countslave(struct block_list *bl);
 int mob_convertslave(struct mob_data *md);
+// I really don't see the point in this...
 int mob_countslave_class(struct block_list* bl, int count, short* classes); // By FlavioJS [Brain]
 
Index: src/map/chrif.c
===================================================================
--- src/map/chrif.c (revision 1)
+++ src/map/chrif.c (revision 24)
@@ -18,4 +18,5 @@
 #include "pc.h"
 #include "pet.h"
+#include "skill.h"
 #include "status.h"
 #include "mercenary.h"
@@ -911,7 +912,7 @@
 	{
 		sd->status.child = 0;
-		sd->status.skill[410].id = 0;
-		sd->status.skill[410].lv = 0;
-		sd->status.skill[410].flag = 0;
+		sd->status.skill[WE_CALLBABY].id = 0;
+		sd->status.skill[WE_CALLBABY].lv = 0;
+		sd->status.skill[WE_CALLBABY].flag = 0;
 		clif_skillinfoblock(sd);
 	}
@@ -920,7 +921,7 @@
 	{
 		sd->status.child = 0;
-		sd->status.skill[410].id = 0;
-		sd->status.skill[410].lv = 0;
-		sd->status.skill[410].flag = 0;
+		sd->status.skill[WE_CALLBABY].id = 0;
+		sd->status.skill[WE_CALLBABY].lv = 0;
+		sd->status.skill[WE_CALLBABY].flag = 0;
 		clif_skillinfoblock(sd);
 	}
