Commit 2973f68a authored by POLYMER's avatar POLYMER

fix

parent a21ee66f
......@@ -25,8 +25,8 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp)
local ag=cg:RandomSelect(tp,#cg-1)
for tc in aux.Next(ag) do
tc:SetEntityCode(89631139)
if not tc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(tp,tc) end
end
Duel.ConfirmCards(tp,ag)
end
local g2=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
if #g2>=15 then
......@@ -53,15 +53,16 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp)
e3:SetTargetRange(1,0)
Duel.RegisterEffect(e3,tp)
--
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(12847200,12))
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
Duel.RegisterEffect(e6,tp)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(197042,2))
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return Duel.GetCurrentChain()==0 and Duel.IsMainPhase() end)
Duel.RegisterEffect(e5,tp)
end
c:SetEntityCode(89631139)
Duel.ConfirmCards(tp,c)
if not c:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(tp,c) end
end
function s.thfilter(c)
return (c:IsCode(89631139) or aux.IsCodeListed(c,89631139))
......@@ -84,8 +85,11 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #sg2>0 then
Duel.SendtoHand(sg2,nil,REASON_RULE)
Duel.ConfirmCards(1-tp,sg2)
local tc=sg2:GetFirst()
local token=Duel.CreateToken(tp,tc:GetOriginalCode())
Duel.Exile(tc,REASON_RULE)
Duel.SendtoHand(token,nil,REASON_RULE)
Duel.ConfirmCards(1-tp,token)
end
Duel.BreakEffect()
local g=Group.CreateGroup()
......@@ -127,8 +131,10 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_OPSELECTED,0,aux.Stringid(id,3))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
if #sg>0 and Duel.SSet(tp,sg,tp)>0 then
if #sg>0 then
local dc=sg:GetFirst()
Duel.MoveToField(dc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true)
Duel.ConfirmCards(1-tp,dc)
if dc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,4))
......
......@@ -67,7 +67,7 @@ function s.pcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_FUSION)
and c:IsLocation(LOCATION_GRAVE)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
......
......@@ -28,9 +28,9 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetCondition(s.costcon)
e2:SetTarget(s.acttg)
e2:SetCost(s.costchk)
e2:SetOperation(s.actop)
e2:SetOperation(s.costop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
......@@ -91,20 +91,38 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function s.costcon(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer()
function s.acttg(e,te,tp)
if Duel.GetTurnPlayer() ~= e:GetHandlerPlayer() then return false end
if not Duel.IsExistingMatchingCard(Card.IsCode, e:GetHandlerPlayer(), LOCATION_PZONE, 0, 1, nil, 40020585) then return false end
return true
end
function s.costchk(e,te_or_c,tp)
function s.costchk(e,te,tp)
return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,3,nil)
return Duel.IsExistingMatchingCard(Card.IsAbleToDeck, tp, LOCATION_GRAVE, 0, 3, nil)
end
function s.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,0,3,3,nil)
if g:GetCount()==3 then
Duel.SendtoDeck(g,nil,SEQ_DECKBOTTOM,REASON_COST)
Duel.SendtoDeck(g, nil, SEQ_DECKTOP, REASON_COST)
local ct = g:GetCount()
if ct > 1 then
Duel.SortDecktop(tp, tp, ct)
end
for i = 1, ct do
local mg = Duel.GetDecktopGroup(tp, 1)
Duel.MoveSequence(mg:GetFirst(), SEQ_DECKBOTTOM)
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