Commit 143a549a authored by POLYMER's avatar POLYMER

fix

parent 75800c47
...@@ -20,63 +20,63 @@ function c75075620.initial_effect(c) ...@@ -20,63 +20,63 @@ function c75075620.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
-- 1 -- 1
function c75075620.filter0(c)
return c:IsSetCard(0x5754) and c:IsType(TYPE_MONSTER)
end
function c75075620.filter1(c,e,tp)
return c:IsSetCard(0x5754) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c75075620.target(e,tp,eg,ep,ev,re,r,rp,chk) function c75075620.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(function(c) return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c75075620.filter0),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
return c:IsSetCard(0x5754) and c:IsType(TYPE_MONSTER) or Duel.IsExistingMatchingCard(c75075620.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
end),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) or Duel.GetFieldGroupCount(tp,LOCATION_FZONE,LOCATION_FZONE)>0
or Duel.IsExistingMatchingCard(function(c) end
return c:IsSetCard(0x5754) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) local options={}
end,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) local op_desc={}
or Duel.GetFieldGroupCount(tp,LOCATION_FZONE,LOCATION_FZONE)>0 if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c75075620.filter0),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) then
end table.insert(options,0)
local options={} table.insert(op_desc,aux.Stringid(75075620,0))
local op_desc={} end
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(function(c) if Duel.IsExistingMatchingCard(c75075620.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) then
return c:IsSetCard(0x5754) and c:IsType(TYPE_MONSTER) table.insert(options,1)
end),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) then table.insert(op_desc,aux.Stringid(75075620,1))
table.insert(options,0) end
table.insert(op_desc,aux.Stringid(75075620,0)) if Duel.GetFieldGroupCount(tp,LOCATION_FZONE,LOCATION_FZONE)>0 then
end table.insert(options,2)
if Duel.IsExistingMatchingCard(function(c) table.insert(op_desc,aux.Stringid(75075620,2))
return c:IsSetCard(0x5754) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
end,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil) then if #options==0 then return false end
table.insert(options,1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
table.insert(op_desc,aux.Stringid(75075620,1)) local sel= Duel.SelectOption(tp,table.unpack(op_desc))
end e:SetLabel(options[sel+1])
if Duel.GetFieldGroupCount(tp,LOCATION_FZONE,LOCATION_FZONE)>0 then return true
table.insert(options,2)
table.insert(op_desc,aux.Stringid(75075620,2))
end
if #options==0 then return false end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local sel= Duel.SelectOption(tp,table.unpack(op_desc))
e:SetLabel(options[sel+1])
return true
end end
function c75075620.activate(e,tp,eg,ep,ev,re,r,rp) function c75075620.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local op=e:GetLabel() local op=e:GetLabel()
if op==0 then if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(function(c) return c:IsSetCard(0x5754) and c:IsType(TYPE_MONSTER) end),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c75075620.filter0),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) local sg=g:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,g) Duel.SendtoHand(sg,nil,REASON_EFFECT)
end Duel.ConfirmCards(1-tp,sg)
elseif op==1 then end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) elseif op==1 then
local g=Duel.GetMatchingGroup(function(c) return c:IsSetCard(0x5754) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if g:GetCount()>0 then local g=Duel.GetMatchingGroup(c75075620.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) if g:GetCount()>0 then
end local sg=g:Select(tp,1,1,nil)
elseif op==2 then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local fg=Duel.GetFieldGroup(tp,LOCATION_FZONE,LOCATION_FZONE) end
local ct=Duel.Destroy(fg,REASON_EFFECT) elseif op==2 then
if ct>0 then local fg=Duel.GetFieldGroup(tp,LOCATION_FZONE,LOCATION_FZONE)
Duel.Draw(tp,ct,REASON_EFFECT) local ct=Duel.Destroy(fg,REASON_EFFECT)
end if ct>0 then
end Duel.Draw(tp,ct,REASON_EFFECT)
end
end
end end
-- 2 -- 2
function c75075620.filter2(c,tp) function c75075620.filter2(c,tp)
......
...@@ -79,10 +79,10 @@ function s.efilter(e,te) ...@@ -79,10 +79,10 @@ function s.efilter(e,te)
return te:GetOwner()~=e:GetOwner() return te:GetOwner()~=e:GetOwner()
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x40) and c:IsAbleToHand() return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x40) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
...@@ -130,17 +130,16 @@ function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -130,17 +130,16 @@ function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
if Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_REMOVED,0,nil,0x40)>=3 then end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) function s.drcfilter(c)
end return c:IsFaceup() and c:IsSetCard(0x40)
end end
function s.spop1(e,tp,eg,ep,ev,re,r,rp) function s.spop1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 and Duel.IsPlayerCanDraw(tp,1) if Duel.Draw(p,d,REASON_EFFECT)>0 and Duel.IsPlayerCanDraw(tp,1)
and Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_REMOVED,0,nil,0x40)>=3 and Duel.GetMatchingGroupCount(s.drcfilter,tp,LOCATION_REMOVED,0,nil)>=3
and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
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