Commit 3d32db18 authored by TanakaKotoha's avatar TanakaKotoha

Suit

parent cf1e4831
......@@ -43,10 +43,9 @@ function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if e:GetHandler():IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -56,22 +55,22 @@ end
function cm.spcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==1
end
function cm.xyzfilter(c,e,tp,mat)
function cm.xyzfilter(c,e,tp)
return c:IsType(TYPE_XYZ) and c:IsCode(14000656) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mat,c)>0
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0
and aux.MustMaterialCheck(e:GetHandler(),tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if Duel.GetLocationCountFromEx(tp,tp,c)<=0 or not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local g=Duel.SelectMatchingCard(tp,cm.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
......
......@@ -4,7 +4,6 @@ function c33310159.initial_effect(c)
aux.AddXyzProcedure(c,aux.TRUE,5,2)
--linmo
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
......@@ -24,14 +23,16 @@ function c33310159.initial_effect(c)
c33310159[c]=e1
end
function c33310159.ltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_GRAVE)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,0x55b) end
end
function c33310159.lop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,0x55b)
if g then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.Overlay(c,g)
end
end
end
......
......@@ -62,15 +62,20 @@ end
function c33400220.cfilter(c)
return c:IsSetCard(0x341) and c:IsType(TYPE_XYZ) and c:IsAbleToRemoveAsCost() and c:IsRankAbove(6)
end
function c33400220.cfilter3(c)
return c:IsSetCard(0x6342) and c:IsType(TYPE_XYZ) and c:IsAbleToRemoveAsCost() and c:IsRankAbove(6)
end
function c33400220.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x341)
end
function c33400220.xyzop(e,tp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33400220.cfilter,tp,LOCATION_GRAVE,0,2,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c33400220.cfilter,tp,LOCATION_GRAVE,0,2,nil) and Duel.IsExistingMatchingCard(c33400220.cfilter3,tp,LOCATION_GRAVE,0,1,nil)end
local g1=Duel.GetMatchingGroup(c33400220.cfilter,tp,LOCATION_GRAVE,0,nil)
if g1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=g1:SelectSubGroup(tp,c33400220.xyzcheck,false,2,99)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end
function c33400220.macon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
......
......@@ -92,7 +92,7 @@ function c60151016.immcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()<2 and e:GetHandler():GetMaterial():FilterCount(c60151016.ccfilter,nil)>0
end
function c60151016.efilter(e,te)
if te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:IsHasType(EFFECT_TYPE_ACTIVATE) then return true end
if te:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return true end
if te:IsActiveType(TYPE_MONSTER) and te:IsActivated() then return true end
end
function c60151016.regcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -27,7 +27,7 @@ function c75646065.lkfilter(c)
return c:IsLinkSetCard(0x2c0) or c:IsLinkSetCard(0xa2c2)
end
function c75646065.lcheck(g,lc)
return g:IsExists(c75646065.lkfilter,1)
return g:IsExists(c75646065.lkfilter,1,nil)
end
function c75646065.filter(c)
return (c:IsSetCard(0x2c0) or c:IsSetCard(0xa2c2)) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToDeck()
......
......@@ -11,7 +11,7 @@ function c81010059.initial_effect(c)
c:RegisterEffect(e1)
end
function c81010059.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==tp
return rp==tp and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function c81010059.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,nil) 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