Paste: Fix PAtch brA 31-07

Author: Shiraz
Mode: c
Date: Tue, 31 Jul 2012 22:26:12
Plain Text |
Index: conf/msg_athena.conf
===================================================================
--- conf/msg_athena.conf	(revision 1187)
+++ conf/msg_athena.conf	(working copy)
@@ -318,6 +318,7 @@
 289: O personagem agora pode ser morto.
 290: O personagem já não pode ser morto.
 291: Os efeitos do tempo serão atualizados.
+292: Você não pode abrir uma loja nesta célula.
 // Números dos Castelos.
 // --------------------
 299: ?? Castelos
Index: db/const.txt
===================================================================
--- db/const.txt	(revision 1187)
+++ db/const.txt	(working copy)
@@ -587,6 +587,8 @@
 bMagicHPGainValue	2044
 bMatk	2045
 bAddClassDropItem	2046
+bCastVariable  2047
+bUseSPSkill    2048
 
 EQI_HEAD_TOP	1
 EQI_ARMOR	2
Index: db/item_db.txt
===================================================================
--- db/item_db.txt	(revision 1187)
+++ db/item_db.txt	(working copy)
@@ -934,7 +934,7 @@
 1651,P_Staff2,Cajado Valhalla Intermediário,4,0,,0,60,,1,0,0x00818314,7,2,2,2,40,0,10,{ bonus bInt,3; bonus bMatk,125; },{},{}
 1652,Traveler's_Staff,Traveler's Staff,4,20,,500,35,,1,0,0x00818315,7,2,2,1,1,1,10,{ bonus bMatkRate,15; bonus bInt,2; bonus bAgi,1; },{},{}
 1653,Healing_Of_Staff,Healing Staff,4,20,,0,10,,1,0,0x00818314,7,2,2,3,1,1,10,{ bonus bMatk,100; bonus bHealPower,18; },{},{}
-1654,Mental_Stick,Mental Stick,4,20,,500,40,,1,1,0x00010000,2,2,2,3,102,1,10,{ bonus bMatk,170; if (getrefine()>6) { bonus2 bSkillAtk,"SO_PSYCHIC_WAVE",(getrefine()-6)*2; bonus bMaxHPrate,-2*(getrefine()-6); } },{},{ heal 0,-100; }
+1654,Mental_Stick,Cajado Mental,4,20,,500,40,,1,1,0x00818315,2,2,2,3,102,1,10,{ bonus bMatk,170; bonus2 bCastVariable,2449,3000; bonus2 bUseSPSkill,2449,60; if (getrefine()>5) { bonus2 bSkillAtk,"SO_PSYCHIC_WAVE",(getrefine()-5)*2; bonus bMaxHPrate,-2*(getrefine()-5); } },{},{ heal 0,-100; }
 1657,Protection_Staff1,Protection Staff I,4,20,,500,30,,1,2,0x00000100,2,2,2,3,100,1,10,{ bonus bMatk,160; bonus bInt,2; bonus bAtkEle,Ele_Holy; bonus bHealPower,10; if (isequipped(2471,2569,15029)) { bonus bHealPower,25; }; },{},{}
 1658,P_Staff3,P.Staff III,4,0,,0,60,,1,0,0x00818314,7,2,2,3,60,0,10,{ bonus bInt,4; bonus bMatk,170; },{},{}
 1659,Light_of_Recovery,Light of Recovery,4,20,,400,30,,1,1,0x00000100,7,2,2,4,110,1,10,{ bonus bMatk,160; bonus bAtkEle,Ele_Holy; bonus bUnbreakableWeapon,0; bonus bHealPower,(getrefine()*3/2); bonus bUseSPrate,(getrefine()*3); },{},{}
@@ -1406,7 +1406,7 @@
 2407,Chrystal_Pumps,Sapatilha de Cristal,5,20,,100,,5,,0,0xFFFFFFFE,7,0,64,,0,1,0,{ bonus bMdef,10; bonus bLuk,5; },{},{}
 2408,Cuffs,Grilhões,5,5000,,3000,,15,,0,0xFFFFFFFF,7,2,64,,0,1,0,{ if (isequipped(2655)) { bonus bBaseAtk,50; bonus2 bAddDefClass,1196,20; bonus2 bAddDefClass,1197,20; } },{},{}
 2409,Spiky_Heel,Salto Alto,5,8500,,600,,10,,0,0xFFFFFFFE,7,2,64,,0,1,0,{ bonus bMdef,5; },{},{}
-2410,Sleipnir,Sleipnir,5,20,,3500,,40,,0,0xFFFFFFFF,7,2,64,,94,0,0,{ bonus bInt,25; bonus bMdef,10; bonus bMaxHPrate,20; bonus bMaxSPrate,20; bonus bSPrecovRate,15; bonus bSpeedRate,25; },{},{}
+2410,Sleipnir,Sleipnir,5,20,,3500,,40,,0,0xFFFFFFFF,7,2,64,,94,0,0,{ bonus bInt,25; bonus bMdef,10; bonus bMaxHPrate,20; bonus bMaxSPrate,20; bonus bSPrecovRate,25; bonus bSpeedRate,25; },{},{}
 2411,Grave,Grevas,5,48000,,750,,27,,0,0x00004080,7,2,64,,65,1,0,{},{},{}
 2412,Grave_,Grevas,5,54000,,750,,27,,1,0x00004080,7,2,64,,65,1,0,{},{},{}
 2413,Safty_Boots,Coturnos,5,34000,,350,,22,,0,0x00004082,7,2,64,,30,0,0,{},{},{}
@@ -6852,7 +6852,7 @@
 14608,Luxurious_Dinner_E,Manchu-Han Imperial Feast,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ sc_start SC_INCALLSTATUS,3600000,6; },{},{}
 14609,Spoiled_Cuisine,Spoiled Cuisine,2,0,,0,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 10,10; },{},{}
 // More Armors
-15000,Bone_Plate,Armadura de Placas de Ossos,5,20,,1000,,60,,1,0x00021040,2,2,16,,1,1,0,{ bonus bStr,1; bonus bMDef,3; bonus2 bIgnoreDefRate,RC_DemiHuman,10; bonus2 bIgnoreDefRate,RC_Brute,10; bonus3 bAutoSpellWhenHit,"NPC_WIDEBLEEDING",1,10; },{},{}
+15000,Bone_Plate,Armadura de Placas de Ossos,5,20,,1000,,60,,1,0x000654E2,2,2,16,,1,1,0,{ bonus bStr,1; bonus bMDef,3; bonus2 bIgnoreDefRate,RC_DemiHuman,10; bonus2 bIgnoreDefRate,RC_Brute,10; bonus3 bAutoSpellWhenHit,"NPC_WIDEBLEEDING",1,10; },{},{}
 15001,Odin's_Blessing_I,Odin's Blessing,5,20,,0,,10,,0,0xFFFFFFFE,7,2,16,,0,0,0,{},{},{}
 15002,Rune_Plate,Armadura Rúnica,5,0,,0,,95,,1,0x00000080,7,2,16,,99,1,0,{},{},{}
 15003,Freya_Soul_Robe1,Freya Soul Robe,5,0,,300,,7,,0,0xFFFFFFFE,7,2,16,,20,1,0,{ bonus bMaxHP,700; },{},{}
Index: db/skill_cast_db.txt
===================================================================
--- db/skill_cast_db.txt	(revision 1187)
+++ db/skill_cast_db.txt	(working copy)
@@ -79,7 +79,7 @@
 //-- AL_HOLYWATER
 31,1000,500,500,0,0,0
 //-- AL_CRUCIS
-32,500,2000,2000,60000,0,0
+32,500,2000,0,0,0,0
 //-- AL ANGELUS
 33,500,3500,3500,0,30000:60000:90000:120000:150000:180000:210000:240000:270000:300000,0
 //-- AL_BLESSING
Index: db/skill_db.txt
===================================================================
--- db/skill_db.txt	(revision 1187)
+++ db/skill_db.txt	(working copy)
@@ -849,7 +849,7 @@
 2006,0,6,4,-1,0x2,5,5,1,no,0,0,0,weapon,0,	RK_IGNITIONBREAK,Impacto Flamejante
 2007,0,0,0,0,0,0,5,0,no,0,0,0,weapon,0,		RK_DRAGONTRAINING,Adestrar Dragão
 2008,9,6,2,3,0xC2,1:1:1:2:2:2:3:3:4:4,10,1,no,0,0,0,misc,0,	RK_DRAGONBREATH,Sopro do Dragão
-2009,0,6,4,0,0x3,3:4:5:6:7,5,1,yes,0,0,0,weapon,0,	RK_DRAGONHOWLING,Rugido do Dragão
+2009,0,6,4,0,0x3,7:9:11:13:15,5,1,yes,0,0,0,weapon,0,	RK_DRAGONHOWLING,Rugido do Dragão
 2010,0,0,0,0,0,0,10,0,no,0,0,0,none,0,		RK_RUNEMASTERY,Perícia em Runas
 2011,0,6,4,0,0x1,0,1,1,yes,0,0,0,none,0,	RK_MILLENNIUMSHIELD,Escudos Milenares
 2012,1,6,1,-1,0,0x8,1,1,yes,0,0,0,weapon,0,	RK_CRUSHSTRIKE,Golpe Titânico
@@ -1149,7 +1149,7 @@
 2481,11,6,1,-1,0x2,1:2:3:4:5,5,1,yes,0,0,0,weapon,0,	GN_SPORE_EXPLOSION,Esporo Explosivo
 2482,11,6,16,0,0x1,0,5,-1,yes,0,0,1,weapon,2,	GN_WALLOFTHORN,Muralha de Espinhos
 2483,11,8,2,0,0x2,3,10,8,yes,0,0,0,weapon,0,	GN_CRAZYWEED,Erva Daninha
-2484,0,8,2,2,0x2,2,10,8,no,0,0,0,weapon,0,	GN_CRAZYWEED_ATK,Erva Daninha
+2484,0,8,2,2,0x2,2,10,3:4:4:5:5:6:6:7:7:8,no,0,0,0,weapon,0,	GN_CRAZYWEED_ATK,Erva Daninha
 2485,9,6,2,3,0,0,5,1,yes,0,0,0,magic,0,		GN_DEMONIC_FIRE,Bomba Napalm
 2486,9,6,2,0,0,0,5,1,yes,0,0,0,none,0,	GN_FIRE_EXPANSION,Catalisador Alquímico
 2487,9,6,2,0,0,0,1,1,no,0,0,0,none,0,	GN_FIRE_EXPANSION_SMOKE_POWDER,Catalisador Alquímico - Cortina de Fumaça em Pó
@@ -1344,24 +1344,24 @@
 8422,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0,		EL_PETROLOGY,Petrology
 8423,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0,		EL_CURSED_SOIL,Cursed Soil
 8424,0,6,4,0,0x1,0,1,1,no,0,0,0,none,0,		EL_UPHEAVAL,Upheaval
-8425,6,6,16,3,0x1,0,1,1,no,0,0,0,magic,0,	EL_FIRE_ARROW,Fire Arrow
-8426,6,6,16,3,0x1,1,1,1,no,0,0,0,magic,0,	EL_FIRE_BOMB,Fire Bomb
+8425,6,6,1,3,0,0,1,1,no,0,0,0,magic,0,	  EL_FIRE_ARROW,Fire Arrow
+8426,6,6,1,3,0,1,1,1,no,0,0,0,magic,0,	  EL_FIRE_BOMB,Fire Bomb
 8427,6,6,1,3,0,1,1,1,no,0,0,0,weapon,0,  	EL_FIRE_BOMB_ATK,Fire Bomb Attack
-8428,6,6,16,3,0x1,1,1,1,no,0,0,0,magic,0,	EL_FIRE_WAVE,Fire Wave
+8428,6,6,1,3,0,1,1,1,no,0,0,0,magic,0,	  EL_FIRE_WAVE,Fire Wave
 8429,6,6,1,3,0,1,1,1,no,0,0,0,weapon,0,		EL_FIRE_WAVE_ATK,Fire Wave Attack
-8430,9,6,16,1,0x1,0,1,1,no,0,0,0,magic,0,	EL_ICE_NEEDLE,Ice Needle
-8431,9,6,16,1,0x1,1,1,1,no,0,0,0,magic,0, 	EL_WATER_SCREW,Water Screw
+8430,9,6,1,1,0,0,1,1,no,0,0,0,magic,0,	  EL_ICE_NEEDLE,Ice Needle
+8431,9,6,1,1,0,1,1,1,no,0,0,0,magic,0,    EL_WATER_SCREW,Water Screw
 8432,9,6,1,1,0,1,1,1,no,0,0,0,weapon,0,		EL_WATER_SCREW_ATK,Water Screw Attack
-8433,9,6,16,1,0x1,1,1,1,no,0,0,0,weapon,0,	EL_TIDAL_WEAPON,Tidal Weapon
-8434,11,6,16,4,0x1,0,1,1,no,0,0,0,weapon,0,	EL_WIND_SLASH,Wind Slasher
-8435,11,6,16,4,0x1,1,1,1,no,0,0,0,weapon,0,	EL_HURRICANE,Hurricane Rage
+8433,9,6,1,1,0,1,1,1,no,0,0,0,weapon,0,	  EL_TIDAL_WEAPON,Tidal Weapon
+8434,11,6,1,4,0,0,1,1,no,0,0,0,weapon,0,	EL_WIND_SLASH,Wind Slasher
+8435,11,6,1,4,0,1,1,1,no,0,0,0,weapon,0,	EL_HURRICANE,Hurricane Rage
 8436,7,6,1,4,0,0,1,1,no,0,0,0,magic,0,		EL_HURRICANE_ATK,Hurricane Rage Attack
 8437,6,8,1,4,0,1,1,-3,no,0,0,0,weapon,0,	EL_TYPOON_MIS,Typhoon Missile
 8438,11,6,1,4,0,1,1,1,no,0,0,0,magic,0,		EL_TYPOON_MIS_ATK,Typhoon Missile Attack
-8439,5,6,16,2,0x1,0,1,1,no,0,0,0,weapon,0,	EL_STONE_HAMMER,Stone Hammer
-8440,3,6,16,2,0x1,1,1,1,no,0,0,0,weapon,0,	EL_ROCK_CRUSHER,Rock Launcher
+8439,5,6,1,2,0,0,1,1,no,0,0,0,weapon,0,	  EL_STONE_HAMMER,Stone Hammer
+8440,3,6,1,2,0,1,1,1,no,0,0,0,weapon,0,	  EL_ROCK_CRUSHER,Rock Launcher
 8441,5,6,1,2,0,1,1,1,no,0,0,0,magic,0,		EL_ROCK_CRUSHER_ATK,Rock Launcher Attack
-8442,9,6,16,2,0x1,1,1,-5,no,0,0,0,weapon,0,	EL_STONE_RAIN,Stone Rain
+8442,9,6,1,2,0,1,1,-5,no,0,0,0,weapon,0,	EL_STONE_RAIN,Stone Rain
 //========================================================================================================
 // Habilidades dos Clãs
 //========================================================================================================
Index: db/skill_require_db.txt
===================================================================
--- db/skill_require_db.txt	(revision 1187)
+++ db/skill_require_db.txt	(working copy)
@@ -527,7 +527,7 @@
 2204,0,0,50:60:70:80:90,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//WL_JACKFROST#Esquife de Gelo#
 2205,0,0,40:42:44:46:48,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//WL_MARSHOFABYSS#Pântano de Nifflheim#
 2206,0,0,100:120:140:160:180,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//WL_RECOGNIZEDSPELL#Maestria Arcana#
-2207,0,0,32:34:36:38:40,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//WL_SIENNAEXECRATE#Fúria da Medusa#
+2207,0,0,32:34:36:38:40,0,0,0,99,0,0,none,0,716,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//WL_SIENNAEXECRATE#Fúria da Medusa#
 2209,0,0,50:60:70:80:90,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//WL_STASIS#Distorção Arcana#
 2210,0,0,20:24:28:32:36,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//WL_DRAINLIFE#Drenar Vida#
 2211,0,0,60:70:80:90:100,0,0,0,99,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0	//WL_CRIMSONROCK#Meteoro Escarlate#
Index: src/map/atcommand.c
===================================================================
--- src/map/atcommand.c	(revision 1187)
+++ src/map/atcommand.c	(working copy)
@@ -1593,9 +1593,9 @@
  *------------------------------------------*/
 ACMD_FUNC(joblevelup)
 {
-	unsigned int level=0;
+	int level = 0;
 	nullpo_retr(-1, sd);
-
+	
 	level = atoi(message);
 
 	if (!message || !*message || !level) {
@@ -1603,7 +1603,7 @@
 		return -1;
 	}
 	if (level > 0) {
-		if (sd->status.job_level == pc_maxjoblv(sd)) {
+		if (sd->status.job_level >= pc_maxjoblv(sd)) {
 			clif_displaymessage(fd, msg_txt(23)); // Job level can't go any higher.
 			return -1;
 		}
Index: src/map/battle.c
===================================================================
--- src/map/battle.c	(revision 1187)
+++ src/map/battle.c	(working copy)
@@ -2127,7 +2127,7 @@
 					if( s_base_level > 99 ) skillratio += skillratio * (s_base_level - 99) / 20;
 					break;
 				case NC_BOOSTKNUCKLE:
-					skillratio += (200 + (skill_lv * 100) + sstatus->dex );
+					skillratio += 100 + 100 * skill_lv + sstatus->dex;
 					if( s_base_level > 99 ) skillratio += skillratio * (s_base_level - 99) / 20;
 					break;
 				case NC_PILEBUNKER:
@@ -2147,16 +2147,16 @@
 					switch(tstatus->size)
 					{
 						case 1://Medio
-							skillratio += 200 + 350*skill_lv;
+							skillratio += 100 + 400*skill_lv;
 							break;
 						case 2://Grande
-							skillratio += 200 + (skill_lv == 1 ? 100 : (300*skill_lv));
+							skillratio += 100 + 300*skill_lv;
 							break;
 						default://Pequeno ou outros
-							skillratio += 300 + (skill_lv == 1 ? 100 : (400*skill_lv));
+							skillratio += 100 + 500*skill_lv;
 							break;
 					}
-					if( s_base_level > 100 ) skillratio += skillratio * (s_base_level - 100) / 130;
+					if( s_base_level > 99 ) skillratio += skillratio * (s_base_level - 99) / 20;
 					break;
 
 				case WM_REVERBERATION_MELEE:
@@ -2258,7 +2258,7 @@
 					skillratio += 200 + 100 * skill_lv;
 					break;
 				case GN_CRAZYWEED_ATK:
-					skillratio += 500 + 100 * skill_lv;
+					skillratio += 400 + 100 * skill_lv;
 					break;
 				case GN_SLINGITEM_RANGEMELEEATK:
 					if( sd )
@@ -3495,10 +3495,12 @@
 						if(sc && sc->data[SC_COOLER_OPTION])
 							skillratio += skillratio*sc->data[SC_COOLER_OPTION]->val3/100;
 						break;
-					case SO_POISON_BUSTER:
-						skillratio = ((300 * skill_lv) + 900) * (s_base_level / 120);
+					case SO_POISON_BUSTER: {
+						struct status_change * sc = status_get_sc(src);
+						skillratio += 1100 + 300 * skill_lv;
 						if( sc && sc->data[SC_CURSED_SOIL_OPTION] )
 							skillratio += skillratio * sc->data[SC_CURSED_SOIL_OPTION]->val2 / 100;
+						}
 						break;
 					case SO_VARETYR_SPEAR:
 						skillratio += -100 + ( 100 * pc_checkskill(sd, SA_LIGHTNINGLOADER) + sstatus->int_ * skill_lv );
@@ -3919,9 +3921,8 @@
 		md.damage = sstatus->int_ * 25 + (status_get_lv(target) * 15 * skill_lv) * (10 / (10 - pc_checkskill(sd,AM_CANNIBALIZE))) - 25;
 		break;
 	case NC_SELFDESTRUCTION:
-		md.damage = (status_get_sp(src) + sstatus->vit) * 20 * skill_lv/3 - (tstatus->def + tstatus->def2);
-		if (status_get_lv(src) > 100) md.damage = md.damage * s_base_level / 150;
-		if (sd) md.damage = md.damage + status_get_hp(src);
+		md.damage = (status_get_sp(src) + sstatus->vit) * 20 * skill_lv/3 + status_get_hp(src) - (tstatus->def + tstatus->def2);
+		if (status_get_lv(src) > 100) md.damage = md.damage * s_base_level / 100;
 		status_set_sp(src, 0, 0);
 		nk|=NK_IGNORE_FLEE|NK_IGNORE_DEF|NK_NO_ELEFIX;
 		if(tstatus->race == RC_DEMIHUMAN) nk |= NK_NO_CARDFIX_DEF;
@@ -4941,13 +4942,11 @@
 		return false;
 
 #ifndef CIRCULAR_AREA
-	if( src->type == BL_PC )
-	{ // Range for players' attacks and skills should always have a circular check. [Inkfish]
+	if( src->type == BL_PC ) { // Range for players' attacks and skills should always have a circular check. [Angezerus]
 		int dx = src->x - bl->x, dy = src->y - bl->y;
-		if( !check_distance(dx*dx + dy*dy, 0, range*range+(dx&&dy?1:0)) )
+		if( !check_distance(dx, dy, range) )
 			return false;
-	}
-	else
+	} else
 #endif
 	if( !check_distance_bl(src, bl, range) )
 		return false;
Index: src/map/clif.c
===================================================================
--- src/map/clif.c	(revision 1187)
+++ src/map/clif.c	(working copy)
@@ -8924,6 +8924,16 @@
 		clif_mercenary_info(sd);
 		clif_mercenary_skillblock(sd);
 	}
+	
+	if( sd->ed )
+	{
+		map_addblock(&sd->ed->bl);
+		clif_spawn(&sd->ed->bl);
+		clif_elemental_info(sd);
+		clif_elemental_updatestatus(sd,SP_HP);
+		clif_hpmeter_single(sd->fd,sd->ed->bl.id,sd->ed->battle_status.hp,sd->ed->battle_status.matk_max);
+		clif_elemental_updatestatus(sd,SP_SP);
+	}
 
 	if(sd->state.connect_new) {
 		int lv;
@@ -11531,7 +11541,7 @@
 		return;
 	}
 	if( map_getcell(sd->bl.m,sd->bl.x,sd->bl.y,CELL_CHKNOVENDING) ) {
-		clif_displaymessage (sd->fd, msg_txt(204)); // "You can't open a shop on this cell."
+		clif_displaymessage (sd->fd, msg_txt(292)); // "Você não pode abrir uma loja nesta célula."
 		return;
 	}
 	if( message[0] == '\0' ) // invalid input
@@ -15837,7 +15847,7 @@
 	    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
 	// 0x7d9 changed
 	    6,  2, -1,  4,  4,  4,  4,  8,  8,268,  6,  8,  6, 54, 30, 54,
-	    0, 15,  8,  0,  0,  8,  8, 32, -1,  5,  0,  0,  0,  0,  0,  0,
+	    0, 15,  8,  6, -1,  8,  8, 32, -1,  5,  0,  0,  0,  0,  0,  0,
 	    0,  0,  0,  0,  0,  0, 14, -1, -1, -1,  8, 25,  0,  0, 26,  0,
 	//#0x0800
 	// for Party booking ( PACKETVER >= 20091229 )
Index: src/map/elemental.c
===================================================================
--- src/map/elemental.c	(revision 1187)
+++ src/map/elemental.c	(working copy)
@@ -594,7 +594,10 @@
 	if( master_dist > AREA_SIZE )
 	{
 		elemental_unlocktarget(ed);
-		unit_warp(&ed->bl,sd->bl.m,sd->bl.x,sd->bl.y,3);
+		unit_warp(&ed->bl,sd->bl.m,sd->bl.x,sd->bl.y,CLR_TELEPORT);
+		clif_elemental_updatestatus(sd,SP_HP);
+		clif_hpmeter_single(sd->fd,ed->bl.id,ed->battle_status.hp,ed->battle_status.matk_max);
+		clif_elemental_updatestatus(sd,SP_SP);
 		return 0;
 	}
 	else if( master_dist > MAX_ELEDISTANCE )
Index: src/map/intif.c
===================================================================
--- src/map/intif.c	(revision 1187)
+++ src/map/intif.c	(working copy)
@@ -34,14 +34,14 @@
 
 
 static const int packet_len_table[]={
-	-1,-1,27,-1, -1, 0,37, 0,  0, 0, 0, 0,  0, 0,  0, 0, //0x3800-0x380f
+	-1,-1,27,-1, -1, 0,37, 522,  0, 0, 0, 0,  0, 0,  0, 0, //0x3800-0x380f
 	 0, 0, 0, 0,  0, 0, 0, 0, -1,11, 0, 0,  0, 0,  0, 0, //0x3810
 	39,-1,15,15, 14,19, 7,-1,  0, 0, 0, 0,  0, 0,  0, 0, //0x3820
 	10,-1,15, 0, 79,19, 7,-1,  0,-1,-1,-1, 14,67,186,-1, //0x3830
 	-1, 0, 0,14,  0, 0, 0, 0, -1,74,-1,11, 11,-1,  0, 0, //0x3840
 	-1,-1, 7, 7,  7,11, 0, 0,  0, 0, 0, 0,  0, 0,  0, 0, //0x3850  Auctions [Zephyrus]
 	-1, 7, 0, 0,  0, 0, 0, 0,  0, 0, 0, 0,  0, 0,  0, 0, //0x3860  Quests [Kevin] [Inkfish]
-	-1, 3, 3, 0,  0, 0, 0, 0,  0, 0, 0, 0,  0, 0,  0, 0, //0x3870  Mercenaries [Zephyrus]
+	-1, 3, 3, 0,  0, 0, 0, 0,  0, 0, 0, 0, -1, 3,  3, 0, //0x3870  Mercenaries [Zephyrus] / Elemental [pakpil]
 	11,-1, 7, 3,  0, 0, 0, 0,  0, 0, 0, 0,  0, 0,  0, 0, //0x3880
 	-1,-1, 7, 3,  0, 0, 0, 0,  0, 0, 0, 0,  0, 0,  0, 0, //0x3890  Homunculus [albator]
 };
Index: src/map/map.h
===================================================================
--- src/map/map.h	(revision 1187)
+++ src/map/map.h	(working copy)
@@ -391,7 +391,7 @@
 	SP_SP_GAIN_RACE, SP_SUBRACE2, SP_UNBREAKABLE_SHOES,	// 2031-2033
 	SP_UNSTRIPABLE_WEAPON,SP_UNSTRIPABLE_ARMOR,SP_UNSTRIPABLE_HELM,SP_UNSTRIPABLE_SHIELD,  // 2034-2037
 	SP_INTRAVISION, SP_ADD_MONSTER_DROP_ITEMGROUP, SP_SP_LOSS_RATE, // 2038-2040
-	SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE, SP_MAGIC_SP_GAIN_VALUE, SP_MAGIC_HP_GAIN_VALUE, SP_MATK, SP_ADD_CLASS_DROP_ITEM //2041-2046
+	SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE, SP_MAGIC_SP_GAIN_VALUE, SP_MAGIC_HP_GAIN_VALUE, SP_MATK, SP_ADD_CLASS_DROP_ITEM, SP_CASTVARIABLE, SP_USE_SKILL //2041-2048
 };
 
 enum _look {
Index: src/map/pc.c
===================================================================
--- src/map/pc.c	(revision 1187)
+++ src/map/pc.c	(working copy)
@@ -1172,8 +1172,8 @@
 		 * Fixes login-without-aura glitch (the screen won't blink at this point, don't worry :P)
 		 **/
 		clif_changemap(sd,sd->mapindex,sd->bl.x,sd->bl.y);
-	}
-	
+	}
+
 	/**
 	 * Check if player have any item cooldowns on
 	 **/
@@ -1256,9 +1256,9 @@
 		sd->hate_mob[i] = pc_readglobalreg(sd,sg_info[i].hate_var)-1;
 	}
 
-	if ((i = pc_checkskill(sd,RG_PLAGIARISM)) > 0) {
+	if ((i = pc_checkskill(sd,RG_PLAGIARISM))) {
 		sd->cloneskill_id = pc_readglobalreg(sd,"CLONE_SKILL");
-		if (sd->cloneskill_id > 0) {
+		if (sd->cloneskill_id) {
 			sd->status.skill[sd->cloneskill_id].id = sd->cloneskill_id;
 			sd->status.skill[sd->cloneskill_id].lv = pc_readglobalreg(sd,"CLONE_SKILL_LV");
 			if (sd->status.skill[sd->cloneskill_id].lv > i)
@@ -1266,14 +1266,14 @@
 			sd->status.skill[sd->cloneskill_id].flag = SKILL_FLAG_PLAGIARIZED;
 		}
 	}
-	if ((i = pc_checkskill(sd,SC_REPRODUCE)) > 0) {
+	if ((i = pc_checkskill(sd,SC_REPRODUCE))) {
 		sd->reproduceskill_id = pc_readglobalreg(sd,"REPRODUCE_SKILL");
-		if( sd->reproduceskill_id > 0) {
+		if( sd->reproduceskill_id) {
 			sd->status.skill[sd->reproduceskill_id].id = sd->reproduceskill_id;
 			sd->status.skill[sd->reproduceskill_id].lv = pc_readglobalreg(sd,"REPRODUCE_SKILL_LV");
 			if( i < sd->status.skill[sd->reproduceskill_id].lv)
 				sd->status.skill[sd->reproduceskill_id].lv = i;
-			sd->status.skill[sd->reproduceskill_id].flag = 13;
+			sd->status.skill[sd->reproduceskill_id].flag = SKILL_FLAG_PLAGIARIZED;
 		}
 	}
 	//Weird... maybe registries were reloaded?
@@ -3144,6 +3144,20 @@
 		if(sd->state.lr_flag != 2)
 			sd->hp_gain_race_attack[type2] = cap_value(sd->hp_gain_race_attack[type2] + val, 0, INT16_MAX);
 		break;
+       case SP_CASTVARIABLE:
+		if(sd->state.lr_flag != 2)
+		{
+			sd->cast2variable = type2;
+			sd->castvariable = val;
+		}
+		break;
+       case SP_USE_SKILL:
+		if(sd->state.lr_flag != 2)
+		{
+			sd->sp2_use_skill = type2;
+			sd->sp_use_skill = val;
+		}
+		break;
 	default:
 		ShowWarning("pc_bonus2: unknown type %d %d %d!\n",type,type2,val);
 		break;
@@ -4234,7 +4248,7 @@
 		return 1;
 	}
 
-	if( (w = data->weight*amount) + sd->cart_weight > battle_config.max_cart_weight )
+	if( (w = data->weight*amount) + sd->cart_weight > battle_config.max_cart_weight + pc_checkskill(sd, GN_REMODELING_CART)*5000 )
 		return 1;
 
 	i = MAX_CART;
@@ -4512,7 +4526,7 @@
 		return 1;
 	}
 
-	if( pc_isdead(sd) )
+	if(battle_config.warp_ress && pc_isdead(sd))
 	{ //Revive dead people before warping them
 		pc_setstand(sd);
 		pc_setrestartvalue(sd,1);
Index: src/map/pc.h
===================================================================
--- src/map/pc.h	(revision 1187)
+++ src/map/pc.h	(working copy)
@@ -336,7 +336,7 @@
 	int castrate,fixedcastrate,delayrate,hprate,sprate,dsprate;
 	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;
+	int critical_rate,hit_rate,flee_rate,flee2_rate,def_rate,def2_rate,mdef_rate,mdef2_rate,castvariable, cast2variable, sp_use_skill, sp2_use_skill;
 
 	int itemid;
 	short itemindex;	//Used item's index in sd->inventory [Skotlex]
Index: src/map/script.c
===================================================================
--- src/map/script.c	(revision 1187)
+++ src/map/script.c	(working copy)
@@ -15693,24 +15693,17 @@
     return 0;
 }
 
-/*==========================================
- * Cria Runas para o Cavaleiro Rúnico
- *------------------------------------------*/
+/**
+ * Rune Knight
+ **/
 BUILDIN_FUNC(makerune)
 {
-	int rune_ore;
 	TBL_PC* sd;
-
-	sd = script_rid2sd(st);
-
-	if( sd == NULL )
+	if( (sd = script_rid2sd(st)) == NULL )
 		return 0;
-
-	rune_ore=script_getnum(st,2);
-	sd->menuskill_itemused = rune_ore;
 	clif_skill_produce_mix_list(sd,RK_RUNEMASTERY,24);
+	sd->itemid = script_getnum(st,2);
 	return 0;
-
 }
 
 /// Invokes buying store preparation window
Index: src/map/skill.c
===================================================================
--- src/map/skill.c	(revision 1187)
+++ src/map/skill.c	(working copy)
@@ -774,7 +774,7 @@
 					skill_get_time2(AS_ENCHANTPOISON,sce->val1),0);
 			// Enchant Deadly Poison gives a chance to deadly poison attacked enemies
 			if((sce=sc->data[SC_EDP]))
-				sc_start4(bl,SC_DPOISON,sce->val2, sce->val1,0,0,0,
+				sc_start4(bl,SC_DPOISON,sce->val2, sce->val1,src->id,0,0,
 					skill_get_time2(ASC_EDP,sce->val1));
 		}
 	}
@@ -1288,6 +1288,9 @@
 	case SO_VARETYR_SPEAR:
 		sc_start(bl, SC_STUN, 5 + 5 * skilllv, skilllv, skill_get_time2(skillid, skilllv));
 		break;
+	case EL_WIND_SLASH:
+		sc_start(bl, SC_BLEEDING,(rand()%100) * 10, skilllv, 40000);
+		break;
 	case EL_STONE_HAMMER:
 		rate = 10 * skilllv;
 		sc_start(bl, SC_STUN, rate, skilllv, skill_get_time(skillid,skilllv));
@@ -2277,45 +2280,50 @@
 
 	map_freeblock_lock();
 
-	if( damage > 0 && dmg.flag&BF_SKILL && tsd && damage < tsd->battle_status.hp )
-	{
-		int copy_skill = skillid, copy_level = skilllv, skill;
-		switch( skillid )
-		{
-		case AB_DUPLELIGHT_MELEE:
-		case AB_DUPLELIGHT_MAGIC:
-			copy_skill = AB_DUPLELIGHT;
+	if(damage > 0 && dmg.flag&BF_SKILL && tsd
+		&& pc_checkskill(tsd,RG_PLAGIARISM)
+	  	&& (!sc || !sc->data[SC_PRESERVE])
+		&& damage < tsd->battle_status.hp)
+	{	//Updated to not be able to copy skills if the blow will kill you. [Skotlex]
+		int copy_skill = skillid;
+		/**
+		 * Copy Referal: dummy skills should point to their source upon copying
+		 **/
+		switch( skillid ) {
+			case AB_DUPLELIGHT_MELEE:
+			case AB_DUPLELIGHT_MAGIC:
+				copy_skill = AB_DUPLELIGHT;
+				break;
+			case WL_CHAINLIGHTNING_ATK:
+				copy_skill = WL_CHAINLIGHTNING;
+				break;
+			case WM_REVERBERATION_MELEE:
+			case WM_REVERBERATION_MAGIC:
+				copy_skill = WM_REVERBERATION;
+				break;
+			case WM_SEVERE_RAINSTORM_MELEE:
+				copy_skill = WM_SEVERE_RAINSTORM;
 			break;
-		case WL_CHAINLIGHTNING_ATK:
-			copy_skill = WL_CHAINLIGHTNING;
-			break;
-		case WM_REVERBERATION_MELEE:
-		case WM_REVERBERATION_MAGIC:
-			copy_skill = WM_REVERBERATION;
-			break;
-		case WM_SEVERE_RAINSTORM_MELEE:
-			copy_skill = WM_SEVERE_RAINSTORM;
-			break;
-		case GN_CRAZYWEED_ATK:
-			copy_skill = GN_CRAZYWEED;
-			break;
-		case GN_HELLS_PLANT_ATK:
-			copy_skill = GN_HELLS_PLANT;
-			break;
-		case LG_OVERBRAND_BRANDISH:
-		case LG_OVERBRAND_PLUSATK:
-			copy_skill = LG_OVERBRAND;
-			break;
+			case GN_CRAZYWEED_ATK:
+				copy_skill = GN_CRAZYWEED;
+				break;
+			case GN_HELLS_PLANT_ATK:
+				copy_skill = GN_HELLS_PLANT;
+				break;				
+			case LG_OVERBRAND_BRANDISH:
+			case LG_OVERBRAND_PLUSATK:
+				copy_skill = LG_OVERBRAND;
+				break;
 		}
 
-		if( can_copy(tsd,copy_skill,bl) && (!tsd->status.skill[copy_skill].id || tsd->status.skill[copy_skill].flag >= 13) )
+		if ((tsd->status.skill[copy_skill].id == 0 || tsd->status.skill[copy_skill].flag == SKILL_FLAG_PLAGIARIZED) &&
+			can_copy(tsd,copy_skill,bl))	// Split all the check into their own function [Aru]
 		{
-			copy_level = cap_value(copy_level,1,10);
-			if( sc && sc->data[SC__REPRODUCE] && (skill = sc->data[SC__REPRODUCE]->val1) )
-			{
-				copy_level = min(skill,skill_get_max(copy_skill));
-				if( tsd->reproduceskill_id && tsd->status.skill[tsd->reproduceskill_id].flag == 13 )
-				{
+			int lv;
+			if( sc && sc->data[SC__REPRODUCE] && (lv = sc->data[SC__REPRODUCE]->val1) ) {
+				//Level dependent and limitation.
+				lv = min(lv,skill_get_max(copy_skill));
+				if( tsd->reproduceskill_id && tsd->status.skill[tsd->reproduceskill_id].flag == SKILL_FLAG_PLAGIARIZED ) {
 					tsd->status.skill[tsd->reproduceskill_id].id = 0;
 					tsd->status.skill[tsd->reproduceskill_id].lv = 0;
 					tsd->status.skill[tsd->reproduceskill_id].flag = 0;
@@ -2324,32 +2332,32 @@
 
 				tsd->reproduceskill_id = copy_skill;
 				pc_setglobalreg(tsd, "REPRODUCE_SKILL", copy_skill);
-				pc_setglobalreg(tsd, "REPRODUCE_SKILL_LV", copy_level);
+				pc_setglobalreg(tsd, "REPRODUCE_SKILL_LV", lv);
 
 				tsd->status.skill[copy_skill].id = copy_skill;
-				tsd->status.skill[copy_skill].lv = copy_level;
-				tsd->status.skill[copy_skill].flag = 13;
+				tsd->status.skill[copy_skill].lv = lv;
+				tsd->status.skill[copy_skill].flag = SKILL_FLAG_PLAGIARIZED;
 				clif_addskill(tsd,copy_skill);
-			}
-			else if( (skill = pc_checkskill(tsd,RG_PLAGIARISM)) > 0 && (!sc || !sc->data[SC_PRESERVE]) )
-			{
-				copy_level = min(copy_level,skill);
-				if( tsd->cloneskill_id && tsd->status.skill[tsd->cloneskill_id].flag == 13 )
-				{
+			} else {
+				lv = skilllv;
+				if (tsd->cloneskill_id && tsd->status.skill[tsd->cloneskill_id].flag == SKILL_FLAG_PLAGIARIZED){
 					tsd->status.skill[tsd->cloneskill_id].id = 0;
 					tsd->status.skill[tsd->cloneskill_id].lv = 0;
 					tsd->status.skill[tsd->cloneskill_id].flag = 0;
 					clif_deleteskill(tsd,tsd->cloneskill_id);
 				}
 
+				if ((type = pc_checkskill(tsd,RG_PLAGIARISM)) < lv)
+					lv = type;
+
 				tsd->cloneskill_id = copy_skill;
 				pc_setglobalreg(tsd, "CLONE_SKILL", copy_skill);
-				pc_setglobalreg(tsd, "CLONE_SKILL_LV", copy_level);
+				pc_setglobalreg(tsd, "CLONE_SKILL_LV", lv);
 
-				tsd->status.skill[copy_skill].id = copy_skill;
-				tsd->status.skill[copy_skill].lv = copy_level;
-				tsd->status.skill[copy_skill].flag = 13;
-				clif_addskill(tsd,copy_skill);
+				tsd->status.skill[skillid].id = copy_skill;
+				tsd->status.skill[skillid].lv = lv;
+				tsd->status.skill[skillid].flag = SKILL_FLAG_PLAGIARIZED;
+				clif_addskill(tsd,skillid);
 			}
 		}
 	}
@@ -4164,7 +4172,7 @@
 		break;
 
 	case WM_LULLABY_DEEPSLEEP:
-		if( rand()%100 < 88 + 2 * skilllv )
+		if( bl != src && rand()%100 < 88 + 2 * skilllv )
 			sc_start(bl,status_skill2sc(skillid),100,skilllv,skill_get_time(skillid,skilllv));
 		break;
 	case SC_FATALMENACE:
@@ -4290,14 +4298,15 @@
 			skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, flag);
 		}
 		break;
-	case SO_POISON_BUSTER:
-		if( tsc && tsc->data[SC_POISON] )
-		{
-			skill_attack(skill_get_type(skillid), src, src, bl, skillid, skilllv, tick, flag);
-			status_change_end(bl, SC_POISON, -1);
+	case SO_POISON_BUSTER: {
+			struct status_change *tsc = status_get_sc(bl);
+			if( tsc && tsc->data[SC_POISON] ) {
+				skill_attack(skill_get_type(skillid), src, src, bl, skillid, skilllv, tick, flag);
+				status_change_end(bl, SC_POISON, INVALID_TIMER);
+			}
+			else if( sd )
+				clif_skill_fail(sd, skillid, USESKILL_FAIL_LEVEL, 0, 0);
 		}
-		else if( sd )
-			clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0,0);
 		break;
 
 	case EL_FIRE_BOMB:
@@ -5011,6 +5020,7 @@
 	case SR_GENTLETOUCH_REVITALIZE:
 	case KO_IZAYOI:
 	case OB_ZANGETSU:
+	case ASC_EDP:
 		clif_skill_nodamage(src,bl,skillid,skilllv,
 			sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
 	case SO_STRIKING:
@@ -5294,7 +5304,7 @@
 
 	case SA_CREATECON:
 		if(sd) {
-			clif_elementalconverter_list(sd); 
+			clif_skill_produce_mix_list(sd,skillid,23); 
 			clif_skill_nodamage(src,bl,skillid,skilllv,1);
 		}
 		break;
@@ -5313,16 +5323,6 @@
 		status_change_end(src, SC_HIDING, INVALID_TIMER);
 		break;
 
-	case ASC_EDP:
-		{
-			int time = skill_get_time(skillid,skilllv);
-			if( sd )
-				time += 3000 * pc_checkskill(sd,GC_RESEARCHNEWPOISON);
-			clif_skill_nodamage(src,bl,skillid,skilllv,
-				sc_start(bl,type,100,skilllv,time));
-		}
-		break;
-
 	case ASC_METEORASSAULT:
 	case GS_SPREADATTACK:
 	case RK_STORMBLAST:
@@ -6122,8 +6122,8 @@
 				case SC_SERVICE4U:				case SC_FOOD_STR_CASH:			case SC_FOOD_AGI_CASH:
 				case SC_FOOD_VIT_CASH:			case SC_FOOD_DEX_CASH:			case SC_FOOD_INT_CASH:
 				case SC_FOOD_LUK_CASH:			case SC_ELECTRICSHOCKER:		case SC__STRIPACCESSORY:
-				case SC_SAVAGE_STEAK:			case SC_COCKTAIL_WARG_BLOOD:	case SC_MINOR_BBQ:
-				case SC_SIROMA_ICE_TEA:			case SC_DROCERA_HERB_STEAMED:	case SC_PUTTI_TAILS_NOODLES:
+			  //case SC_SAVAGE_STEAK:			case SC_COCKTAIL_WARG_BLOOD:	case SC_MINOR_BBQ:
+			  //case SC_SIROMA_ICE_TEA:			case SC_DROCERA_HERB_STEAMED:	case SC_PUTTI_TAILS_NOODLES:
 				case SC_NEUTRALBARRIER_MASTER:	case SC_NEUTRALBARRIER:			case SC_STEALTHFIELD_MASTER:
 				case SC_STEALTHFIELD:			case SC_GIANTGROWTH:			case SC_MILLENNIUMSHIELD:
 				case SC_REFRESH:				case SC_STONEHARDSKIN:			case SC_VITALITYACTIVATION:
@@ -7434,9 +7434,9 @@
 				case SC_FOOD_LUK_CASH:   case SC_ELECTRICSHOCKER: case SC_BITE:
 				case SC__STRIPACCESSORY: case SC__ENERVATION: case SC__GROOMY:
 				case SC__IGNORANCE:  case SC__LAZINESS:   case SC__UNLUCKY:
-				case SC__WEAKNESS:   case SC_SAVAGE_STEAK:  case SC_COCKTAIL_WARG_BLOOD:
+				case SC__WEAKNESS:   /*case SC_SAVAGE_STEAK:  case SC_COCKTAIL_WARG_BLOOD:
 				case SC_MAGNETICFIELD: case SC_MINOR_BBQ:   case SC_SIROMA_ICE_TEA:
-				case SC_DROCERA_HERB_STEAMED: case SC_PUTTI_TAILS_NOODLES:
+				case SC_DROCERA_HERB_STEAMED:*/ case SC_PUTTI_TAILS_NOODLES:
 				case SC_NEUTRALBARRIER_MASTER: case SC_NEUTRALBARRIER:
 				case SC_STEALTHFIELD_MASTER: case SC_STEALTHFIELD:
 				case SC_LEADERSHIP:		case SC_GLORYWOUNDS:	case SC_SOULCOLD:
@@ -9068,6 +9068,9 @@
 			status_change_end(src,SC_CURSEDCIRCLE_ATKER,-1);
 		}
 	}
+	
+	if(sd && sd->sp_use_skill && sd->sp2_use_skill == skillid)
+		status_zap(&sd->bl, 0, sd->sp_use_skill);
 
 	switch (skillid) { //Skill effect.
 		case WZ_METEOR:
@@ -9504,7 +9507,7 @@
 	case WM_LULLABY_DEEPSLEEP:
 		i = skill_get_splash(skillid,skilllv);
 		map_foreachinarea(skill_area_sub,src->m,x-i,y-i,x+i,y+i,BL_CHAR,
-			src,skillid,skilllv,tick,flag|BCT_ENEMY|1,skill_castend_damage_id);
+			src,skillid,skilllv,tick,flag|(skillid==WM_LULLABY_DEEPSLEEP?BCT_ALL:BCT_ENEMY)|1,skill_castend_damage_id);
 		break;
 
 	case AB_EPICLESIS:
@@ -11142,7 +11145,7 @@
 		case UNT_DIMENSIONDOOR:
 			if( tsd && !map[bl->m].flag.noteleport )
 				pc_randomwarp(tsd,3);
-			else if( bl->type == BL_MOB && battle_config.mob_warp&8 )
+			else if(bl->type == BL_MOB && !map[bl->m].flag.monster_noteleport)
 				unit_warp(bl,-1,-1,-1,3);
 			break;
 
@@ -11240,7 +11243,7 @@
 		case UNT_WATER_INSIGNIA:
 		case UNT_WIND_INSIGNIA:
 		case UNT_EARTH_INSIGNIA:
-			sc_start(bl,SC_FIRE_INSIGNIA, 100, sg->skill_lv, sg->interval);
+			sc_start(bl,type, 100, sg->skill_lv, sg->interval);
 			break;
 			
 		case UNT_VACUUM_EXTREME:
@@ -12959,15 +12962,6 @@
 		case SO_SUMMON_TERA:
 			req.sp -= req.sp * (5 + 5 * pc_checkskill(sd,SO_EL_SYMPATHY)) / 100;
 			break;
-
-		default:
-			if( sc && sc->data[SC_EDP] )
-				switch(skill){
-					case AS_SONICBLOW:
-					case GC_COUNTERSLASH:
-					case GC_CROSSIMPACT:
-						req.sp += req.sp;
-			}
 	}
 	return req;
 }
@@ -12994,6 +12988,8 @@
 	// Tempo de cast para itens, cartas e bônus.
 	if(sd && !(skill_get_castnodex(skill_id, skill_lv)&4)) {
 		int i;
+		if(sd->castvariable && sd->cast2variable == skill_id)
+			time -= sd->castvariable;
 		if( sd->castrate != 100 )
 			time = time*sd->castrate/100;
 		for(i=0; i < ARRAYLENGTH(sd->skillcast) && sd->skillcast[i].id; i++)
@@ -13044,6 +13040,7 @@
 {
 	struct status_change *sc = status_get_sc(bl);
 	struct map_session_data *tsd;
+	int i;
 	
 	nullpo_ret(tsd=(struct map_session_data*)bl);
 
@@ -13067,6 +13064,8 @@
 			time -= time * sc->data[SC_IZAYOI]->val2 / 100;
 			status_change_end(bl, SC_IZAYOI, INVALID_TIMER);
 		}
+		if(sc->data[i = SC_GUST_OPTION] || sc->data[i = SC_BLAST_OPTION] || sc->data[i = SC_WILD_STORM_OPTION]) /* Redução do cast fixo summon Vayu [Shiraz] */
+			time -= sc->data[i]->val4 * 1000;
 	}
 	return (time > 0) ? time : 0;
 }
@@ -15750,9 +15749,11 @@
 		status_change_end(&sd->bl,SC_STOP,-1);
 	}
 
-	if( (id = sd->status.skill[skill_id].id) == 0 || sd->status.skill[skill_id].flag != 13 || skill_id >= GS_GLITTERING || skill_get_type(skill_id) != BF_MAGIC )
+	if((id = sd->status.skill[skill_id].id) == 0 
+	|| sd->status.skill[skill_id].flag != SKILL_FLAG_PLAGIARIZED 
+	|| skill_id >= GS_GLITTERING || skill_get_type(skill_id) != BF_MAGIC)
 	{
-		clif_skill_fail(sd,SC_AUTOSHADOWSPELL,0,0,0);
+		clif_skill_fail(sd,SC_AUTOSHADOWSPELL,USESKILL_FAIL_LEVEL,0,0);
 		return 0;
 	}
 
Index: src/map/status.c
===================================================================
--- src/map/status.c	(revision 1187)
+++ src/map/status.c	(working copy)
@@ -626,12 +626,12 @@
 	set_sc( EL_AQUAPLAY        , SC_AQUAPLAY_OPTION      , SI_AQUAPLAY_OPTION      , SCB_MATK );
 	set_sc( EL_COOLER          , SC_COOLER_OPTION        , SI_COOLER_OPTION        , SCB_MATK );
 	set_sc( EL_CHILLY_AIR      , SC_CHILLY_AIR_OPTION    , SI_CHILLY_AIR_OPTION    , SCB_MATK );
-	set_sc( EL_GUST            , SC_GUST_OPTION          , SI_GUST_OPTION          , SCB_NONE );
-	set_sc( EL_BLAST           , SC_BLAST_OPTION         , SI_BLAST_OPTION         , SCB_NONE );
-	set_sc( EL_WILD_STORM      , SC_WILD_STORM_OPTION    , SI_WILD_STORM_OPTION    , SCB_NONE );
-	set_sc( EL_PETROLOGY       , SC_PETROLOGY_OPTION     , SI_PETROLOGY_OPTION     , SCB_NONE );
-	set_sc( EL_CURSED_SOIL     , SC_CURSED_SOIL_OPTION   , SI_CURSED_SOIL_OPTION   , SCB_NONE );
-	set_sc( EL_UPHEAVAL        , SC_UPHEAVAL_OPTION      , SI_UPHEAVAL_OPTION      , SCB_NONE );
+	set_sc( EL_GUST            , SC_GUST_OPTION          , SI_GUST_OPTION          , SCB_ASPD );
+	set_sc( EL_BLAST           , SC_BLAST_OPTION         , SI_BLAST_OPTION         , SCB_ASPD );
+	set_sc( EL_WILD_STORM      , SC_WILD_STORM_OPTION    , SI_WILD_STORM_OPTION    , SCB_ASPD );
+	set_sc( EL_PETROLOGY       , SC_PETROLOGY_OPTION     , SI_PETROLOGY_OPTION     , SCB_MAXHP );
+	set_sc( EL_CURSED_SOIL     , SC_CURSED_SOIL_OPTION   , SI_CURSED_SOIL_OPTION   , SCB_MAXHP );
+	set_sc( EL_UPHEAVAL        , SC_UPHEAVAL_OPTION      , SI_UPHEAVAL_OPTION      , SCB_MAXHP );
 	set_sc( EL_TIDAL_WEAPON    , SC_TIDAL_WEAPON_OPTION  , SI_TIDAL_WEAPON_OPTION  , SCB_ALL );
 	set_sc( EL_ROCK_CRUSHER    , SC_ROCK_CRUSHER         , SI_ROCK_CRUSHER         , SCB_DEF );
 	set_sc( EL_ROCK_CRUSHER_ATK, SC_ROCK_CRUSHER_ATK     , SI_ROCK_CRUSHER_ATK     , SCB_SPEED );
@@ -889,8 +889,6 @@
 	
 	// Montarias de Aluguel
 	StatusChangeFlagTable[SC_ALL_RIDING] = SCB_SPEED;
-	
-	StatusChangeFlagTable[SC_EDP] |= SCB_BATK|SCB_WATK;
 
 	if( !battle_config.display_hallucination ) 
 		StatusIconChangeTable[SC_HALLUCINATION] = SI_BLANK;
@@ -2212,6 +2210,7 @@
 	sd->critical_rate = sd->hit_rate = sd->flee_rate = sd->flee2_rate = 100;
 	sd->def_rate = sd->def2_rate = sd->mdef_rate = sd->mdef2_rate = 100;
 	sd->regen.state.block = 0;
+	sd->castvariable = sd->cast2variable = sd->sp_use_skill = sd->sp2_use_skill = 0;
 
 	// zeroed arrays, order follows the order in pc.h.
 	// add new arrays to the end of zeroed area in pc.h (see comments) and size here. [zzo]
@@ -4210,12 +4209,11 @@
 		batk += batk / 5;
 	if(sc->data[SC_ZANGETSU])
 		batk += batk * sc->data[SC_ZANGETSU]->val2 / 100;
-	if( sc->data[SC_EDP] && sc->data[SC_EDP]->val1 > 1 )
-		batk = batk * sc->data[SC_EDP]->val1;
 	if(sc->data[SC_ODINS_POWER])
 		batk += 70;
-		
-		
+	if(sc->data[SC_EDP])
+		batk += 150 + (50*sc->data[SC_EDP]->val1);
+
 	return (unsigned short)cap_value(batk,0,USHRT_MAX);
 }
 
@@ -4292,7 +4290,7 @@
 		|| (sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 2)
 		)
 		watk += watk / 10;
-	if( sc->data[SC_EDP] )
+	if(sc->data[SC_EDP] && sc->data[SC_EDP]->val1 > 1)
 		watk = watk * (sc->data[SC_EDP]->val1 - 1);
 	
 	return (unsigned short)cap_value(watk,0,USHRT_MAX);
@@ -5003,8 +5001,9 @@
 		aspd_rate -= aspd_rate * sc->data[SC_INCASPDRATE]->val1 / 100;
 	if( sc->data[SC_GLOOMYDAY] )
 		aspd_rate += aspd_rate * sc->data[SC_GLOOMYDAY]->val3 / 100;
+	if(sc->data[i = SC_GUST_OPTION] || sc->data[i = SC_BLAST_OPTION] || sc->data[i = SC_WILD_STORM_OPTION]) /* +5 de aspd summon Vayu [Shiraz] */
+		aspd_rate -= 36 * sc->data[i]->val3;
 
-
 	return (short)cap_value(aspd_rate,0,SHRT_MAX);
 }
 
@@ -6677,9 +6676,9 @@
 			break;
 		case SC_EDP:	// [Celest]
 			val2 = val1 + 2; //Chance to Poison enemies.
-			val3 = 35 * val1;
-			if( sd )
-				tick += pc_checkskill(sd,GC_RESEARCHNEWPOISON) * 3000;
+			val3 = 150 + (50*val1);
+			if( sd )//[Ind] - iROwiki says each level increases its duration by 3 seconds
+				tick += pc_checkskill(sd,GC_RESEARCHNEWPOISON)*3000;
 			break;
 		case SC_POISONREACT:
 			val2=(val1+1)/2 + val1/10; // Number of counters [Skotlex]
@@ -7846,19 +7845,23 @@
 			val3 = 15;
 			val_flag |= 1|2;
 			break;
-		case SC_GUST_OPTION:
-			val2 = 20;
-			val3 = 5;
-			val_flag |= 1|2;
+		case SC_GUST_OPTION:         /* Atualizado 18/07/2012 [Shiraz] */
+			val2 = 20;               // Aumenta o dano das habilidades Relâmpago e Tempestades de Raio. (20%)
+			val3 = 5;                // +5 de ASPD.
+			val4 = 1;                // Reduz o Cast Fixo em 1 segundo. (Acumula com Sacramentum.)
+			val_flag |= 1|2|4;
 			break;
-		case SC_BLAST_OPTION:
-			val2 = 20;
-			val3 = 4;
+		case SC_BLAST_OPTION:        /* Atualizado 18/07/2012 [Shiraz] */
+			val2 = 20;               // Aumenta em 20% o dano da Onda Psíquica e muda sua propriedade para o elemento Vento.
+			val3 = 5;                // +5 de ASPD.
+			val4 = 1;                // Reduz o Cast Fixo em 1 segundo. (Acumula com Sacramentum.)
 			val_flag |= 1|2|4;
 			break;
-		case SC_WILD_STORM_OPTION:
-			val2 = MG_LIGHTNINGBOLT;
-			val_flag |= 1|2;
+		case SC_WILD_STORM_OPTION:   /* Atualizado 18/07/2012 [Shiraz] */
+			val2 = MG_LIGHTNINGBOLT; // Cerca de 25% de chance de conjurar Relâmpago Nvl 5 ao atacar fisicamente.
+			val3 = 5;                // +5 de ASPD.
+			val4 = 1;                // Reduz o Cast Fixo em 1 segundo. (Acumula com Sacramentum.)
+			val_flag |= 1|2|4;
 			break;
 		case SC_WIND_STEP_OPTION:
 			val2 = 50;
@@ -8801,7 +8804,7 @@
 			break;
 		case SC_CURSEDCIRCLE_ATKER:
 			if(sce->val3)
-				map_foreachinrange(status_change_timer_sub, bl, skill_get_splash(SR_CURSEDCIRCLE, sce->val1),BL_CHAR, bl, sce, SC_CURSEDCIRCLE_TARGET, gettick());
+				map_foreachinrange(status_change_timer_sub, bl, battle_config.area_size,BL_CHAR, bl, sce, SC_CURSEDCIRCLE_TARGET, gettick());
 			break;
 		case SC_WHITEIMPRISON:
 			clif_damage(bl,bl,0,0,0,400*sce->val1,0,0,0);

New Annotation

Summary:
Author:
Mode:
Body: