Commit b5026a6f authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 488483d5
Pipeline #395 failed with stages
in 60 minutes
...@@ -17,6 +17,7 @@ function cm.initial_effect(c) ...@@ -17,6 +17,7 @@ function cm.initial_effect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_ATTACK_ANNOUNCE) e5:SetCode(EVENT_ATTACK_ANNOUNCE)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1)
e5:SetCondition(cm.atkcon) e5:SetCondition(cm.atkcon)
e5:SetOperation(cm.atkop) e5:SetOperation(cm.atkop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,m+10000) -- e1:SetCountLimit(1,m+10000)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
e1:SetTarget(cm.sptg2) e1:SetTarget(cm.sptg2)
e1:SetOperation(cm.spop2) e1:SetOperation(cm.spop2)
......
...@@ -14,6 +14,14 @@ function cm.initial_effect(c) ...@@ -14,6 +14,14 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_HAND)
e2:SetCountLimit(3)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.activate2)
c:RegisterEffect(e2)
end end
--e1 --e1
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -22,11 +30,11 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,11 +30,11 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lvt={} local lvt={}
if cn>16 then cn=16 end if cn>16 then cn=16 end
local g2=Group.CreateGroup() local g2=Group.CreateGroup()
-- local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp,cn/2) local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp,cn/2)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp,cn) -- local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp,cn)
-- if Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x3a80) then g2=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp,cn) end if Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x3a80) then g2=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_EXTRA,0,nil,e,tp,cn) end
g:Merge(g2)
local num=g:GetCount() local num=g:GetCount()
-- g:Merge(g2)
Debug.Message(num) Debug.Message(num)
local tc=g:GetFirst() local tc=g:GetFirst()
if Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x3a80) then if Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x3a80) then
...@@ -105,4 +113,38 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -105,4 +113,38 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure() sc:CompleteProcedure()
end end
end
--e2
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_EFFECT)~=0 and re:GetHandler():IsCode(33500811) and c:GetPreviousControler()==tp
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local nm=e:GetLabel()
local tc=Duel.GetFirstTarget()
local mg=tc:GetOverlayGroup()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
-- if Duel.SendtoGrave(c,REASON_EFFECT)~=0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_EXTRA,0,nil,e,tp,tc,nm/2)
if tc:IsSetCard(0x3a80) then
local g2=Duel.GetMatchingGroup(cm.filter3,tp,LOCATION_EXTRA,0,nil,e,tp,tc,nm)
g1:Merge(g2)
end
-- g2:Merge(g1)
local g3=g1:Select(tp,1,1,nil)
local sc=g3:GetFirst()
if sc then
-- local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
Duel.SendtoGrave(c,REASON_EFFECT)
end end
\ No newline at end of file
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