Commit 526c2082 authored by Huangnan's avatar Huangnan

fixed

parent 502d56de
Pipeline #23771 passed with stages
in 26 minutes and 59 seconds
...@@ -39,20 +39,20 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,20 +39,20 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoDeck(tdc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then if Duel.SendtoDeck(tdc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eqc=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,tdc:GetCode()):GetFirst() local eqc=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,tdc:GetCode()):GetFirst()
Duel.Equip(tp,eqc,tc,false) Duel.Equip(tp,eqc,tc)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT) e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetLabelObject(tc)
e2:SetValue(s.eqlimit) e2:SetValue(s.eqlimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) eqc:RegisterEffect(e2)
tc:RegisterFlagEffect(82962242,RESET_EVENT+RESETS_STANDARD,0,1)
end end
end end
end end
function s.eqlimit(e,c) function s.eqlimit(e,c)
return e:GetOwner()==c return e:GetLabelObject()==c
end end
function s.tograve(c) function s.tograve(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -10,7 +10,6 @@ function s.initial_effect(c) ...@@ -10,7 +10,6 @@ function s.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCondition(s.sycon)
e1:SetValue(s.matval) e1:SetValue(s.matval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -27,9 +26,6 @@ function s.initial_effect(c) ...@@ -27,9 +26,6 @@ function s.initial_effect(c)
e2:SetOperation(s.tsop) e2:SetOperation(s.tsop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.sycon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.tsfilter,1,nil,tp)
end
function s.matval(e,c) function s.matval(e,c)
return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x43e) return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x43e)
end end
...@@ -52,7 +48,7 @@ function s.tsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +48,7 @@ function s.tsop(e,tp,eg,ep,ev,re,r,rp)
if not aux.NecroValleyFilter()(c) then return end if not aux.NecroValleyFilter()(c) then return end
if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return end if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if Duel.IsExistingMatchingCard(s.ckfilter,tp,LOCATION_MZONE,0,1,nil) and if Duel.IsExistingMatchingCard(s.ckfilter,tp,LOCATION_MZONE,0,1,nil) and
Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) then Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil):GetFirst()
......
...@@ -16,11 +16,11 @@ function s.initial_effect(c) ...@@ -16,11 +16,11 @@ function s.initial_effect(c)
--atk down --atk down
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCost(s.cost) e2:SetCost(s.cost)
e2:SetTarget(s.atktg)
e2:SetOperation(s.atkop) e2:SetOperation(s.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to grave --to grave
...@@ -45,9 +45,15 @@ function s.counter(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,9 +45,15 @@ function s.counter(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x43f,2,REASON_COST) and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x43f,2,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x43f,2,REASON_COST) Duel.RemoveCounter(tp,1,0,0x43f,2,REASON_COST)
end end
function s.downfilter(c)
return c:IsFaceup() and c:IsAttackAbove(1)
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.downfilter,tp,0,LOCATION_MZONE,1,nil) end
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp) function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local mc = Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) local mc = Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
......
...@@ -63,14 +63,25 @@ function Lost_In_Mirror.eff3op(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,14 +63,25 @@ function Lost_In_Mirror.eff3op(e,tp,eg,ep,ev,re,r,rp)
and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(47350500,0)) then and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(47350500,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sc=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())
Duel.SSet(tp,sc) if #sg==0 then return end
local sc=sg:GetFirst()
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
end end
end end
end end
end end
function Lost_In_Mirror.setfilter(c,code) function Lost_In_Mirror.setfilter(c,code)
return c:IsType(TYPE_MONSTER) and not c:IsCode(code) and c:IsRace(RACE_FIEND) and c:IsSSetable() return c:IsType(TYPE_MONSTER) and not c:IsCode(code) and c:IsRace(RACE_FIEND)
end end
function Lost_In_Mirror.confirm(tp,tc) function Lost_In_Mirror.confirm(tp,tc)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
......
...@@ -20,6 +20,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,6 +20,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP) e1:SetValue(TYPE_TRAP)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tc:GetOwner(),nil,0)
end end
end end
function s.filter(c,tp) function s.filter(c,tp)
......
...@@ -18,7 +18,7 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -18,7 +18,7 @@ function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end end
function s.tgfilter(c) function s.tgfilter(c)
return c:IsRace(RACE_FIEND) and c:IsLevel(3) and c:IsAbleToGrave() return (c:IsSetCard(0x43c) or (c:IsRace(RACE_FIEND) and c:IsLevel(3))) and c:IsAbleToGrave()
end end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
...@@ -77,5 +77,5 @@ function s.initial_effect(c) ...@@ -77,5 +77,5 @@ function s.initial_effect(c)
s.tohand(c) s.tohand(c)
end end
function s.fmatfilter(c) function s.fmatfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER) return c:IsAttribute(ATTRIBUTE_DARK) and c:IsFusionType(TYPE_MONSTER)
end end
...@@ -102,6 +102,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,6 +102,7 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_TRAP) e1:SetValue(TYPE_TRAP)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tc:GetOwner(),nil,0)
end end
end end
end end
...@@ -115,5 +116,5 @@ function s.initial_effect(c) ...@@ -115,5 +116,5 @@ function s.initial_effect(c)
s.set(c) s.set(c)
end end
function s.fmatfilter(c) function s.fmatfilter(c)
return c:IsLevel(3) and c:IsType(TYPE_MONSTER) return c:IsLevel(3) and c:IsFusionType(TYPE_MONSTER)
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