Commit a1c3a78d authored by 2924713558's avatar 2924713558 Committed by GitHub

Add files via upload

parent d666b3f2
--赤色制裁 --赤色制裁
function c11200109.initial_effect(c) function c11200109.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:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,11200109+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,11200109+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c11200109.cost) e1:SetCost(c11200109.cost)
e1:SetTarget(c11200109.target) e1:SetTarget(c11200109.target)
e1:SetOperation(c11200109.operation) e1:SetOperation(c11200109.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Remove --Remove
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(c11200109.rmop) e2:SetOperation(c11200109.rmop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk down --atk down
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(0,LOCATION_MZONE) e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(c11200109.atkcon) e3:SetCondition(c11200109.atkcon)
e3:SetTarget(c11200109.atktg) e3:SetTarget(c11200109.atktg)
e3:SetValue(1000) e3:SetValue(1000)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--damage --damage
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DAMAGE) e4:SetCategory(CATEGORY_DAMAGE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_REMOVE) e4:SetCode(EVENT_REMOVE)
e4:SetCountLimit(1,11209109) e4:SetCountLimit(1,11209109)
e4:SetCondition(c11200109.damcon) e4:SetTarget(c11200109.damtg)
e4:SetTarget(c11200109.damtg) e4:SetOperation(c11200109.damop)
e4:SetOperation(c11200109.damop) c:RegisterEffect(e4)
c:RegisterEffect(e4) end
end function c11200109.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function c11200109.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,1500)
if chk==0 then return Duel.CheckLPCost(tp,1500) else Duel.PayLPCost(tp,1500) end
else Duel.PayLPCost(tp,1500) end end
end function c11200109.filter(c,e,tp)
function c11200109.filter(c,e,tp) return bit.band(c:GetType(),0x81)==0x81 and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return bit.band(c:GetType(),0x81)==0x81 and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
end function c11200109.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c11200109.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c11200109.filter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c11200109.filter(chkc,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c11200109.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
and Duel.IsExistingTarget(c11200109.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g=Duel.SelectTarget(tp,c11200109.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
local g=Duel.SelectTarget(tp,c11200109.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) end
end function c11200109.eqlimit(e,c)
function c11200109.eqlimit(e,c) return e:GetOwner()==c
return e:GetOwner()==c end
end function c11200109.operation(e,tp,eg,ep,ev,re,r,rp)
function c11200109.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler()
local c=e:GetHandler() local tc=Duel.GetFirstTarget()
local tc=Duel.GetFirstTarget() if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end Duel.Equip(tp,c,tc)
Duel.Equip(tp,c,tc) --Add Equip limit
--Add Equip limit local e1=Effect.CreateEffect(tc)
local e1=Effect.CreateEffect(tc) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(c11200109.eqlimit)
e1:SetValue(c11200109.eqlimit) c:RegisterEffect(e1)
c:RegisterEffect(e1) end
end end
end function c11200109.rmop(e,tp,eg,ep,ev,re,r,rp)
function c11200109.rmop(e,tp,eg,ep,ev,re,r,rp) local tc=e:GetHandler():GetEquipTarget()
local tc=e:GetHandler():GetEquipTarget() if tc then
if tc then Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) end
end end
end function c11200109.atkcon(e)
function c11200109.atkcon(e) return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and e:GetHandler():GetEquipTarget():GetBattleTarget()
and e:GetHandler():GetEquipTarget():GetBattleTarget() end
end function c11200109.atktg(e,c)
function c11200109.atktg(e,c) return c==e:GetHandler():GetEquipTarget():GetBattleTarget()
return c==e:GetHandler():GetEquipTarget():GetBattleTarget() end
end function c11200109.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
function c11200109.damtg(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(1-tp)
Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(800)
Duel.SetTargetParam(800) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) end
end function c11200109.damop(e,tp,eg,ep,ev,re,r,rp)
function c11200109.damop(e,tp,eg,ep,ev,re,r,rp) 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.Damage(p,d,REASON_EFFECT)
Duel.Damage(p,d,REASON_EFFECT) end
end
This diff is collapsed.
--飞球之魔弹 --飞球之魔弹
function c13254097.initial_effect(c) function c13254097.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(13254097,0)) e1:SetDescription(aux.Stringid(13254097,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW+CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_TOHAND) e1:SetHintTiming(0,TIMING_TOHAND)
e1:SetCountLimit(1,13254097+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,13254097+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c13254097.target) e1:SetTarget(c13254097.target)
e1:SetOperation(c13254097.activate) e1:SetOperation(c13254097.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c13254097.filter(c) function c13254097.filter(c)
return c:IsAbleToDeck() and c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1) return c:IsAbleToDeck() and c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1)
end end
function c13254097.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13254097.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c13254097.filter(chkc) end if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c13254097.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c13254097.filter,tp,LOCATION_GRAVE,0,4,nil) end if chk==0 then return Duel.IsExistingTarget(c13254097.filter,tp,LOCATION_GRAVE,0,4,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c13254097.filter,tp,LOCATION_GRAVE,0,1,4,nil) local g=Duel.SelectTarget(tp,c13254097.filter,tp,LOCATION_GRAVE,0,1,4,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
function c13254097.activate(e,tp,eg,ep,ev,re,r,rp,chk) function c13254097.activate(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local j=Duel.SendtoDeck(tg,tp,2,REASON_EFFECT) local j=Duel.SendtoDeck(tg,tp,2,REASON_EFFECT)
if j>0 then if j>0 then
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
local i=0 local i=0
while i<j and (i==0 or Duel.SelectYesNo(tp,aux.Stringid(13254097,1))) do while i<j and (i==0 or Duel.SelectYesNo(tp,aux.Stringid(13254097,1))) do
local t1=Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil) Duel.BreakEffect()
local t2=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_HAND,1,nil) and Duel.IsPlayerCanDraw(1-tp,1) local t1=Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_DECK,0,1,nil)
local t2=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_HAND,1,nil) and Duel.IsPlayerCanDraw(1-tp,1)
local op=0
local m={} local op=0
local n={} local m={}
local ct=1 local n={}
if t1 then m[ct]=aux.Stringid(13254097,2) n[ct]=1 ct=ct+1 end local ct=1
m[ct]=aux.Stringid(13254097,3) n[ct]=2 ct=ct+1 if t1 then m[ct]=aux.Stringid(13254097,2) n[ct]=1 ct=ct+1 end
if t2 then m[ct]=aux.Stringid(13254097,4) n[ct]=3 ct=ct+1 end m[ct]=aux.Stringid(13254097,3) n[ct]=2 ct=ct+1
local sp=Duel.SelectOption(tp,table.unpack(m)) if t2 then m[ct]=aux.Stringid(13254097,4) n[ct]=3 ct=ct+1 end
op=n[sp+1] local sp=Duel.SelectOption(tp,table.unpack(m))
if op==0 then return end op=n[sp+1]
if op==0 then return end
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) if op==1 then
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
if g:GetCount()>0 then local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(g,REASON_EFFECT) if g:GetCount()>0 then
end Duel.Destroy(g,REASON_EFFECT)
end end
if op==2 then end
Duel.Damage(1-tp,1000,REASON_EFFECT) if op==2 then
end Duel.Damage(1-tp,1000,REASON_EFFECT)
if op==3 then end
local g=Duel.GetFieldGroup(p,0,LOCATION_HAND) if op==3 then
if g:GetCount()>0 then local g=Duel.GetFieldGroup(p,0,LOCATION_HAND)
Duel.ConfirmCards(p,g) if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.ConfirmCards(p,g)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_HAND,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
if g:GetCount()>0 then local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_HAND,1,1,nil)
Duel.Destroy(g,REASON_EFFECT) if g:GetCount()>0 then
Duel.Draw(1-tp,1,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
Duel.ShuffleHand(1-tp) Duel.Draw(1-tp,1,REASON_EFFECT)
end Duel.ShuffleHand(1-tp)
end end
end end
if(j==0) then Duel.BreakEffect() end end
i++ i=i+1
end end
end end
end end
--元始·飞球之乱流 --元始·飞球之乱流
function c13254131.initial_effect(c) function c13254131.initial_effect(c)
--Activate c:EnableCounterPermit(0x356)
local e1=Effect.CreateEffect(c) c:SetCounterLimit(0x356,4)
e1:SetType(EFFECT_TYPE_ACTIVATE) --Activate
e1:SetCode(EVENT_FREE_CHAIN) local e1=Effect.CreateEffect(c)
c:RegisterEffect(e1) e1:SetType(EFFECT_TYPE_ACTIVATE)
local e2=Effect.CreateEffect(c) e1:SetCode(EVENT_FREE_CHAIN)
e2:SetDescription(aux.Stringid(13254131,0)) c:RegisterEffect(e1)
e2:SetCategory(CATEGORY_COUNTER) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetDescription(aux.Stringid(13254131,0))
e2:SetRange(LOCATION_SZONE) e2:SetCategory(CATEGORY_COUNTER)
e2:SetCost(c13254131.ctcost) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetTarget(c13254131.cttg) e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c13254131.ctop) e2:SetCost(c13254131.ctcost)
c:RegisterEffect(e2) e2:SetTarget(c13254131.cttg)
--draw e2:SetOperation(c13254131.ctop)
local e3=Effect.CreateEffect(c) c:RegisterEffect(e2)
e3:SetDescription(aux.Stringid(13254131,1)) --draw
e3:SetCategory(CATEGORY_DRAW) local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetDescription(aux.Stringid(13254131,1))
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetCategory(CATEGORY_DRAW)
e3:SetRange(LOCATION_SZONE) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTarget(c13254131.drtg) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetOperation(c13254131.drop) e3:SetRange(LOCATION_SZONE)
c:RegisterEffect(e3) e3:SetTarget(c13254131.drtg)
local e4=Effect.CreateEffect(c) e3:SetOperation(c13254131.drop)
e4:SetCategory(CATEGORY_DESTROY) c:RegisterEffect(e3)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) local e4=Effect.CreateEffect(c)
e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetCategory(CATEGORY_DESTROY)
e4:SetRange(LOCATION_SZONE) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCountLimit(1) e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCondition(c13254131.descon) e4:SetRange(LOCATION_SZONE)
e4:SetTarget(c13254131.destg) e4:SetCountLimit(1)
e4:SetOperation(c13254131.desop) e4:SetCondition(c13254131.descon)
c:RegisterEffect(e4) e4:SetTarget(c13254131.destg)
e4:SetOperation(c13254131.desop)
end c:RegisterEffect(e4)
function c13254131.dfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1) and c:IsDiscardable() end
end function c13254131.dfilter(c)
function c13254131.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(1) and c:IsDiscardable()
if chk==0 then return Duel.IsExistingMatchingCard(c13254131.dfilter,tp,LOCATION_HAND,0,1,nil) end end
Duel.DiscardHand(tp,c13254131.dfilter,1,1,REASON_COST+REASON_DISCARD) function c13254131.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
end if chk==0 then return Duel.IsExistingMatchingCard(c13254131.dfilter,tp,LOCATION_HAND,0,1,nil) end
function c13254131.cttg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.DiscardHand(tp,c13254131.dfilter,1,1,REASON_COST+REASON_DISCARD)
if chk==0 then return true end end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x356) function c13254131.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
end if chk==0 then return true end
function c13254131.ctop(e,tp,eg,ep,ev,re,r,rp) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x356)
if e:GetHandler():IsRelateToEffect(e) then end
e:GetHandler():AddCounter(0x356,1) function c13254131.ctop(e,tp,eg,ep,ev,re,r,rp)
end if e:GetHandler():IsRelateToEffect(e) then
end e:GetHandler():AddCounter(0x356,1)
function c13254131.drtg(e,tp,eg,ep,ev,re,r,rp,chk) end
if chk==0 then return e:GetHandler():GetCounter(0x356)>0 end end
Duel.SetTargetPlayer(tp) function c13254131.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetParam(e:GetLabel()) if chk==0 then return e:GetHandler():GetCounter(0x356)>0 end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,e:GetLabel()) Duel.SetTargetPlayer(tp)
end Duel.SetTargetParam(e:GetLabel())
function c13254131.drop(e,tp,eg,ep,ev,re,r,rp) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,e:GetLabel())
if e:GetHandler():IsRelateToEffect(e) then end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) function c13254131.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(p,d,REASON_EFFECT) if e:GetHandler():IsRelateToEffect(e) then
end local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
end Duel.Draw(p,d,REASON_EFFECT)
function c13254131.descon(e,tp,eg,ep,ev,re,r,rp) end
return Duel.GetTurnPlayer()==tp end
end function c13254131.descon(e,tp,eg,ep,ev,re,r,rp)
function c13254131.destg(e,tp,eg,ep,ev,re,r,rp,chk) return Duel.GetTurnPlayer()==tp
if chk==0 then return true end end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) function c13254131.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end if chk==0 then return true end
function c13254131.desop(e,tp,eg,ep,ev,re,r,rp) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
local c=e:GetHandler() end
if c:IsRelateToEffect(e) then function c13254131.desop(e,tp,eg,ep,ev,re,r,rp)
c:RemoveCounter(tp,0x356,1,REASON_EFFECT) local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) c:RemoveCounter(tp,0x356,1,REASON_EFFECT)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.HintSelection(g) local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.Destroy(g,REASON_EFFECT) if g:GetCount()>0 then
end Duel.HintSelection(g)
end Duel.Destroy(g,REASON_EFFECT)
end end
end
end
This diff is collapsed.
--宇宙惑星要塞 泽洛斯 --宇宙惑星要塞 泽洛斯
function c13257209.initial_effect(c) function c13257209.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c13257209.thop) e1:SetOperation(c13257209.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(13257209,1)) e2:SetDescription(aux.Stringid(13257209,1))
e2:SetCategory(CATEGORY_SUMMON) e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,0x1c0+TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END) e2:SetHintTiming(0,0x1c0+TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetCountLimit(1) e2:SetCondition(c13257209.condition)
e2:SetCondition(c13257209.condition) e2:SetTarget(c13257209.target)
e2:SetTarget(c13257209.target) e2:SetOperation(c13257209.activate)
e2:SetOperation(c13257209.activate) c:RegisterEffect(e2)
c:RegisterEffect(e2) local e3=Effect.CreateEffect(c)
local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(13257209,2))
e3:SetDescription(aux.Stringid(13257209,2)) e3:SetCategory(CATEGORY_DRAW)
e3:SetCategory(CATEGORY_DRAW) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetRange(LOCATION_FZONE)
e3:SetRange(LOCATION_FZONE) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DELAY) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCondition(c13257209.drcon)
e3:SetCondition(c13257209.drcon) e3:SetTarget(c13257209.drtg)
e3:SetTarget(c13257209.drtg) e3:SetOperation(c13257209.drop)
e3:SetOperation(c13257209.drop) c:RegisterEffect(e3)
c:RegisterEffect(e3)
end
end function c13257209.thfilter(c)
function c13257209.thfilter(c) return (c:IsCode(13257207) or c:IsCode(13257213)) and c:IsAbleToHand()
return (c:IsCode(13257207) or c:IsCode(13257213)) and c:IsAbleToHand() end
end function c13257209.thop(e,tp,eg,ep,ev,re,r,rp)
function c13257209.thop(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 Duel.Hint(11,0,aux.Stringid(13257209,4))
Duel.Hint(11,0,aux.Stringid(13257209,4)) local g=Duel.GetMatchingGroup(c13257209.thfilter,tp,LOCATION_DECK,0,nil)
local g=Duel.GetMatchingGroup(c13257209.thfilter,tp,LOCATION_DECK,0,nil) if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(13257209,0)) then
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(13257209,0)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=g:Select(tp,1,1,nil)
local sg=g:Select(tp,1,1,nil) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg)
Duel.ConfirmCards(1-tp,sg) end
end end
end function c13257209.condition(e,tp,eg,ep,ev,re,r,rp)
function c13257209.condition(e,tp,eg,ep,ev,re,r,rp) local tn=Duel.GetTurnPlayer()
local tn=Duel.GetTurnPlayer() local ph=Duel.GetCurrentPhase()
local ph=Duel.GetCurrentPhase() return tn~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
return tn~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)) end
end function c13257209.filter(c)
function c13257209.filter(c) return (c:IsRace(RACE_MACHINE) or c:IsRace(RACE_FIEND)) and c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
return (c:IsRace(RACE_MACHINE) or c:IsRace(RACE_FIEND)) and c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1) end
end function c13257209.target(e,tp,eg,ep,ev,re,r,rp,chk)
function c13257209.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c13257209.filter,tp,LOCATION_HAND,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c13257209.filter,tp,LOCATION_HAND,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0) end
end function c13257209.activate(e,tp,eg,ep,ev,re,r,rp)
function c13257209.activate(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 Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON) local g=Duel.SelectMatchingCard(tp,c13257209.filter,tp,LOCATION_HAND,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c13257209.filter,tp,LOCATION_HAND,0,1,1,nil) local tc=g:GetFirst()
local tc=g:GetFirst() if tc then
if tc then local s1=tc:IsSummonable(true,nil,1)
local s1=tc:IsSummonable(true,nil,1) local s2=tc:IsMSetable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1) if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then Duel.Summon(tp,tc,true,nil,1)
Duel.Summon(tp,tc,true,nil,1) else
else Duel.MSet(tp,tc,true,nil,1)
Duel.MSet(tp,tc,true,nil,1) end
end end
end end
end function c13257209.cfilter(c,tp)
function c13257209.cfilter(c,tp) return c:GetPreviousControler()==tp and c:IsSetCard(0x353) and (c:GetReasonPlayer()~=tp and c:IsReason(REASON_EFFECT))
return c:GetPreviousControler()==tp and c:IsSetCard(0x353) and (c:GetReasonPlayer()~=tp and c:IsReason(REASON_EFFECT)) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousLocation(LOCATION_MZONE) end
end function c13257209.drcon(e,tp,eg,ep,ev,re,r,rp)
function c13257209.drcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(c13257209.cfilter,1,nil,tp)
return eg:IsExists(c13257209.cfilter,1,nil,tp) end
end function c13257209.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
function c13257209.drtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end Duel.SetTargetPlayer(tp)
Duel.SetTargetPlayer(tp) Duel.SetTargetParam(1)
Duel.SetTargetParam(1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end
end function c13257209.drop(e,tp,eg,ep,ev,re,r,rp)
function c13257209.drop(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.Draw(p,d,REASON_EFFECT)
Duel.Draw(p,d,REASON_EFFECT) end
end
\ No newline at end of file
--Actress! ReLive! --Actress! ReLive!
local m=20100120 local m=20100120
local cm=_G["c"..m] local cm=_G["c"..m]
xpcall(function() require("expansions/script/c20100002") end,function() require("script/c20100002") end) xpcall(function() require("expansions/script/c20100002") end,function() require("script/c20100002") end)
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--SpecialSummon --SpecialSummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetCondition(cm.spcon) e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not cm.global_check then if not cm.global_check then
cm.global_check=true cm.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_TO_GRAVE) ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(cm.checkop) ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function cm.filter1(c,e,tp) function cm.filter1(c,e,tp)
return c:IsSetCard(0xc99) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xc99) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter1(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(cm.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0xc99) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0xc99)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) then if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) then
Duel.BreakEffect() Duel.BreakEffect()
tc:AddCounter(0xc99,1) tc:AddCounter(0xc99,1)
end end
end end
end end
function cm.callback(c) function cm.callback(c)
local tp=c:GetPreviousControler() local tp=c:GetPreviousControler()
if c:IsSetCard(0xc99) and c:IsControler(tp) then if c:IsSetCard(0xc99) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) then
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1) c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
end end
end end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp) function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
eg:ForEach(cm.callback) eg:ForEach(cm.callback)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp return Duel.GetTurnPlayer()==1-tp
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:GetFlagEffect(m)~=0 and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp) return c:GetFlagEffect(m)~=0 and c:IsLocation(LOCATION_GRAVE) and c:IsControler(tp)
and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and cm.filter(chkc,e,tp) end if chkc then return eg:IsContains(chkc) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:IsExists(cm.filter,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:IsExists(cm.filter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=eg:FilterSelect(tp,cm.filter,1,1,nil,e,tp) local g=eg:FilterSelect(tp,cm.filter,1,1,nil,e,tp)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(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
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
--THE DRAWER 玄墨 --THE DRAWER 玄墨
local m=33330319 local m=33330319
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="THE DRAWER" cm.name="THE DRAWER"
function c33330319.initial_effect(c) function c33330319.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,c33330319.tfilter,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,c33330319.tfilter,aux.NonTuner(nil),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--special summon --special summon
---- local e2=Effect.CreateEffect(c) ---- local e2=Effect.CreateEffect(c)
-- e2:SetCategory(CATEGORY_SPECIAL_SUMMON) -- e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
-- e2:SetType(EFFECT_TYPE_IGNITION) -- e2:SetType(EFFECT_TYPE_IGNITION)
-- e2:SetRange(LOCATION_GRAVE) -- e2:SetRange(LOCATION_GRAVE)
-- e2:SetCountLimit(1,33330319) -- e2:SetCountLimit(1,33330319)
-- e2:SetCost(c33330319.spcost) -- e2:SetCost(c33330319.spcost)
-- e2:SetTarget(c33330319.sptg) -- e2:SetTarget(c33330319.sptg)
-- e2:SetOperation(c33330319.spop) -- e2:SetOperation(c33330319.spop)
-- c:RegisterEffect(e2) -- c:RegisterEffect(e2)
--end --end
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(17031211,0)) e1:SetDescription(aux.Stringid(17031211,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,33330319) e1:SetCountLimit(1,33330319)
e1:SetCost(cm.spcost) e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to deck --to deck
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33330319,1)) e2:SetDescription(aux.Stringid(33330319,1))
e2:SetCategory(CATEGORY_TODECK) e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetTarget(c33330319.tgtg) e2:SetTarget(c33330319.tgtg)
e2:SetOperation(c33330319.tgop) e2:SetOperation(c33330319.tgop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--nontuner --nontuner
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_NONTUNER) e4:SetCode(EFFECT_NONTUNER)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c33330319.tfilter(c) function c33330319.tfilter(c)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
function cm.spcfilter(c,ft,tp) function cm.spcfilter(c,ft,tp)
return ft>0 or (c:IsControler(tp) and c:GetSequence()<5) return ft>0 or (c:IsControler(tp) and c:GetSequence()<5)
end end
function cm.costfilter(c) function cm.costfilter(c)
return c:IsFaceup() and c:IsLevelBelow(2) return c:IsFaceup() and c:IsLevelBelow(2)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then if chk==0 then
if ft<0 then return false end if ft<0 then return false end
if ft==0 then if ft==0 then
return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,0,1,nil)
else else
return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
if ft==0 then if ft==0 then
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
else else
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end 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_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
-- if not c:IsRelateToEffect(e) then return end -- if not c:IsRelateToEffect(e) then return end
-- Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) -- Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT) e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED) e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true) c:RegisterEffect(e1,true)
end end
end end
---to deck ---to deck
function c33330319.tgfilter(c) function c33330319.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_WARRIOR) and c:IsAbleToGrave() return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_WARRIOR) and c:IsAbleToGrave()
end end
function c33330319.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c33330319.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33330319.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c33330319.tgfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end end
function c33330319.tgop(e,tp,eg,ep,ev,re,r,rp) function c33330319.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectMatchingCard(tp,c33330319.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,c33330319.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if tc and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local lv=tc:GetLevel() local lv=tc:GetLevel()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv) e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
--幻梦迷境王将 普芙蕾 --幻梦迷境王将 普芙蕾
function c65010056.initial_effect(c) function c65010056.initial_effect(c)
--xyz summon --xyz summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c65010056.mfilter,c65010056.xyzcheck,2,2) aux.AddXyzProcedureLevelFree(c,c65010056.mfilter,c65010056.xyzcheck,2,2)
--summon success --summon success
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c65010056.sumsuc) e1:SetOperation(c65010056.sumsuc)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCost(c65010056.cost) e2:SetCost(c65010056.cost)
e2:SetTarget(c65010056.destg) e2:SetTarget(c65010056.destg)
e2:SetOperation(c65010056.desop) e2:SetOperation(c65010056.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--cannot disable summon --cannot disable summon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON) e4:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSummonType,SUMMON_TYPE_XYZ)) e4:SetTarget(aux.TargetBoolFunction(Card.IsSummonType,SUMMON_TYPE_XYZ))
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c65010056.mfilter(c) function c65010056.mfilter(c,xyzc)
return c:IsRace(RACE_CYBERSE) and c:IsXyzLevel(8) return c:IsRace(RACE_CYBERSE) and c:IsXyzLevel(xyzc,8)
end end
function c65010056.xyzcheck(g) function c65010056.xyzcheck(g)
return g:GetClassCount(Card.GetAttribute)==g:GetCount() return g:GetClassCount(Card.GetAttribute)==g:GetCount()
end end
function c65010056.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c65010056.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c65010056.desfilter(c) function c65010056.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c65010056.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c65010056.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65010056.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c65010056.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c65010056.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c65010056.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c65010056.desop(e,tp,eg,ep,ev,re,r,rp) function c65010056.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c65010056.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c65010056.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if Duel.Destroy(g,REASON_EFFECT)>=2 and Duel.SelectYesNo(tp,aux.Stringid(65010056,0)) then if Duel.Destroy(g,REASON_EFFECT)>=2 and Duel.SelectYesNo(tp,aux.Stringid(65010056,0)) then
local mg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local mg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if mg:GetCount()>0 then if mg:GetCount()>0 then
Duel.HintSelection(mg) Duel.HintSelection(mg)
Duel.SendtoGrave(mg,REASON_EFFECT) Duel.SendtoGrave(mg,REASON_EFFECT)
end end
end end
end end
function c65010056.sumsuc(e,tp,eg,ep,ev,re,r,rp) function c65010056.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsSummonType(SUMMON_TYPE_XYZ) then return end if not c:IsSummonType(SUMMON_TYPE_XYZ) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1) e1:SetTargetRange(1,1)
e1:SetValue(c65010056.aclimit) e1:SetValue(c65010056.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE) e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(c65010056.disable) e2:SetTarget(c65010056.disable)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c65010056.aclimit(e,re,tp) function c65010056.aclimit(e,re,tp)
return re:GetHandler():IsOnField() and e:GetHandler()~=re:GetHandler() return re:GetHandler():IsOnField() and e:GetHandler()~=re:GetHandler()
end end
function c65010056.disable(e,c) function c65010056.disable(e,c)
return c~=e:GetHandler() and (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT)) return c~=e:GetHandler() and (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT))
end end
--星光歌剧 星见纯那Revue
function c65010125.initial_effect(c)
--summon with 1 tribute
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(65010125,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(c65010125.otcon)
e0:SetOperation(c65010125.otop)
e0:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e0)
local e1=e0:Clone()
e1:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65010125,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetTarget(c65010125.target)
e2:SetOperation(c65010125.operation)
c:RegisterEffect(e2)
--des
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65010125,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c65010125.descon)
e3:SetTarget(c65010125.destg)
e3:SetOperation(c65010125.desop)
c:RegisterEffect(e3)
--Activate
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(65010125,3))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetHintTiming(TIMING_END_PHASE)
e4:SetCondition(c65010125.condition)
e4:SetOperation(c65010125.activate)
c:RegisterEffect(e4)
if c65010125.counter==nil then
c65010125.counter=true
c65010125[0]=0
c65010125[1]=0
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e5:SetOperation(c65010125.resetcount)
Duel.RegisterEffect(e5,0)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e6:SetCode(EVENT_TO_GRAVE)
e6:SetOperation(c65010125.addcount)
Duel.RegisterEffect(e6,0)
end
end
function c65010125.resetcount(e,tp,eg,ep,ev,re,r,rp)
c65010125[0]=0
c65010125[1]=0
end
function c65010125.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
local pl=tc:GetPreviousLocation()
if pl==LOCATION_MZONE then
local p=tc:GetPreviousControler()
c65010125[p]=c65010125[p]+1
end
tc=eg:GetNext()
end
end
function c65010125.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c65010125.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(c65010125.droperation)
Duel.RegisterEffect(e1,tp)
end
function c65010125.droperation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,65010125)
Duel.Draw(tp,c65010125[tp],REASON_EFFECT)
end
function c65010125.otfilter(c)
return c:IsSetCard(0x9da0)
end
function c65010125.otcon(e,c,minc)
if c==nil then return true end
local mg=Duel.GetMatchingGroup(c65010125.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end
function c65010125.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c65010125.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c65010125.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE) and Duel.GetTurnPlayer()~=tp
end
function c65010125.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end
local num=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,num,1-tp,LOCATION_ONFIELD)
end
function c65010125.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil)
Duel.Destroy(g,REASON_EFFECT)
end
function c65010125.filter(c)
return c:IsFacedown()
end
function c65010125.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c65010125.filter,tp,0,LOCATION_ONFIELD,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c65010125.filter,tp,0,LOCATION_ONFIELD,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0)
local tc=g:GetFirst()
while tc do
Duel.SetChainLimit(c65010125.limit(tc))
tc=g:GetNext()
end
end
function c65010125.limit(c)
return function (e,lp,tp)
return e:GetHandler()~=c
end
end
function c65010125.operation(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
\ No newline at end of file
--『星光歌剧』台本-轮回Revue
function c65010126.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SUMMON)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--token&summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,65010126)
e1:SetCondition(c65010126.con)
e1:SetCost(c65010126.cost)
e1:SetTarget(c65010126.tg)
e1:SetOperation(c65010126.op)
c:RegisterEffect(e1)
--draw!
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c65010126.drtg)
e2:SetOperation(c65010126.drop)
c:RegisterEffect(e2)
end
function c65010126.drfil(c)
return c:IsSetCard(0x9da0) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c65010126.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c65010126.drfil(chkc) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c65010126.drfil,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsPlayerCanDraw(tp) end
local g=Duel.SelectTarget(tp,c65010126.drfil,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,0,0,tp,1)
end
function c65010126.drop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
function c65010126.con(e,tp,eg,ep,ev,re,r,rp)
local tn=Duel.GetTurnPlayer()
local ph=Duel.GetCurrentPhase()
return tn~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
end
function c65010126.costfil(c)
return c:IsSetCard(0x9da0) and c:IsType(TYPE_MONSTER) and c:IsAbleToHandAsCost()
end
function c65010126.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65010126.costfil,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65010126.costfil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
function c65010126.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,65010128,0,0x4011,1000,2800,8,RACE_FAIRY,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c65010126.filter(c)
return (c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)) and c:IsSetCard(0x9da0)
end
function c65010126.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,65010128,0,0x4011,1000,2800,8,RACE_FAIRY,ATTRIBUTE_DARK) or not e:GetHandler():IsRelateToEffect(e) then return end
local token=Duel.CreateToken(tp,65010128)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(c65010126.filter,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(65010126,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c65010126.filter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil,1)
else
Duel.MSet(tp,tc,true,nil,1)
end
end
end
end
\ No newline at end of file
--『星光歌剧』台本-约定Revue
function c65010127.initial_effect(c)
--SearchCard
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c65010127.cost)
e1:SetTarget(c65010127.tg)
e1:SetOperation(c65010127.op)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,65010127)
e2:SetTarget(c65010127.drtg)
e2:SetOperation(c65010127.drop)
c:RegisterEffect(e2)
end
function c65010127.costfil(c)
return c:IsSetCard(0x9da0) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end
function c65010127.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65010127.costfil,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c65010127.costfil,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
end
function c65010127.thfil(c)
return c:IsSetCard(0x9da0) and not c:IsCode(65010127) and c:IsAbleToHand()
end
function c65010127.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65010127.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c65010127.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c65010127.thfil,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c65010127.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DRAW,0,0,tp,1)
end
function c65010127.drop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--星光歌剧 露崎真昼
function c65010129.initial_effect(c)
--summon proc
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(65010129,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(c65010129.sumcon)
e0:SetOperation(c65010129.sumop)
e0:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCost(c65010129.cost)
e1:SetOperation(c65010129.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(65010129,ACTIVITY_SPSUMMON,c65010129.counterfilter)
end
function c65010129.refil(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x9da0)
end
function c65010129.sumcon(e,c)
local tp=e:GetHandler():GetControler()
return Duel.IsExistingMatchingCard(c65010129.refil,tp,LOCATION_EXTRA,0,1,nil)
end
function c65010129.sumop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectMatchingCard(tp,c65010129.refil,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c65010129.counterfilter(c)
return c:IsSetCard(0x9da0)
end
function c65010129.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(65010129,tp,ACTIVITY_SPSUMMON)==0 and Duel.GetFlagEffect(tp,65010129)==0 and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_COST) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c65010129.splimit)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,65010129,RESET_PHASE+PHASE_END,0,1)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST,nil,REASON_COST)
end
function c65010129.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x9da0)
end
function c65010129.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_RELEASE_SUM)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--星光歌剧 露崎真昼Revue
function c65010130.initial_effect(c)
--summon with 1 tribute
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(65010130,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(c65010130.otcon)
e0:SetOperation(c65010130.otop)
e0:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e0)
local e1=e0:Clone()
e1:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c65010130.con)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSummonType,SUMMON_TYPE_ADVANCE))
e2:SetValue(1)
c:RegisterEffect(e2)
--cannot be target
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(65010130,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetCountLimit(1)
e4:SetCondition(c65010130.thcon)
e4:SetTarget(c65010130.thtg)
e4:SetOperation(c65010130.thop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
--damage
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(65010130,2))
e6:SetCategory(CATEGORY_DAMAGE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_TO_HAND)
e6:SetRange(LOCATION_MZONE)
e6:SetCountLimit(1)
e6:SetCondition(c65010130.damcon)
e6:SetTarget(c65010130.damtg)
e6:SetOperation(c65010130.damop)
c:RegisterEffect(e6)
end
function c65010130.otfilter(c)
return c:IsSetCard(0x9da0)
end
function c65010130.otcon(e,c,minc)
if c==nil then return true end
local mg=Duel.GetMatchingGroup(c65010130.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end
function c65010130.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c65010130.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c65010130.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c65010130.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE) and not eg:IsContains(e:GetHandler())
end
function c65010130.thfil(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x9da0) and c:IsAbleToHand()
end
function c65010130.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65010130.thfil,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c65010130.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c65010130.thfil,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
function c65010130.damcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and Duel.GetCurrentPhase()~=PHASE_DRAW
end
function c65010130.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500)
end
function c65010130.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
\ No newline at end of file
--渺奏迷景曲-凝望至高 --渺奏迷景曲-凝望至高
function c65072007.initial_effect(c) function c65072007.initial_effect(c)
--tohand --tohand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65072007+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,65072007+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c65072007.target) e1:SetTarget(c65072007.target)
e1:SetOperation(c65072007.activate) e1:SetOperation(c65072007.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c65072007.card_code_list={65072000} c65072007.card_code_list={65072000}
function c65072007.filter(c) function c65072007.filter(c)
return aux.IsCodeListed(c,65072000) and c:IsAbleToHand() return aux.IsCodeListed(c,65072000) and c:IsAbleToHand()
end end
function c65072007.target(e,tp,eg,ep,ev,re,r,rp,chk) function c65072007.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65072007.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c65072007.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(11,0,aux.Stringid(65072007,0)) Duel.Hint(11,0,aux.Stringid(65072007,0))
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c65072007.activate(e,tp,eg,ep,ev,re,r,rp) function c65072007.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c65072007.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c65072007.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT) Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
--actlimit --actlimit
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(c65072007.actlimit) e1:SetValue(c65072007.actlimit)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
end end
function c65072007.actlimit(e,te,tp) function c65072007.actlimit(e,te,tp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 return te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:IsActiveType(TYPE_SPELL) and te:GetHandler():IsType(TYPE_FIELD)
and te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:IsActiveType(TYPE_SPELL) and te:GetHandler():IsType(TYPE_FIELD) end
end
--鸡里奥 --鸡里奥
function c9980521.initial_effect(c) function c9980521.initial_effect(c)
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--destroy & search --destroy & search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9980521,0)) e1:SetDescription(aux.Stringid(9980521,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,9980521) e1:SetCountLimit(1,9980521)
e1:SetCondition(c9980521.thcon) e1:SetCondition(c9980521.thcon)
e1:SetTarget(c9980521.thtg) e1:SetTarget(c9980521.thtg)
e1:SetOperation(c9980521.thop) e1:SetOperation(c9980521.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk --atk
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_ROCK)) e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_ROCK))
e2:SetValue(500) e2:SetValue(500)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE) e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--special summon from hand --special summon from hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9980521,1)) e2:SetDescription(aux.Stringid(9980521,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_EXTRA+LOCATION_GRAVE) e2:SetRange(LOCATION_EXTRA+LOCATION_GRAVE)
e2:SetCountLimit(1,99805210) e2:SetCountLimit(1,99805210)
e2:SetCondition(c9980521.spcon) e2:SetCondition(c9980521.spcon)
e2:SetCost(c9980521.spcost) e2:SetCost(c9980521.spcost)
e2:SetTarget(c9980521.sptg) e2:SetTarget(c9980521.sptg)
e2:SetOperation(c9980521.spop) e2:SetOperation(c9980521.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk up --atk up
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9980521,2)) e3:SetDescription(aux.Stringid(9980521,2))
e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetCountLimit(1,99805211) e3:SetCountLimit(1,99805211)
e3:SetCondition(c9980521.atkcon) e3:SetCondition(c9980521.atkcon)
e3:SetOperation(c9980521.atkop) e3:SetOperation(c9980521.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(9980521,ACTIVITY_SPSUMMON,c9980521.counterfilter) end
end function c9980521.thcon(e,tp,eg,ep,ev,re,r,rp)
function c9980521.counterfilter(c) return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler())
return not c:IsSummonType(SUMMON_TYPE_PENDULUM) end
end function c9980521.thfilter(c)
function c9980521.thcon(e,tp,eg,ep,ev,re,r,rp) return c:IsSetCard(0x1bcf) and not c:IsCode(9980521)
return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_PZONE,0,1,e:GetHandler()) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c9980521.thfilter(c) function c9980521.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsSetCard(0x1bcf) and not c:IsCode(9980521) local c=e:GetHandler()
and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() if chk==0 then return c:IsDestructable() and Duel.IsExistingMatchingCard(c9980521.thfilter,tp,LOCATION_DECK,0,1,nil) end
end Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0)
function c9980521.thtg(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
local c=e:GetHandler() end
if chk==0 then return c:IsDestructable() and Duel.IsExistingMatchingCard(c9980521.thfilter,tp,LOCATION_DECK,0,1,nil) end function c9980521.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0) local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then
end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
function c9980521.thop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.SelectMatchingCard(tp,c9980521.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local c=e:GetHandler() if g:GetCount()>0 then
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.ConfirmCards(1-tp,g)
local g=Duel.SelectMatchingCard(tp,c9980521.thfilter,tp,LOCATION_DECK,0,1,1,nil) end
if g:GetCount()>0 then end
Duel.SendtoHand(g,nil,REASON_EFFECT) end
Duel.ConfirmCards(1-tp,g) function c9980521.spcon(e,tp,eg,ep,ev,re,r,rp)
end return Duel.GetFieldCard(tp,LOCATION_PZONE,0) and Duel.GetFieldCard(tp,LOCATION_PZONE,1)
end end
end function c9980521.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
function c9980521.spcon(e,tp,eg,ep,ev,re,r,rp) if chk==0 then return Duel.GetCustomActivityCount(9980521,tp,ACTIVITY_SPSUMMON)==0 end
return Duel.GetFieldCard(tp,LOCATION_PZONE,0) and Duel.GetFieldCard(tp,LOCATION_PZONE,1) local e1=Effect.CreateEffect(e:GetHandler())
end e1:SetType(EFFECT_TYPE_FIELD)
function c9980521.spcost(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
if chk==0 then return Duel.GetCustomActivityCount(9980521,tp,ACTIVITY_SPSUMMON)==0 end e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
local e1=Effect.CreateEffect(e:GetHandler()) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetTarget(c9980521.splimit)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) Duel.RegisterEffect(e1,tp)
e1:SetReset(RESET_PHASE+PHASE_END) end
e1:SetTarget(c9980521.splimit) function c9980521.splimit(e,c,sump,sumtype,sumpos,targetp,se)
e1:SetTargetRange(1,0) return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
Duel.RegisterEffect(e1,tp) end
end function c9980521.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c9980521.splimit(e,c,sump,sumtype,sumpos,targetp,se) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
function c9980521.sptg(e,tp,eg,ep,ev,re,r,rp,chk) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 function c9980521.spop(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) if not c:IsRelateToEffect(e) then return end
end Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
function c9980521.spop(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function c9980521.atkfilter(c)
if not c:IsRelateToEffect(e) then return end return c:IsRace(RACE_ROCK) and c:IsFaceup()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
end function c9980521.atkcon(e,tp,eg,ep,ev,re,r,rp)
function c9980521.atkfilter(c) local c=e:GetHandler()
return c:IsRace(RACE_ROCK) and c:IsFaceup() local d=c:GetBattleTarget()
end local gc=Duel.GetMatchingGroupCount(c9980521.atkfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil)
function c9980521.atkcon(e,tp,eg,ep,ev,re,r,rp) return c==Duel.GetAttacker() and d and d:IsFaceup() and not d:IsControler(tp) and gc>0
local c=e:GetHandler() end
local d=c:GetBattleTarget() function c9980521.atkop(e,tp,eg,ep,ev,re,r,rp)
local gc=Duel.GetMatchingGroupCount(c9980521.atkfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil) local d=Duel.GetAttacker():GetBattleTarget()
return c==Duel.GetAttacker() and d and d:IsFaceup() and not d:IsControler(tp) and gc>0 local gc=Duel.GetMatchingGroupCount(c9980521.atkfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil)
end if d:IsRelateToBattle() and d:IsFaceup() then
function c9980521.atkop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler())
local d=Duel.GetAttacker():GetBattleTarget() e1:SetType(EFFECT_TYPE_SINGLE)
local gc=Duel.GetMatchingGroupCount(c9980521.atkfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil) e1:SetCode(EFFECT_UPDATE_ATTACK)
if d:IsRelateToBattle() and d:IsFaceup() then e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
local e1=Effect.CreateEffect(e:GetHandler()) e1:SetValue(-gc*500)
e1:SetType(EFFECT_TYPE_SINGLE) d:RegisterEffect(e1)
e1:SetCode(EFFECT_UPDATE_ATTACK) end
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL) end
e1:SetValue(-gc*500)
d:RegisterEffect(e1)
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