Commit 41920300 authored by Tachibana's avatar Tachibana

得得得得得

parent 100237f8
Pipeline #12058 passed with stages
in 34 minutes and 45 seconds
...@@ -19,7 +19,7 @@ function c17032730.initial_effect(c) ...@@ -19,7 +19,7 @@ function c17032730.initial_effect(c)
--draw --draw
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(17032730,0)) e3:SetDescription(aux.Stringid(17032730,0))
e3:SetCategory(CATEGORY_DRAW) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_PHASE+PHASE_END) e3:SetCode(EVENT_PHASE+PHASE_END)
......
...@@ -33,16 +33,17 @@ function c17032790.tgfilter(c,mc) ...@@ -33,16 +33,17 @@ function c17032790.tgfilter(c,mc)
return c:IsLevel(lv) return c:IsLevel(lv)
end end
function c17032790.cfilter(c,e,tp) function c17032790.cfilter(c,e,tp)
if not c:IsFaceup() then return end
local g=e:GetHandler():GetOverlayGroup():Filter(c17032790.spfilter,nil,e,tp) local g=e:GetHandler():GetOverlayGroup():Filter(c17032790.spfilter,nil,e,tp)
local b1=Duel.IsExistingMatchingCard(c17032790.tgfilter,tp,LOCATION_DECK,0,1,nil,c) local b1=Duel.IsExistingMatchingCard(c17032790.tgfilter,tp,LOCATION_DECK,0,1,nil,c) and c:IsAbleToGrave()
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 and c~=e:GetHandler() local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return c:IsFaceup() and (b1 or b2) return b1 or (b2 and #g>0 and c~=e:GetHandler())
end end
function c17032790.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c17032790.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c17032790.cfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c17032790.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c17032790.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c17032790.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
end end
function c17032790.operation(e,tp,eg,ep,ev,re,r,rp) function c17032790.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -50,7 +51,7 @@ function c17032790.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +51,7 @@ function c17032790.operation(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
local g=e:GetHandler():GetOverlayGroup():Filter(c17032790.spfilter,nil,e,tp) local g=e:GetHandler():GetOverlayGroup():Filter(c17032790.spfilter,nil,e,tp)
local b1=Duel.IsExistingMatchingCard(c17032790.tgfilter,tp,LOCATION_DECK,0,1,nil,tc) local b1=Duel.IsExistingMatchingCard(c17032790.tgfilter,tp,LOCATION_DECK,0,1,nil,tc)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 and tc~=e:GetHandler() local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local off=1 local off=1
local ops={} local ops={}
local opval={} local opval={}
...@@ -59,7 +60,7 @@ function c17032790.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +60,7 @@ function c17032790.operation(e,tp,eg,ep,ev,re,r,rp)
opval[off-1]=1 opval[off-1]=1
off=off+1 off=off+1
end end
if b2 then if b2 and #g>0 and tc~=c then
ops[off]=aux.Stringid(17032790,3) ops[off]=aux.Stringid(17032790,3)
opval[off-1]=2 opval[off-1]=2
off=off+1 off=off+1
...@@ -69,8 +70,8 @@ function c17032790.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,8 +70,8 @@ function c17032790.operation(e,tp,eg,ep,ev,re,r,rp)
if sel==1 then if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c17032790.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tc) local tg=Duel.SelectMatchingCard(tp,c17032790.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tc)
if tg:GetCount()>0 then if tg:GetCount()>0 and Duel.SendtoGrave(tg,REASON_EFFECT)~=0 then
Duel.SendtoGrave(tg,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
else else
sg=g:Select(tp,1,1,nil) sg=g:Select(tp,1,1,nil)
......
...@@ -8,7 +8,6 @@ function c17032810.initial_effect(c) ...@@ -8,7 +8,6 @@ function c17032810.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,17032810)
e1:SetCondition(c17032810.effcon) e1:SetCondition(c17032810.effcon)
e1:SetOperation(c17032810.effop) e1:SetOperation(c17032810.effop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -36,12 +36,10 @@ function c17032820.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,12 +36,10 @@ function c17032820.op(e,tp,eg,ep,ev,re,r,rp)
local val=e:GetLabel()+10 local val=e:GetLabel()+10
Duel.Damage(1-tp,200,REASON_EFFECT) Duel.Damage(1-tp,200,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,val,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,val,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
if (Duel.GetFlagEffect(tp,val))/4==math.floor((Duel.GetFlagEffect(tp,val))/4) then local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil) if (Duel.GetFlagEffect(tp,val))/4==math.floor((Duel.GetFlagEffect(tp,val))/4) and #g>0 then
if g:GetCount()>0 then Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE) local sg=g:Select(1-tp,1,1,nil)
local sg=g:Select(1-tp,1,1,nil) Duel.SendtoGrave(sg,REASON_EFFECT)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end end
end end
--绝望的崇拜者 --绝望的崇拜者
xpcall(function() require("expansions/script/c17035101") end,function() require("script/c17035101") end)
function c17032830.initial_effect(c) function c17032830.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_LIGHT),2,2) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkAttribute,ATTRIBUTE_LIGHT),2,2)
...@@ -6,11 +7,10 @@ function c17032830.initial_effect(c) ...@@ -6,11 +7,10 @@ function c17032830.initial_effect(c)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17032830,0)) e1:SetDescription(aux.Stringid(17032830,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,17032830)
e1:SetCondition(c17032830.rccon) e1:SetCondition(c17032830.rccon)
e1:SetTarget(c17032830.rctg) e1:SetTarget(c17032830.rctg)
e1:SetOperation(c17032830.rcop) e1:SetOperation(c17032830.rcop)
...@@ -21,7 +21,6 @@ function c17032830.initial_effect(c) ...@@ -21,7 +21,6 @@ function c17032830.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RECOVER) e2:SetCode(EVENT_RECOVER)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,17032830)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c17032830.target) e2:SetTarget(c17032830.target)
e2:SetOperation(c17032830.activate) e2:SetOperation(c17032830.activate)
...@@ -44,7 +43,7 @@ function c17032830.spfilter(c,e,tp) ...@@ -44,7 +43,7 @@ function c17032830.spfilter(c,e,tp)
return c:IsSetCard(0x97f3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x97f3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c17032830.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c17032830.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c17032830.spfilter(chkc,e,tp) end if chkc then return true end
local b1=Duel.IsExistingTarget(c17032830.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b1=Duel.IsExistingTarget(c17032830.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return true end if chk==0 then return true end
local op=0 local op=0
......
...@@ -39,7 +39,7 @@ function c17032840.thfilter(c) ...@@ -39,7 +39,7 @@ function c17032840.thfilter(c)
end end
function c17032840.activate(e,tp,eg,ep,ev,re,r,rp) function c17032840.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c17032840.thfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c17032840.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(17032730,0)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(17032840,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
...@@ -47,7 +47,7 @@ end ...@@ -47,7 +47,7 @@ end
cm.pendulum_level=7 cm.pendulum_level=7
function cm.xyzfilter(c,xyzc) function cm.xyzfilter(c,xyzc)
return c:IsXyzLevel(xyzc,7) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) return c:IsXyzLevel(xyzc,7) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE))
and (c:IsRace(RACE_REPTILE) or not c:IsLocation(LOCATION_GRAVE)) and ((c:IsRace(RACE_REPTILE) and c:IsSetCard(0x57f6))or not c:IsLocation(LOCATION_GRAVE))
end end
function cm.fselect(g,tp,xyzc) function cm.fselect(g,tp,xyzc)
return g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1 return g:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)<=1
......
...@@ -135,15 +135,18 @@ function cm.posac(g,e,tp) ...@@ -135,15 +135,18 @@ function cm.posac(g,e,tp)
for tc in aux.Next(g) do for tc in aux.Next(g) do
if tc:IsFaceup() and tc:IsCanTurnSet() then if tc:IsFaceup() and tc:IsCanTurnSet() then
if tc:IsLocation(LOCATION_MZONE) then if tc:IsLocation(LOCATION_MZONE) then
local pos1=Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
local pos1=Duel.GetOperatedGroup():GetCount()
ac=ac+pos1 ac=ac+pos1
else else
local pos2=Duel.ChangePosition(tc,POS_FACEDOWN) Duel.ChangePosition(tc,POS_FACEDOWN)
local pos2=Duel.GetOperatedGroup():GetCount()
Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
ac=ac+pos2 ac=ac+pos2
end end
else else
local tg=Duel.SendtoGrave(tc,REASON_EFFECT) Duel.SendtoGrave(tc,REASON_EFFECT)
local tg=Duel.GetOperatedGroup():GetCount()
ac=ac+tg ac=ac+tg
end end
if ac>0 then og:AddCard(tc) end if ac>0 then og:AddCard(tc) 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