Commit 415a61b2 authored by REIKAI's avatar REIKAI 💬

rep

parent 5cec15cd
No preview for this file type
expansions/pics/65040052.jpg

6.37 KB | W: | H:

expansions/pics/65040052.jpg

128 KB | W: | H:

expansions/pics/65040052.jpg
expansions/pics/65040052.jpg
expansions/pics/65040052.jpg
expansions/pics/65040052.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65080054.jpg

6.2 KB | W: | H:

expansions/pics/65080054.jpg

124 KB | W: | H:

expansions/pics/65080054.jpg
expansions/pics/65080054.jpg
expansions/pics/65080054.jpg
expansions/pics/65080054.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65080055.jpg

6.24 KB | W: | H:

expansions/pics/65080055.jpg

130 KB | W: | H:

expansions/pics/65080055.jpg
expansions/pics/65080055.jpg
expansions/pics/65080055.jpg
expansions/pics/65080055.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65080056.jpg

5.92 KB | W: | H:

expansions/pics/65080056.jpg

122 KB | W: | H:

expansions/pics/65080056.jpg
expansions/pics/65080056.jpg
expansions/pics/65080056.jpg
expansions/pics/65080056.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65080057.jpg

6.01 KB | W: | H:

expansions/pics/65080057.jpg

124 KB | W: | H:

expansions/pics/65080057.jpg
expansions/pics/65080057.jpg
expansions/pics/65080057.jpg
expansions/pics/65080057.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/71400042.jpg

37.8 KB | W: | H:

expansions/pics/71400042.jpg

487 KB | W: | H:

expansions/pics/71400042.jpg
expansions/pics/71400042.jpg
expansions/pics/71400042.jpg
expansions/pics/71400042.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/field/65080060.jpg

91.5 KB | W: | H:

expansions/pics/field/65080060.jpg

718 KB | W: | H:

expansions/pics/field/65080060.jpg
expansions/pics/field/65080060.jpg
expansions/pics/field/65080060.jpg
expansions/pics/field/65080060.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/field/71400042.jpg

47.6 KB | W: | H:

expansions/pics/field/71400042.jpg

905 KB | W: | H:

expansions/pics/field/71400042.jpg
expansions/pics/field/71400042.jpg
expansions/pics/field/71400042.jpg
expansions/pics/field/71400042.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -34,7 +34,7 @@ function c19500250.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c19500250.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,19500260,0x3990,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH) then
if Duel.IsPlayerCanSpecialSummonMonster(tp,19500260,0x3990,0x4011,0,0,1,RACE_MACHINE,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,19500260)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -83,6 +83,12 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,s.matfilter,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler())
if g:GetCount()>0 then
for mc in aux.Next(g) do
local mg=mc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(e:GetHandler(),mg)
end
end
Duel.Overlay(e:GetHandler(),g)
end
end
......
......@@ -59,16 +59,19 @@ end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_CARD,0,m)
local g=Group.CreateGroup()
local ec=re:GetHandler()
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,aux.NULL)
Duel.SendtoDeck(eg:GetFirst(),nil,SEQ_DECKTOP,REASON_EFFECT)
Duel.ChangeChainOperation(ev,cm.cgefilter(tp))
Duel.SendtoDeck(ec,nil,SEQ_DECKTOP,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g2,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.SendtoGrave(g2,REASON_EFFECT)
end
end
function cm.cgefilter(tp)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,LOCATION_DECK)>0 end
......@@ -151,7 +154,7 @@ function cm.tgop2(e,tp,eg,ep,ev,re,r,rp)
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
end
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
end
end
end
if key==1 then
......@@ -170,10 +173,9 @@ function cm.tgop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g4=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil)
local tc=g4:GetFirst()
local ck=Duel.SelectOption(tp,aux.Stringid(m,3),aux.Stringid(m,4))
if ck==0 then Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) end
if ck==1 then Duel.SendtoDeck(tc,nil,1,REASON_EFFECT) end
if ck==0 then Duel.SendtoDeck(g4,nil,0,REASON_EFFECT) end
if ck==1 then Duel.SendtoDeck(g4,nil,1,REASON_EFFECT) end
end
end
if tc:IsCode(ac) then
......
......@@ -137,7 +137,7 @@ function cm.tgop2(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-d)
sc:RegisterEffect(e1)
local e2=e1:Clone()
......@@ -153,7 +153,7 @@ function cm.tgop2(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(d)
sc:RegisterEffect(e1)
local e2=e1:Clone()
......
......@@ -30,6 +30,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function cm.ckfilter1(c)
......
......@@ -8,11 +8,11 @@ function cm.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SPSUMMON_PROC)
e3:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e3:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,m+1)
e3:SetCondition(cm.spcon)
e3:SetValue(POS_ATTACK)
e3:SetTargetRange(POS_FACEUP_ATTACK,0)
c:RegisterEffect(e3)
--nontuner
local e2=Effect.CreateEffect(c)
......
......@@ -37,7 +37,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.filter1(c)
return c:IsFaceup() and c:IsSetCard(0xb71) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
return c:IsFaceup() and c:IsSetCard(0x3b71) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end
function cm.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_ONFIELD,0,1,nil) end
......
......@@ -77,5 +77,5 @@ function cm.tfilters(c,tp)
return c:IsFaceup() and c:GetPreviousControler()==tp
end
function cm.filters(c,e,tp)
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsType(TYPE_TOKEN)
end
\ No newline at end of file
......@@ -47,14 +47,13 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetValue(-500)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local e2=e1:Clone()
local e2=e3:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
--cannot announce
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetRange(LOCATION_MZONE)
e8:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e8:SetCode(EFFECT_CANNOT_ATTACK)
e8:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e8)
end
......
......@@ -22,7 +22,7 @@ function cm.initial_effect(c)
local g = Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end)
.Return()).c("RegisterEffect",iFunc(c)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
.e("SetCode",EVENT_EQUIP)
......@@ -30,7 +30,10 @@ function cm.initial_effect(c)
.e("SetCountLimit",1,m)
.e("SetProperty",EFFECT_FLAG_DELAY)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then local tg = re:GetHandler():GetEquipTarget() return tg:IsType(TYPE_NORMAL) and tg:IsRace(RACE_SPELLCASTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsLocation(LOCATION_HAND) end
if chk==0 then
local tg = re:GetHandler():GetEquipTarget()
if not tg then return end
return tg:IsType(TYPE_NORMAL) and tg:IsRace(RACE_SPELLCASTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsLocation(LOCATION_HAND) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
......@@ -39,7 +42,7 @@ function cm.initial_effect(c)
local g = Duel.SelectMatchingCard(tp,function(c) return c:IsType(TYPE_EQUIP) and c:IsAbleToGrave() end,tp,LOCATION_DECK,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
end)
.Return())
......
......@@ -30,7 +30,10 @@ function cm.initial_effect(c)
.e("SetCountLimit",1,m)
.e("SetProperty",EFFECT_FLAG_DELAY)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then local tg = re:GetHandler():GetEquipTarget() return tg:IsType(TYPE_NORMAL) and tg:IsRace(RACE_SPELLCASTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsLocation(LOCATION_HAND) end
if chk==0 then
local tg = re:GetHandler():GetEquipTarget()
if not tg then return end
return tg:IsType(TYPE_NORMAL) and tg:IsRace(RACE_SPELLCASTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsLocation(LOCATION_HAND) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
......@@ -39,7 +42,7 @@ function cm.initial_effect(c)
local g = Duel.SelectMatchingCard(tp,function(c) return c:IsType(TYPE_EQUIP) and c:IsAbleToHand() end,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end)
.Return())
......
......@@ -33,7 +33,7 @@ function cm.initial_effect(c)
local g1=Duel.SelectMatchingCard(tp,cm.thfilter1,tp,LOCATION_DECK,0,1,1,nil,tp)
if g1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,cmthfilter2,tp,LOCATION_DECK,0,1,1,g1:GetFirst())
local g2=Duel.SelectMatchingCard(tp,cm.thfilter2,tp,LOCATION_DECK,0,1,1,g1:GetFirst())
g1:Merge(g2)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
......
......@@ -35,9 +35,18 @@ function cm.initial_effect(c)
.e("SetTargetRange",LOCATION_ONFIELD,LOCATION_ONFIELD)
.e("SetCode",EFFECT_DISABLE)
.e("SetTarget",function(e,c)
local seq=c:GetSequence()
local seq1=c:GetSequence()
if not seq1 then return false end
local seq=e:GetHandler():GetSequence()
local tp1=c:GetControler()
local tp=e:GetHandler():GetControler()
seq1 = (seq1==5 and {1} or {seq1})[1]
seq1 = (seq1==6 and {3} or {seq1})[1]
return (bit.band(0x1,c:GetOriginalType())==0x1)
and seq<5 and (math.abs(e:GetHandler():GetSequence()-seq)<=1) end)
and (not c:IsLocation(LOCATION_FZONE)) and seq1<5
and (((math.abs(seq-seq1)<=1) and (tp==tp1))
or ((math.abs(seq-(4-seq1))<=1) and (tp~=tp1)))
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetType",EFFECT_TYPE_SINGLE)
.e("SetProperty",EFFECT_FLAG_SINGLE_RANGE)
......
......@@ -109,9 +109,11 @@ function c66660004.cttg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c66660004.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c66660004.ctop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFirstTarget()==nil then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,1-tp,PHASE_STANDBY,2)
......
......@@ -125,7 +125,7 @@ function c66660013.damop(e,tp,eg,ep,ev,re,r,rp)
end
--alive
function c66660013.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_MONSTER_REBORN,tp,true,false) and c:IsSetCard(0x666) and c:IsType(TYPE_PENDULUM)
return c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_MONSTER_REBORN,tp,false,false) and c:IsSetCard(0x666)
end
function c66660013.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c66660013.filter(chkc,e,tp) end
......
......@@ -17,7 +17,13 @@ function c66660014.initial_effect(c)
e1:SetTarget(c66660014.target)
e1:SetOperation(c66660014.operation)
c:RegisterEffect(e1)
--spsummon condition
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
e2:SetValue(c66660014.splimit1)
c:RegisterEffect(e2)
--cannot be material
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_SINGLE)
......@@ -35,6 +41,9 @@ function c66660014.initial_effect(c)
e13:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e13)
end
function c66660014.splimit1(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c66660014.ffilter(c)
return c:IsSetCard(0x666) and c:IsFusionType(TYPE_PENDULUM)
end
......@@ -46,7 +55,7 @@ function c66660014.splimit(e,c)
return not c:IsSetCard(0x666)
end
function c66660014.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup() and c:IsAbleToHand()
end
function c66660014.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c66660014.filter(chkc) end
......
......@@ -28,7 +28,6 @@ local e2=Effect.CreateEffect(c)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c66660015.ngtg)
......@@ -90,7 +89,7 @@ function c66660015.ngtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c66660015.ngop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,e:GetHandler())
if g:GetCount()==0 then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
......
......@@ -34,7 +34,9 @@ function c66660026.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveCounter(tp,0x666,10,REASON_COST)
end
function c66660026.filter(c,e,tp)
return c:IsSetCard(0x666) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
return c:IsSetCard(0x666) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function c66660026.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -49,6 +51,7 @@ function c66660026.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c66660026.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP_ATTACK)
Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP_ATTACK)
tc:CompleteProcedure()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end end
\ No newline at end of file
......@@ -34,7 +34,7 @@ function c66660027.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveCounter(tp,0x666,10,REASON_COST)
end
function c66660027.filter(c,e,tp)
return c:IsSetCard(0x666) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
return c:IsSetCard(0x666) and c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c66660027.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66660027.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
......@@ -47,6 +47,6 @@ function c66660027.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c66660027.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP_ATTACK)
Duel.SpecialSummon(tc,0,tp,tp,false,true,POS_FACEUP_ATTACK)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end end
\ No newline at end of file
......@@ -34,7 +34,7 @@ function c66660028.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveCounter(tp,0x666,10,REASON_COST)
end
function c66660028.filter(c,e,tp)
return c:IsSetCard(0x666) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
return c:IsSetCard(0x666) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c66660028.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66660028.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
......@@ -47,6 +47,7 @@ function c66660028.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c66660028.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP_ATTACK)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)
tc:CompleteProcedure()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end end
\ No newline at end of file
......@@ -34,7 +34,7 @@ function c66660029.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveCounter(tp,0x666,10,REASON_COST)
end
function c66660029.filter(c,e,tp)
return c:IsSetCard(0x666) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
return c:IsSetCard(0x666) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c66660029.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66660029.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
......@@ -47,6 +47,7 @@ function c66660029.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c66660029.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,true,POS_FACEUP_ATTACK)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)
tc:CompleteProcedure()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end end
\ No newline at end of file
--布丁的幻想
function c85401500.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c85401500.cd)
e1:SetTarget(c85401500.tg)
e1:SetOperation(c85401500.op)
c:RegisterEffect(e1)
end
function c85401500.filter(c)
return c:IsFaceup() and c:GetAttack()>0
end
function c85401500.gl(c)
return c:IsCode(85400000)
end
function c85401500.cd(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
local sg=g:Filter(c85401500.gl,nil)
return sg:GetCount()>0
end
function c85401500.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c85401500.filter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c85401500.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,0,0)
end
function c85401500.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c85401500.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tg=g:GetMaxGroup(Card.GetAttack)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT)
end
end
end
\ No newline at end of file
--公主宝珠
function c85401700.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE)
e1:SetTarget(c85401700.tg)
e1:SetOperation(c85401700.op)
c:RegisterEffect(e1)
------回手效果
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_HAND)
e2:SetTarget(c85401700.reptg)
e2:SetValue(c85401700.repval)
e2:SetOperation(c85401700.repop)
c:RegisterEffect(e2)
-------手卡代破
end
function c85401700.fll(c)
return c:IsSetCard(0x6e45)
end
function c85401700.fl(c,tp)
local g=c:GetEquipGroup()
local sg=g:Filter(c85401700.fll,nil)
return c:IsSetCard(0x3e45) and c:IsAbleToHand() and sg:GetCount()>0
end
function c85401700.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsFaceup() and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c85401700.fl(chkc) end
if chk==0 then return Duel.IsExistingTarget(c85401700.fl,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c85401700.fl,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_MZONE)
end
function c85401700.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(LOCATION_REMOVED+LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD+LOCATION_GRAVE)
e4:SetValue(c85401700.linklimit)
tc:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e5)
local e6=e4:Clone()
e6:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
tc:RegisterEffect(e6)
local e7=e4:Clone()
e6:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e7)
tc:RegisterFlagEffect(85401700,RESET_EVENT,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(85401700,1))
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
function c85401700.linklimit(e,c)
if not c then return false end
return not c:IsSetCard(0xe45)
end
function c85401700.flll(c,tp)
return c:IsPosition(POS_FACEUP) and c:IsSetCard(0x3e45) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT))
end
function c85401700.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c85401700.flll,1,nil,tp) end
return Duel.SelectYesNo(tp,aux.Stringid(85401700,0))
end
function c85401700.repval(e,c)
return c85401700.flll(c,e:GetHandlerPlayer())
end
function c85401700.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
--圣迹与神殿的调查
function c85401890.initial_effect(c)
c:EnableCounterPermit(0xe43)
c:EnableCounterPermit(0xe46)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetOperation(c85401890.spop)
c:RegisterEffect(e1)
------场地发动时将flag数量转化为指示物数量
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_FZONE)
e2:SetOperation(c85401890.op)
c:RegisterEffect(e2)
------放置指示物
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH)
e3:SetDescription(aux.Stringid(85401890,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_FZONE)
e3:SetCost(c85401890.costxs)
e3:SetTarget(c85401890.tgxs)
e3:SetOperation(c85401890.opxs)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SEARCH)
e4:SetDescription(aux.Stringid(85401890,0))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_FZONE)
e4:SetCost(c85401890.costbz)
e4:SetTarget(c85401890.tgbz)
e4:SetOperation(c85401890.opbz)
c:RegisterEffect(e4)
------使用指示物
--- local e5=Effect.CreateEffect(c)
--- e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
--- e5:SetCode(EFFECT_DESTROY_REPLACE)
--- e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
--- e5:SetRange(LOCATION_FZONE)
--- e5:SetTarget(c85401890.desreptg)
--- e5:SetOperation(c85401890.desrepop)
--- c:RegisterEffect(e5)
------代替破坏
--- local e6=Effect.CreateEffect(c)
--- e6:SetDescription(aux.Stringid(85401890,3))
--- e6:SetCategory(CATEGORY_NEGATE)
--- e6:SetType(EFFECT_TYPE_QUICK_O)
--- e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
--- e6:SetCode(EVENT_BECOME_TARGET)
--- e6:SetRange(LOCATION_FZONE)
--- e6:SetCountLimit(1,85401890)
--- e6:SetCondition(c85401890.negcon)
--- e6:SetCost(c85401890.negcost)
--- e6:SetTarget(c85401890.negtg)
--- e6:SetOperation(c85401890.negop)
--- c:RegisterEffect(e6)
------无效效果
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_LEAVE_FIELD_P)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e7:SetOperation(c85401890.damp)
e7:SetRange(LOCATION_FZONE)
c:RegisterEffect(e7)
------离场前获得指示物数量
end
function c85401890.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsReason(REASON_RULE)
and e:GetHandler():GetCounter(0xe43)>=1 and e:GetHandler():GetCounter(0xe46)>=1 end
return Duel.SelectYesNo(tp,aux.Stringid(85401890,2))
end
function c85401890.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(ep,0xe43,1,REASON_EFFECT)
e:GetHandler():RemoveCounter(ep,0xe46,1,REASON_EFFECT)
end
function c85401890.fl(c)
return c:GetReason(REASON_BATTLE) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c85401890.fll(c)
return c:GetReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c85401890.flll(c)
return c:IsSetCard(0x6e45) and c:IsAbleToHand()
end
function c85401890.fllll(c)
return c:IsCode(85401700) and c:IsAbleToHand()
end
function c85401890.op(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c85401890.fl,nil)
local cb=eg:FilterCount(c85401890.fll,nil)
if ct>0 then
e:GetHandler():AddCounter(0xe43,ct)
elseif cb>0 then
e:GetHandler():AddCounter(0xe46,cb)
end
end
function c85401890.costbz(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetCounter(0xe43)>2 and e:GetHandler():IsCanRemoveCounter(tp,0xe43,3,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveCounter(tp,0xe43,3,REASON_COST)
end
function c85401890.x1(c)
return aux.IsCodeListed(c,85402400) and c:IsFaceup()
end
function c85401890.tgbz(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroupCount(c85401890.x1,tp,LOCATION_ONFIELD,0,nil)
local b1=Duel.GetMatchingGroupCount(c85401890.fllll,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)>0
if chk==0 then return Duel.GetMatchingGroupCount(c85401890.fllll,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)>0 or (g>0 and b1) end
Duel.SetOperationInfo(0,CATEGORY_SEARCH,nil,1,0,0)
end
function c85401890.opbz(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if Duel.GetMatchingGroupCount(c85401890.x1,tp,LOCATION_ONFIELD,0,nil)>0 then
local g=Duel.SelectMatchingCard(tp,c85401890.fllll,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
else
local g=Duel.SelectMatchingCard(tp,c85401890.fllll,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c85401890.costxs(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetCounter(0xe46)>2 and e:GetHandler():IsCanRemoveCounter(tp,0xe46,3,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveCounter(tp,0xe46,3,REASON_COST)
end
function c85401890.x(c)
return aux.IsCodeListed(c,85402400) and c:IsFaceup()
end
function c85401890.tgxs(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetMatchingGroupCount(c85401890.x,tp,LOCATION_ONFIELD,0,nil)>0 then
local b1=Duel.GetMatchingGroupCount(c85401890.flll,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)>0
end
if chk==0 then return Duel.GetMatchingGroupCount(c85401890.flll,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)>0 or b1 end
Duel.SetOperationInfo(0,CATEGORY_SEARCH,nil,1,0,0)
end
function c85401890.opxs(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if Duel.GetMatchingGroupCount(c85401890.x,tp,LOCATION_ONFIELD,0,nil)>0 then
local g=Duel.SelectMatchingCard(tp,c85401890.flll,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
else
local g=Duel.SelectMatchingCard(tp,c85401890.flll,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c85401890.negcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c85401890.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetCounter(0xe46)>0 and e:GetHandler():IsCanRemoveCounter(tp,0xe46,1,REASON_COST) and e:GetHandler():GetCounter(0xe43)>0 and e:GetHandler():IsCanRemoveCounter(tp,0xe43,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0xe46,1,REASON_COST)
e:GetHandler():RemoveCounter(tp,0xe43,1,REASON_COST)
end
function c85401890.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c85401890.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
function c85401890.damp(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetCounter(0xe43)
if ct>0 then
for i=1,ct,1 do
Duel.RegisterFlagEffect(tp,85401890,RESET_EVENT,0,0)
end
end
local cb=c:GetCounter(0xe46)
if cb>0 then
for i=1,cb,1 do
Duel.RegisterFlagEffect(tp,85401891,RESET_EVENT,0,0)
end
end
end
function c85401890.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetFlagEffect(tp,85401890)
if ct>0 then
c:AddCounter(0xe43,ct)
Duel.ResetFlagEffect(tp,85401890)
end
local cb=Duel.GetFlagEffect(tp,85401891)
if cb>0 then
c:AddCounter(0xe46,cb)
Duel.ResetFlagEffect(tp,85401891)
end
end
--初音
c85402200.dfc_front_side=85402200
c85402200.dfc_back_side=85402210
---日月面变化公式
function c85402200.initial_effect(c)
--- local e5=Effect.CreateEffect(c)
--- e5:SetCategory(CATEGORY_DISABLE)
--- e5:SetType(EFFECT_TYPE_IGNITION)
--- e5:SetCode(EVENT_FREE_CHAIN)
--- e5:SetRange(LOCATION_MZONE)
--- e5:SetCountLimit(1)
--- e5:SetCondition(c85402200.cd)
--- e5:SetTarget(c85402200.tg)
--- e5:SetOperation(c85402200.op)
--- c:RegisterEffect(e5)
------无效效果
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE)
e1:SetCondition(c85402200.con1)
e1:SetTarget(c85402200.tg1)
e1:SetOperation(c85402200.op1)
c:RegisterEffect(e1)
------特殊召唤变月面
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SPSUM_PARAM)
e2:SetRange(LOCATION_HAND)
e2:SetTargetRange(POS_FACEUP,0)
e2:SetCondition(c85402200.spcon)
c:RegisterEffect(e2)
------从手卡特殊召唤
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
e3:SetTargetRange(1,0)
e3:SetTarget(c85402200.reck)
e3:SetCondition(c85402200.pcon)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e4)
------不能召唤、覆盖怪兽
end
function c85402200.reck(e,c,sump,sumtype,sumpos,targetp)
return c:IsCode(85402200)
end
function c85402200.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(85401700)>0
end
function c85402200.pcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(85401700)>0
end
function c85402200.spcon(e,c)
if c==nil then return true end
return e:GetHandler():GetFlagEffect(85401700)>0
end
function c85402200.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c85402200.fl(c,e)
return c:IsDestructable() and c:IsFaceup() and ((c:GetDefense()<=e:GetHandler():GetAttack()-1200 and c:IsType(TYPE_EFFECT)) or (c:GetDefense()<=e:GetHandler():GetAttack()-800 and c:IsType(TYPE_NORMAL)))
end
function c85402200.f(c)
return c:IsType(TYPE_EFFECT) and c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_MONSTER)
end
function c85402200.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tcode=c.dfc_back_side
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,1,85402210)
local g=Duel.GetMatchingGroup(c85402200.f,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tg=g:GetMaxGroup(Card.GetAttack)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
if tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1+PHASE_MAIN2)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1+PHASE_MAIN2)
tc:RegisterEffect(e2)
if tc:GetDefense()+tc:GetLink()*700<=e:GetHandler():GetAttack()-1500 then
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
end
end
function c85402200.cd(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(85402200)==0
end
function c85402200.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tg=g:GetMaxGroup(Card.GetAttack)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
if tc:GetDefense()<=e:GetHandler():GetAttack()-1500 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
end
end
end
function c85402200.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tg=g:GetMaxGroup(Card.GetAttack)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
if tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1+PHASE_MAIN2)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1+PHASE_MAIN2)
tc:RegisterEffect(e2)
if tc:GetDefense()<=e:GetHandler():GetAttack()-1500 then
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.Destroy(tc,REASON_EFFECT)
end
e:GetHandler():RegisterFlagEffect(85402200,RESET_EVENT+RESET_PHASE+PHASE_END,0,4)
end
end
end
end
--初音 六星开花
function c85402210.initial_effect(c)
c:SetUniqueOnField(1,0,85402210)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SPSUM_PARAM)
e2:SetRange(LOCATION_HAND)
e2:SetTargetRange(POS_FACEUP,0)
c:RegisterEffect(e2)
------从手卡特殊召唤
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetTarget(c85402210.tg)
e3:SetOperation(c85402210.op)
c:RegisterEffect(e3)
------特殊召唤效果
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(85402210,1))
e4:SetCategory(CATEGORY_DEFCHANGE)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c85402210.fb)
e4:SetOperation(c85402210.bf)
c:RegisterEffect(e4)
------降低对方守备力
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(85402210,0))
e5:SetCategory(CATEGORY_DISABLE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c85402210.cd)
e5:SetTarget(c85402210.tg1)
e5:SetOperation(c85402210.op1)
c:RegisterEffect(e5)
------无效效果
end
function c85402210.tgg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c85402210.fl(c,e)
return c:IsDestructable() and c:IsFaceup() and ((c:GetDefense()<=e:GetHandler():GetAttack()-1000 and c:IsType(TYPE_EFFECT)) or (c:GetDefense()<=e:GetHandler():GetAttack()-500 and c:IsType(TYPE_NORMAL)))
end
function c85402210.opp(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c85402210.fl,tp,0,LOCATION_MZONE,nil,e)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c85402210.fc(c)
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c85402210.fb(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85402210.fc,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,nil,1,0,0)
end
function c85402210.bf(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c85402210.fc,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tg=g:GetMaxGroup(Card.GetAttack)
if tg:GetCount()>0 then
local bg=tg:RandomSelect(tp,1)
local bc=bg:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetValue(-500)
bc:RegisterEffect(e1)
end
end
end
function c85402210.cd(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(85402210)==0 and Duel.GetTurnPlayer()==1-tp
end
function c85402210.f(c)
return c:IsType(TYPE_EFFECT) and c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_MONSTER)
end
function c85402210.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85402210.f,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0)
local g=Duel.GetMatchingGroup(c85402210.f,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tg=g:GetMaxGroup(Card.GetAttack)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
if tc:GetDefense()+tc:GetLink()*700<=e:GetHandler():GetAttack()-1200 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
end
end
end
function c85402210.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c85402210.f,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tg=g:GetMaxGroup(Card.GetAttack)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
if tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1+PHASE_MAIN2+PHASE_BATTLE)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1+PHASE_MAIN2+PHASE_BATTLE)
tc:RegisterEffect(e2)
if tc:GetDefense()+tc:GetLink()*700<=e:GetHandler():GetAttack()-1200 then
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
end
end
function c85402210.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85402210.f,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0)
local g=Duel.GetMatchingGroup(c85402210.f,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tg=g:GetMaxGroup(Card.GetAttack)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
if tc:GetDefense()+tc:GetLink()*700<=e:GetHandler():GetAttack()-1200 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
end
end
end
function c85402210.op1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c85402210.f,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tg=g:GetMaxGroup(Card.GetAttack)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
if tc:IsFaceup() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1+PHASE_MAIN2+PHASE_BATTLE)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_MAIN1+PHASE_MAIN2+PHASE_BATTLE)
tc:RegisterEffect(e2)
if tc:GetDefense()+tc:GetLink()*700<=e:GetHandler():GetAttack()-1200 then
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.Destroy(tc,REASON_EFFECT)
end
e:GetHandler():RegisterFlagEffect(85402210,RESET_EVENT+RESET_PHASE+RESET_OPPO_TURN+PHASE_END,EFFECT_FLAG_CLIENT_HINT,2,0,aux.Stringid(85402210,2))
end
end
end
end
--流星☆蝴蝶结/初音·专属
function c85402220.initial_effect(c)
aux.AddCodeList(c,85410000)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c85402220.fl)
c:RegisterEffect(e1)
------对象限制
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c85402220.target)
e2:SetOperation(c85402220.operation)
c:RegisterEffect(e2)
------装备手续
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(400)
c:RegisterEffect(e3)
------提升攻击力
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DEFCHANGE)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c85402220.ee)
e4:SetTarget(c85402220.fb)
e4:SetOperation(c85402220.bf)
c:RegisterEffect(e4)
------降低对方守备力
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e5:SetCost(c85402220.cost)
e5:SetTarget(c85402220.ta)
e5:SetOperation(c85402220.ac)
c:RegisterEffect(e5)
------除外效果
end
c85402220.assault_name=85402200
function c85402220.fl(e,c)
return c:IsCode(85402200)
end
function c85402220.fll(c)
return c:IsFaceup() and c:IsCode(85402200)
end
function c85402220.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c85402220.fll(chkc) end
if chk==0 then return Duel.IsExistingTarget(c85402220.fll,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c85402220.fll,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c85402220.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c85402220.ee(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c85402220.fb(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85402220.fc,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DEFCHANGE,nil,1,0,0)
end
function c85402220.fc(c)
return c:IsFaceup() and not c:IsType(TYPE_LINK)
end
function c85402220.bf(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c85402220.fc,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tg=g:GetMaxGroup(Card.GetAttack)
if tg:GetCount()>0 then
local bg=tg:RandomSelect(tp,1)
local bc=bg:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(-300)
bc:RegisterEffect(e1)
end
end
end
function c85402220.f(c,e,tp)
return c:IsCode(85402200,85402210) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c85402220.f1(c)
return c:IsCode(85402300) and c:IsAbleToDeck()
end
function c85402220.f2(c)
return c:IsCode(85402320) and c:IsAbleToHand()
end
function c85402220.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c85402220.ta(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85402220.f,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
local g=Duel.GetMatchingGroup(c85402220.f1,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
local gg=Duel.GetMatchingGroup(c85402220.f2,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
end
end
function c85402220.ac(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c85402220.f),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local gg=Duel.SelectMatchingCard(tp,c85402220.f1,tp,LOCATION_GRAVE,0,1,1,nil)
if gg:GetCount()>0 then
local tc=e:GetHandler()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
Duel.SendtoDeck(gg,nil,2,REASON_EFFECT)
local ggg=Duel.SelectMatchingCard(tp,c85402220.f2,tp,LOCATION_GRAVE,0,1,1,nil)
if ggg:GetCount()>0 then
Duel.SendtoHand(ggg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,ggg)
end
end
end
end
--栞
function c85402300.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE)
e1:SetCondition(c85402300.con1)
e1:SetOperation(c85402300.op1)
c:RegisterEffect(e1)
------特殊召唤
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c85402300.cd)
e2:SetTarget(c85402300.target)
e2:SetOperation(c85402300.operation)
c:RegisterEffect(e2)
------爱酱嘟哇噜
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE)
e3:SetOperation(c85402300.op2)
c:RegisterEffect(e3)
------特殊召唤增加效果次数
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_BATTLE)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c85402300.con3)
e4:SetTarget(c85402300.tg3)
e4:SetOperation(c85402300.op3)
c:RegisterEffect(e4)
------发动效果后回卡组
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_REMOVE)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetTarget(c85402300.tg4)
e5:SetOperation(c85402300.op4)
c:RegisterEffect(e5)
------除外抽卡
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TODECK)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_CHANGE_POS)
e6:SetRange(LOCATION_MZONE)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetTarget(c85402300.tg5)
e6:SetCondition(c85402300.con5)
e6:SetOperation(c85402300.op5)
c:RegisterEffect(e6)
------变为里侧抽卡
--- local e7=Effect.CreateEffect(c)
--- e7:SetType(EFFECT_TYPE_SINGLE)
--- e7:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
--- e7:SetValue(1)
--- c:RegisterEffect(e7)
------己方不受战斗伤害
end
function c85402300.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
end
function c85402300.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
end
function c85402300.tg5(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
end
function c85402300.fl(c)
return c:IsFaceup() and c:IsCode(85402200,85402210)
end
function c85402300.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c85402300.fl,tp,LOCATION_MZONE,0,1,nil)
end
function c85402300.op1(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(200)
e1:SetReset(RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c85402300.cd(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(85402300)>e:GetHandler():GetFlagEffect(85402301)
end
function c85402300.gl(c)
return c:IsFaceup()
end
function c85402300.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c85402300.gl(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c85402300.gl,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c85402300.gl,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,0,0)
end
function c85402300.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:GetAttack()<e:GetHandler():GetAttack() then
Duel.CalculateDamage(e:GetHandler(),tc,false)
end
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(800)
e1:SetReset(RESET_PHASE+PHASE_END,3)
e:GetHandler():RegisterEffect(e1)
e:GetHandler():RegisterFlagEffect(85402301,RESET_EVENT,0,0)
e:GetHandler():RegisterFlagEffect(85402303,RESET_EVENT+RESET_PHASE+PHASE_END,0,1)
end
function c85402300.op2(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(85402300,RESET_EVENT,0,0)
end
function c85402300.con3(e,tp,eg,ep,ev,re,r,rp)
return (e:GetHandler():GetAttackedCount()>0 or e:GetHandler():GetBattledGroupCount()>0) or e:GetHandler():GetFlagEffect(85402303)>0
end
function c85402300.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
function c85402300.op4(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
function c85402300.con5(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c85402300.op5(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
--初音亲手制作的守护石/栞·专属
function c85402310.initial_effect(c)
aux.AddCodeList(c,85410000)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c85402310.fl)
c:RegisterEffect(e1)
------对象限制
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c85402310.target)
e2:SetOperation(c85402310.operation)
c:RegisterEffect(e2)
------装备手续
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(500)
c:RegisterEffect(e3)
------提升攻击力
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c85402310.ee)
e4:SetOperation(c85402310.bf)
c:RegisterEffect(e4)
------效果发动提升攻击力
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_DESTROY_REPLACE)
e5:SetTarget(c85402310.destg)
e5:SetOperation(c85402310.desop)
c:RegisterEffect(e5)
------装备时代替破坏
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TODECK)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_GRAVE)
e6:SetCost(c85402310.spcost)
e6:SetTarget(c85402310.sptg)
e6:SetOperation(c85402310.spop)
c:RegisterEffect(e6)
------墓地回卡组
end
c85402310.assault_name=85402300
function c85402310.fl(e,c)
return c:IsCode(85402300)
end
function c85402310.fll(c)
return c:IsFaceup() and c:IsCode(85402300)
end
function c85402310.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c85402310.fll(chkc) end
if chk==0 then return Duel.IsExistingTarget(c85402310.fll,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c85402310.fll,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c85402310.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function c85402310.ee(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()==e:GetHandler():GetEquipTarget()
end
function c85402310.bf(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler():GetEquipTarget())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(200)
e1:SetReset(RESET_PHASE+PHASE_END,3)
e:GetHandler():GetEquipTarget():RegisterEffect(e1)
end
function c85402310.bcbcbcb(c,tp)
return c:IsCode(85402320) and c:IsAbleToDeck()
end
function c85402310.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=c:GetEquipTarget()
if chk==0 then return c:IsDestructable(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) and c:IsAbleToDeck()
and tc and tc:IsPosition(POS_FACEUP) and tc:IsAbleToDeck() end
return Duel.SelectEffectYesNo(tp,c,aux.Stringid(85402310,0))
end
function c85402310.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetEquipTarget()
Duel.SendtoDeck(c,nil,2,REASON_EFFECT+REASON_REPLACE)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT+REASON_REPLACE)
if Duel.IsExistingMatchingCard(c85402310.bcbcbcb,tp,LOCATION_REMOVED,0,1,nil,tp) then
local g=Duel.GetMatchingGroup(c85402310.bcbcbcb,tp,LOCATION_REMOVED,0,nil,tp)
local tg=g:RandomSelect(tp,1)
if tg==nil then return end
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT+REASON_REPLACE)
end
end
function c85402310.tdfilter(c)
return c:IsCode(85402300) and c:IsAbleToDeck()
end
function c85402310.tdf(c)
return c:IsCode(85402320) and c:IsAbleToDeckAsCost()
end
function c85402310.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85402310.tdf,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c85402310.tdf,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c85402310.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c85402310.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c85402310.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and e:GetHandler():IsAbleToHandAsCost() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c85402310.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c85402310.spop(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.SendtoHand(e:GetHandler(),tp,REASON_EFFECT)
end
end
--兰德索尔的小商铺
function c85402330.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetOperation(c85402330.op)
c:RegisterEffect(e2)
------放置指示物
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetDescription(aux.Stringid(85402330,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PREDRAW)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c85402330.conbz)
e3:SetCost(c85402330.costbz)
e3:SetTarget(c85402330.tgbz)
e3:SetOperation(c85402330.opbz)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e4:SetDescription(aux.Stringid(85402330,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PREDRAW)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c85402330.concs)
e4:SetCost(c85402330.costcs)
e4:SetTarget(c85402330.tgcs)
e4:SetOperation(c85402330.opcs)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SEARCH)
e5:SetDescription(aux.Stringid(85402330,2))
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_PREDRAW)
e5:SetRange(LOCATION_SZONE)
e5:SetCondition(c85402330.consk)
e5:SetCost(c85402330.costsk)
e5:SetTarget(c85402330.tgsk)
e5:SetOperation(c85402330.opsk)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TODECK)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_GRAVE)
e6:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e6:SetCost(c85402330.cost1)
e6:SetTarget(c85402330.sptg1)
e6:SetOperation(c85402330.spop1)
c:RegisterEffect(e6)
------墓地回卡组
end
function c85402330.op(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x1e41,1)
end
function c85402330.f(c)
return c:IsCode(85402200,85402210)
end
function c85402330.g(c)
return c:IsCode(85402320) and c:IsAbleToHand()
end
function c85402330.fl(c)
return c:IsCode(85402200) and c:IsPosition(POS_FACEUP)
end
function c85402330.fll(c,e,tp)
return c:IsCode(85402300) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c85402330.flll(c)
return c:IsCode(85402320) and c:IsAbleToGrave()
end
function c85402330.flll1(c)
return c:IsCode(85402320) and c:IsAbleToHand()
end
function c85402330.fllll2(c)
return c:IsCode(85402200,85402210)
end
function c85402330.conbz(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c85402330.f,tp,LOCATION_MZONE+LOCATION_HAND,0,nil)==0
end
function c85402330.costbz(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetCounter(0x1e41)>2 and e:GetHandler():IsCanRemoveCounter(tp,0x1e41,3,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveCounter(tp,0x1e41,3,REASON_COST)
end
function c85402330.tgbz(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,0,0)
end
function c85402330.opbz(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
function c85402330.concs(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c85402330.fl,tp,LOCATION_MZONE,0,nil)>0
end
function c85402330.costcs(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetCounter(0x1e41)>2 and e:GetHandler():IsCanRemoveCounter(tp,0x1e41,3,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveCounter(tp,0x1e41,3,REASON_COST)
end
function c85402330.tgcs(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85402330.fll,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c85402330.flll,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,0,0)
end
function c85402330.opcs(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c85402330.flll,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local ggg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c85402330.fll),tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(ggg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c85402330.consk(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c85402330.f,tp,LOCATION_HAND,0,nil)>0
end
function c85402330.costsk(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetCounter(0x1e41)>2 and e:GetHandler():IsCanRemoveCounter(tp,0x1e41,3,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveCounter(tp,0x1e41,3,REASON_COST)
end
function c85402330.tgsk(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85402330.flll1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,0,0)
end
function c85402330.opsk(e,tp,eg,ep,ev,re,r,rp)
local ggg=Duel.SelectMatchingCard(tp,c85402330.fllll2,tp,LOCATION_HAND,0,1,1,nil)
if ggg:GetCount()>0 then
Duel.ConfirmCards(1-tp,ggg)
Duel.ShuffleHand(tp)
end
local g=Duel.SelectMatchingCard(tp,c85402330.flll1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
end
end
function c85402330.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end
function c85402330.spfilter1(c)
return c:IsCode(85402320) and c:IsAbleToDeck()
end
function c85402330.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c85402330.spfilter1,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.GetMatchingGroup(c85402330.spfilter1,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
if g:GetCount()>1 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
end
function c85402330.spop1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c85402330.spfilter1,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
local b=Duel.SendtoDeck(g,tp,2,REASON_EFFECT)
if b>1 then
local h=Duel.SelectMatchingCard(tp,c85402330.g,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(h,tp,REASON_EFFECT)
end
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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