--机空队 神风 function c40009035.initial_effect(c) --damage conversion local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(40009035,0)) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_HAND) e2:SetCountLimit(1,40009035) e2:SetHintTiming(0,TIMING_DRAW_PHASE+TIMING_STANDBY_PHASE) e2:SetCost(c40009035.cost) e2:SetOperation(c40009035.operation) c:RegisterEffect(e2) --special summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(40009035,1)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetRange(LOCATION_GRAVE) e3:SetCondition(c40009035.spcon) e3:SetTarget(c40009035.sptg) e3:SetOperation(c40009035.spop) c:RegisterEffect(e3) end function c40009035.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsDiscardable() end Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD) end function c40009035.operation(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e1:SetTargetRange(LOCATION_HAND,0) e1:SetTarget(c40009035.etarget) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) local e2=e1:Clone() e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) Duel.RegisterEffect(e2,tp) end function c40009035.etarget(e,c) return c:IsSetCard(0xf13) end function c40009035.cfilter(c,tp) return c:IsControler(tp) and c:IsSetCard(0xf13) and c:IsType(TYPE_LINK) and c:IsSummonType(SUMMON_TYPE_LINK) end function c40009035.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(c40009035.cfilter,1,nil,tp) end function c40009035.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local zone=0 local lg=eg:Filter(c40009035.cfilter,nil,tp) for tc in aux.Next(lg) do zone=bit.bor(zone,tc:GetLinkedZone()) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) end function c40009035.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local zone=0 local lg=eg:Filter(c40009035.cfilter,nil,tp) for tc in aux.Next(lg) do zone=bit.bor(zone,tc:GetLinkedZone()) end if c:IsRelateToEffect(e) and zone~=0 and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP,zone) then local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e2:SetValue(LOCATION_REMOVED) e2:SetReset(RESET_EVENT+RESETS_REDIRECT) c:RegisterEffect(e2,true) Duel.SpecialSummonComplete() end end