Commit 246f5ae5 authored by wind2009's avatar wind2009

Fix

parent 5496effb
Pipeline #43724 passed with stages
in 2 minutes and 51 seconds
No preview for this file type
...@@ -45,7 +45,8 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -45,7 +45,8 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(Duel.GetTargetsRelateToChain(),REASON_EFFECT) local sg=Duel.GetTargetsRelateToChain():Filter(Card.IsOnField,nil)
Duel.Destroy(sg,REASON_EFFECT)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp return ep==1-tp
...@@ -82,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,4 +83,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
sc:CompleteProcedure() sc:CompleteProcedure()
end end
end end
end end
\ No newline at end of file
...@@ -87,8 +87,10 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,8 +87,10 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and tc:IsFaceup() then if tc:IsRelateToChain() and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_XYZ_LEVEL) e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(s.xyzlv) e1:SetValue(s.xyzlv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
...@@ -96,4 +98,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,4 +98,4 @@ function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.xyzlv(e,c,rc) function s.xyzlv(e,c,rc)
return c:GetRank() return c:GetRank()
end end
\ No newline at end of file
...@@ -11,7 +11,7 @@ function s.initial_effect(c) ...@@ -11,7 +11,7 @@ function s.initial_effect(c)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.spcon) e1:SetCondition(s.spcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--search --set
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SSET) e2:SetCategory(CATEGORY_SSET)
...@@ -49,7 +49,6 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,7 +49,6 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -85,4 +84,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,4 +84,4 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -96,4 +96,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,4 +96,4 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
--RUM-幻影騎士団レクイエム --RUM幻影騎士団レクイエム
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -12,8 +13,7 @@ function s.initial_effect(c) ...@@ -12,8 +13,7 @@ function s.initial_effect(c)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.cfilter(c,e,tp) function s.cfilter(c,tp)
local rk=c:GetRank()
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
...@@ -34,15 +34,15 @@ function s.xyzfilter(c,e,tp,mc,rk) ...@@ -34,15 +34,15 @@ function s.xyzfilter(c,e,tp,mc,rk)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_MZONE,0,nil,tp)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.spfilter(chkc,e,tp,g) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.spfilter(chkc,e,tp,g) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,g) end and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,g) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,g) local sg=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp,g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,2,tp,LOCATION_EXTRA)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -87,4 +87,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,4 +87,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
sc:CompleteProcedure() sc:CompleteProcedure()
end end
end end
end end
\ No newline at end of file
...@@ -42,7 +42,7 @@ function s.posfilter(c) ...@@ -42,7 +42,7 @@ function s.posfilter(c)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x10db,TYPES_NORMAL_TRAP_MONSTER,0,300,3,RACE_WARRIOR,ATTRIBUTE_DARK) then if c:IsRelateToChain() and Duel.IsPlayerCanSpecialSummonMonster(tp,id,0x10db,TYPES_NORMAL_TRAP_MONSTER,0,300,3,RACE_WARRIOR,ATTRIBUTE_DARK) then
c:AddMonsterAttribute(TYPE_NORMAL) c:AddMonsterAttribute(TYPE_NORMAL)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE)~=0 if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(s.posfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(s.posfilter,tp,0,LOCATION_MZONE,1,nil)
...@@ -75,4 +75,4 @@ function s.cfilter(c) ...@@ -75,4 +75,4 @@ function s.cfilter(c)
end end
function s.actcon(e) function s.actcon(e)
return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
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