--Marincess Reincarnation function c212740.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,212740+EFFECT_COUNT_CODE_OATH) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetCondition(c212740.con) e1:SetTarget(c212740.target) e1:SetOperation(c212740.activate) c:RegisterEffect(e1) --act in hand local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCondition(c212740.handcon) c:RegisterEffect(e2) end function c212740.ccfilter(c) return c:IsCode(67712104) end function c212740.con(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(c212740.ccfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) end function c212740.cfilter(c) return c:IsFaceup() and c:IsSetCard(0x12b) and c:IsType(TYPE_EQUIP) end function c212740.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end if chk==0 then return Duel.IsExistingMatchingCard(c212740.cfilter,tp,LOCATION_SZONE,0,1,nil) and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end local ct=Duel.GetMatchingGroupCount(c212740.cfilter,tp,LOCATION_SZONE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,ct,nil) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) end function c212740.activate(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end end function c212740.hcfilter(c) return c:IsFaceup() and c:IsSetCard(0x12b) and c:IsLinkAbove(3) end function c212740.handcon(e) return Duel.IsExistingMatchingCard(c212740.hcfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) end