--created & coded by Lyris --インライトメント・サイキック頭 local s,id,o=GetID() function s.initial_effect(c) local e0=Effect.CreateEffect(c) e0:SetCategory(CATEGORY_SPECIAL_SUMMON) e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e0:SetRange(LOCATION_GRAVE) e0:SetCountLimit(1) e0:SetCode(EVENT_PHASE+PHASE_STANDBY) e0:SetCondition(s.spcon) e0:SetTarget(s.sptg) e0:SetOperation(s.spop) c:RegisterEffect(e0) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(0,LOCATION_MZONE) e1:SetCondition(function() return c:IsAttackPos() end) e1:SetValue(function(e,tc) return tc~=c end) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_CANNOT_ATTACK) c:RegisterEffect(e2) c:SetUniqueOnField(1,0,id,LOCATION_MZONE) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,aux.FilterBoolFunction(Card.IsSetCard,0xda6)) end function s.cfilter(c) return c:IsFaceup() and c:IsSetCard(0xda6) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()==tp end function s.filter(c,e,tp) return c:IsSetCard(0xda6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetReset(RESET_PHASE+PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(aux.TargetBoolFunction(aux.NOT(Card.IsSetCard),0xda6)) Duel.RegisterEffect(e1,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g2=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) if #g2>0 then Duel.BreakEffect() Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP) end end end