Commit 6bfda224 authored by mercury233's avatar mercury233

fix

parent 7afd37ec
...@@ -26,16 +26,20 @@ function c101006032.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,16 +26,20 @@ function c101006032.operation(e,tp,eg,ep,ev,re,r,rp)
local tc1=hg1:Select(tp,1,1,nil):GetFirst() local tc1=hg1:Select(tp,1,1,nil):GetFirst()
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_CONFIRM)
local tc2=hg2:Select(1-tp,1,1,nil):GetFirst() local tc2=hg2:Select(1-tp,1,1,nil):GetFirst()
local tg={tc1,tc2} local tg=Group.FromCards(tc1,tc2)
if tc2:IsControler(0) then tc={tc2,tc1} end Duel.ConfirmCards(tp,tg)
if tc1:IsType(TYPE_MONSTER) and tc2:IsType(TYPE_MONSTER) then if tc1:IsType(TYPE_MONSTER) and tc2:IsType(TYPE_MONSTER) then
for p=0,1 do local i=0
local tc=tg[p] local p=tp
while i<=1 do
local tc=tg:Filter(Card.IsControler,nil,p):GetFirst()
if Duel.GetLocationCount(p,LOCATION_MZONE)>0 if Duel.GetLocationCount(p,LOCATION_MZONE)>0
and tc:IsCanBeSpecialSummoned(e,0,p,false,false) and tc:IsCanBeSpecialSummoned(e,0,p,false,false)
and Duel.SelectYesNo(p,aux.Stringid(101006032,1)) then and Duel.SelectYesNo(p,aux.Stringid(101006032,1)) then
Duel.SpecialSummon(tc,0,p,p,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,p,p,false,false,POS_FACEUP)
end end
i=i+1
p=1-tp
end end
elseif tc1:IsType(TYPE_SPELL) and tc2:IsType(TYPE_SPELL) elseif tc1:IsType(TYPE_SPELL) and tc2:IsType(TYPE_SPELL)
and Duel.IsPlayerCanDraw(tp,2) and Duel.IsPlayerCanDraw(1-tp,2) then and Duel.IsPlayerCanDraw(tp,2) and Duel.IsPlayerCanDraw(1-tp,2) then
...@@ -50,4 +54,6 @@ function c101006032.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,4 +54,6 @@ function c101006032.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
end end
Duel.ShuffleHand(tp)
Duel.ShuffleHand(1-tp)
end end
...@@ -30,6 +30,7 @@ function c101006068.initial_effect(c) ...@@ -30,6 +30,7 @@ function c101006068.initial_effect(c)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(c101006068.accon) e3:SetCondition(c101006068.accon)
e3:SetTarget(c101006068.actg)
e3:SetOperation(c101006068.acop) e3:SetOperation(c101006068.acop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--set --set
...@@ -57,13 +58,16 @@ function c101006068.accon(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,13 +58,16 @@ function c101006068.accon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,0,1,nil) and not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,0,1,nil)
end end
function c101006068.filter(c) function c101006068.filter(c,tp)
return c:IsCode(47355498) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true) return c:IsCode(47355498) and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)
end end
function c101006068.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101006068.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp) end
end
function c101006068.acop(e,tp,eg,ep,ev,re,r,rp) function c101006068.acop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101006068.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101006068.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then if fc then
......
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