Commit f860a637 authored by fallenstardust's avatar fallenstardust
parents 34f540d7 4589e072
/test-release.cdb
...@@ -35,7 +35,7 @@ merge_databases: ...@@ -35,7 +35,7 @@ merge_databases:
- linux - linux
script: script:
- apt update && apt -y install sqlite3 - apt update && apt -y install sqlite3
- ls cdbs/test-release.cdb | xargs -I '{}' sqlite3 '{}' .dump | sqlite3 test-release.cdb - ls -1 *.cdb | sed '/test-update.cdb/d' | xargs -I '{}' sqlite3 '{}' .dump | sqlite3 test-release.cdb || true
artifacts: artifacts:
paths: paths:
- test-release.cdb - test-release.cdb
...@@ -72,7 +72,8 @@ pack: ...@@ -72,7 +72,8 @@ pack:
- linux - linux
script: script:
- mkdir -p data archive - mkdir -p data archive
- mv *.cdb data/ - mv test-release.cdb data/
- mv test-update.cdb data/
- mv pics data/ - mv pics data/
- mv script data/ - mv script data/
- mv *.conf data/ - mv *.conf data/
...@@ -98,7 +99,8 @@ server: ...@@ -98,7 +99,8 @@ server:
- linux - linux
script: script:
- mkdir server-dist - mkdir server-dist
- mv *.cdb server-dist - mv test-release.cdb server-dist
- mv test-update.cdb server-dist
- mv *.conf server-dist - mv *.conf server-dist
- mv script server-dist - mv script server-dist
# merge ygopro-pre-data # merge ygopro-pre-data
......
File added
File added
File added
File added
File added
File added
File added
#created by ygomobile
#main
100213001
100213004
100213005
#extra
100213002
100213003
!side
#created by ygomobile
#main
100200244
100212002
100212003
100212006
100213001
100216001
#extra
100212004
100212005
100213002
100215003
100200248
100200249
!side
\ No newline at end of file
#created by ygomobile #created by ygomobile
#main #main
100200244
100212002
100212003
100212006
100213001
101204001 101204001
101204002 101204002
101204003 101204003
101204004 101204004
101204005 101204005
101204006
101204007
101204008
101204009 101204009
101204010 101204010
101204016 101204016
101204017 101204017
101204018 101204018
101204023
101204024
101204034 101204034
101204059
101204060
101204051 101204051
101204052 101204052
101204053 101204053
101204054 101204054
101204055
101204056 101204056
101204059
101204060 101204060
101204062 101204062
101204071 101204071
100216001 101204072
101204077
#extra #extra
100212004
100212005
100213002
100215003
101204035 101204035
101204036 101204036
101204038
101204039 101204039
101204040 101204040
100200248 101204043
100200249
!side !side
\ No newline at end of file
#created by ygomobile
#main
100200244
100216001
#extra
100200248
100200249
100215003
!side
--究極竜魔導師
function c100212001.initial_effect(c)
aux.AddMaterialCodeList(c,23995346)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetCondition(c100212001.FShaddollCondition())
e1:SetOperation(c100212001.FShaddollOperation())
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100212001,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100212001.discon)
e2:SetTarget(c100212001.distg)
e2:SetOperation(c100212001.disop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100212001,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c100212001.spcon)
e3:SetTarget(c100212001.sptg)
e3:SetOperation(c100212001.spop)
c:RegisterEffect(e3)
end
function c100212001.FShaddollFilter(c,fc)
return c:IsFusionSetCard(0xdd) or c:IsFusionSetCard(0xcf) and c:IsFusionType(TYPE_RITUAL) or c:IsFusionCode(23995346) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)
end
function c100212001.Chaos_FShaddollFilter(c,mg)
return c:IsFusionSetCard(0xcf) and c:IsFusionType(TYPE_RITUAL) and mg:CheckSubGroup(c100212001.FShaddollSpgcheck,1,3,c,c)
end
function c100212001.Blue_Eyes_Ultimate_Dragon(c,g)
return (c:IsFusionCode(23995346) or c:IsHasEffect(EFFECT_FUSION_SUBSTITUTE)) and g:FilterCount(Card.IsFusionSetCard,nil,0xdd,c)==0
end
function c100212001.FShaddollSpgcheck(g,c)
return (g:FilterCount(c100212001.Blue_Eyes_Ultimate_Dragon,c,g)==1
or g:FilterCount(Card.IsFusionSetCard,c,0xdd)==3)
end
function c100212001.FShaddollCondition()
return function(e,g,gc,chkf)
if g==nil then return aux.MustMaterialCheck(nil,e:GetHandlerPlayer(),EFFECT_MUST_BE_FMATERIAL) end
local c=e:GetHandler()
local mg=g:Filter(c100212001.FShaddollFilter,nil)
return mg:IsExists(c100212001.Chaos_FShaddollFilter,1,nil,mg)
end
end
function c100212001.FShaddollOperation()
return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local c=e:GetHandler()
local mg=eg:Filter(c100212001.FShaddollFilter,nil)
local g=nil
if gc then
g=Group.FromCards(gc)
mg:RemoveCard(gc)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=mg:FilterSelect(tp,c100212001.Chaos_FShaddollFilter,1,1,nil,mg)
mg:Sub(g)
end
local sg=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=mg:SelectSubGroup(tp,c100212001.FShaddollSpgcheck,true,1,3,g)
while not sg do
mg:AddCard(g:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g=mg:FilterSelect(tp,c100212001.Chaos_FShaddollFilter,1,1,nil,mg)
mg:Sub(g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=mg:SelectSubGroup(tp,c100212001.FShaddollSpgcheck,true,1,3,g)
end
g:Merge(sg)
Duel.SetFusionMaterial(g)
end
end
function c100212001.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
and ((re:IsActiveType(TYPE_MONSTER) and Duel.GetFlagEffect(tp,100212001)==0)
or (re:IsActiveType(TYPE_SPELL) and Duel.GetFlagEffect(tp,100212101)==0)
or (re:IsActiveType(TYPE_TRAP) and Duel.GetFlagEffect(tp,100212201)==0))
end
function c100212001.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:IsActiveType(TYPE_MONSTER) then
Duel.RegisterFlagEffect(tp,100212001,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100212001,3))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
elseif re:IsActiveType(TYPE_SPELL) then
Duel.RegisterFlagEffect(tp,100212101,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100212001,4))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
else re:IsActiveType(TYPE_TRAP)
Duel.RegisterFlagEffect(tp,100212201,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100212001,5))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
end
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c100212001.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c100212001.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c100212001.spfilter(c,e,tp)
return (c:IsFusionSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
or c:IsFusionSetCard(0xcf) and c:IsFusionType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,true,false))
and (c:IsLocation(LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function c100212001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100212001.spfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c100212001.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100212001.spfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
\ No newline at end of file
--四獣層ウォンキー
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddXyzProcedure(c,nil,4,2,nil,nil,99)
c:EnableReviveLimit()
--immume
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(s.efilter)
c:RegisterEffect(e1)
--attach_PHASE_STANDBY
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.atcon1)
e2:SetTarget(s.attg)
e2:SetOperation(s.atop)
c:RegisterEffect(e2)
--attach_xyzSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.atcon2)
e3:SetTarget(s.attg)
e3:SetOperation(s.atop)
c:RegisterEffect(e3)
end
function s.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function s.atcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function s.atcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.attg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end
end
function s.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ld=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_DECK,0,nil)
if ld<1 then return end
local g=Duel.GetDecktopGroup(tp,math.min(ld,3))
if c:IsRelateToEffect(e) then
Duel.DisableShuffleCheck()
Duel.Overlay(c,g)
end
Duel.BreakEffect()
if c:GetOverlayGroup():FilterCount(Card.IsType,nil,TYPE_MONSTER)<5 then
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.GetControl(c,1-tp)
else
Duel.Damage(tp,c:GetOverlayCount()*400,REASON_EFFECT)
local mg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
Duel.Destroy(mg,REASON_EFFECT)
end
end
\ No newline at end of file
--ライフハック
function c100213004.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100213004,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,100213004)
e1:SetCondition(aux.dscon)
e1:SetTarget(c100213004.target)
e1:SetOperation(c100213004.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100213004,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100213104)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100213004.atktg)
e2:SetOperation(c100213004.atkop)
c:RegisterEffect(e2)
end
function c100213004.filter(c,tp)
return c:IsFaceup() and not c:IsAttack(Duel.GetLP(tp))
end
function c100213004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100213004.filter(chkc,1-tp) end
if chk==0 then return Duel.IsExistingTarget(c100213004.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,1-tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100213004.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,1-tp)
end
function c100213004.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(Duel.GetLP(1-tp))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetValue(HALF_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c100213004.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100213004.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c100213004.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100213004.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
end
function c100213004.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(Duel.GetLP(tp))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetValue(HALF_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
\ No newline at end of file
--獸累々
function c100213005.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c100213005.target)
e1:SetOperation(c100213005.activate)
c:RegisterEffect(e1)
if not c100213005.global_check then
c100213005.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(c100213005.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
end
end
function c100213005.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
tc:RegisterFlagEffect(100213005,RESET_EVENT+RESETS_STANDARD-RESET_TEMP_REMOVE+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function c100213005.filter(c)
return c:IsAttackPos() and c:IsCanChangePosition() and c:GetFlagEffect(100213005)==0
end
function c100213005.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100213005.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c100213005.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c100213005.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100213005.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(c100213005.atkcon1)
e1:SetTarget(c100213005.atkfilter)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c100213005.atkcon2)
Duel.RegisterEffect(e2,tp)
end
function c100213005.atkcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,LOCATION_MZONE,0,1,nil)
end
function c100213005.atkcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,0,LOCATION_MZONE,1,nil)
end
function c100213005.atkfilter(e,c)
return c:GetFlagEffect(100213005)~=0
end
\ No newline at end of file
--幻奏の歌姫クープレ --幻奏の歌姫クープレ
function c101204010.initial_effect(c) function c101204010.initial_effect(c)
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
...@@ -47,8 +48,11 @@ end ...@@ -47,8 +48,11 @@ end
function c101204010.splimit(e,c,tp,sumtp,sumpos) function c101204010.splimit(e,c,tp,sumtp,sumpos)
return not c:IsAttribute(ATTRIBUTE_LIGHT) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM return not c:IsAttribute(ATTRIBUTE_LIGHT) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end end
function c101204010.thcfilter(c)
return c:IsFaceup() and not c:IsSetCard(0x9b)
end
function c101204010.thcon(e,tp,eg,ep,ev,re,r,rp) function c101204010.thcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(aux.NOT(aux.AND(Card.IsFaceup,Card.IsSetCard)),tp,LOCATION_MZONE,0,1,nil,0x9b) return not Duel.IsExistingMatchingCard(c101204010.thcfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c101204010.thfilter(c) function c101204010.thfilter(c)
return c:IsSetCard(0x9b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x9b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
...@@ -98,7 +102,7 @@ function c101204010.pentg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -98,7 +102,7 @@ function c101204010.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c101204010.penop(e,tp,eg,ep,ev,re,r,rp) function c101204010.penop(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) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end end
end end
\ No newline at end of file
--光道の龍
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--Search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id+o)
e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
c:RegisterEffect(e1)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,id+o*2)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
end
function s.spfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x38)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.tgfilter(c)
return c:IsSetCard(0x38) and not c:IsCode(id) and c:IsAbleToGrave()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function s.thfilter(c)
return c:IsAttack(3000) and c:IsDefense(2600) and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
\ No newline at end of file
--ライトロード・デーモン ヴァイス
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--grave spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsSetCard(0x38) and c:IsAbleToDeckAsCost()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND,0,e:GetHandler())
if chk==0 then return cg:GetCount()>0 end
Duel.SendtoDeck(cg:Select(tp,1,1,nil),nil,SEQ_DECKTOP,REASON_COST)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) then
Duel.BreakEffect()
Duel.DiscardDeck(tp,2,REASON_EFFECT)
end
end
function s.spfilter(c,e,tp)
return not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
...@@ -19,6 +19,7 @@ function s.initial_effect(c) ...@@ -19,6 +19,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISEFFECT) e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.inacon)
e2:SetValue(s.effectfilter) e2:SetValue(s.effectfilter)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon_grave --spsummon_grave
...@@ -46,6 +47,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,6 +47,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,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 if g:GetCount()>0 then Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end
end end
function s.inacon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.effectfilter(e,ct) function s.effectfilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT) local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
return te:IsActiveType(TYPE_FUSION) and te:GetHandler():IsSetCard(0x9b) return te:IsActiveType(TYPE_FUSION) and te:GetHandler():IsSetCard(0x9b)
......
...@@ -41,6 +41,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,6 +41,7 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
if #sg==0 or Duel.Remove(sg,0,REASON_EFFECT+REASON_TEMPORARY)==0 if #sg==0 or Duel.Remove(sg,0,REASON_EFFECT+REASON_TEMPORARY)==0
or not sg:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then return end or not sg:IsExists(Card.IsLocation,1,nil,LOCATION_REMOVED) then return end
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED) local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
og=og-og:Filter(Card.IsReason,nil,REASON_REDIRECT)
for tc in aux.Next(og) do for tc in aux.Next(og) do
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end end
......
--神光の龍
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,19959563,57774843,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCost(s.recost)
e2:SetTarget(s.retg)
e2:SetOperation(s.reop)
c:RegisterEffect(e2)
--discard deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCategory(CATEGORY_DECKDES)
e3:SetCountLimit(1)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.tgcon)
e3:SetTarget(s.tgtg)
e3:SetOperation(s.tgop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(s.thcon)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
end
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function s.recost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) end
Duel.PayLPCost(tp,2000)
end
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,sg:GetCount(),0,0)
end
function s.reop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,4)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,4,REASON_EFFECT)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and e:GetHandler():IsPreviousControler(tp)
end
function s.thfilter1(c)
return c:IsFaceup() and c:IsCode(19959563) and c:IsAbleToHand()
end
function s.thfilter2(c)
return c:IsFaceup() and c:IsCode(57774843) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_REMOVED,0,1,nil) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,0,LOCATION_REMOVED)
end
function s.fselect(g)
return g:GetClassCount(Card.GetCode)==g:GetCount()
end
function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.GetFieldGroup(s.thfilter1,LOCATION_REMOVED,0)
local g2=Duel.GetFieldGroup(s.thfilter2,LOCATION_REMOVED,0)
if #g1>0 and #g2>0 then
Duel.SendtoHand(Group.__add(g1,g2):SelectSubGroup(tp,s.fselect,false,2,2),nil,REASON_EFFECT)
end
local tg=Duel.GetOperatedGroup()
if tg:FilterCount(s.spfilter,nil,e,tp)==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
for tc in aux.Next(tg) do
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--ライトロード・アテナ ミネルバ
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetCondition(s.tgcon)
e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
c:RegisterEffect(e1)
--cannot remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,1)
e2:SetTarget(s.efilter)
c:RegisterEffect(e2)
--remove and tograve
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o)
e3:SetCost(s.recost)
e3:SetTarget(s.retg)
e3:SetOperation(s.reop)
c:RegisterEffect(e3)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.tgfilter(c)
return c:IsSetCard(0x38) and c:IsAbleToGrave()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():GetMaterial():FilterCount(Card.IsSetCard,nil,0x38)>1 and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_DECK)
end
function s.fselect(g)
return g:GetClassCount(Card.GetRace)==g:GetCount()
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local mc=e:GetHandler():GetMaterial():FilterCount(Card.IsSetCard,nil,0x38)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and mc>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.SendtoGrave(g:SelectSubGroup(tp,s.fselect,false,1,mc),REASON_EFFECT)
end
end
function s.efilter(e,c,rp,r,re)
local tp=e:GetHandlerPlayer()
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and re and r&REASON_EFFECT>0 and rp==1-tp
end
function s.refilter(c)
return c:IsSetCard(0x38) and c:IsAbleToRemoveAsCost()
end
function s.recost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk)
local dc=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(s.refilter,tp,LOCATION_GRAVE,0,1,nil) and dc>0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local cg=Duel.SelectMatchingCard(tp,s.refilter,tp,LOCATION_GRAVE,0,1,math.min(dc,4),nil)
e:SetLabel(0,cg:GetCount())
Duel.Remove(cg,POS_FACEUP,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,cg:GetCount())
end
function s.reop(e,tp,eg,ep,ev,re,r,rp)
local label,count=e:GetLabel()
Duel.DiscardDeck(tp,count,REASON_EFFECT)
end
\ No newline at end of file
--ライトロード・アイギス
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_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--sset
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.setcon)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):FilterCount(Card.IsSetCard,nil,0x38)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) and ct>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetTargetsRelateToChain()
for tc in aux.Next(tg) do
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e,false) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SSet(tp,c)
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