function DefineColor(num)
{
	if(num>0){return([128,255,128]);}
	else if(num<0){return([255,128,128]);}
	else{return([]);}
}

function StatasChangeDisplay(dir,Equip)
{
alternative(Equip[0])
case("普通の箒")
{
	E_MagicPower(10);
}
case("ミニ八卦路（故障中）")
{
	E_MagicPower(0);
}
case("プロテクトリング")
{
	E_ShieldReduce(6);
}
case("妖精の羽飾り")
{
	E_MagicPower(6);
	E_SpellCardRecover(3);
}
case("コレクトリング")
{
	E_Collect(20);
}
case("フェアリーチャーム")
{
	E_SpiritReduce(12);
}
case("初等魔法書")
{
	E_SpellCardRecover(15);
}

ascent(j in 1.. length(Equip))
{
let TempEQ=Equip[j];
if(length(TempEQ)>1)
{
let Level=TempEQ[0..1];
let Type=TempEQ[2..length(TempEQ)];

alternative(Type)
case("01")
{
	E_MagicPower(DefineNum(7.5,Level));
}
case("02")
{
	E_ShieldRecover(DefineNum(2.5,Level));
}
case("03")
{
	E_ShieldReduce(DefineNum(2.5,Level));
}
case("04")
{
	E_SpellCardRecover(DefineNum(2.5,Level));
}
case("05")
{
	E_SpellCardReduce(DefineNum(2.5,Level));
}
case("06")
{
	E_SpiritRecover(DefineNum(2.5,Level));
}
case("07")
{
	E_SpiritReduce(DefineNum(2.5,Level));
}
case("08")
{
	E_Luck(DefineNum(2.5,Level));
}
case("09")
{
	E_Critical(DefineNum(2.5,Level));
}
}

}


function E_MagicPower(num)
{
	MagicPower+=num*dir;
}

function E_ShieldRecover(num)
{
	ShieldRecover+=num*dir;
}

function E_ShieldReduce(num)
{
	ShieldReduce+=num*dir;
}

function E_SpellCardRecover(num)
{
	SpellCardRecover+=num*dir;
}

function E_SpellCardReduce(num)
{
	SpellCardReduce+=num*dir;
}

function E_SpiritRecover(num)
{
	SpiritRecover+=num*dir;
}

function E_SpiritReduce(num)
{
	SpiritReduce+=num*dir;
}

function E_Luck(num)
{
	Luck+=num*dir;
}

function E_Critical(num)
{
	Critical+=num*dir;
}

function E_Collect(num)
{
	SetCommonData("Equip_Collect",GetCommonData("Equip_Collect",0)+num);
}


function DefineNum(a,num)
{
	let R_num=0;
	let time=num;
	let Plus=a;
	loop(time)
	{
		R_num+=Plus;
		Plus+=0.5;
	}
	return(R_num+2.5);
}

}