Commit c4770552 authored by wind2009's avatar wind2009

Fix 2つに1つ

parent dec20acb
Pipeline #42356 passed with stages
in 2 minutes and 13 seconds
No preview for this file type
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
101304066 101304066
101304067 101304067
101304069 101304069
101304070
101304208 101304208
101304075 101304075
101304076 101304076
\ No newline at end of file
...@@ -9,10 +9,10 @@ function s.initial_effect(c) ...@@ -9,10 +9,10 @@ function s.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.chkfilter(c) function s.chkfilter(c)
return (c:IsType(TYPE_MONSTER) or c:IsType(TYPE_TRAP)) and c:IsAbleToRemove() return c:IsType(TYPE_MONSTER+TYPE_TRAP) and c:IsAbleToRemove()
end end
function s.chkfilter2(c,e,tp) function s.chkfilter2(c,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
...@@ -27,6 +27,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,6 +27,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.chkfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(s.chkfilter,tp,LOCATION_DECK,0,nil)
if not g:CheckSubGroup(s.fslect,3,3,e,tp) then return end
local sg=g:SelectSubGroup(tp,s.fslect,false,3,3,e,tp) local sg=g:SelectSubGroup(tp,s.fslect,false,3,3,e,tp)
if not sg then return end if not sg then return end
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
...@@ -38,30 +39,31 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,30 +39,31 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc3=fg:GetFirst() local tc3=fg:GetFirst()
if Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT)~=0 then if Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT)~=0 then
local op=aux.SelectFromOptions(1-tp, local op=aux.SelectFromOptions(1-tp,
{true,aux.Stringid(id,1)}, {true,aux.Stringid(id,1),1},
{true,aux.Stringid(id,2)}) {true,aux.Stringid(id,2),2})
if op==1 then if op==1 then
Duel.ConfirmCards(tp,tc1) Duel.ConfirmCards(tp,tc1)
Duel.ConfirmCards(1-tp,tc1) Duel.ConfirmCards(1-tp,tc1)
if tc1:IsType(TYPE_MONSTER) then if tc1:IsType(TYPE_MONSTER) then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if tc1:IsAbleToHand() and (not tc1:IsCanBeSpecialSummoned(e,0,tp,false,false) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then local spchk=tc1:IsCanBeSpecialSummoned(e,0,tp,false,false) and ft>0
if tc1:IsAbleToHand() and (not spchk or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc1,nil,REASON_EFFECT) Duel.SendtoHand(tc1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc1) Duel.ConfirmCards(1-tp,tc1)
else elseif spchk then
Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc1,0,tp,tp,false,false,POS_FACEUP)
end end
else else
Duel.Remove(tc1,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc1,POS_FACEUP,REASON_EFFECT)
end end
else elseif op==2 then
Duel.ConfirmCards(tp,tc3) Duel.ConfirmCards(tp,tc3)
Duel.ConfirmCards(1-tp,tc3) Duel.ConfirmCards(1-tp,tc3)
if tc3:IsType(TYPE_MONSTER) then if tc3:IsType(TYPE_MONSTER) then
if tc3:IsAbleToHand() then if tc3:IsAbleToHand() then
Duel.SendtoHand(tc3,nil,REASON_EFFECT) Duel.SendtoHand(tc3,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc3) Duel.ConfirmCards(1-tp,tc3)
end end
else else
Duel.Remove(tc3,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc3,POS_FACEUP,REASON_EFFECT)
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