Commit 158f8dac authored by Satty's avatar Satty

fix

parent cfdf129c
Pipeline #35733 passed with stages
in 33 minutes and 37 seconds
......@@ -97,7 +97,7 @@ function c16349310.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and zone~=0 then
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP,zone) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
......
......@@ -35,10 +35,10 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_ONFIELD,0,1,nil)
return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_ONFIELD,0,1,nil)
return not Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp)
end
function s.chkfilter(c)
return (c.ThKingdWei or c:GetFlagEffect(17243108)>0) and c:IsFaceup()
......
......@@ -24,7 +24,7 @@ function cm.initial_effect(c)
end
function cm.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
and not (c:IsSummonableCard() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_XYZ) and c:IsType(TYPE_LINK))
and not c:IsSummonableCard() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_XYZ) and c:IsType(TYPE_LINK)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
......@@ -42,7 +42,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end
function cm.xyzfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
and not (c:IsSummonableCard() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_XYZ) and c:IsType(TYPE_LINK))
and not c:IsSummonableCard() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_XYZ) and c:IsType(TYPE_LINK)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.xyzfilter(chkc) end
......
......@@ -4,7 +4,7 @@ function cm.initial_effect(c)
aux.AddCodeList(c,23410101)
c:EnableReviveLimit()
--fusion material
aux.AddFusionProcFunRep(c,cm.ffilter,6,true)
--aux.AddFusionProcFunRep(c,cm.ffilter,6,true)
--code
aux.EnableChangeCode(c,23410101,LOCATION_MZONE)
--special summon rule
......@@ -131,7 +131,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp,c)
local og=mg:Filter(Card.IsLocation,nil,LOCATION_MZONE)
if #og>0 and #sg==5 and Duel.GetLocationCountFromEx(tp,tp,sg,c)==0 then
cg=og
end
end
Duel.Hint(3,tp,HINTMSG_FMATERIAL)
local tc=cg:SelectUnselect(cancel_group,tp,button,false,3,6)
if not tc then break end
......@@ -139,7 +139,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp,c)
sg:RemoveCard(tc)
else
sg:AddCard(tc)
end
end
end
c:SetMaterial(sg)
if sg:IsExists(Card.IsFacedown,1,nil) then
......
......@@ -4,6 +4,7 @@ function s.initial_effect(c)
-- ① 检索效果
local e1=Effect.CreateEffect(c)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......
......@@ -40,13 +40,13 @@ function cm.initial_effect(c)
end
function cm.hspfilter(c,tp,sc)
return c:IsSetCard(0xa341) and Duel.GetFlagEffect(tp,c:GetCode())==0
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0 and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,tc)
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0 and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,c)
end
function cm.hspfilter2(c,tp,sc,tc)
local g=Group.CreateGroup()
g:AddCard(tc)
g:AddCard(c)
return c:IsSetCard(0xa341) and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0
return c:IsSetCard(0xa341) and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0 and not c:IsCode(tc:GetCode())
and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0 and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end
function cm.hspcon(e,c)
......
......@@ -39,13 +39,13 @@ function cm.initial_effect(c)
end
function cm.hspfilter(c,tp,sc)
return c:IsSetCard(0xa341) and Duel.GetFlagEffect(tp,c:GetCode())==0
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0 and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,tc)
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0 and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,c)
end
function cm.hspfilter2(c,tp,sc,tc)
local g=Group.CreateGroup()
g:AddCard(tc)
g:AddCard(c)
return c:IsSetCard(0xa341) and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0
return c:IsSetCard(0xa341) and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0 and not c:IsCode(tc:GetCode())
and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0 and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end
function cm.hspcon(e,c)
......
......@@ -40,13 +40,13 @@ function cm.initial_effect(c)
end
function cm.hspfilter(c,tp,sc)
return c:IsSetCard(0xa341) and Duel.GetFlagEffect(tp,c:GetCode())==0
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0 and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,tc)
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0 and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,c)
end
function cm.hspfilter2(c,tp,sc,tc)
local g=Group.CreateGroup()
g:AddCard(tc)
g:AddCard(c)
return c:IsSetCard(0xa341) and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0
return c:IsSetCard(0xa341) and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0 and not c:IsCode(tc:GetCode())
and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0 and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end
function cm.hspcon(e,c)
......
......@@ -40,13 +40,13 @@ function cm.initial_effect(c)
end
function cm.hspfilter(c,tp,sc)
return c:IsSetCard(0xa341) and Duel.GetFlagEffect(tp,c:GetCode())==0
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0 and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,tc)
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0 and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,c)
end
function cm.hspfilter2(c,tp,sc,tc)
local g=Group.CreateGroup()
g:AddCard(tc)
g:AddCard(c)
return c:IsSetCard(0xa341) and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0
return c:IsSetCard(0xa341) and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0 and not c:IsCode(tc:GetCode())
and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0 and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end
function cm.hspcon(e,c)
......
......@@ -70,14 +70,14 @@ end
function cm.hspfilter(c,tp,sc)
return c:IsSetCard(0xa341)and c:IsType(TYPE_FUSION) and Duel.GetFlagEffect(tp,c:GetCode())==0
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0
and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,tc)
and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,c)
end
function cm.hspfilter2(c,tp,sc,tc)
local g=Group.CreateGroup()
g:AddCard(tc)
g:AddCard(c)
return c:IsSetCard(0xa341) and c:IsType(TYPE_FUSION)and Duel.GetFlagEffect(tp,c:GetCode())==0
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0 and not c:IsCode(tc:GetCode())
and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0 and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end
function cm.hspcon(e,c)
......@@ -92,8 +92,8 @@ function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
g2:Merge(g1)
c:SetMaterial(g2)
Duel.Release(g2,REASON_COST)
Duel.RegisterFlagEffect(tp,tc1:GetCode(),RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.RegisterFlagEffect(tp,tc2:GetCode(),RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.RegisterFlagEffect(tp,tc1:GetCode()+10000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.RegisterFlagEffect(tp,tc2:GetCode()+10000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
local tg1=Duel.GetMatchingGroup(Card.IsOriginalCodeRule,tp,0x7f,0,nil,tc1:GetCode())
local tc1=tg1:GetFirst()
while tc1 do
......
......@@ -77,15 +77,15 @@ end
function cm.hspfilter(c,tp,sc)
return c:IsSetCard(0xa341)and c:IsType(TYPE_FUSION) and Duel.GetFlagEffect(tp,c:GetCode())==0
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0
and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,tc)
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0
and c:IsControler(tp) and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL) and Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter2,1,c,c:GetControler(),sc,c)
end
function cm.hspfilter2(c,tp,sc,tc)
local g=Group.CreateGroup()
g:AddCard(tc)
g:AddCard(c)
return c:IsSetCard(0xa341) and c:IsType(TYPE_FUSION)and Duel.GetFlagEffect(tp,c:GetCode())==0
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0
and Duel.GetFlagEffect(tp,c:GetCode()+10000)==0 and not c:IsCode(tc:GetCode())
and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0 and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end
function cm.hspcon(e,c)
......@@ -100,8 +100,8 @@ function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
g2:Merge(g1)
c:SetMaterial(g2)
Duel.Release(g2,REASON_COST)
Duel.RegisterFlagEffect(tp,tc1:GetCode(),RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.RegisterFlagEffect(tp,tc2:GetCode(),RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.RegisterFlagEffect(tp,tc1:GetCode()+10000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
Duel.RegisterFlagEffect(tp,tc2:GetCode()+10000,RESET_EVENT+RESET_PHASE+PHASE_END,0,0)
local tg1=Duel.GetMatchingGroup(Card.IsOriginalCodeRule,tp,0x7f,0,nil,tc1:GetCode())
local tc1=tg1:GetFirst()
while tc1 do
......
......@@ -21,6 +21,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(s.trcost)
e2:SetTarget(s.trtg)
e2:SetOperation(s.trop)
......
......@@ -75,7 +75,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function s.sfilter(c)
return c:IsSummonable(true,nil,1) and c:IsSetCard(0x3529) and c:IsRace(RACE_WYRM)
return c:IsSummonableCard() and c:IsSetCard(0x3529) and c:IsRace(RACE_WYRM)
end
function s.con(e,tp)
return Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil)
......
......@@ -10,6 +10,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
......
......@@ -18,6 +18,16 @@ function s.initial_effect(c)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(s.target)
e2:SetOperation(s.operation)
c:RegisterEffect(e2)
end
function s.spfilter(c,e,tp,zone)
return c:IsCode(75027001) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
......@@ -38,4 +48,27 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and zone~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(math.ceil(tc:GetAttack()/2))
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(math.ceil(tc:GetDefense()/2))
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
......@@ -14,7 +14,7 @@ function c82000783.initial_effect(c)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(82000783,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
......
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