--Dash the Mecha Wolf function c249000529.initial_effect(c) aux.EnableUnionAttribute(c,c249000529.eqlimit) --equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(30012506,0)) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE+LOCATION_HAND) e1:SetTarget(c249000529.eqtg) e1:SetOperation(c249000529.eqop) c:RegisterEffect(e1) --unequip local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(249000529,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_SZONE) e2:SetTarget(c249000529.sptg) e2:SetOperation(c249000529.spop) c:RegisterEffect(e2) --cannot be target local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_EQUIP) e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e3:SetValue(aux.tgoval) c:RegisterEffect(e3) --spsummon local e4=Effect.CreateEffect(c) e4:SetDescription(2) e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetCode(EVENT_SUMMON_SUCCESS) e4:SetCost(c249000529.spcost) e4:SetTarget(c249000529.sptg2) e4:SetOperation(c249000529.spop2) c:RegisterEffect(e4) --extra att local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_EQUIP) e5:SetCode(EFFECT_EXTRA_ATTACK) e5:SetValue(1) c:RegisterEffect(e5) end function c249000529.filter(c) local ct1,ct2=c:GetUnionCount() return c:IsFaceup() and c:IsCode(249000005,249001130) and ct2==0 end function c249000529.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c249000529.filter(chkc) end if chk==0 then return e:GetHandler():GetFlagEffect(249000529)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c249000529.filter,tp,LOCATION_MZONE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectTarget(tp,c249000529.filter,tp,LOCATION_MZONE,0,1,1,c) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) c:RegisterFlagEffect(249000529,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) end function c249000529.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if not c:IsRelateToEffect(e) or (c:IsFacedown() and not c:IsLocation(LOCATION_HAND)) then return end if not tc:IsRelateToEffect(e) or not c249000529.filter(tc) then Duel.SendtoGrave(c,REASON_EFFECT) return end if not Duel.Equip(tp,c,tc) then return end aux.SetUnionState(c) end function c249000529.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(249000529)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) c:RegisterFlagEffect(249000529,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) end function c249000529.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) end function c249000529.eqlimit(e,c) return c:IsCode(249000005,249001130) or e:GetHandler():GetEquipTarget()==c end function c249000529.cfilter(c) return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDiscardable() end function c249000529.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c249000529.cfilter,tp,LOCATION_HAND,0,1,nil) end Duel.DiscardHand(tp,c249000529.cfilter,1,1,REASON_COST+REASON_DISCARD) end function c249000529.filter2(c,e,tp) return c:IsCode(249000005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function c249000529.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c249000529.filter2,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) end function c249000529.spop2(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c249000529.filter2),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp) if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end end