Index: src/map/status.c
===================================================================
--- src/map/status.c (revision 1)
+++ src/map/status.c (revision 10)
@@ -130,4 +130,7 @@
 	set_sc( NPC_SILENCEATTACK , SC_SILENCE   , SI_BLANK    , SCB_NONE );
 	set_sc( DC_WINKCHARM      , SC_CONFUSION , SI_BLANK    , SCB_NONE );
+	//Custom Jobs (blackmagic)
+	set_sc( AD_PWFEAR         , SC_FEAR      , SI_HALLUCINATION , SCB_SPEED ); //Fear Status by [Brainstorm]
+	//Custom Job End
 	set_sc( NPC_BLINDATTACK   , SC_BLIND     , SI_BLANK    , SCB_HIT|SCB_FLEE );
 	set_sc( LK_HEADCRUSH      , SC_BLEEDING  , SI_BLEEDING , SCB_REGEN );
@@ -407,4 +410,32 @@
 	set_sc( GD_BATTLEORDER       , SC_BATTLEORDERS    , SI_BLANK           , SCB_STR|SCB_INT|SCB_DEX );
 	set_sc( GD_REGENERATION      , SC_REGENERATION    , SI_BLANK           , SCB_REGEN );
+	//Custom Jobs (blackmagic)	
+	// 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);
+	
+	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);
+	//Custom Job End
 
 	// Storing the target job rather than simply SC_SPIRIT simplifies code later on.
@@ -650,4 +681,5 @@
 			status_change_end(target,SC_CLOAKING,-1);
 			status_change_end(target,SC_CHASEWALK,-1);
+			status_change_end(target,SC_FEAR, -1);//Custom Jobs (blackmagic)
 			if ((sce=sc->data[SC_ENDURE]) && !sce->val4) {
 				//Endure count is only reduced by non-players on non-gvg maps.
@@ -1340,4 +1372,9 @@
 	if (md->master_id && md->special_state.ai>1)
 		flag|=16;
+
+	//Custom Jobs (blackmagic)		
+	if (md->master_id && md->special_state.ai)
+		flag|=32; //Adept/Necro/Warlock Summon Stats Bonus [Brainstorm]
+	//Custom Job End
 
 	if (!flag)
@@ -1458,4 +1495,69 @@
 	}
 
+	//Custom Jobs (blackmagic)
+	//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);
+	
+			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);
+	}
+	//Custom Job End
+
 	//Initial battle status
 	if (!first)
@@ -1705,5 +1807,9 @@
 	status->aspd_rate = 1000;
 	status->ele_lv = 1;
-	status->race = RC_DEMIHUMAN;
+	//Custom Jobs (blackmagic)
+	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
+	//Custom Job End
+
 
 	//zero up structures...
@@ -1996,4 +2102,10 @@
 		status->dex += skill;
 
+	//Custom Jobs (blackmagic)
+	
+	if((skill=pc_checkskill(sd,WL_DEMONOLOGY))>0) //Warlock Demonology [Brain]
+		status->str += skill/2; //+1 str per 2 skill points
+	//Custom Job End
+
 	// Bonuses from cards and equipment as well as base stat, remember to avoid overflows.
 	i = status->str + sd->status.str + sd->param_bonus[0] + sd->param_equip[0];
@@ -2033,4 +2145,9 @@
 		status->max_hp += skill*200;
 
+	//Custom Jobs (blackmagic)
+	if((skill=pc_checkskill(sd,AD_PROFANE))>0) // Adept Profane Soul [Brain]
+		status->max_hp += status->max_hp * (skill*3)/100;
+	//Custom Job End
+
 	// Apply relative modifiers from equipment
 	if(sd->hprate < 0)
@@ -2061,4 +2178,9 @@
 	if((skill=pc_checkskill(sd,HW_SOULDRAIN))>0)
 		status->max_sp += status->max_sp * 2*skill/100;
+
+	//Custom Jobs (blackmagic)
+	if((skill=pc_checkskill(sd,AD_PROFANE))>0) // Adept Profane Soul [Brain]
+		status->max_sp += sd->status.max_sp * (skill*3)/100;
+	//Custom Job End
 
 	// Apply relative modifiers from equipment
@@ -2155,4 +2277,9 @@
 	}
 
+	//Custom Jobs (blackmagic)
+	if((skill=pc_checkskill(sd,AD_FERVOR))>0) // Adept Unholy Fevor [Brain]
+		status->hit += skill*2;
+	//Custom Job End
+
 // ----- FLEE CALCULATION -----
 
@@ -2162,4 +2289,9 @@
 	if((skill=pc_checkskill(sd,MO_DODGE))>0)
 		status->flee += (skill*3)>>1;
+
+	//Custom Jobs (blackmagic)
+	if((skill=pc_checkskill(sd,AD_FERVOR))>0) // Adept Unholy Fevor [Brain]
+		status->flee += skill*2;
+	//Custom Job End
 
 // ----- EQUIPMENT-DEF CALCULATION -----
@@ -2172,5 +2304,9 @@
 		status->def = cap_value(i, CHAR_MIN, CHAR_MAX);
 	}
-
+	//Custom Jobs (blackmagic)
+	// Absolute modifiers from passive skills
+	if((skill=pc_checkskill(sd,AD_DARKFAITH))>0) // Adept Dark Faith [Brain]
+		status->mdef += 1*skill;
+	//Custom Job End
 	if (!battle_config.weapon_defense_type && status->def > battle_config.max_def)
 	{
@@ -2295,4 +2431,19 @@
 	}
 
+
+	//Custom Jobs (blackmagic)
+	if((skill=pc_checkskill(sd,AD_DARKFAITH))>0) // Adept Dark Faith [Brain]
+		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;
+	}
+	if((pc_checkskill(sd,NC_PHYLACTERY))>0){ // Necro Phylactery [Brain]
+		sd->subele[ELE_NEUTRAL] += 10;	//And increases neutral resistance by 10%
+	}
+	//Custom Job End
+
 	if(sc->count){
      	if(sc->data[SC_CONCENTRATE])
@@ -2317,4 +2468,10 @@
 			sd->subrace[RC_DEMON] += sc->data[SC_PROVIDENCE]->val2;
 		}
+
+		//Custom Jobs (blackmagic)
+		if(sd->sc.data[SC_DEATHPACT]) //Necro Death Pact [Brain]
+			sd->subele[ELE_NEUTRAL] += sd->sc.data[SC_DEATHPACT]->val2;
+		//Custom Job End
+
 		if(sc->data[SC_ARMOR_ELEMENT])
 		{	//This status change should grant card-type elemental resist.
@@ -2638,4 +2795,8 @@
 		|| sc->data[SC_TRICKDEAD]
 		|| sc->data[SC_BLEEDING]
+		//Custom Jobs (blackmagic)
+		|| sc->data[SC_LUST]		// Adept Blood Lust, stops hp regen [Brain]
+		|| sc->data[SC_DEATHPACT]	// Necro Death Pact
+		//Custom Job End
 	)	//No regen
 		regen->flag = 0;
@@ -2646,4 +2807,7 @@
 		|| (sc->data[SC_EXPLOSIONSPIRITS]
 			&& (!sc->data[SC_SPIRIT] || sc->data[SC_SPIRIT]->val2 != SL_MONK))
+//Custom Jobs (blackmagic)
+		|| sc->data[SC_OVERWHELMING]	// Warlock Overwhelming Evil, stops sp regen [Brain]
+//Custom Job End
 	)	//No natural SP regen
 		regen->flag &=~RGN_SP;
@@ -3414,4 +3578,14 @@
 	if(sc->data[SC_MADNESSCANCEL])
 		batk += 100;
+	//Custom Jobs (blackmagic)
+	if(sc->data[SC_LUST]) // Adept Blood Lust [Brain]
+		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;
+	if(sc->data[SC_DECREPIFY]) // Necromancer Decrepify [Brain]
+		if(sc->data[SC_DECREPIFY]->val2>=2)
+			batk -= batk * 25/100;
+	
+	//Custom Job End
 	return (unsigned short)cap_value(batk,0,USHRT_MAX);
 }
@@ -3456,4 +3630,19 @@
 	if(sc->data[SC_STRIPWEAPON])
 		watk -= watk * sc->data[SC_STRIPWEAPON]->val2/100;
+	//Custom Jobs (blackmagic)
+	if(sc->data[SC_LUST]) // Adept Blood Lust [Brain]
+		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_CURSEWEAKNESS]) // Warlock Curse of Weakness [Brain]
+		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;
+	//Custom Job End
 
 	return (unsigned short)cap_value(watk,0,USHRT_MAX);
@@ -3475,4 +3664,8 @@
 	if(sc->data[SC_INCMATKRATE])
 		matk += matk * sc->data[SC_INCMATKRATE]->val1/100;
+	//Custom Jobs (blackmagic)
+	if(sc->data[SC_OVERWHELMING]) // Warlock Overwhelming Evil [Brain]
+		matk += matk * sc->data[SC_OVERWHELMING]->val2/100;
+	//Custom Job End
 
 	return (unsigned short)cap_value(matk,0,USHRT_MAX);
@@ -3522,4 +3715,12 @@
 	if(sc->data[SC_INCREASING])
 		hit += 20; // RockmanEXE; changed based on updated [Reddozen]
+	//Custom Jobs (blackmagic)
+	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;
+	}
+	//Custom Job End
 	
 	return (short)cap_value(hit,1,SHRT_MAX);
@@ -3562,4 +3763,12 @@
 	if(sc->data[SC_SPEED])
 		flee += 10 + sc->data[SC_SPEED]->val1 * 10 ;
+	//Custom Jobs (blackmagic)
+	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;
+	}
+	//Custom Job End
 
 	return (short)cap_value(flee,1,SHRT_MAX);
@@ -3620,4 +3829,12 @@
 	if (sc->data[SC_FLING])
 		def -= def * (sc->data[SC_FLING]->val2)/100;
+	//Custom Jobs (blackmagic)
+	if(sc->data[SC_SUFFER])	// Necro Power Word: Suffer [Brain]
+		def <<=1; // -25% def
+	if (sc->data[SC_CURSEEXHAUST]) // Warlock Curse of Exhaustion [Brain]
+		def -= sc->data[SC_CURSEEXHAUST]->val2;
+	if (sc->data[SC_OVERWHELMING]) // Warlock Overwhelming Evil [Brain]
+ 		def += sc->data[SC_OVERWHELMING]->val1;
+	//Custom Job End
 
 	return (signed char)cap_value(def,CHAR_MIN,CHAR_MAX);
@@ -3655,4 +3872,12 @@
 		def2 -= def2 * (sc->data[SC_FLING]->val3)/100;
 
+	//Custom Jobs (blackmagic)
+	if(sc->data[SC_SUFFER])	// Necro Power Word: Suffer [Brain]
+		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;
+	//Custom Job End
+
 	return (short)cap_value(def2,1,SHRT_MAX);
 }
@@ -3681,4 +3906,12 @@
 	if(sc->data[SC_CONCENTRATION])
 		mdef += 1; //Skill info says it adds a fixed 1 Mdef point.
+	//Custom Jobs (blackmagic)
+	if(sc->data[SC_AGONY])	 // Warlock Power Word: Agony [Brain]
+		mdef -= 25*mdef/100; // -25% mdef
+	if (sc->data[SC_CURSEEXHAUST]) // Warlock Curse of Exhaustion [Brain]
+		mdef -= sc->data[SC_CURSEEXHAUST]->val2;
+	if (sc->data[SC_OVERWHELMING]) // Warlock Overwhelming Evil [Brain]
+ 		mdef += sc->data[SC_OVERWHELMING]->val1;
+	//Custom Job End
 
 	return (signed char)cap_value(mdef,CHAR_MIN,CHAR_MAX);
@@ -3694,4 +3927,11 @@
 	if(sc->data[SC_MINDBREAKER])
 		mdef2 -= mdef2 * sc->data[SC_MINDBREAKER]->val3/100;
+	//Custom Jobs (blackmagic)
+	if(sc->data[SC_AGONY])	 // Warlock Power Word: Agony [Brain]
+		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;
+	//Custom Job End
 
 	return (short)cap_value(mdef2,1,SHRT_MAX);
@@ -3747,4 +3987,8 @@
 			else if(sc->data[SC_WINDWALK])
 				new_speed -= new_speed * sc->data[SC_WINDWALK]->val3/100;
+			//Custom Jobs (blackmagic)
+			else if(sc->data[SC_FEAR]) //Fear Status by [Brainstorm]
+				new_speed -= new_speed * 25/100;
+			//Custom Job End
 		}
 
@@ -3790,4 +4034,8 @@
 	if(sc->data[SC_SLOWDOWN])
 		speed = speed * 100/75;
+	//Custom Jobs (blackmagic)
+	if(sc->data[SC_DECREPIFY]) // Necromancer Decrepify [Brain]
+		speed = speed * 100/75; //-25% walkspeed
+	//Custom Job End
 	
 	return (short)cap_value(speed,10,USHRT_MAX);
@@ -3860,4 +4108,8 @@
 		else if(sc->data[SC_MADNESSCANCEL])
 			aspd_rate -= 200;
+		//Custom Jobs (blackmagic)
+		else if(sc->data[SC_LUST]) // Adept Blood Lust [Brain]
+			aspd_rate -= sc->data[SC_LUST]->val2*10;
+		//Custom Job End
 	}
 
@@ -3953,4 +4205,10 @@
 	if(sc->data[SC_ELEMENTALCHANGE])
 		return sc->data[SC_ELEMENTALCHANGE]->val2;
+	//Custom Jobs (blackmagic)
+	if( sc->data[SC_DEATHPACT]) // Necro Death Pact [Brain]
+		return ELE_UNDEAD;
+	if( sc->data[SC_OVERWHELMING]) // Warlock Overwhelming Evil [Brain]
+		return ELE_DARK;
+	//Custom Job End
 	return (unsigned char)cap_value(element,0,UCHAR_MAX);
 }
@@ -3971,4 +4229,10 @@
 	if(sc->data[SC_ELEMENTALCHANGE])
 		return sc->data[SC_ELEMENTALCHANGE]->val1;
+	//Custom Jobs (blackmagic)
+	if( sc->data[SC_DEATHPACT]) // Necro Death Pact [Brain]
+		return 1;
+	if( sc->data[SC_OVERWHELMING]) // Warlock Overwhelming Evil [Brain]
+		return 1;
+	//Custom Job End
 
 	return (unsigned char)cap_value(lv,1,4);
@@ -4708,4 +4972,7 @@
 	case SC_CARTBOOST:
 	case SC_ASSNCROS:
+	//Custom Jobs (blackmagic)
+	case SC_LUST: // Adept Blood Lust [Brain]
+	//Custom Job End
 		if (sc->data[SC_QUAGMIRE])
 			return 0;
@@ -4826,4 +5093,14 @@
 			case SC_ROKISWEIL:
 			case SC_FOGWALL:
+			//Custom Jobs (blackmagic)
+			//New status [Brainstorm]
+			case SC_FEAR:
+			case SC_DECREPIFY:
+			case SC_DARKMOON:
+			case SC_REQUIEM:
+			case SC_CURSETONGUES:
+			case SC_CURSEWEAKNESS:
+			case SC_CURSEEXHAUST:
+			//Custom Job End
 				return 0;
 		}
@@ -4841,6 +5118,50 @@
 			if (sc->data[SC_STONE] && sc->opt1 == OPT1_STONE)
 				status_change_end(bl,SC_STONE,-1);
-		}
-		break;
+			//Custom Jobs (blackmagic)
+			// 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
+			//Custom Job End
+		}
+		break;
+		//Custom Jobs (blackmagic)
+	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;
+		//Custom Job End
 	case SC_INCREASEAGI:
 		status_change_end(bl,SC_DECREASEAGI,-1);
@@ -4861,4 +5182,8 @@
 		status_change_end(bl,SC_TWOHANDQUICKEN,-1);
 		status_change_end(bl,SC_ONEHAND,-1);
+		//Custom Jobs (blackmagic)
+		if(sc->data[SC_LUST])	// Adept Blood Lust [Brain]
+		status_change_end(bl,SC_LUST,-1);
+		//Custom Job End
 		break;
 	case SC_ONEHAND:
@@ -4919,4 +5244,13 @@
 		status_change_end(bl,SC_MADNESSCANCEL,-1);
 		break;
+		//Custom Jobs (blackmagic)
+	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;
+		//Custom Job End
 	case SC_MADNESSCANCEL:
 		status_change_end(bl,SC_ADJUSTMENT,-1);
@@ -4950,4 +5284,7 @@
 			case SC_SILENCE:
 			case SC_CONFUSION:
+				//Custom Jobs (blackmagic)
+			case SC_FEAR: //Fear Status by [Brainstorm]
+				//Custom Job End
 			case SC_BLIND:
 			case SC_BLEEDING:
@@ -5259,4 +5596,10 @@
 			clif_emotion(bl,1);
 			break;
+			//Custom Jobs (blackmagic)
+		case SC_FEAR: //Fear Status by [Brainstorm]
+			clif_emotion(bl,16); // e_wah
+			if(sd) tick /= 2;
+			break;
+			//Custom Job End
 		case SC_BLEEDING:
 			val4 = tick/10000;
@@ -5636,4 +5979,13 @@
 			break;
 
+			//Custom Jobs (blackmagic)
+		case SC_ATFIELD: // AT-Field [Brainstorm]
+			val2 = 100; // 100% Block chance
+			val3 = 100; // Dodge 100 attacks total.
+			val4 = tick/1000;
+			tick = 1000;
+			break;
+			//Custom Job End
+
 		case SC_COMBO:
 		{
@@ -5683,4 +6035,21 @@
 				val2 = 0; //0 -> Half stat.
 			break;
+			//Custom Jobs (blackmagic)
+		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;
+			//Custom Job End
 		case SC_TRICKDEAD:
 			if (vd) vd->dead_sit = 1;
@@ -5723,4 +6092,15 @@
 			val2 = 5*val1; //watk increase
 			break;
+			//Custom Jobs (blackmagic)
+		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;
+			//Custom Job End
 		case SC_MELTDOWN:
 			val2 = 100*val1; //Chance to break weapon
@@ -5778,4 +6158,18 @@
 			val3 = 5+5*val1; //bAtk/wAtk rate change
 			break;
+			//Custom Jobs (blackmagic)
+		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;
+			//Custom Job End
 		case SC_MINDBREAKER:
 			val2 = 20*val1; //matk increase.
@@ -5961,4 +6355,9 @@
 				unit_skillcastcancel(bl, 0);
 		break;
+		//Custom Jobs (blackmagic)
+		case SC_FEAR: //Fear Status by [Brainstorm]
+			unit_stop_attack(bl);
+		break;
+		//Custom Job End
 	}
 
@@ -6406,5 +6805,8 @@
 			}
 			break;
-		case SC_SPLASHER:	
+//Custom Jobs (blackmagic)
+		case SC_SPLASHER:
+		case SC_DOOM: // Warlock Curse of Doom [Brain]
+//Custom Job End
 			{
 				struct block_list *src=map_id2bl(sce->val3);
@@ -6774,4 +7176,21 @@
 		sc_timer_next(sce->val2+tick, status_change_timer, bl->id, data);
 		return 0;
+		//Custom Jobs (blackmagic)
+	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;
+	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;
+	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;
+		//Custom Job End
 
 	case SC_CHASEWALK:
@@ -7008,4 +7427,12 @@
 		}
 		break;
+		//Custom Jobs (blackmagic)
+	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;
+		//Custom Job End
 
 	case SC_MARIONETTE:
@@ -7175,4 +7602,7 @@
 			case SC_WATKFOOD:
 			case SC_MATKFOOD:
+				//Custom Jobs (blackmagic)
+			case SC_DOOM: // Warlock Curse of Doom [Brain]
+				//Custom Job End
 				continue;
 				
