Commit ff70c4b9 authored by wind2009's avatar wind2009

Fix

parent f095ffd5
Pipeline #42991 canceled with stages
in 1 minute and 48 seconds
No preview for this file type
...@@ -35,13 +35,14 @@ end ...@@ -35,13 +35,14 @@ end
function s.effop(e,tp,eg,ep,ev,re,r,rp) function s.effop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then if tc:IsRelateToChain() and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2)) tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
local e2=Effect.CreateEffect(tc) local e2=Effect.CreateEffect(tc)
e2:SetDescription(aux.Stringid(id,3)) e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCost(s.descost) e2:SetCost(s.descost)
...@@ -52,6 +53,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,6 +53,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST) Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
end end
function s.desfilter(c) function s.desfilter(c)
...@@ -69,4 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,4 +71,4 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
if tc and tc:IsRelateToChain() and tc:IsFaceup() then if tc and tc:IsRelateToChain() and tc:IsFaceup() then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
\ No newline at end of file
--虹の橋ビフレスト --虹の橋 ビフレスト
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_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -42,4 +43,4 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,4 +43,4 @@ function s.activate(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
...@@ -3,6 +3,7 @@ local s,id,o=GetID() ...@@ -3,6 +3,7 @@ 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_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -78,11 +79,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,11 +79,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,TIMING_DRAW_PHASE+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetTarget(s.thtg) e2:SetTarget(s.thtg)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
...@@ -128,11 +130,12 @@ function s.cfilter(c) ...@@ -128,11 +130,12 @@ function s.cfilter(c)
return c:IsSetCard(0x23) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x23) and c:IsAbleToRemoveAsCost()
end end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() local c=e:GetHandler()
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_GRAVE,0,1,1,c)
g:AddCard(e:GetHandler()) g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -143,4 +146,4 @@ end ...@@ -143,4 +146,4 @@ end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE) local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -8,20 +8,21 @@ function s.initial_effect(c) ...@@ -8,20 +8,21 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DRAW_PHASE,TIMING_DRAW_PHASE+TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,3)) e2:SetDescription(aux.Stringid(id,2))
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCost(s.cost) e2:SetCost(s.cost)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.thfilter(c,tp) function s.thfilter(c,tp)
return c:IsType(TYPE_FIELD) and c:IsCode(27564031) return c:IsCode(27564031)
and (c:IsAbleToHand() or (not c:IsForbidden() and c:CheckUniqueOnField(tp))) and (c:IsAbleToHand() or (c:IsType(TYPE_FIELD) and not c:IsForbidden() and c:CheckUniqueOnField(tp)))
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsSetCard(0x23) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsSetCard(0x23) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
...@@ -47,6 +48,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,6 +48,11 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
else else
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
res=Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) res=Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end end
if res then if res then
...@@ -55,16 +61,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,16 +61,15 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then if #g>0 then
Duel.BreakEffect() Duel.BreakEffect()
if Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)~=0 if Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(s.atkfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(s.atkfilter,tp,0,LOCATION_MZONE,1,nil) then
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local sg=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(sg) do for mc in aux.Next(sg) do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-2500) e1:SetValue(-2500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) mc:RegisterEffect(e1)
end end
end end
end end
...@@ -74,4 +79,4 @@ end ...@@ -74,4 +79,4 @@ 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 true end if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
\ No newline at end of file
--A BF-叢雲のクサナギ --A BF叢雲のクサナギ
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--synchro summon --synchro summon
...@@ -34,9 +34,9 @@ s.treat_itself_tuner=true ...@@ -34,9 +34,9 @@ s.treat_itself_tuner=true
function s.valcheck(e,c) function s.valcheck(e,c)
local g=c:GetMaterial() local g=c:GetMaterial()
local atk=0 local atk=0
for tc in aux.Next(g) do local sg=g:Filter(Card.IsType,nil,TYPE_SYNCHRO)
local catk=tc:GetBaseAttack() if sg:GetCount()>0 then
atk=atk+catk atk=sg:GetSum(Card.GetBaseAttack)
end end
if g:IsExists(Card.IsSetCard,1,nil,0x33) then if g:IsExists(Card.IsSetCard,1,nil,0x33) then
e:GetLabelObject():SetLabel(1,atk) e:GetLabelObject():SetLabel(1,atk)
...@@ -60,6 +60,7 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,6 +60,7 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
if atk~=0 then if atk~=0 then
Duel.Hint(HINT_CARD,0,id)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
...@@ -67,4 +68,4 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,4 +68,4 @@ function s.tnop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
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