Commit 57571aa1 authored by GuGu's avatar GuGu

Update c86379654.lua 红字bug

parent 31f5ae38
Pipeline #16482 passed with stage
in 1 minute and 1 second
......@@ -111,15 +111,14 @@ function c86379654.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c86379654.spfilter(chkc,e,tp) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c86379654.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c86379654.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectTarget(tp,c86379654.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c86379654.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
tc:RegisterFlagEffect(86379654,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(c)
......@@ -207,6 +206,10 @@ function c86379654.tdfilter(c)
end
function c86379654.tzfilter(c)
return bit.band(c:GetReason(),REASON_TEMPORARY)~=0
and ((c:IsPreviousLocation(LOCATION_MZONE) and Duel.GetLocationCount(c:GetPreviousControler(),LOCATION_MZONE)>0)
or (c:IsPreviousLocation(LOCATION_SZONE) and Duel.GetLocationCount(c:GetPreviousControler(),LOCATION_SZONE)>0 and not c:IsPreviousLocation(LOCATION_PZONE+LOCATION_FZONE))
or (c:IsPreviousLocation(LOCATION_PZONE) and (Duel.CheckLocation(c:GetPreviousControler(),LOCATION_SZONE,0) or Duel.CheckLocation(c:GetPreviousControler(),LOCATION_SZONE,4)))
or (c:IsPreviousLocation(LOCATION_FZONE) and Duel.CheckLocation(c:GetPreviousControler(),LOCATION_SZONE,5)))
end
function c86379654.operation2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c86379654.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) then return end
......@@ -219,7 +222,7 @@ function c86379654.operation2(e,tp,eg,ep,ev,re,r,rp)
opval[off-1]=1
off=off+1
end
if Duel.IsExistingMatchingCard(c86379654.tzfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) and Duel.GetMZoneCount(tp)>0 then
if Duel.IsExistingMatchingCard(c86379654.tzfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) then
ops[off]=aux.Stringid(86379654,4)
opval[off-1]=2
off=off+1
......@@ -240,19 +243,19 @@ function c86379654.operation2(e,tp,eg,ep,ev,re,r,rp)
local pos=rc:GetPreviousPosition()
local cp=rc:GetPreviousControler()
if rc:IsType(TYPE_FIELD) and rc:IsPreviousLocation(LOCATION_FZONE) then
if Duel.GetFieldCard(cp,LOCATION_SZONE,5) then
Duel.SendtoGrave(rc,REASON_RULE)
else
if Duel.CheckLocation(cp,LOCATION_SZONE,5) then
Duel.MoveToField(rc,cp,cp,LOCATION_FZONE,pos,true)
if rc:IsFacedown() and rc:GetFlagEffect(186379657)>0 then
rc:SetStatus(STATUS_SET_TURN,true)
end
else
Duel.SendtoGrave(rc,REASON_RULE)
end
elseif rc:IsType(TYPE_PENDULUM) and rc:IsPreviousLocation(LOCATION_PZONE) then
if Duel.GetFieldCard(cp,LOCATION_PZONE,0) and Duel.GetFieldCard(cp,LOCATION_PZONE,1) then
Duel.SendtoGrave(rc,REASON_RULE)
else
if Duel.CheckLocation(cp,LOCATION_SZONE,0) or Duel.CheckLocation(cp,LOCATION_SZONE,4) then
Duel.MoveToField(rc,cp,cp,LOCATION_PZONE,pos,true)
else
Duel.SendtoGrave(rc,REASON_RULE)
end
elseif rc:IsType(TYPE_MONSTER) and rc:IsPreviousLocation(LOCATION_SZONE) then
local ty=rc:GetPreviousTypeOnField()
......
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