Commit 143a549a authored by POLYMER's avatar POLYMER

fix

parent 75800c47
...@@ -20,27 +20,25 @@ function c75075620.initial_effect(c) ...@@ -20,27 +20,25 @@ function c75075620.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
-- 1 -- 1
function c75075620.target(e,tp,eg,ep,ev,re,r,rp,chk) function c75075620.filter0(c)
if chk==0 then
return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(function(c)
return c:IsSetCard(0x5754) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x5754) and c:IsType(TYPE_MONSTER)
end),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
or Duel.IsExistingMatchingCard(function(c) function c75075620.filter1(c,e,tp)
return c:IsSetCard(0x5754) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x5754) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
function c75075620.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c75075620.filter0),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
or Duel.IsExistingMatchingCard(c75075620.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
or Duel.GetFieldGroupCount(tp,LOCATION_FZONE,LOCATION_FZONE)>0 or Duel.GetFieldGroupCount(tp,LOCATION_FZONE,LOCATION_FZONE)>0
end end
local options={} local options={}
local op_desc={} local op_desc={}
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(function(c) if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c75075620.filter0),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) then
return c:IsSetCard(0x5754) and c:IsType(TYPE_MONSTER)
end),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) then
table.insert(options,0) table.insert(options,0)
table.insert(op_desc,aux.Stringid(75075620,0)) table.insert(op_desc,aux.Stringid(75075620,0))
end end
if Duel.IsExistingMatchingCard(function(c) if Duel.IsExistingMatchingCard(c75075620.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) then
return c:IsSetCard(0x5754) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil) then
table.insert(options,1) table.insert(options,1)
table.insert(op_desc,aux.Stringid(75075620,1)) table.insert(op_desc,aux.Stringid(75075620,1))
end end
...@@ -59,16 +57,18 @@ function c75075620.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,16 +57,18 @@ function c75075620.activate(e,tp,eg,ep,ev,re,r,rp)
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)
Duel.ConfirmCards(1-tp,sg)
end end
elseif op==1 then elseif op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
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) local g=Duel.GetMatchingGroup(c75075620.filter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
elseif op==2 then elseif op==2 then
local fg=Duel.GetFieldGroup(tp,LOCATION_FZONE,LOCATION_FZONE) local fg=Duel.GetFieldGroup(tp,LOCATION_FZONE,LOCATION_FZONE)
......
...@@ -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