Commit ea01f5a4 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 1b950fe7
......@@ -51,14 +51,14 @@ function cm.initial_effect(c)
e3:SetTargetRange(1,1)
e3:SetTarget(function(e,c)return c:IsType(e:GetLabel()) end)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
Duel.RegisterEffect(e3,tp)
end end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_SINGLE)
.e("SetCode",EFFECT_DIRECT_ATTACK)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetDescription",aux.Stringid(m,1))
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetCategory",CATEGORY_TOHAND)
.e("SetType",EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
.e("SetCode",EVENT_BATTLE_DAMAGE)
.e("SetCountLimit",1,m)
......@@ -71,14 +71,15 @@ function cm.initial_effect(c)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) end)
.e("SetOperation",function(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,cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end)
.Return())
end
......@@ -90,7 +91,7 @@ function cm.disfilter(c,g)
return g:IsContains(c)
end
function cm.spfilter(c,e,tp)
return c:IsCode(m+1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsCode(m+1) and c:IsAbleToHand()
end
function iFunc(c,x)
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
......
......@@ -46,14 +46,14 @@ function cm.initial_effect(c)
e3:SetTargetRange(1,1)
e3:SetTarget(function(e,c)return c:IsType(e:GetLabel()) end)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
Duel.RegisterEffect(e3,tp)
end end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_SINGLE)
.e("SetCode",EFFECT_DIRECT_ATTACK)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetDescription",aux.Stringid(m,1))
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetCategory",CATEGORY_TOHAND)
.e("SetType",EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
.e("SetCode",EVENT_BATTLE_DAMAGE)
.e("SetCountLimit",1,m)
......@@ -66,14 +66,15 @@ function cm.initial_effect(c)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) end)
.e("SetOperation",function(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,cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end)
.Return())
end
......@@ -85,7 +86,7 @@ function cm.disfilter(c,g)
return g:IsContains(c)
end
function cm.spfilter(c,e,tp)
return c:IsCode(m-1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsCode(m-1) and c:IsAbleToHand()
end
function iFunc(c,x)
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
......
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