--Jhieane, Knights of the Fallen local s,id=GetID() function s.initial_effect(c) --negate and send local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetCode(EVENT_CHAINING) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,id) e1:SetCondition(s.spcon) e1:SetCost(s.spcost) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) Duel.AddCustomActivityCounter(id,ACTIVITY_SPSUMMON,s.counterfilter) --place pzone local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCountLimit(1,id+1) e2:SetCondition(s.sumcon) e2:SetTarget(s.sumtg) e2:SetOperation(s.sumop) c:RegisterEffect(e2) end s.listed_series={0xFA0} function s.counterfilter(c) return c:IsSetCard(0xFA0) or c:IsSetCard(0x190) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) return (re:IsActiveType(TYPE_MONSTER) or (tg and tg:IsExists(Card.IsOnField,1,nil) and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET))) and Duel.IsChainDisablable(ev) and Duel.GetTurnPlayer()==tp end function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 and not e:GetHandler():IsPublic() end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.ConfirmCards(1-tp,e:GetHandler()) Duel.ShuffleHand(tp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetReset(RESET_PHASE+PHASE_END) e1:SetTargetRange(1,0) e1:SetTarget(s.splimit) Duel.RegisterEffect(e1,tp) local e2=Effect.CreateEffect(e:GetHandler()) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT) e2:SetDescription(aux.Stringid(id,1)) e2:SetReset(RESET_PHASE+PHASE_END) e2:SetTargetRange(1,0) Duel.RegisterEffect(e2,tp) end function s.splimit(e,c) return not c:IsSetCard(0xFA0) and not c:IsSetCard(0x190) end function s.tgfilter(c) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xFA0) and c:IsAbleToGrave() end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) end end function s.spop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil) if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.NegateEffect(ev) and tc:GetCount()>0 then local tc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.SendtoGrave(tc,REASON_EFFECT) end end function s.sumcon(e,tp,eg,ep,ev,re,r,rp) if not re then return false end local rc=re:GetHandler() return rc and (rc:IsSetCard(0xFA0)) or (e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM) end function s.pcfilter(c) return c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0xFA0) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() end function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.pcfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.pcfilter,tp,LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) local g=Duel.SelectTarget(tp,s.pcfilter,tp,LOCATION_GRAVE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) end function s.sumop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) and tc and tc:IsRelateToEffect(e) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0):Select(tp,1,1,nil) if g:GetCount()>0 then Duel.HintSelection(g) if Duel.Destroy(g,REASON_EFFECT)==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end elseif tc and tc:IsRelateToEffect(e) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end end