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