Commit afa47f5d authored by Nemo Ma's avatar Nemo Ma

fix

parent 6dc48d0b
......@@ -34,8 +34,8 @@ function c40009130.initial_effect(c)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetCountLimit(1,40009130)
e4:SetCondition(c40009130.drcon)
e1:SetTarget(c40009130.target)
e1:SetOperation(c40009130.operation)
e4:SetTarget(c40009130.target)
e4:SetOperation(c40009130.operation)
c:RegisterEffect(e4)
end
function c40009130.indcon(e)
......
--机械加工·起
if not pcall(function() require("expansions/script/c40008000") end) then require("script/c40008000") end
local m,cm=rscf.DefineCard(40009425)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m,1},"tg,sp",nil,nil,nil,rsop.target2(rstg.opinfo("sp",0,0,LOCATION_DECK),cm.tgfilter,"tg",LOCATION_DECK),cm.act)
function c40009425.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(40009425,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,40009425+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c40009425.target)
e1:SetOperation(c40009425.activate)
c:RegisterEffect(e1)
end
function cm.tgfilter(c)
return c:IsAbleToGrave() and c:IsRace(RACE_INSECT)
function c40009425.tgfilter(c)
return c:IsRace(RACE_INSECT) and c:IsAbleToGrave()
end
function cm.act(e,tp)
local ct,og,tc=rsop.SelectToGrave(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,{})
if tc and tc:IsLocation(LOCATION_GRAVE) and tc:IsType(TYPE_NORMAL) then
rsop.SelectOC("sp",true)
rsop.SelectSpecialSummon(tp,rscf.spfilter2(Card.IsSetCard,0x5f1d),tp,LOCATION_DECK,0,1,1,nil,{},e,tp)
function c40009425.spfilter(c,e,tp)
return c:IsSetCard(0x5f1d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40009425.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009425.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c40009425.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40009425.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) and tc:IsRace(RACE_INSECT) and tc:IsType(TYPE_NORMAL)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c40009425.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(40009425,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c40009425.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment