Commit 44932d91 authored by POLYMER's avatar POLYMER

fix

parent 07bd49ae
......@@ -3,7 +3,7 @@ local s,id,o=GetID()
Duel.LoadScript("c33201450.lua")
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,2,2,s.ovfilter,aux.Stringid(id,0),99,s.xyzop)
aux.AddXyzProcedure(c,nil,2,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop)
c:EnableReviveLimit()
--remove
local e1=Effect.CreateEffect(c)
......@@ -11,8 +11,8 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.rmcon)
e1:SetCost(s.rmcost)
e1:SetCondition(s.rmcon)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
c:RegisterEffect(e1)
......@@ -43,7 +43,7 @@ function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=e:GetHandler():GetOverlayGroup()
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.GetMatchingGroupCount(s.exfilter,tp,0,LOCATION_HAND,nil)>0 end
local hc=Duel.GetMatchingGroupCount(s.exfilter,tp,0,LOCATION_HAND,nil)
if rg:GetCount()<hc then hc=rg:GetCount() end
if rg:GetCount()<hc then hc=rg end
local ct=e:GetHandler():RemoveOverlayCard(tp,1,hc,REASON_COST)
e:SetLabel(ct)
end
......@@ -55,11 +55,10 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
local g=Duel.GetMatchingGroup(s.exfilter,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 and ct then
local sg=Duel.GetMatchingGroup(s.exfilter,tp,0,LOCATION_HAND,nil)
if sg:GetCount()>0 and ct then
local sg=g:RandomSelect(tp,ct)
Duel.ConfirmCards(tp,sg)
Duel.ShuffleHand(1-tp)
local tc=sg:GetFirst()
while tc do
if VHisc_HDST.nck(tc) then Duel.Destroy(tc,REASON_EFFECT) end
......@@ -69,7 +68,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local fg=Duel.GetMatchingGroup(s.fgfilter,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_EXTRA+LOCATION_REMOVED,nil,code)
for fc in aux.Next(fg) do
if fc:GetFlagEffect(33201450)==0 then
fc:RegisterFlagEffect(33201450,nil,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33201450,3))
fc:RegisterFlagEffect(33201450,nil,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end
end
end
......
......@@ -22,16 +22,12 @@ function cm.initial_effect(c)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
local ge1_1=ge1:Clone()
ge1_1:SetCode(EVENT_MSET)
Duel.RegisterEffect(ge1_1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge3:SetCode(EVENT_ADJUST)
ge3:SetOperation(cm.adjustop)
Duel.RegisterEffect(ge3,0)
local ge4=ge3:Clone()
Duel.RegisterEffect(ge4,1)
local ge5=Effect.CreateEffect(c)
ge5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge5:SetCode(EVENT_CHANGE_POS)
......@@ -124,16 +120,15 @@ function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m+500)>0 then
for tc in aux.Next(fg) do
if tc:IsFacedown() then
if tc:GetFlagEffectLabel(m)==1100 then tc:SetStatus(STATUS_SUMMON_TURN,false) else tc:SetStatus(STATUS_SPSUMMON_TURN,false) end
if tc:GetFlagEffectLabel(m)==1100 or tc:GetFlagEffectLabel(m)==1106 then tc:SetStatus(STATUS_SUMMON_TURN,false) else tc:SetStatus(STATUS_SPSUMMON_TURN,false) end
else
if tc:GetFlagEffectLabel(m)==1100 then tc:SetStatus(STATUS_SUMMON_TURN,true) else tc:SetStatus(STATUS_SPSUMMON_TURN,true) end
if tc:GetFlagEffectLabel(m)==1100 or tc:GetFlagEffectLabel(m)==1106 then tc:SetStatus(STATUS_SUMMON_TURN,true) else tc:SetStatus(STATUS_SPSUMMON_TURN,true) end
end
end
else
for tc in aux.Next(fg) do
if tc:GetFlagEffectLabel(m)==1100 then tc:SetStatus(STATUS_SUMMON_TURN,true) else tc:SetStatus(STATUS_SPSUMMON_TURN,true) end
if tc:GetFlagEffectLabel(m)==1100 or tc:GetFlagEffectLabel(m)==1106 then tc:SetStatus(STATUS_SUMMON_TURN,true) else tc:SetStatus(STATUS_SPSUMMON_TURN,true) end
end
e:Reset()
Duel.Readjust()
end
end
......@@ -25,13 +25,13 @@ function s.thfilter(c)
return c:IsCode(13171876) and c:IsAbleToHand()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.DisableShuffleCheck(true)
Duel.SendtoHand(g,nil,REASON_EFFECT)
......
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