Commit b15a04cd authored by argon.sun's avatar argon.sun

scripts

parent 17e6ca2c
--シャトルロイド
function c10449150.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10449150,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetTarget(c10449150.rmtg)
e1:SetOperation(c10449150.rmop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10449150,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_REMOVED)
e2:SetCondition(c10449150.spcon)
e2:SetTarget(c10449150.sptg)
e2:SetOperation(c10449150.spop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10449150,2))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c10449150.damcon)
e3:SetTarget(c10449150.damtg)
e3:SetOperation(c10449150.damop)
c:RegisterEffect(e3)
end
function c10449150.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c10449150.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then
c:RegisterFlagEffect(10449150,RESET_EVENT+0x1fe0000,0,1)
end
end
function c10449150.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c10449150.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(10449150)~=0 end
e:GetHandler():ResetFlagEffect(10449150)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function c10449150.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),1,tp,tp,false,false,POS_FACEUP)
end
end
function c10449150.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c10449150.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function c10449150.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--生命吸収装置 --生命吸収装置
function c74318794.initial_effect(c) function c14318794.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
...@@ -8,52 +8,52 @@ function c74318794.initial_effect(c) ...@@ -8,52 +8,52 @@ function c74318794.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--recover --recover
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74318794,0)) e2:SetDescription(aux.Stringid(14318794,0))
e2:SetCategory(CATEGORY_RECOVER) e2:SetCategory(CATEGORY_RECOVER)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_REPEAT) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_REPEAT)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY) e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCondition(c74318794.reccon) e2:SetCondition(c14318794.reccon)
e2:SetTarget(c74318794.rectg) e2:SetTarget(c14318794.rectg)
e2:SetOperation(c74318794.recop) e2:SetOperation(c14318794.recop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not c74318794.global_check then if not c14318794.global_check then
c74318794.global_check=true c14318794.global_check=true
c74318794[0]=0 c14318794[0]=0
c74318794[1]=0 c14318794[1]=0
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_PAY_LPCOST) ge1:SetCode(EVENT_PAY_LPCOST)
ge1:SetOperation(c74318794.checkop) ge1:SetOperation(c14318794.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c) local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW) ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c74318794.clear) ge2:SetOperation(c14318794.clear)
Duel.RegisterEffect(ge2,0) Duel.RegisterEffect(ge2,0)
end end
end end
function c74318794.checkop(e,tp,eg,ep,ev,re,r,rp) function c14318794.checkop(e,tp,eg,ep,ev,re,r,rp)
if ep==Duel.GetTurnPlayer() then if ep==Duel.GetTurnPlayer() then
c74318794[ep]=c74318794[ep]+ev c14318794[ep]=c14318794[ep]+ev
end end
end end
function c74318794.clear(e,tp,eg,ep,ev,re,r,rp) function c14318794.clear(e,tp,eg,ep,ev,re,r,rp)
c74318794[2]=c74318794[Duel.GetTurnPlayer()] c14318794[2]=c14318794[Duel.GetTurnPlayer()]
c74318794[Duel.GetTurnPlayer()]=0 c14318794[Duel.GetTurnPlayer()]=0
end end
function c74318794.reccon(e,tp,eg,ep,ev,re,r,rp) function c14318794.reccon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() return tp==Duel.GetTurnPlayer()
end end
function c74318794.rectg(e,tp,eg,ep,ev,re,r,rp,chk) function c14318794.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(c74318794[2]/2) Duel.SetTargetParam(c14318794[2]/2)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,c74318794[2]/2) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,c14318794[2]/2)
end end
function c74318794.recop(e,tp,eg,ep,ev,re,r,rp) function c14318794.recop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT) Duel.Recover(p,d,REASON_EFFECT)
......
--ハーピィの羽根帚 --ハーピィの羽根帚(JP)
function c18144506.initial_effect(c) function c18144506.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
--ハーピィの羽根帚(EU)
function c18144507.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c18144507.target)
e1:SetOperation(c18144507.activate)
c:RegisterEffect(e1)
end
function c18144507.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c18144507.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c18144507.filter,tp,0,LOCATION_ONFIELD,1,c) end
local sg=Duel.GetMatchingGroup(c18144507.filter,tp,0,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c18144507.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c18144507.filter,tp,0,LOCATION_ONFIELD,e:GetHandler())
Duel.Destroy(sg,REASON_EFFECT)
end
--死者への供物 --死者への供物(JP)
function c19230407.initial_effect(c) function c19230407.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
--死者への供物(EU)
function c19230408.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c19230408.target)
e1:SetOperation(c19230408.activate)
c:RegisterEffect(e1)
end
function c19230408.filter(c)
return c:IsFaceup() and c:IsDestructable()
end
function c19230408.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c19230408.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c19230408.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c19230408.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c19230408.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_DP)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END,3)
Duel.RegisterEffect(e1,tp)
end
...@@ -49,7 +49,7 @@ function c20951752.sumcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function c20951752.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabel()==1 return e:GetLabel()==1
end end
function c20951752.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) function c20951752.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_FAIRY) end
local g=Duel.GetReleaseGroup(tp) local g=Duel.GetReleaseGroup(tp)
local rg=g:Filter(Card.IsRace,nil,RACE_FAIRY) local rg=g:Filter(Card.IsRace,nil,RACE_FAIRY)
Duel.Release(rg,REASON_COST) Duel.Release(rg,REASON_COST)
......
--融合
function c24094654.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:SetTarget(c24094654.target)
e1:SetOperation(c24094654.activate)
c:RegisterEffect(e1)
end
function c24094654.filter1(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c24094654.filter2(c,e,tp,m,chkf)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
and c:CheckFusionMaterial(m,nil,chkf)
end
function c24094654.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c24094654.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local res=Duel.IsExistingMatchingCard(c24094654.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
res=Duel.IsExistingMatchingCard(c24094654.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c24094654.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
local mg1=Duel.GetMatchingGroup(c24094654.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,e)
local sg1=Duel.GetMatchingGroup(c24094654.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
sg2=Duel.GetMatchingGroup(c24094654.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
--アポピスの化神
function c28649820.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c28649820.condition)
e1:SetTarget(c28649820.target)
e1:SetOperation(c28649820.activate)
c:RegisterEffect(e1)
end
function c28649820.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c28649820.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,28649820,0,0x11,1600,1800,4,RACE_REPTILE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c28649820.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,28649820,0,0x11,1600,1800,4,RACE_REPTILE,ATTRIBUTE_EARTH) then return end
c:AddTrapMonsterAttribute(false,ATTRIBUTE_EARTH,RACE_REPTILE,4,1600,1800)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
c:TrapMonsterBlock()
end
--闇の呪縛
function c29267084.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c29267084.target)
e1:SetOperation(c29267084.operation)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCondition(c29267084.descon)
e2:SetOperation(c29267084.desop)
c:RegisterEffect(e2)
end
function c29267084.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
end
function c29267084.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_OWNER_RELATE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetCondition(c29267084.rcon)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_ATTACK)
tc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(-700)
tc:RegisterEffect(e3,true)
end
end
function c29267084.rcon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler())
end
function c29267084.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_DESTROY_CONFIRMED) then return false end
local tc=c:GetFirstCardTarget()
return tc and eg:IsContains(tc)
end
function c29267084.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(), REASON_EFFECT)
end
--断頭台の惨劇 --断頭台の惨劇(JP)
function c35686187.initial_effect(c) function c35686187.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
--断頭台の惨劇(EU)
function c35686188.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHANGE_POS)
e1:SetCondition(c35686188.condition)
e1:SetTarget(c35686188.target)
e1:SetOperation(c35686188.activate)
c:RegisterEffect(e1)
end
function c35686188.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousPosition(POS_FACEUP_ATTACK) and c:IsPosition(POS_FACEUP_DEFENCE)
end
function c35686188.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c35686188.cfilter,1,nil,1-tp)
end
function c35686188.filter(c)
return c:IsDefencePos() and c:IsDestructable()
end
function c35686188.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c35686188.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c35686188.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c35686188.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c35686188.filter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--竜の騎士
function c38109772.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(38109772,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c38109772.condition)
e1:SetCost(c38109772.cost)
e1:SetTarget(c38109772.target)
e1:SetOperation(c38109772.operation)
c:RegisterEffect(e1)
local g=Group.CreateGroup()
g:KeepAlive()
e1:SetLabelObject(g)
end
function c38109772.filter(c,tp,dg)
return c:IsControler(tp) and dg:IsContains(c)
end
function c38109772.condition(e,tp,eg,ep,ev,re,r,rp)
if rp==tp or not re:IsActiveType(TYPE_MONSTER) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not tg or tg:GetCount()==0 then return false end
local ex,dg,dc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
if not ex or not dg then return false end
local cg=tg:Filter(c38109772.filter,nil,tp,dg)
if cg:GetCount()>0 then
e:GetLabelObject():Clear()
e:GetLabelObject():Merge(cg)
return true
end
return false
end
function c38109772.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetLabelObject():FilterCount(Card.IsAbleToGraveAsCost,nil)==e:GetLabelObject():GetCount() end
Duel.SendtoGrave(e:GetLabelObject(),REASON_COST)
end
function c38109772.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ct=e:GetLabelObject():FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-ct and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end
Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.ShuffleHand(tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg,1,0,0)
end
function c38109772.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
--トラスト·マインド
function c38680149.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:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetLabel(0)
e1:SetCost(c38680149.cost)
e1:SetTarget(c38680149.target)
e1:SetOperation(c38680149.activate)
c:RegisterEffect(e1)
end
function c38680149.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function c38680149.filter1(c,e,tp)
local lv=c:GetLevel()
return lv>=2 and Duel.IsExistingTarget(c38680149.filter2,tp,LOCATION_GRAVE,0,1,nil,lv/2)
end
function c38680149.filter2(c,lv)
return c:IsLevelBelow(lv) and c:IsType(TYPE_TUNER) and c:IsAbleToHand()
end
function c38680149.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c38680149.filter2(chkc,e:GetLabel()) end
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c38680149.filter1,1,nil,e,tp)
end
local rg=Duel.SelectReleaseGroup(tp,c38680149.filter1,1,1,nil,e,tp)
local lv=rg:GetFirst():GetLevel()/2
e:SetLabel(lv)
Duel.Release(rg,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c38680149.filter2,tp,LOCATION_GRAVE,0,1,1,nil,lv)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c38680149.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--千年竜
function c41462084.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,71625222,88819587,true,true)
end
c41462084.material_count=2
c41462084.material={71625222,88819587}
--ガーゴイルの道化師
function c42647539.initial_effect(c)
--pos
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(42647539,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c42647539.postg)
e1:SetOperation(c42647539.posop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c42647539.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c42647539.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,0,POS_FACEUP_ATTACK,0)
end
end
...@@ -21,16 +21,14 @@ function c47217354.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -21,16 +21,14 @@ function c47217354.op(e,tp,eg,ep,ev,re,r,rp)
if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
e1:SetValue(ct*400) e1:SetValue(ct*400)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_UPDATE_LEVEL) e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
e2:SetValue(ct) e2:SetValue(ct)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
......
--フィッシュボーグ-プランター --フィッシュボーグ-プランター
function c51281878.initial_effect(c) function c51282878.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(51281878,0)) e1:SetDescription(aux.Stringid(51282878,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c51281878.cost) e1:SetCost(c51282878.cost)
e1:SetTarget(c51281878.target) e1:SetTarget(c51282878.target)
e1:SetOperation(c51281878.operation) e1:SetOperation(c51282878.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c51281878.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c51282878.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,51281878)==0 end if chk==0 then return Duel.GetFlagEffect(tp,51282878)==0 end
Duel.RegisterFlagEffect(tp,51281878,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,51282878,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function c51281878.target(e,tp,eg,ep,ev,re,r,rp,chk) function c51282878.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
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 c51281878.operation(e,tp,eg,ep,ev,re,r,rp) function c51282878.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.DiscardDeck(tp,1,REASON_EFFECT) Duel.DiscardDeck(tp,1,REASON_EFFECT)
local c=e:GetHandler() local c=e:GetHandler()
......
--同姓同名同盟
function c55008284.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c55008284.target)
e1:SetOperation(c55008284.activate)
c:RegisterEffect(e1)
end
function c55008284.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c55008284.filter(c,e,tp)
return c:IsFaceup() and c:IsLevelBelow(2) and c:IsType(TYPE_NORMAL)
and Duel.IsExistingMatchingCard(c55008284.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end
function c55008284.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c55008284.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c55008284.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c55008284.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c55008284.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
local g=Duel.GetMatchingGroup(c55008284.spfilter,tp,LOCATION_DECK,0,nil,e,tp,tc:GetCode())
local sc=g:GetFirst()
while ft>0 and sc do
Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP)
ft=ft-1
sc=g:GetNext()
end
Duel.SpecialSummonComplete()
end
--死のデッキ破壊ウイルス
function c57728571.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_TOHAND)
e1:SetCost(c57728571.cost)
e1:SetTarget(c57728571.target)
e1:SetOperation(c57728571.activate)
c:RegisterEffect(e1)
end
function c57728571.costfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAttackBelow(1000)
end
function c57728571.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c57728571.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c57728571.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c57728571.tgfilter(c)
return c:IsFaceup() and c:GetAttack()>=1500 and c:IsDestructable()
end
function c57728571.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c57728571.tgfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c57728571.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttackAbove(1500)
end
function c57728571.activate(e,tp,eg,ep,ev,re,r,rp)
local conf=Duel.GetFieldGroup(tp,0,LOCATION_MZONE+LOCATION_HAND)
if conf:GetCount()>0 then
Duel.ConfirmCards(tp,conf)
local dg=conf:Filter(c57728571.filter,nil)
Duel.Destroy(dg,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DRAW)
e1:SetOperation(c57728571.desop)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
Duel.RegisterEffect(e1,tp)
end
function c57728571.desop(e,tp,eg,ep,ev,re,r,rp)
if ep==e:GetOwnerPlayer() then return end
local hg=eg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if hg:GetCount()==0 then return end
Duel.ConfirmCards(1-ep,hg)
local dg=hg:Filter(c57728571.filter,nil)
Duel.Destroy(dg,REASON_EFFECT)
Duel.ShuffleHand(ep)
end
--マインド·オン·エア --マインド·オン·エア
function c66690511.initial_effect(c) function c66690411.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_PUBLIC) e1:SetCode(EFFECT_PUBLIC)
......
--半蛇人サクズィー --半蛇人サクズィー
function c75100441.initial_effect(c) function c75109441.initial_effect(c)
--turn set --turn set
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75100441,0)) e1:SetDescription(aux.Stringid(75109441,0))
e1:SetCategory(CATEGORY_POSITION) e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c75100441.target) e1:SetTarget(c75109441.target)
e1:SetOperation(c75100441.operation) e1:SetOperation(c75109441.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--confirm --confirm
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75100441,1)) e2:SetDescription(aux.Stringid(75109441,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_FLIP) e2:SetCode(EVENT_FLIP)
e2:SetOperation(c75100441.cfop) e2:SetOperation(c75109441.cfop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c75100441.target(e,tp,eg,ep,ev,re,r,rp,chk) function c75109441.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(75100441)==0 end if chk==0 then return c:IsCanTurnSet() and c:GetFlagEffect(75109441)==0 end
c:RegisterFlagEffect(75100441,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(75109441,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1)
Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0)
end end
function c75100441.operation(e,tp,eg,ep,ev,re,r,rp) function c75109441.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE) Duel.ChangePosition(c,POS_FACEDOWN_DEFENCE)
end end
end end
function c75100441.cfop(e,tp,eg,ep,ev,re,r,rp) function c75109441.cfop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_SZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_SZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(tp,g)
......
--死者蘇生 --死者蘇生(JP)
function c83764718.initial_effect(c) function c83764718.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
--死者蘇生(EU)
function c83764719.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c83764719.target)
e1:SetOperation(c83764719.activate)
c:RegisterEffect(e1)
end
function c83764719.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c83764719.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c83764719.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c83764719.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c83764719.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c83764719.activate(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
--パワー·ブレイク
function c86821010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c86821010.condition)
e1:SetTarget(c86821010.target)
e1:SetOperation(c86821010.activate)
c:RegisterEffect(e1)
end
function c86821010.cfilter(c)
return c:IsFaceup() and c:IsCode(2403771)
end
function c86821010.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c86821010.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c86821010.filter(c)
return c:IsType(TYPE_EQUIP) and c:IsAbleToDeck()
end
function c86821010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE+LOCATION_GRAVE) and chkc:IsControler(tp) and c86821010.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c86821010.filter,tp,LOCATION_SZONE+LOCATION_GRAVE,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c86821010.filter,tp,LOCATION_SZONE+LOCATION_GRAVE,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1500)
end
function c86821010.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
Duel.Damage(1-tp,ct*500,REASON_EFFECT)
end
end
--大騒動 --大騒動
function c8074847.initial_effect(c) function c9074847.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_TO_HAND) e1:SetCode(EVENT_TO_HAND)
e1:SetCondition(c8074847.condition) e1:SetCondition(c9074847.condition)
e1:SetTarget(c8074847.target) e1:SetTarget(c9074847.target)
e1:SetOperation(c8074847.operation) e1:SetOperation(c9074847.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c8074847.confilter(c,tp) function c9074847.confilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
end end
function c8074847.condition(e,tp,eg,ep,ev,re,r,rp) function c9074847.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c8074847.confilter,1,nil,tp) return rp~=tp and eg:IsExists(c9074847.confilter,1,nil,tp)
end end
function c8074847.thfilter(c,tp) function c9074847.thfilter(c,tp)
return c:IsLocation(LOCATION_HAND) and c:IsControler(tp) return c:IsLocation(LOCATION_HAND) and c:IsControler(tp)
end end
function c8074847.spfilter(c,e,tp) function c9074847.spfilter(c,e,tp)
return c:GetLevel()<=4 and c:IsSummonableCard() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:GetLevel()<=4 and c:IsSummonableCard() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c8074847.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9074847.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end end
function c8074847.operation(e,tp,eg,ep,ev,re,r,rp) function c9074847.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.BreakEffect() Duel.BreakEffect()
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
local ct1=og:FilterCount(c8074847.thfilter,nil,tp) local ct1=og:FilterCount(c9074847.thfilter,nil,tp)
local ct2=og:FilterCount(c8074847.thfilter,nil,1-tp) local ct2=og:FilterCount(c9074847.thfilter,nil,1-tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c8074847.spfilter,tp,LOCATION_HAND,0,ct1,ct1,nil,e,tp) local g1=Duel.SelectMatchingCard(tp,c9074847.spfilter,tp,LOCATION_HAND,0,ct1,ct1,nil,e,tp)
if g1:GetCount()>0 then if g1:GetCount()>0 then
local tc=g1:GetFirst() local tc=g1:GetFirst()
while tc do while tc do
...@@ -45,7 +45,7 @@ function c8074847.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function c8074847.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(1-tp,c8074847.spfilter,1-tp,LOCATION_HAND,0,ct2,ct2,nil,e,1-tp) local g2=Duel.SelectMatchingCard(1-tp,c9074847.spfilter,1-tp,LOCATION_HAND,0,ct2,ct2,nil,e,1-tp)
if g2:GetCount()>0 then if g2:GetCount()>0 then
local tc=g2:GetFirst() local tc=g2:GetFirst()
while tc do while tc do
......
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