Commit af74783f authored by Nemo Ma's avatar Nemo Ma

fix

parent 4245856d
......@@ -162,7 +162,7 @@ function cm.pcop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
while tc do
Duel.Equip(tp,tc,c,true,true)
tc=sg:GetNext()
tc=g:GetNext()
end
Duel.EquipComplete()
else
......
......@@ -50,15 +50,34 @@ function c9910445.activate(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DisableShuffleCheck()
local tg=dg:Filter(Card.IsAbleToHand,nil)
local thct=0
if tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910445,0)) then
local flag=true
local g1=Group.CreateGroup()
while tg:GetCount()>10 do
if not Duel.SelectYesNo(tp,aux.Stringid(9910445,0)) then
flag=false
break
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=tg:Select(tp,1,1,nil):GetFirst()
g1:AddCard(tc)
local sg=Group.CreateGroup()
if tc:IsType(TYPE_SPELL+TYPE_TRAP) then sg=tg:Filter(Card.IsType,nil,TYPE_SPELL+TYPE_TRAP) end
if tc:IsType(TYPE_MONSTER) then sg=tg:Filter(Card.IsLevel,nil,tc:GetLevel()) end
tg:Sub(sg)
end
if flag and tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910445,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=tg:SelectSubGroup(tp,c9910445.thfilter,false,1,tg:GetCount())
thct=Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
g1:Merge(sg)
end
if g1:GetCount()>0 then
Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
Duel.ShuffleHand(tp)
dg:Sub(sg)
thct=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_HAND)
end
Duel.Remove(dg,POS_FACEDOWN,REASON_EFFECT)
local g2=dg:Filter(Card.IsLocation,nil,LOCATION_DECK)
Duel.Remove(g2,POS_FACEDOWN,REASON_EFFECT)
if thct>=ct and Duel.GetTurnPlayer()==tp then
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
......
......@@ -49,14 +49,18 @@ end
function c9910709.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9910709.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetChainLimit(c9910709.chlimit)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c9910709.chlimit)
end
end
function c9910709.chlimit(e,ep,tp)
return tp==ep
end
function c9910709.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9910709.filter,tp,LOCATION_DECK,0,1,2,nil)
local ct=1
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then ct=2 end
local g=Duel.SelectMatchingCard(tp,c9910709.filter,tp,LOCATION_DECK,0,1,ct,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -53,22 +53,26 @@ function c9910723.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c9910723.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then lv=lv+1 end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9910723.filter,tp,LOCATION_DECK,0,1,nil,lv+1,e,tp) end
and Duel.IsExistingMatchingCard(c9910723.filter,tp,LOCATION_DECK,0,1,nil,lv,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetChainLimit(c9910723.chlimit)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c9910723.chlimit)
end
end
function c9910723.chlimit(e,ep,tp)
return tp==ep
end
function c9910723.activate2(e,tp,eg,ep,ev,re,r,rp)
local lv=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then lv=lv+1 end
local ct=1
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if ft>1 then ct=2 end
if ft>1 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then ct=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9910723.filter,tp,LOCATION_DECK,0,1,ct,nil,lv+1,e,tp)
local g=Duel.SelectMatchingCard(tp,c9910723.filter,tp,LOCATION_DECK,0,1,ct,nil,lv,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
......
......@@ -15,7 +15,6 @@ function c9910730.initial_effect(c)
--cost
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910730,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
......@@ -84,10 +83,15 @@ function c9910730.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if ft>2 then ft=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,Ygzw.SetFilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,ft,nil,e,tp)
local cate=0
if g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
e:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_REMOVE)
cate=cate+CATEGORY_LEAVE_GRAVE
end
Duel.SetChainLimit(c9910730.chlimit)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
cate=cate+CATEGORY_REMOVE
Duel.SetChainLimit(c9910730.chlimit)
end
e:SetCategory(cate)
end
function c9910730.chlimit(e,ep,tp)
return tp==ep
......@@ -111,7 +115,7 @@ function c9910730.activate2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==0 or g:GetCount()>ft then return end
local og=Ygzw.Set2(g,e,tp):Filter(Card.IsOnField,nil)
if og:GetCount()==0 then return end
if og:GetCount()==0 or not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local tg=Duel.GetMatchingGroup(c9910730.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,og)
if tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910730,2)) then
Duel.BreakEffect()
......
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