Skip to content
This repository was archived by the owner on Jun 22, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
254 changes: 127 additions & 127 deletions script/c111011904.lua
Original file line number Diff line number Diff line change
@@ -1,128 +1,128 @@
--NO8 エーテリック・セベク
function c111011904.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--サーチ
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(111011904,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c111011904.con)
e1:SetTarget(c111011904.target)
e1:SetOperation(c111011904.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(111011904,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_STANDBY_PHASE+0x1c0)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c111011904.cost)
e2:SetCountLimit(1)
e2:SetTarget(c111011904.target2)
e2:SetOperation(c111011904.operation2)
c:RegisterEffect(e2)
if not c111011904.global_check then
c111011904.global_check=true
--check obsolete ruling
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DRAW)
ge1:SetOperation(c111011904.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c111011904.checkop(e,tp,eg,ep,ev,re,r,rp)
if bit.band(r,REASON_RULE)~=0 and Duel.GetTurnCount()==1 then
--obsolete
Duel.RegisterFlagEffect(tp,62765383,0,0,1)
Duel.RegisterFlagEffect(1-tp,62765383,0,0,1)
end
end
function c111011904.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
function c111011904.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c111011904.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c111011904.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c111011904.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c111011904.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c111011904.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c111011904.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c111011904.filter1,tp,LOCATION_HAND,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c111011904.filter1(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:CheckActivateEffect(false,false,false)~=nil
end
function c111011904.operation2(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local g=Duel.SelectMatchingCard(tp,c111011904.filter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
local tpe=tc:GetType()
local te=tc:GetActivateEffect()
local tg=te:GetTarget()
local co=te:GetCost()
local op=te:GetOperation()
e:SetCategory(te:GetCategory())
e:SetProperty(te:GetProperty())
Duel.ClearTargetCard()
if bit.band(tpe,TYPE_FIELD)~=0 then
local fc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)
if Duel.GetFlagEffect(tp,62765383)>0 then
if fc then Duel.Destroy(fc,REASON_RULE) end
of=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc and Duel.Destroy(fc,REASON_RULE)==0 then Duel.SendtoGrave(tc,REASON_RULE) end
else
Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc and Duel.SendtoGrave(fc,REASON_RULE)==0 then Duel.SendtoGrave(tc,REASON_RULE) end
end
end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
if bit.band(tpe,TYPE_TRAP+TYPE_FIELD)~=0 then
Duel.MoveSequence(tc,5)
end
Duel.Hint(HINT_CARD,0,tc:GetCode())
tc:CreateEffectRelation(te)
if bit.band(tpe,TYPE_EQUIP+TYPE_CONTINUOUS+TYPE_FIELD)==0 then
tc:CancelToGrave(false)
end
if co then co(te,tp,eg,ep,ev,re,r,rp,1) end
if tg then tg(te,tp,eg,ep,ev,re,r,rp,1) end
Duel.BreakEffect()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g then
local etc=g:GetFirst()
while etc do
etc:CreateEffectRelation(te)
etc=g:GetNext()
end
end
if op then op(te,tp,eg,ep,ev,re,r,rp) end
tc:ReleaseEffectRelation(te)
if etc then
etc=g:GetFirst()
while etc do
etc:ReleaseEffectRelation(te)
etc=g:GetNext()
end
end
end
--NO8 エーテリック・セベク
function c111011904.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--サーチ
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(111011904,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c111011904.con)
e1:SetTarget(c111011904.target)
e1:SetOperation(c111011904.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(111011904,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_STANDBY_PHASE+0x1c0)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c111011904.cost)
e2:SetCountLimit(1)
e2:SetTarget(c111011904.target2)
e2:SetOperation(c111011904.operation2)
c:RegisterEffect(e2)
if not c111011904.global_check then
c111011904.global_check=true
--check obsolete ruling
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DRAW)
ge1:SetOperation(c111011904.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c111011904.checkop(e,tp,eg,ep,ev,re,r,rp)
if bit.band(r,REASON_RULE)~=0 and Duel.GetTurnCount()==1 then
--obsolete
Duel.RegisterFlagEffect(tp,62765383,0,0,1)
Duel.RegisterFlagEffect(1-tp,62765383,0,0,1)
end
end
function c111011904.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
function c111011904.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c111011904.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c111011904.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c111011904.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c111011904.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c111011904.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c111011904.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c111011904.filter1,tp,LOCATION_HAND,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function c111011904.filter1(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:CheckActivateEffect(false,false,false)~=nil
end
function c111011904.operation2(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local g=Duel.SelectMatchingCard(tp,c111011904.filter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
local tpe=tc:GetType()
local te=tc:GetActivateEffect()
local tg=te:GetTarget()
local co=te:GetCost()
local op=te:GetOperation()
e:SetCategory(te:GetCategory())
e:SetProperty(te:GetProperty())
Duel.ClearTargetCard()
if bit.band(tpe,TYPE_FIELD)~=0 then
local fc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)
if Duel.GetFlagEffect(tp,62765383)>0 then
if fc then Duel.Destroy(fc,REASON_RULE) end
of=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc and Duel.Destroy(fc,REASON_RULE)==0 then Duel.SendtoGrave(tc,REASON_RULE) end
else
fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc and Duel.SendtoGrave(fc,REASON_RULE)==0 then Duel.SendtoGrave(tc,REASON_RULE) end
end
end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
if bit.band(tpe,TYPE_TRAP+TYPE_FIELD)==TYPE_TRAP+TYPE_FIELD then
Duel.MoveSequence(tc,5)
end
Duel.Hint(HINT_CARD,0,tc:GetCode())
tc:CreateEffectRelation(te)
if bit.band(tpe,TYPE_EQUIP+TYPE_CONTINUOUS+TYPE_FIELD)==0 then
tc:CancelToGrave(false)
end
if co then co(te,tp,eg,ep,ev,re,r,rp,1) end
if tg then tg(te,tp,eg,ep,ev,re,r,rp,1) end
Duel.BreakEffect()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if g then
local etc=g:GetFirst()
while etc do
etc:CreateEffectRelation(te)
etc=g:GetNext()
end
end
if op then op(te,tp,eg,ep,ev,re,r,rp) end
tc:ReleaseEffectRelation(te)
if etc then
etc=g:GetFirst()
while etc do
etc:ReleaseEffectRelation(te)
etc=g:GetNext()
end
end
end
end
106 changes: 55 additions & 51 deletions script/c511000056.lua
Original file line number Diff line number Diff line change
@@ -1,51 +1,55 @@
--Double Ripple
function c511000056.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c511000056.target)
e1:SetOperation(c511000056.activate)
c:RegisterEffect(e1)
end
function c511000056.filter1(c,ntg)
local lv=c:GetLevel()
return c:IsFaceup() and lv>0 and c:IsType(TYPE_TUNER) and ntg:CheckWithSumEqual(Card.GetLevel,7-lv,1,99)
end
function c511000056.filter2(c)
return c:IsFaceup() and c:GetLevel()>0 and not c:IsType(TYPE_TUNER)
end
function c511000056.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c511000056.target(e,tp,eg,ep,ev,re,r,rp,chk)
local nt=Duel.GetMatchingGroup(c511000056.filter2,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c511000056.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,2403771)
and Duel.IsExistingMatchingCard(c511000056.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,25862681)
and Duel.IsExistingMatchingCard(c511000056.filter1,tp,LOCATION_MZONE,0,1,nil,nt)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c511000056.activate(e,tp,eg,ep,ev,re,r,rp)
local nt=Duel.GetMatchingGroup(c511000056.filter2,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c511000056.filter1,tp,LOCATION_MZONE,0,1,1,nil,nt)
local tc=g:GetFirst()
if tc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=nt:SelectWithSumEqual(tp,Card.GetLevel,7-tc:GetLevel(),1,99)
g:Merge(sg)
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sp1=Duel.SelectMatchingCard(tp,c511000056.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,2403771):GetFirst()
Duel.SpecialSummonStep(sp1,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sp2=Duel.SelectMatchingCard(tp,c511000056.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,25862681):GetFirst()
Duel.SpecialSummonStep(sp2,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonComplete()
end
end
--Double Ripple
function c511000056.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c511000056.target)
e1:SetOperation(c511000056.activate)
c:RegisterEffect(e1)
end
function c511000056.filter1(c,ntg)
local lv=c:GetLevel()
return c:IsFaceup() and lv>0 and c:IsType(TYPE_TUNER) and ntg:CheckWithSumEqual(Card.GetLevel,7-lv,1,99)
end
function c511000056.filter2(c)
return c:IsFaceup() and c:GetLevel()>0 and not c:IsType(TYPE_TUNER)
end
function c511000056.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c511000056.target(e,tp,eg,ep,ev,re,r,rp,chk)
local nt=Duel.GetMatchingGroup(c511000056.filter2,tp,LOCATION_MZONE,0,nil)
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and (not ect or ect>=2) and Duel.IsExistingMatchingCard(c511000056.filter1,tp,LOCATION_MZONE,0,1,nil,nt)
and Duel.IsExistingMatchingCard(c511000056.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,2403771)
and Duel.IsExistingMatchingCard(c511000056.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,25862681)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c511000056.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
if ect~=nil and ect<2 then return end
local nt=Duel.GetMatchingGroup(c511000056.filter2,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c511000056.filter1,tp,LOCATION_MZONE,0,1,1,nil,nt)
local tc=g:GetFirst()
if tc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=nt:SelectWithSumEqual(tp,Card.GetLevel,7-tc:GetLevel(),1,99)
g:Merge(sg)
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sp1=Duel.SelectMatchingCard(tp,c511000056.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,2403771):GetFirst()
Duel.SpecialSummonStep(sp1,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sp2=Duel.SelectMatchingCard(tp,c511000056.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,25862681):GetFirst()
Duel.SpecialSummonStep(sp2,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
Duel.SpecialSummonComplete()
end
end
Loading