Commit 164ae303 authored by VanillaSalt's avatar VanillaSalt

fix

parent c2435343
--ガガガ学園の緊急連絡網
function c21715155.initial_effect(c)
function c21715135.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c21715155.condition)
e1:SetCost(c21715155.cost)
e1:SetTarget(c21715155.target)
e1:SetOperation(c21715155.activate)
e1:SetCondition(c21715135.condition)
e1:SetCost(c21715135.cost)
e1:SetTarget(c21715135.target)
e1:SetOperation(c21715135.activate)
c:RegisterEffect(e1)
if not c21715155.global_check then
c21715155.global_check=true
if not c21715135.global_check then
c21715135.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c21715155.checkop)
ge1:SetOperation(c21715135.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c21715155.checkop(e,tp,eg,ep,ev,re,r,rp)
function c21715135.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local p1=false
local p2=false
......@@ -29,14 +29,14 @@ function c21715155.checkop(e,tp,eg,ep,ev,re,r,rp)
end
tc=eg:GetNext()
end
if p1 then Duel.RegisterFlagEffect(0,21715155,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,21715155,RESET_PHASE+PHASE_END,0,1) end
if p1 then Duel.RegisterFlagEffect(0,21715135,RESET_PHASE+PHASE_END,0,1) end
if p2 then Duel.RegisterFlagEffect(1,21715135,RESET_PHASE+PHASE_END,0,1) end
end
function c21715155.condition(e,tp,eg,ep,ev,re,r,rp)
function c21715135.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c21715155.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,21715155)==0 end
function c21715135.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,21715135)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
......@@ -44,25 +44,25 @@ function c21715155.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetLabelObject(e)
e1:SetTarget(c21715155.splimit)
e1:SetTarget(c21715135.splimit)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,21715155,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,21715135,RESET_PHASE+PHASE_END,0,1)
end
function c21715155.splimit(e,c,sump,sumtype,sumpos,targetp,se)
function c21715135.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return sumtype~=SUMMON_TYPE_XYZ and e:GetLabelObject()~=se
end
function c21715155.filter(c,e,tp)
function c21715135.filter(c,e,tp)
return c:IsSetCard(0x54) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c21715155.target(e,tp,eg,ep,ev,re,r,rp,chk)
function c21715135.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c21715155.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c21715135.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c21715155.activate(e,tp,eg,ep,ev,re,r,rp)
function c21715135.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c21715155.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c21715135.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
--サイレント・ウォビー
function c31015787.initial_effect(c)
function c71015787.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(31015787,0))
e1:SetDescription(aux.Stringid(71015787,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetTarget(c31015787.sptg)
e1:SetOperation(c31015787.spop)
e1:SetTarget(c71015787.sptg)
e1:SetOperation(c71015787.spop)
c:RegisterEffect(e1)
--draw/recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(31015787,1))
e2:SetDescription(aux.Stringid(71015787,1))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c31015787.effcon)
e2:SetCost(c31015787.effcost)
e2:SetTarget(c31015787.efftg)
e2:SetOperation(c31015787.effop)
e2:SetCondition(c71015787.effcon)
e2:SetCost(c71015787.effcost)
e2:SetTarget(c71015787.efftg)
e2:SetOperation(c71015787.effop)
c:RegisterEffect(e2)
--limit
local e3=Effect.CreateEffect(c)
......@@ -30,30 +30,30 @@ function c31015787.initial_effect(c)
e3:SetValue(3)
c:RegisterEffect(e3)
end
function c31015787.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c71015787.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,1,tp,false,false,POS_FACEUP,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c31015787.spop(e,tp,eg,ep,ev,re,r,rp)
function c71015787.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,1,tp,1-tp,false,false,POS_FACEUP)
end
end
function c31015787.effcon(e,tp,eg,ep,ev,re,r,rp)
function c71015787.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c31015787.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,31015787)==0 end
Duel.RegisterFlagEffect(tp,31015787,RESET_PHASE+PHASE_END,0,1)
function c71015787.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,71015787)==0 end
Duel.RegisterFlagEffect(tp,71015787,RESET_PHASE+PHASE_END,0,1)
end
function c31015787.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
function c71015787.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,2000)
end
function c31015787.effop(e,tp,eg,ep,ev,re,r,rp)
function c71015787.effop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Recover(1-tp,2000,REASON_EFFECT)
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