Commit ea01f5a4 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 1b950fe7
...@@ -58,7 +58,7 @@ function cm.initial_effect(c) ...@@ -58,7 +58,7 @@ function cm.initial_effect(c)
.e("SetCode",EFFECT_DIRECT_ATTACK) .e("SetCode",EFFECT_DIRECT_ATTACK)
.Return()).c("RegisterEffect",iFunc(c) .Return()).c("RegisterEffect",iFunc(c)
.e("SetDescription",aux.Stringid(m,1)) .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("SetType",EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
.e("SetCode",EVENT_BATTLE_DAMAGE) .e("SetCode",EVENT_BATTLE_DAMAGE)
.e("SetCountLimit",1,m) .e("SetCountLimit",1,m)
...@@ -71,14 +71,15 @@ function cm.initial_effect(c) ...@@ -71,14 +71,15 @@ function cm.initial_effect(c)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk) .e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 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) 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) .e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) 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 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) end end)
.Return()) .Return())
end end
...@@ -90,7 +91,7 @@ function cm.disfilter(c,g) ...@@ -90,7 +91,7 @@ function cm.disfilter(c,g)
return g:IsContains(c) return g:IsContains(c)
end end
function cm.spfilter(c,e,tp) 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 end
function iFunc(c,x) function iFunc(c,x)
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1] local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1]
......
...@@ -53,7 +53,7 @@ function cm.initial_effect(c) ...@@ -53,7 +53,7 @@ function cm.initial_effect(c)
.e("SetCode",EFFECT_DIRECT_ATTACK) .e("SetCode",EFFECT_DIRECT_ATTACK)
.Return()).c("RegisterEffect",iFunc(c) .Return()).c("RegisterEffect",iFunc(c)
.e("SetDescription",aux.Stringid(m,1)) .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("SetType",EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
.e("SetCode",EVENT_BATTLE_DAMAGE) .e("SetCode",EVENT_BATTLE_DAMAGE)
.e("SetCountLimit",1,m) .e("SetCountLimit",1,m)
...@@ -66,14 +66,15 @@ function cm.initial_effect(c) ...@@ -66,14 +66,15 @@ function cm.initial_effect(c)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk) .e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 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) 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) .e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) 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 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) end end)
.Return()) .Return())
end end
...@@ -85,7 +86,7 @@ function cm.disfilter(c,g) ...@@ -85,7 +86,7 @@ function cm.disfilter(c,g)
return g:IsContains(c) return g:IsContains(c)
end end
function cm.spfilter(c,e,tp) 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 end
function iFunc(c,x) function iFunc(c,x)
local __this = (aux.GetValueType(c) == "Card" and {(x == nil and {Effect.CreateEffect(c)} or {x})[1]} or {x})[1] 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