BananaPhone42
2019-07-13T22:41:27Z
Read the 2nd post below before commenting.

So, you know how Performapal Miss Director is supposed to be able to Special Summon a Level 1 monster from the Grave, and then Synchro Summon a Synchro using herself and the Special Summoned monster as Synchro material? Yeah, well, I have the materials in my Grave, but for some strange reason, the effect won't work. The other effects work just fine. Can anyone give me a hand?

The bolded parts of the effect work, the rest don't:
While you control an "Odd-Eyes" monster, your opponent cannot target this card for attacks. While this card is in Defense Position, your "Odd-Eyes" monsters cannot be destroyed by battle, also you take no battle damage from that battle. You can target 1 Level 1 monster in your GY; Special Summon it, but negate its effects (if any), and if you do, immediately after this effect resolves, Synchro Summon 1 Synchro Monster using only that monster and this card. You can only use this effect of "Performapal Miss Director" once per turn.

--EMミス・ディレクター
function c100200166.initial_effect(c)
	--can not be battle target
	local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
	e1:SetCondition(c100200166.atcon)
	e1:SetValue(aux.imval1)
	c:RegisterEffect(e1)
	--indes
	local e2=Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_FIELD)
	e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
	e2:SetRange(LOCATION_MZONE)
	e2:SetTargetRange(LOCATION_MZONE,0)
	e2:SetTarget(c100200166.target)
	e2:SetCondition(c100200166.indcon)
	e2:SetValue(1)
	c:RegisterEffect(e2)
	--avoid battle damage
	local e3=Effect.CreateEffect(c)
	e3:SetType(EFFECT_TYPE_FIELD)
	e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
	e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
	e3:SetRange(LOCATION_MZONE)
	e3:SetTargetRange(LOCATION_MZONE,0)
	e3:SetTarget(c100200166.target)
	e3:SetCondition(c100200166.indcon)
	e3:SetValue(1)
	c:RegisterEffect(e3)
	--special summon
	local e4=Effect.CreateEffect(c)
	e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e4:SetType(EFFECT_TYPE_IGNITION)
	e4:SetRange(LOCATION_MZONE)
	e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e4:SetCountLimit(1,100200166)
	e4:SetTarget(c100200166.sctg)
	e4:SetOperation(c100200166.scop)
	c:RegisterEffect(e4)
end
function c100200166.cfilter(c)
	return c:IsFaceup() and c:IsSetCard(0x99)
end
function c100200166.atcon(e)
	return Duel.IsExistingMatchingCard(c100200166.cfilter,e:GetOwnerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function c100200166.indcon(e)
	return e:GetHandler():IsDefensePos()
end
function c100200166.target(e,c)
	return c~=e:GetHandler() and c:IsSetCard(0x99)
end
function c100200166.scfilter1(c,e,tp,mc)
	local mg=Group.FromCards(c,mc)
	return c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
		and Duel.IsExistingMatchingCard(c100200166.scfilter2,tp,LOCATION_EXTRA,0,1,nil,mg)
end
function c100200166.scfilter2(c,mg)
	return c:IsSynchroSummonable(nil,mg)
end
function c100200166.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
	local c=e:GetHandler()
	if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
		and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
		and Duel.IsExistingTarget(c100200166.scfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,c) end
	Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
	local g=Duel.SelectTarget(tp,c100200166.scfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c)
	Duel.SetOperationInfo(g,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100200166.scop(e,tp,eg,ep,ev,re,r,rp)
	if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
	local c=e:GetHandler()
	local tc=Duel.GetFirstTarget()
	if not tc:IsRelateToEffect(e) or not Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then return end
	local e5=Effect.CreateEffect(c)
	e5:SetType(EFFECT_TYPE_SINGLE)
	e5:SetCode(EFFECT_DISABLE)
	e5:SetReset(RESET_EVENT+0x1fe0000)
	tc:RegisterEffect(e5)
	local e6=e5:Clone()
	e6:SetCode(EFFECT_DISABLE_EFFECT)
	tc:RegisterEffect(e6)
	Duel.SpecialSummonComplete()
	if not c:IsRelateToEffect(e) then return end
	local mg=Group.FromCards(c,tc)
	local g=Duel.GetMatchingGroup(c100200166.scfilter2,tp,LOCATION_EXTRA,0,nil,mg)
	if g:GetCount()>0 then
		Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
		local sg=g:Select(tp,1,1,nil)
		Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
	end
end
BananaPhone42
2019-07-13T23:54:24Z
Never mind, got it working full-throttle now.

--EMミス・ディレクター
--
--Script by DJ
function c100200166.initial_effect(c)
	--can not be battle target
	local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
	e1:SetCondition(c100200166.atcon)
	e1:SetValue(aux.imval1)
	c:RegisterEffect(e1)
	--indes
	local e2=Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_FIELD)
	e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
	e2:SetRange(LOCATION_MZONE)
	e2:SetTargetRange(LOCATION_MZONE,0)
	e2:SetTarget(c100200166.target)
	e2:SetCondition(c100200166.indcon)
	e2:SetValue(1)
	c:RegisterEffect(e2)
	--avoid battle damage
	local e3=Effect.CreateEffect(c)
	e3:SetType(EFFECT_TYPE_FIELD)
	e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
	e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
	e3:SetRange(LOCATION_MZONE)
	e3:SetTargetRange(LOCATION_MZONE,0)
	e3:SetTarget(c100200166.target)
	e3:SetCondition(c100200166.indcon)
	e3:SetValue(1)
	c:RegisterEffect(e3)
    --special summon
    local e4=Effect.CreateEffect(c)
    e4:SetDescription(aux.Stringid(100200166,0))
    e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
    e4:SetType(EFFECT_TYPE_QUICK_O)
    e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
    e4:SetCode(EVENT_FREE_CHAIN)
    e4:SetHintTiming(0,0x1e0)
    e4:SetRange(LOCATION_MZONE)
    e4:SetCountLimit(1,100200166)
    e4:SetTarget(c100200166.sctg)
    e4:SetOperation(c100200166.scop)
    c:RegisterEffect(e4)
end
function c100200166.cfilter(c)
	return c:IsFaceup() and c:IsSetCard(0x99)
end
function c100200166.atcon(e)
	return Duel.IsExistingMatchingCard(c100200166.cfilter,e:GetOwnerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
end
function c100200166.indcon(e)
	return e:GetHandler():IsDefensePos()
end
function c100200166.target(e,c)
	return c~=e:GetHandler() and c:IsSetCard(0x99)
end
function c100200166.scfilter1(c,e,tp,mc)
    local mg=Group.FromCards(c,mc)
    return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
        and Duel.IsExistingMatchingCard(c100200166.scfilter2,tp,LOCATION_EXTRA,0,1,nil,mg)
end
function c100200166.scfilter2(c,mg)
    return c:IsRace(RACE_ALL) and c:IsSynchroSummonable(nil,mg)
end
function c100200166.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
    if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100200166.scfilter1(chkc,e,tp,e:GetHandler()) end
    if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
        and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
        and Duel.IsExistingTarget(c100200166.scfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,e:GetHandler()) end
    Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
    local g=Duel.SelectTarget(tp,c100200166.scfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,e:GetHandler())
    Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100200166.scop(e,tp,eg,ep,ev,re,r,rp)
    if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
    local c=e:GetHandler()
    local tc=Duel.GetFirstTarget()
    if not tc:IsRelateToEffect(e) or not Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then return end
    local e1=Effect.CreateEffect(c)
    e1:SetType(EFFECT_TYPE_SINGLE)
    e1:SetCode(EFFECT_DISABLE)
    e1:SetReset(RESET_EVENT+0x1fe0000)
    tc:RegisterEffect(e1)
    local e2=e1:Clone()
    e2:SetCode(EFFECT_DISABLE_EFFECT)
    tc:RegisterEffect(e2)
    Duel.SpecialSummonComplete()
    if not c:IsRelateToEffect(e) then return end
    local mg=Group.FromCards(c,tc)
    local g=Duel.GetMatchingGroup(c100200166.scfilter2,tp,LOCATION_EXTRA,0,nil,mg)
    if g:GetCount()>0 then
        Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
        local sg=g:Select(tp,1,1,nil)
        local e1=Effect.CreateEffect(c)
        e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
        e1:SetType(EFFECT_TYPE_SINGLE)
        e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
        e1:SetValue(LOCATION_GRAVE)
        e1:SetReset(RESET_EVENT+0x47e0000)
        c:RegisterEffect(e1,true)
        local e2=e1:Clone()
        tc:RegisterEffect(e2,true)
        Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
    end
end