Commit 164ae303 authored by VanillaSalt's avatar VanillaSalt

fix

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