--苍波龙 浸没龙 function c40009119.initial_effect(c) --synchro summon aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x6f1d),1) c:EnableReviveLimit() --search local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(40009119,0)) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,40009119) e1:SetCondition(c40009119.thcon) e1:SetTarget(c40009119.thtg) e1:SetOperation(c40009119.thop) c:RegisterEffect(e1) --synchro effect local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) e2:SetCountLimit(1,40009120) e2:SetCondition(c40009119.sccon) e2:SetTarget(c40009119.sctg) e2:SetOperation(c40009119.scop) c:RegisterEffect(e2) --battle indes local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetRange(LOCATION_MZONE) e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e3:SetValue(1) e3:SetCondition(c40009119.indcon) c:RegisterEffect(e3) --dam local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e4:SetValue(1) c:RegisterEffect(e4) end function c40009119.thcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end function c40009119.thfilter(c) return c:IsSetCard(0x6f1d) and c:IsType(TYPE_TRAP) and c:IsAbleToHand() end function c40009119.thtg(e,tp,eg,ep,ev,re,r,rp,chk) local ph=Duel.GetCurrentPhase() if chk==0 then return Duel.IsExistingMatchingCard(c40009119.thfilter,tp,LOCATION_DECK,0,1,nil) end e:SetLabel(0) if (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) then e:SetLabel(1) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c40009119.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(c40009119.thfilter,tp,LOCATION_DECK,0,nil) if #g<=0 then return end local ct=1 if e:GetLabel()==1 then ct=2 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg1=g:SelectSubGroup(tp,aux.dncheck,false,1,ct) Duel.SendtoHand(sg1,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg1) end function c40009119.sccon(e,tp,eg,ep,ev,re,r,rp) return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) end function c40009119.mfilter(c) return c:IsSetCard(0x6f1d) end function c40009119.sctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local mg=Duel.GetMatchingGroup(c40009119.mfilter,tp,LOCATION_MZONE,0,nil) return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function c40009119.scop(e,tp,eg,ep,ev,re,r,rp) local mg=Duel.GetMatchingGroup(c40009119.mfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,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 function c40009119.indcon(e) return e:GetHandler():IsAttackPos() end