Commit b195744c authored by wind2009's avatar wind2009

Fix

parent 98760625
Pipeline #40960 passed with stages
in 2 minutes and 51 seconds
......@@ -41,7 +41,6 @@ function s.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,0x4)>0
end
function s.spval(e,c)
local tp=c:GetControler()
return 0,0x4
end
function s.thfilter(c)
......@@ -74,7 +73,7 @@ end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cs=c:GetSequence()
if cs>4 or cs==2 then return end
if not c:IsRelateToChain() or cs>4 or cs==2 then return end
local g=Duel.GetMatchingGroup(s.chfilter,tp,LOCATION_MZONE,0,nil)
if g:GetCount()==1 then
local tc=g:GetFirst()
......@@ -84,9 +83,9 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.rthfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
local rg=Duel.SelectMatchingCard(tp,s.rthfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(rg)
Duel.SendtoHand(rg,nil,REASON_EFFECT)
end
end
end
......@@ -23,7 +23,7 @@ function s.initial_effect(c)
--switch locations
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
......@@ -40,7 +40,6 @@ function s.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,0x4)>0
end
function s.spval(e,c)
local tp=c:GetControler()
return 0,0x4
end
function s.pfilter(c,tp)
......@@ -69,7 +68,7 @@ end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cs=c:GetSequence()
if cs>4 or cs==2 then return end
if not c:IsRelateToChain() or cs>4 or cs==2 then return end
local g=Duel.GetMatchingGroup(s.chfilter,tp,LOCATION_MZONE,0,nil)
if g:GetCount()==1 then
local tc=g:GetFirst()
......@@ -79,12 +78,11 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil):RandomSelect(tp,1)
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil):RandomSelect(tp,1)
Duel.HintSelection(rg)
Duel.SendtoHand(rg,nil,REASON_EFFECT)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
local c=e:GetHandler()
local fid=c:GetFieldID()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -109,3 +107,8 @@ function s.retcon(e,tp,eg,ep,ev,re,r,rp)
return false
end
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local tc=e:GetLabelObject()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
--耀聖の月詩フォルトナ
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
......@@ -39,7 +40,6 @@ function s.spcon(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,0x4)>0
end
function s.spval(e,c)
local tp=c:GetControler()
return 0,0x4
end
function s.pfilter(c,tp)
......@@ -48,12 +48,12 @@ function s.pfilter(c,tp)
end
function s.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_DECK,0,1,nil,tp) end
and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,tp) end
end
function s.pop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
local tc=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
end
function s.chcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -71,7 +71,7 @@ end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cs=c:GetSequence()
if cs>4 or cs==2 then return end
if not c:IsRelateToChain() or cs>4 or cs==2 then return end
local g=Duel.GetMatchingGroup(s.chfilter,tp,LOCATION_MZONE,0,nil)
if g:GetCount()==1 then
local tc=g:GetFirst()
......@@ -81,9 +81,9 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.rthfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
local rg=Duel.SelectMatchingCard(tp,s.rthfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(rg)
Duel.SendtoHand(rg,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
......@@ -19,6 +19,7 @@ function s.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,id)
e2:SetCondition(s.lvcon)
e2:SetTarget(s.lvtg)
......@@ -41,7 +42,7 @@ function s.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
function s.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
return Duel.IsMainPhase()
end
function s.lvfilter(c,e)
return c:GetSequence()==2 and c:IsFaceup() and c:IsLevelAbove(1)
......
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