Commit 60a8d098 authored by Huangnan's avatar Huangnan

fix

parent 8e611279
Pipeline #35460 passed with stages
in 67 minutes and 7 seconds
......@@ -57,31 +57,44 @@ function Lost_In_Mirror.eff3op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() and tc:IsRelateToEffect(e) then
Lost_In_Mirror.confirm(tp,tc)
local check=Duel.GetFlagEffect(tp,47370213)~=0
if tc:GetOriginalType()&TYPE_MONSTER~=0 and Duel.SendtoGrave(tc,REASON_EFFECT)>0 then
if tc:IsPreviousControler(tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(Lost_In_Mirror.setfilter,tp,LOCATION_GRAVE,0,1,nil,tc:GetCode())
and Duel.IsExistingMatchingCard(Lost_In_Mirror.setfilter,tp,LOCATION_GRAVE,0,1,nil,tc:GetCode(),check)
and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(47350500,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,Lost_In_Mirror.setfilter,tp,LOCATION_GRAVE,0,1,1,nil,tc:GetCode())
local sg=Duel.SelectMatchingCard(tp,Lost_In_Mirror.setfilter,tp,LOCATION_GRAVE,0,1,1,nil,tc:GetCode(),check)
if #sg==0 then return end
local sc=sg:GetFirst()
if Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true) then
if sc:IsSetCard(0x6ca1) and sc:IsType(TYPE_MONSTER) then
if Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,true) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP)
sc:RegisterEffect(e1)
Duel.RaiseEvent(sc,EVENT_SSET,e,REASON_EFFECT,tc:GetOwner(),nil,0)
end
else
Duel.SSet(tp,sc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
Duel.RaiseEvent(sc,EVENT_SSET,e,REASON_EFFECT,tc:GetOwner(),nil,0)
end
end
end
end
end
function Lost_In_Mirror.setfilter(c,code)
function Lost_In_Mirror.setfilter(c,code,check)
return c:IsType(TYPE_MONSTER) and not c:IsCode(code) and c:IsRace(RACE_FIEND)
or (check and c:IsSetCard(0x9ca1) and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsSSetable())
end
function Lost_In_Mirror.confirm(tp,tc)
Duel.ConfirmCards(1-tp,tc)
......
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