Commit 0b823757 authored by mercury233's avatar mercury233

fix

parent 4419fcf8
Pipeline #11523 failed with stages
in 3 minutes and 5 seconds
...@@ -10,7 +10,7 @@ function s.initial_effect(c) ...@@ -10,7 +10,7 @@ function s.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE) e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetTarget(s.eqtg) e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop) e1:SetOperation(s.eqop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -21,18 +21,18 @@ function s.initial_effect(c) ...@@ -21,18 +21,18 @@ function s.initial_effect(c)
e2:SetValue(400) e2:SetValue(400)
e2:SetCondition(s.atkcon) e2:SetCondition(s.atkcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to grave --to grave
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOGRAVE) e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,id) e3:SetCountLimit(1,id)
e3:SetCondition(s.tgcon) e3:SetCondition(s.tgcon)
e3:SetTarget(s.tgtg) e3:SetTarget(s.tgtg)
e3:SetOperation(s.tgop) e3:SetOperation(s.tgop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.filter(c) function s.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1115) return c:IsFaceup() and c:IsSetCard(0x1115)
...@@ -52,7 +52,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown()
or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
return return
end end
...@@ -74,20 +74,20 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,20 +74,20 @@ function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return ec and ec:IsSetCard(0x1115) return ec and ec:IsSetCard(0x1115)
end end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp) function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) return c:IsPreviousLocation(LOCATION_ONFIELD)
end end
function s.tgfilter(c) function s.tgfilter(c)
return c:IsSetCard(0x115) and c:IsType(TYPE_SPELL) and c:IsAbleToGrave() return c:IsSetCard(0x115) and c:IsType(TYPE_SPELL) 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
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
end end
...@@ -5,6 +5,11 @@ function c21293424.initial_effect(c) ...@@ -5,6 +5,11 @@ function c21293424.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,2) aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--apply the effect --apply the effect
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c21293424.valcheck)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(21293424,0)) e1:SetDescription(aux.Stringid(21293424,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
...@@ -14,6 +19,7 @@ function c21293424.initial_effect(c) ...@@ -14,6 +19,7 @@ function c21293424.initial_effect(c)
e1:SetTarget(c21293424.efftg) e1:SetTarget(c21293424.efftg)
e1:SetOperation(c21293424.effop) e1:SetOperation(c21293424.effop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
e0:SetLabelObject(e1)
--protection --protection
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
...@@ -29,6 +35,13 @@ function c21293424.initial_effect(c) ...@@ -29,6 +35,13 @@ function c21293424.initial_effect(c)
e3:SetValue(c21293424.atkval) e3:SetValue(c21293424.atkval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c21293424.valcheck(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local flag=0
if c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0 then flag=flag|1 end
if c:GetMaterial():FilterCount(Card.IsCode,nil,78362751)>0 then flag=flag|2 end
e:GetLabelObject():SetLabel(flag)
end
function c21293424.effcon(e,tp,eg,ep,ev,re,r,rp) function c21293424.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
...@@ -36,9 +49,8 @@ function c21293424.thfilter(c) ...@@ -36,9 +49,8 @@ function c21293424.thfilter(c)
return c:IsSetCard(0x166) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x166) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function c21293424.efftg(e,tp,eg,ep,ev,re,r,rp,chk) function c21293424.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local chk1=e:GetLabel()&1>0
local chk1=c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0 local chk2=e:GetLabel()&2>0
local chk2=c:GetMaterial():FilterCount(Card.IsCode,nil,78362751)>0
if chk==0 then return chk1 and Duel.IsPlayerCanDraw(tp,1) if chk==0 then return chk1 and Duel.IsPlayerCanDraw(tp,1)
or chk2 and Duel.IsExistingMatchingCard(c21293424.thfilter,tp,LOCATION_DECK,0,1,nil) end or chk2 and Duel.IsExistingMatchingCard(c21293424.thfilter,tp,LOCATION_DECK,0,1,nil) end
e:SetCategory(0) e:SetCategory(0)
...@@ -53,8 +65,8 @@ function c21293424.efftg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,8 +65,8 @@ function c21293424.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c21293424.effop(e,tp,eg,ep,ev,re,r,rp) function c21293424.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local chk1=c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0 local chk1=e:GetLabel()&1>0
local chk2=c:GetMaterial():FilterCount(Card.IsCode,nil,78362751)>0 local chk2=e:GetLabel()&2>0
if chk1 then if chk1 then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
......
...@@ -5,6 +5,11 @@ function c75215744.initial_effect(c) ...@@ -5,6 +5,11 @@ function c75215744.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,2) aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--apply the effect --apply the effect
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c75215744.valcheck)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75215744,0)) e1:SetDescription(aux.Stringid(75215744,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
...@@ -14,6 +19,7 @@ function c75215744.initial_effect(c) ...@@ -14,6 +19,7 @@ function c75215744.initial_effect(c)
e1:SetTarget(c75215744.efftg) e1:SetTarget(c75215744.efftg)
e1:SetOperation(c75215744.effop) e1:SetOperation(c75215744.effop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
e0:SetLabelObject(e1)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75215744,1)) e2:SetDescription(aux.Stringid(75215744,1))
...@@ -28,13 +34,19 @@ function c75215744.initial_effect(c) ...@@ -28,13 +34,19 @@ function c75215744.initial_effect(c)
e2:SetOperation(c75215744.desop) e2:SetOperation(c75215744.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c75215744.valcheck(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local flag=0
if c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0 then flag=flag|1 end
if c:GetMaterial():FilterCount(Card.IsCode,nil,61027400)>0 then flag=flag|2 end
e:GetLabelObject():SetLabel(flag)
end
function c75215744.effcon(e,tp,eg,ep,ev,re,r,rp) function c75215744.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function c75215744.efftg(e,tp,eg,ep,ev,re,r,rp,chk) function c75215744.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local chk1=e:GetLabel()&1>0
local chk1=c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0 local chk2=e:GetLabel()&2>0
local chk2=c:GetMaterial():FilterCount(Card.IsCode,nil,61027400)>0
if chk==0 then return (chk1 and Duel.IsPlayerCanDraw(tp,1) or chk2) end if chk==0 then return (chk1 and Duel.IsPlayerCanDraw(tp,1) or chk2) end
if chk1 then if chk1 then
e:SetCategory(CATEGORY_DRAW) e:SetCategory(CATEGORY_DRAW)
...@@ -45,8 +57,8 @@ function c75215744.efftg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,8 +57,8 @@ function c75215744.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c75215744.effop(e,tp,eg,ep,ev,re,r,rp) function c75215744.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local chk1=c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0 local chk1=e:GetLabel()&1>0
local chk2=c:GetMaterial():FilterCount(Card.IsCode,nil,61027400)>0 local chk2=e:GetLabel()&2>0
if chk1 then if chk1 then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
......
...@@ -5,6 +5,11 @@ function c94798725.initial_effect(c) ...@@ -5,6 +5,11 @@ function c94798725.initial_effect(c)
aux.AddXyzProcedure(c,nil,5,2) aux.AddXyzProcedure(c,nil,5,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--apply the effect --apply the effect
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c94798725.valcheck)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(94798725,0)) e1:SetDescription(aux.Stringid(94798725,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
...@@ -14,6 +19,7 @@ function c94798725.initial_effect(c) ...@@ -14,6 +19,7 @@ function c94798725.initial_effect(c)
e1:SetTarget(c94798725.efftg) e1:SetTarget(c94798725.efftg)
e1:SetOperation(c94798725.effop) e1:SetOperation(c94798725.effop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
e0:SetLabelObject(e1)
--disable --disable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(94798725,1)) e2:SetDescription(aux.Stringid(94798725,1))
...@@ -29,13 +35,19 @@ function c94798725.initial_effect(c) ...@@ -29,13 +35,19 @@ function c94798725.initial_effect(c)
e2:SetOperation(c94798725.disop) e2:SetOperation(c94798725.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c94798725.valcheck(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local flag=0
if c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0 then flag=flag|1 end
if c:GetMaterial():FilterCount(Card.IsCode,nil,42377643)>0 then flag=flag|2 end
e:GetLabelObject():SetLabel(flag)
end
function c94798725.effcon(e,tp,eg,ep,ev,re,r,rp) function c94798725.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function c94798725.efftg(e,tp,eg,ep,ev,re,r,rp,chk) function c94798725.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local chk1=e:GetLabel()&1>0
local chk1=c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0 local chk2=e:GetLabel()&2>0
local chk2=c:GetMaterial():FilterCount(Card.IsCode,nil,42377643)>0
if chk==0 then return (chk1 and Duel.IsPlayerCanDraw(tp,1) or chk2) end if chk==0 then return (chk1 and Duel.IsPlayerCanDraw(tp,1) or chk2) end
if chk1 then if chk1 then
e:SetCategory(CATEGORY_DRAW) e:SetCategory(CATEGORY_DRAW)
...@@ -46,8 +58,8 @@ function c94798725.efftg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -46,8 +58,8 @@ function c94798725.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c94798725.effop(e,tp,eg,ep,ev,re,r,rp) function c94798725.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local chk1=c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0 local chk1=e:GetLabel()&1>0
local chk2=c:GetMaterial():FilterCount(Card.IsCode,nil,42377643)>0 local chk2=e:GetLabel()&2>0
if chk1 then if chk1 then
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
......
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