Commit aeaa4a0e authored by POLYMER's avatar POLYMER

fix

parent 3aa7a304
...@@ -22,7 +22,7 @@ function cm.initial_effect(c) ...@@ -22,7 +22,7 @@ function cm.initial_effect(c)
cm.aozora_field_effect=e2 cm.aozora_field_effect=e2
end end
function cm.filter(c) function cm.filter(c)
return c:IsCode(53734011) and ((c:IsLocation(LOCATION_DECK) and c:IsSSetable()) or (c:IsLocation(LOCATION_FZONE) and c:IsCanTurnSet())) return c:IsCode(53734012) and ((c:IsLocation(LOCATION_DECK) and c:IsSSetable()) or (c:IsLocation(LOCATION_FZONE) and c:IsCanTurnSet()))
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_FZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_FZONE,0,1,nil) end
......
...@@ -97,6 +97,6 @@ end ...@@ -97,6 +97,6 @@ end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<1 then return end if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(1-tp,s.setfilter,1-tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() local sc=Duel.SelectMatchingCard(1-tp,s.spfilter,1-tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst()
if sc then Duel.SpecialSummon(sc,0,1-tp,1-tp,false,false,POS_FACEUP) end if sc then Duel.SpecialSummon(sc,0,1-tp,1-tp,false,false,POS_FACEUP) end
end end
--极彩蛇的腹辙
local s,id,o=GetID()
function s.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.desfilter(c)
return c:GetSequence()<5 and c:IsAbleToGrave()
end
function s.ctrfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc20) and c:IsControlerCanBeChanged()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(s.ctrfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,tp,LOCATION_MZONE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
local seq=tc:GetSequence()
if Duel.SendtoGrave(tc,REASON_EFFECT)<=0 or not tc:IsLocation(LOCATION_GRAVE) then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local sg=Duel.SelectMatchingCard(tp,s.ctrfilter,tp,LOCATION_MZONE,0,1,1,nil)
if #sg<=0 then return end
local sc=sg:GetFirst()
if Duel.GetControl(sc,1-tp,PHASE_END,1,1<<seq)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_SUM)
sc:RegisterEffect(e2)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
sc:RegisterEffect(e2)
end
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