--[决斗编年史]传说的暗之魔导师
function c20120002.initial_effect(c)
	--xyz summon
	aux.AddXyzProcedure(c,nil,7,3)
	c:EnableReviveLimit()
	--spsummon condition
	local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
	e1:SetCode(EFFECT_SPSUMMON_CONDITION)
	e1:SetValue(aux.xyzlimit)
	c:RegisterEffect(e1)
	--match kill
	local e2=Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_SINGLE)
	e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
	e2:SetCode(EFFECT_MATCH_KILL)
	e2:SetCondition(c20120002.cond)
	c:RegisterEffect(e2)
end
function c20120002.cond(e,tp,eg,ep,ev,re,r,rp)
	 return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
		and e:GetHandler():GetOverlayGroup():IsExists(Card.IsRace,1,nil,RACE_SPELLCASTER)
end