Commit cbdc82c5 authored by Nemo Ma's avatar Nemo Ma

update 211107

130 cards
parent fd9ed100
No preview for this file type
expansions/pics/111006.jpg

387 KB | W: | H:

expansions/pics/111006.jpg

49.7 KB | W: | H:

expansions/pics/111006.jpg
expansions/pics/111006.jpg
expansions/pics/111006.jpg
expansions/pics/111006.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/29002019.jpg

56.8 KB | W: | H:

expansions/pics/29002019.jpg

58.2 KB | W: | H:

expansions/pics/29002019.jpg
expansions/pics/29002019.jpg
expansions/pics/29002019.jpg
expansions/pics/29002019.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/29002020.jpg

56.3 KB | W: | H:

expansions/pics/29002020.jpg

57 KB | W: | H:

expansions/pics/29002020.jpg
expansions/pics/29002020.jpg
expansions/pics/29002020.jpg
expansions/pics/29002020.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/29010019.jpg

715 KB | W: | H:

expansions/pics/29010019.jpg

55.4 KB | W: | H:

expansions/pics/29010019.jpg
expansions/pics/29010019.jpg
expansions/pics/29010019.jpg
expansions/pics/29010019.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/29010020.jpg

41.8 KB | W: | H:

expansions/pics/29010020.jpg

44.7 KB | W: | H:

expansions/pics/29010020.jpg
expansions/pics/29010020.jpg
expansions/pics/29010020.jpg
expansions/pics/29010020.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/29065500.jpg

52.6 KB | W: | H:

expansions/pics/29065500.jpg

49.1 KB | W: | H:

expansions/pics/29065500.jpg
expansions/pics/29065500.jpg
expansions/pics/29065500.jpg
expansions/pics/29065500.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/29065501.jpg

53.2 KB | W: | H:

expansions/pics/29065501.jpg

49.9 KB | W: | H:

expansions/pics/29065501.jpg
expansions/pics/29065501.jpg
expansions/pics/29065501.jpg
expansions/pics/29065501.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/29065506.jpg

48.9 KB | W: | H:

expansions/pics/29065506.jpg

49.1 KB | W: | H:

expansions/pics/29065506.jpg
expansions/pics/29065506.jpg
expansions/pics/29065506.jpg
expansions/pics/29065506.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/29065512.jpg

49.8 KB | W: | H:

expansions/pics/29065512.jpg

50 KB | W: | H:

expansions/pics/29065512.jpg
expansions/pics/29065512.jpg
expansions/pics/29065512.jpg
expansions/pics/29065512.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200005.jpg

183 KB | W: | H:

expansions/pics/33200005.jpg

230 KB | W: | H:

expansions/pics/33200005.jpg
expansions/pics/33200005.jpg
expansions/pics/33200005.jpg
expansions/pics/33200005.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200008.jpg

149 KB | W: | H:

expansions/pics/33200008.jpg

188 KB | W: | H:

expansions/pics/33200008.jpg
expansions/pics/33200008.jpg
expansions/pics/33200008.jpg
expansions/pics/33200008.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200014.jpg

150 KB | W: | H:

expansions/pics/33200014.jpg

192 KB | W: | H:

expansions/pics/33200014.jpg
expansions/pics/33200014.jpg
expansions/pics/33200014.jpg
expansions/pics/33200014.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200032.jpg

138 KB | W: | H:

expansions/pics/33200032.jpg

173 KB | W: | H:

expansions/pics/33200032.jpg
expansions/pics/33200032.jpg
expansions/pics/33200032.jpg
expansions/pics/33200032.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200041.jpg

167 KB | W: | H:

expansions/pics/33200041.jpg

209 KB | W: | H:

expansions/pics/33200041.jpg
expansions/pics/33200041.jpg
expansions/pics/33200041.jpg
expansions/pics/33200041.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200261.jpg

123 KB | W: | H:

expansions/pics/33200261.jpg

152 KB | W: | H:

expansions/pics/33200261.jpg
expansions/pics/33200261.jpg
expansions/pics/33200261.jpg
expansions/pics/33200261.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200264.jpg

143 KB | W: | H:

expansions/pics/33200264.jpg

179 KB | W: | H:

expansions/pics/33200264.jpg
expansions/pics/33200264.jpg
expansions/pics/33200264.jpg
expansions/pics/33200264.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200400.jpg

154 KB | W: | H:

expansions/pics/33200400.jpg

216 KB | W: | H:

expansions/pics/33200400.jpg
expansions/pics/33200400.jpg
expansions/pics/33200400.jpg
expansions/pics/33200400.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200404.jpg

151 KB | W: | H:

expansions/pics/33200404.jpg

212 KB | W: | H:

expansions/pics/33200404.jpg
expansions/pics/33200404.jpg
expansions/pics/33200404.jpg
expansions/pics/33200404.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200407.jpg

159 KB | W: | H:

expansions/pics/33200407.jpg

226 KB | W: | H:

expansions/pics/33200407.jpg
expansions/pics/33200407.jpg
expansions/pics/33200407.jpg
expansions/pics/33200407.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200409.jpg

154 KB | W: | H:

expansions/pics/33200409.jpg

217 KB | W: | H:

expansions/pics/33200409.jpg
expansions/pics/33200409.jpg
expansions/pics/33200409.jpg
expansions/pics/33200409.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200411.jpg

142 KB | W: | H:

expansions/pics/33200411.jpg

200 KB | W: | H:

expansions/pics/33200411.jpg
expansions/pics/33200411.jpg
expansions/pics/33200411.jpg
expansions/pics/33200411.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200412.jpg

147 KB | W: | H:

expansions/pics/33200412.jpg

209 KB | W: | H:

expansions/pics/33200412.jpg
expansions/pics/33200412.jpg
expansions/pics/33200412.jpg
expansions/pics/33200412.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200413.jpg

158 KB | W: | H:

expansions/pics/33200413.jpg

224 KB | W: | H:

expansions/pics/33200413.jpg
expansions/pics/33200413.jpg
expansions/pics/33200413.jpg
expansions/pics/33200413.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200415.jpg

129 KB | W: | H:

expansions/pics/33200415.jpg

182 KB | W: | H:

expansions/pics/33200415.jpg
expansions/pics/33200415.jpg
expansions/pics/33200415.jpg
expansions/pics/33200415.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200418.jpg

162 KB | W: | H:

expansions/pics/33200418.jpg

229 KB | W: | H:

expansions/pics/33200418.jpg
expansions/pics/33200418.jpg
expansions/pics/33200418.jpg
expansions/pics/33200418.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200419.jpg

160 KB | W: | H:

expansions/pics/33200419.jpg

226 KB | W: | H:

expansions/pics/33200419.jpg
expansions/pics/33200419.jpg
expansions/pics/33200419.jpg
expansions/pics/33200419.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200420.jpg

160 KB | W: | H:

expansions/pics/33200420.jpg

225 KB | W: | H:

expansions/pics/33200420.jpg
expansions/pics/33200420.jpg
expansions/pics/33200420.jpg
expansions/pics/33200420.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33200421.jpg

169 KB | W: | H:

expansions/pics/33200421.jpg

238 KB | W: | H:

expansions/pics/33200421.jpg
expansions/pics/33200421.jpg
expansions/pics/33200421.jpg
expansions/pics/33200421.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/76029000.jpg

393 KB | W: | H:

expansions/pics/76029000.jpg

381 KB | W: | H:

expansions/pics/76029000.jpg
expansions/pics/76029000.jpg
expansions/pics/76029000.jpg
expansions/pics/76029000.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/76029002.jpg

391 KB | W: | H:

expansions/pics/76029002.jpg

358 KB | W: | H:

expansions/pics/76029002.jpg
expansions/pics/76029002.jpg
expansions/pics/76029002.jpg
expansions/pics/76029002.jpg
  • 2-up
  • Swipe
  • Onion skin
--
local m=111006
local cm=_G["c"..m]
cm.named_with_Arknight=1
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),1)
......
--方舟骑士-塞雷娅
c115020.named_with_Arknight=1
function c115020.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_RECOVER)
e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,115020)
e1:SetCost(c115020.spcost)
e1:SetTarget(c115020.sptg)
e1:SetOperation(c115020.spop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,115021)
e2:SetCost(c115020.incost)
e2:SetTarget(c115020.intg)
e2:SetOperation(c115020.inop)
c:RegisterEffect(e2)
--Recover
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,115022)
e4:SetTarget(c115020.rectg)
e4:SetOperation(c115020.recop)
c:RegisterEffect(e4)
end
function c115020.thfil(c)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c115020.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,Duel.GetLP(tp)/2) end
Duel.PayLPCost(tp,Duel.GetLP(tp)/2)
end
function c115020.spfil(c,e,tp)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c115020.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.IsExistingMatchingCard(c115020.thfil,tp,LOCATION_DECK,0,1,nil,e,tp,check) end
end
function c115020.spop(e,tp,eg,ep,ev,re,r,rp)
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c115020.thfil,tp,LOCATION_DECK,0,1,1,nil,e,tp,check)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not (check and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)) or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c115020.incost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c115020.intg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c115020.inop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTarget(c115020.imtg)
e1:SetValue(1)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
Duel.RegisterEffect(e2,tp)
end
function c115020.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and e:GetHandler():IsReason(REASON_EFFECT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function c115020.recop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCountFromEx(tp,tp,nil,c)<=0 then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) then
Duel.BreakEffect()
local atk=c:GetAttack()
Duel.Recover(tp,atk,REASON_EFFECT)
end
end
function c115020.imtg(e,c)
return c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight
end
\ No newline at end of file
--方舟骑士-临光
c115023.named_with_Arknight=1
function c115023.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,115023)
e1:SetTarget(c115023.sptg1)
e1:SetOperation(c115023.spop1)
c:RegisterEffect(e1)
c115023.summon_effect=e1
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,115024)
e2:SetCondition(c115023.spcon)
e2:SetTarget(c115023.sptg)
e2:SetOperation(c115023.spop)
c:RegisterEffect(e2)
end
function c115023.cfilter2(c,tp)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_ONFIELD)
and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP)
end
function c115023.spcon(e,tp,eg,ep,ev,re,r,rp)
if eg:IsContains(e:GetHandler()) then return false end
return eg:IsExists(c115023.cfilter2,1,nil,tp)
end
function c115023.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800)
end
function c115023.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) then
Duel.BreakEffect()
Duel.Recover(tp,800,REASON_EFFECT)
end
end
function c115023.spfil(c,e,tp)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c115023.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c115023.spfil,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c115023.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c115023.spfil,tp,LOCATION_DECK,0,nil,e,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or g:GetCount()<=0 then return end
local sg=g:Select(tp,1,1,nil)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) then
--
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetProperty(EFFECT_FLAG_IGNORE_RANGE)
e2:SetTarget(c115023.actfilter)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c115023.actfilter(e,c)
return c:GetControler()==e:GetHandlerPlayer() and not (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsType(TYPE_MONSTER)
end
\ No newline at end of file
--方舟骑士-瑕光
c115025.named_with_Arknight=1
function c115025.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,115025)
e1:SetCost(c115025.thcost)
e1:SetTarget(c115025.thtg)
e1:SetOperation(c115025.thop)
c:RegisterEffect(e1)
--set
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_RECOVER)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,115026)
e3:SetTarget(c115025.sttg)
e3:SetOperation(c115025.stop)
c:RegisterEffect(e3)
end
function c115025.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c115025.thfil(c)
return c:IsAbleToHand() and (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_PENDULUM)
end
function c115025.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c115025.thfil,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function c115025.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c115025.thfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
local tg=g:Select(tp,1,1,nil)
Duel.SendtoHand(tg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
local tc=tg:GetFirst()
Duel.Recover(tp,tc:GetAttack()/2,REASON_EFFECT)
end
function c115025.stfil(c)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function c115025.xgfilter(c)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight)
end
function c115025.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c115025.xgfilter,tp,LOCATION_PZONE,0,1,nil) and ep==tp and re:GetHandler():IsSetCard(0x87af)or _G["c"..re:GetHandler():GetCode()].named_with_Arknight and Duel.IsExistingMatchingCard(c115025.stfil,tp,LOCATION_DECK,0,2,nil) end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,tp,LOCATION_PZONE)
end
function c115025.stop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local g1=Duel.GetMatchingGroup(c115025.stfil,tp,LOCATION_DECK,0,nil)
if Duel.Destroy(g,REASON_EFFECT) and g1:GetCount()>1 then
local tg=g1:Select(tp,2,2,nil)
local tc=tg:GetFirst()
while tc do
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
tc=tg:GetNext()
end
end
end
\ No newline at end of file
--方舟骑士-哞
c115027.named_with_Arknight=1
function c115027.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--Recover
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_PZONE)
e1:SetTarget(c115027.rectg)
e1:SetOperation(c115027.recop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,115027)
e2:SetCondition(c115027.spcon)
e2:SetTarget(c115027.sptg)
e2:SetOperation(c115027.spop)
c:RegisterEffect(e2)
--Recover
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_RECOVER)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,115028)
e4:SetTarget(c115027.rectg1)
e4:SetOperation(c115027.recop1)
c:RegisterEffect(e4)
end
function c115027.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800)
end
function c115027.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c115027.cfilter2(c,tp)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and (c:IsReason(REASON_EFFECT) or c:IsReason(REASON_BATTLE)) and c:IsPreviousLocation(LOCATION_ONFIELD)
and c:GetPreviousControler()==tp and c:IsPreviousPosition(POS_FACEUP)
end
function c115027.spcon(e,tp,eg,ep,ev,re,r,rp)
if eg:IsContains(e:GetHandler()) then return false end
return eg:IsExists(c115027.cfilter2,1,nil,tp)
end
function c115027.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c115027.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c115027.rthfil(c)
return c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsType(TYPE_PENDULUM) and (c:IsLocation(LOCATION_GRAVE) or (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()))
end
function c115027.rectg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c115027.rthfil,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) and e:GetHandler():IsReason(REASON_EFFECT) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c115027.recop1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(c115027.rthfil,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,nil)
if Duel.Recover(p,d,REASON_EFFECT) and g:GetCount()<=0 then return end
Duel.BreakEffect()
local tg=g:Select(tp,1,1,nil)
Duel.SendtoHand(tg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
\ No newline at end of file
--方舟骑士-苏苏洛
function c115029.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,115029)
e1:SetTarget(c115029.thtg)
e1:SetOperation(c115029.thop)
c:RegisterEffect(e1)
--Recover
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCategory(CATEGORY_RECOVER)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTarget(c115029.rectg)
e4:SetOperation(c115029.recop)
c:RegisterEffect(e4)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetCode(EVENT_RECOVER)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1,115030)
e4:SetTarget(c115029.sptg1)
e4:SetOperation(c115029.spop1)
c:RegisterEffect(e4)
end
function c115029.thfil(c)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c115029.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c115029.thfil,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0,nil)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,tp,LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0)
end
function c115029.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local g1=Duel.GetMatchingGroup(c115029.thfil,tp,LOCATION_DECK,0,1,nil)
if Duel.Destroy(g,REASON_EFFECT) and g1:GetCount()>0 then
local tg=g1:Select(tp,1,1,nil)
Duel.SendtoHand(tg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
if Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)==0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c115029.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReason(REASON_EFFECT) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,800)
end
function c115029.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c115029.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and ep==tp end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c115029.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--方舟骑士-末药
function c115031.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,115031)
e1:SetTarget(c115031.sptg)
e1:SetOperation(c115031.spop)
c:RegisterEffect(e1)
--Recover
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c115031.rectg)
e2:SetOperation(c115031.recop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c115031.summon_effect=e2
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetCode(EVENT_RECOVER)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_HAND)
e4:SetCountLimit(1,115032)
e4:SetTarget(c115031.sptg1)
e4:SetOperation(c115031.spop1)
c:RegisterEffect(e4)
end
function c115031.myfilter(c)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight)
end
function c115031.spfil(c,e,tp)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ((c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 ) or (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 ))
end
function c115031.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c115031.myfilter,tp,LOCATION_PZONE,0,1,nil) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c115031.spfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end
function c115031.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
local g1=Duel.GetMatchingGroup(c115031.spfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_EXTRA,0,nil,e,tp)
if g1:GetCount()<=0 then return end
Duel.BreakEffect()
local sg=g1:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
function c115031.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c115031.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c115031.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and ep==tp end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c115031.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--方舟骑士-清流
c115034.named_with_Arknight=1
function c115034.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,c115034.lcheck)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(115034,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,115034)
e1:SetCondition(c115034.thcon)
e1:SetTarget(c115034.thtg)
e1:SetOperation(c115034.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c115034.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--to extra
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(115035,1))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,115035)
e3:SetTarget(c115034.destg)
e3:SetOperation(c115034.desop)
c:RegisterEffect(e3)
end
function c115034.mfilter(c)
return c:IsType(TYPE_PENDULUM)
end
function c115034.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(c115034.mfilter,1,nil) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c115034.lmfilter(c)
return c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight
end
function c115034.lcheck(g)
return g:IsExists(c115034.lmfilter,1,nil)
end
function c115034.thfilter(c)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsAbleToHand() and c:IsType(TYPE_SPELL)
end
function c115034.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1
end
function c115034.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c115034.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c115034.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c115034.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c115034.desfilter(c)
return c:IsFaceup()
end
function c115034.tefilter(c)
return c:IsType(TYPE_PENDULUM) and (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight)
end
function c115034.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and c115034.desfilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c115034.tefilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingTarget(c115034.desfilter,tp,LOCATION_PZONE,0,1,nil)end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_PZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
end
function c115034.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(24094258,3))
local g=Duel.SelectMatchingCard(tp,c115034.tefilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoExtraP(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--不畏苦暗 瑕光-先贤化身
function c115036.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_PENDULUM),aux.NonTuner(Card.IsSynchroType,TYPE_PENDULUM),1,1)
c:EnableReviveLimit()
--P atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c115036.atktg)
e1:SetValue(800)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,115036)
e3:SetCondition(c115036.spcon)
e3:SetTarget(c115036.sptg)
e3:SetOperation(c115036.spop)
c:RegisterEffect(e3)
--code
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_CHANGE_CODE)
e4:SetRange(LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_EXTRA)
e4:SetCondition(c115036.codecon)
e4:SetValue(115025)
c:RegisterEffect(e4)
--position
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_POSITION)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetCountLimit(1)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e5:SetTarget(c115036.postg)
e5:SetOperation(c115036.posop)
c:RegisterEffect(e5)
--pendulum
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e6:SetCondition(c115036.pencon)
e6:SetTarget(c115036.pentg)
e6:SetOperation(c115036.penop)
c:RegisterEffect(e6)
end
function c115036.atktg(e,c)
return c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight
end
function c115036.cfilter(c,tp,rp)
return (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_DESTROY)))
and (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp)
end
function c115036.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c115036.cfilter,1,nil,tp,rp)
end
function c115036.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c115036.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c115036.codecon(e)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()
end
function c115036.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
end
function c115036.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()==0 then return end
Duel.HintSelection(g)
if Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)==0 then return end
local og=Duel.GetOperatedGroup()
if og:GetFirst() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
og:GetFirst():RegisterEffect(e1)
end
end
function c115036.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp))) and c:IsPreviousPosition(POS_FACEUP)
end
function c115036.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c115036.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--不畏苦暗 临光-辉耀使徒
function c115039.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_PENDULUM),aux.NonTuner(Card.IsSynchroType,TYPE_PENDULUM),1,1)
c:EnableReviveLimit()
--P atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c115039.atktg)
e1:SetValue(800)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,115039)
e3:SetCondition(c115039.spcon)
e3:SetTarget(c115039.sptg)
e3:SetOperation(c115039.spop)
c:RegisterEffect(e3)
--code
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_CHANGE_CODE)
e4:SetRange(LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_EXTRA)
e4:SetCondition(c115039.codecon)
e4:SetValue(115023)
c:RegisterEffect(e4)
--negate
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c115039.negcon)
e5:SetCost(c115039.negcost)
e5:SetTarget(c115039.negtg)
e5:SetOperation(c115039.negop)
c:RegisterEffect(e5)
--pendulum
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e6:SetCondition(c115039.pencon)
e6:SetTarget(c115039.pentg)
e6:SetOperation(c115039.penop)
c:RegisterEffect(e6)
end
function c115039.atktg(e,c)
return c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight
end
function c115039.cfilter(c,tp,rp)
return (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_DESTROY)))
and (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp)
end
function c115039.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c115039.cfilter,1,nil,tp,rp)
end
function c115039.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c115039.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c115039.codecon(e)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()
end
function c115039.negfilter(c,tp)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight)
and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsControler(tp)
end
function c115039.negcon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end
local ex,tg1,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
local tg2=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
local b1=not (re:IsHasCategory(CATEGORY_NEGATE) and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE)) and ex and tg1~=nil and tc+tg1:FilterCount(Card.IsOnField,nil)-tg1:GetCount()>0
local b2=re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and tg2 and tg2:IsExists(c115039.negfilter,1,nil,tp)
return b1 or b2
end
function c115039.tdfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToDeckAsCost()
and (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight)
end
function c115039.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c115039.tdfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c115039.tdfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c115039.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)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
end
function c115039.negop(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
ec:CancelToGrave()
Duel.SendtoDeck(ec,nil,2,REASON_EFFECT)
end
end
function c115039.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp))) and c:IsPreviousPosition(POS_FACEUP)
end
function c115039.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c115039.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
--方舟骑士胜利时刻
c115042.named_with_Arknight=1
function c115042.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c115042.cost)
e1:SetTarget(c115042.target)
e1:SetOperation(c115042.activate)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_START)
e2:SetOperation(c115042.atkop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c115042.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
function c115042.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c115042.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c115042.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false)
end
end
function c115042.filter(c)
return c:IsFaceup() and (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight)
end
function c115042.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c115042.filter(chkc) end
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c115042.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c115042.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c115042.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) then return end
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c115042.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
Duel.AdjustInstantly(c)
e:GetHandler():RegisterFlagEffect(115042,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
else
c:CancelToGrave(false)
end
end
function c115042.eqlimit(e,c)
return c:GetControler()==e:GetHandlerPlayer() or e:GetHandler():GetEquipTarget()==c
end
function c115042.eftg(e,c)
if e:GetHandler():GetFlagEffect(115042)==0 then return false end
local ec=e:GetHandler():GetEquipTarget()
return ec and ec==c and c:IsCode(115023,115025)
end
function c115042.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c==Duel.GetAttacker() and bc and bc:IsDefensePos() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENSE_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
bc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetValue(DOUBLE_DAMAGE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e2)
end
end
--耀骑士 临光-烁夜之刃
c115043.named_with_Arknight=1
function c115043.initial_effect(c)
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.ritlimit)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_PZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c115043.imtg)
e2:SetValue(1)
c:RegisterEffect(e2)
--destroy & search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,115043)
e3:SetTarget(c115043.thtg)
e3:SetOperation(c115043.thop)
c:RegisterEffect(e3)
--change
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DISABLE+CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c115043.chcon)
e4:SetOperation(c115043.chop)
c:RegisterEffect(e4)
--indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_NO_TURN_RESET)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e5:SetCountLimit(4)
e5:SetValue(c115043.valcon)
c:RegisterEffect(e5)
--material check
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
e6:SetCondition(c115043.matcon)
e6:SetOperation(c115043.matop)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_MATERIAL_CHECK)
e7:SetValue(c115043.valcheck)
e7:SetLabelObject(e6)
c:RegisterEffect(e7)
end
function c115043.mat_filter(c)
return not c:IsLevel(11)
end
function c115043.imtg(e,c)
return c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight
end
function c115043.thfilter(c)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight)
and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c115043.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDestructable() and Duel.IsExistingMatchingCard(c115043.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c115043.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c115043.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c115043.mfilter(c)
return not c:IsOriginalCodeRule(115023,115039)
end
function c115043.matcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and e:GetLabel()==1
end
function c115043.matop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(115043,RESET_EVENT+RESETS_STANDARD,0,1)
end
function c115043.valcheck(e,c)
local g=c:GetMaterial()
if g:GetCount()>0 and not g:IsExists(c115043.mfilter,1,nil) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c115043.chcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetFlagEffect(115043)>0 and e:GetHandler():GetFlagEffect(115044)<=0
end
function c115043.chop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,115046,0,TYPES_TOKEN_MONSTER,0,2000,11,RACE_WARRIOR,ATTRIBUTE_LIGHT,POS_FACEUP,1-tp) then return end
Duel.HintSelection(Group.FromCards(c))
if Duel.SelectYesNo(tp,aux.Stringid(115043,0)) then
Duel.Hint(HINT_CARD,0,115043)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c115043.repop)
c:RegisterFlagEffect(115044,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
function c115043.repop(e,tp,eg,ep,ev,re,r,rp)
local token=Duel.CreateToken(tp,115046)
Duel.SpecialSummon(token,0,1-tp,tp,false,false,POS_FACEUP)
end
function c115043.valcon(e,re,r,rp)
return (bit.band(r,REASON_BATTLE)~=0 or (bit.band(r,REASON_EFFECT)~=0 and rp==1-e:GetHandlerPlayer()))
and e:GetHandler():GetFlagEffect(115043)>0
end
--方舟骑士追逐黎明
function c115045.initial_effect(c)
aux.AddCodeList(c,115043)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,115045+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c115045.target)
e1:SetOperation(c115045.operation)
c:RegisterEffect(e1)
end
function c115045.exfilter0(c)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight)
and c:IsType(TYPE_PENDULUM) and c:IsFaceup() and c:IsLevelAbove(1) and c:IsAbleToGrave()
end
function c115045.filter(c)
return c:GetOriginalCode()==115043 and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
end
function c115045.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
local sg=nil
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) then
sg=Duel.GetMatchingGroup(c115045.exfilter0,tp,LOCATION_EXTRA,0,nil)
end
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil,c115045.filter,e,tp,mg,sg,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_EXTRA)
end
function c115045.operation(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp)
local sg=nil
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) then
sg=Duel.GetMatchingGroup(c115045.exfilter0,tp,LOCATION_EXTRA,0,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,nil,c115045.filter,e,tp,mg,sg,Card.GetLevel,"Greater")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if sg then
mg:Merge(sg)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
local mat2=mat:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
mat:Sub(mat2)
Duel.ReleaseRitualMaterial(mat)
Duel.SendtoGrave(mat2,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
--耀阳衍生物
function c115046.initial_effect(c)
end
local m=15000798
local cm=_G["c"..m]
cm.name="十字刻证兽·镇罪菲戾克斯"
function cm.initial_effect(c)
aux.AddCodeList(c,15000807)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,15000798)
e1:SetCost(cm.sp1cost)
e1:SetTarget(cm.sp1tg)
e1:SetOperation(cm.sp1op)
c:RegisterEffect(e1)
--SpecialSummon 2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,15000799)
e2:SetCost(cm.sp2cost)
e2:SetCondition(cm.sp2con)
e2:SetTarget(cm.sp2tg)
e2:SetOperation(cm.sp2op)
c:RegisterEffect(e2)
end
function cm.sp1cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.spfilter1(c,e,tp)
return c:IsSetCard(0xf3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sp1tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return false end
local g=Duel.GetMatchingGroup(cm.spfilter1,tp,LOCATION_DECK,0,nil,e,tp)
return #g>0 and g:GetClassCount(Card.GetCode)>=1
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function cm.sp1op(e,tp,eg,ep,ev,re,r,rp)
local ft=2
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then ft=1 end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local g=Duel.GetMatchingGroup(cm.spfilter1,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ft)
if sg then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
Duel.ConfirmCards(1-tp,sg)
end
end
function cm.sp2cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,cm.costfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
end
function cm.costfilter2(c)
return c:IsCode(15000807) and c:IsAbleToRemoveAsCost()
end
function cm.sp2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=Duel.GetLP(1-tp)-2000
end
function cm.sp2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.sp2op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
local m=15000807
local cm=_G["c"..m]
cm.name="在漆黑的尽头守望希冀"
function cm.initial_effect(c)
aux.AddCodeList(c,15000798)
--ritual summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.RitualUltimateTarget(aux.FilterBoolFunction(Card.IsCode,15000798),Card.GetOriginalLevel,"Greater",LOCATION_HAND,cm.tdfilter,cm.rfilter))
e1:SetOperation(cm.RitualUltimateOperation(aux.FilterBoolFunction(Card.IsCode,15000798),Card.GetOriginalLevel,"Greater",LOCATION_HAND,cm.tdfilter,cm.rfilter))
c:RegisterEffect(e1)
end
function cm.tdfilter(c)
return c:GetLevel()>0 and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.rfilter(c)
return c:GetLevel()>0 and c:IsType(TYPE_MONSTER)
end
function cm.RitualExtraFilter(c,f)
return c:GetLevel()>0 and f(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.RitualUltimateTarget(filter,level_function,greater_or_equal,summon_location,grave_filter,mat_filter)
return function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
if mat_filter then mg=mg:Filter(mat_filter,nil,e,tp,true) end
local exg=nil
if grave_filter then
exg=Duel.GetMatchingGroup(cm.RitualExtraFilter,tp,LOCATION_GRAVE,0,nil,grave_filter)
end
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,summon_location,0,1,nil,filter,e,tp,mg,exg,level_function,greater_or_equal,true)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,summon_location)
if grave_filter then
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,tp,LOCATION_GRAVE)
end
end
end
function cm.RitualUltimateOperation(filter,level_function,greater_or_equal,summon_location,grave_filter,mat_filter)
return function(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp)
if mat_filter then mg=mg:Filter(mat_filter,nil,e,tp) end
local exg=nil
if grave_filter then
exg=Duel.GetMatchingGroup(cm.RitualExtraFilter,tp,LOCATION_GRAVE,0,nil,grave_filter)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(aux.RitualUltimateFilter),tp,summon_location,0,1,1,nil,filter,e,tp,mg,exg,level_function,greater_or_equal)
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if exg then
mg:Merge(exg)
end
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local lv=level_function(tc)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,lv,greater_or_equal)
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,lv,tp,tc,lv,greater_or_equal)
aux.GCheckAdditional=nil
tc:SetMaterial(mat)
local mat2=mat:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
mat:Sub(mat2)
Duel.ConfirmCards(1-tp,mat2)
Duel.ReleaseRitualMaterial(mat)
Duel.SendtoDeck(mat2,nil,1,REASON_EFFECT+REASON_MATERIAL)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
Duel.ShuffleDeck(tp)
end
end
end
\ No newline at end of file
--铭恶魔 魔王的骑士
function c19000.initial_effect(c)
aux.AddCodeList(c,19000)
--mzone limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_GRAVE)
e1:SetCode(EFFECT_MAX_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(c19000.value)
c:RegisterEffect(e1)
--advance summon limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EFFECT_UNRELEASABLE_SUM)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetValue(c19000.sumlimit)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(19000,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCost(c19000.cost)
e3:SetTarget(c19000.target)
e3:SetOperation(c19000.operation)
c:RegisterEffect(e3)
end
function c19000.value(e,fp,rp,r)
if rp==e:GetHandlerPlayer() or r~=LOCATION_REASON_TOFIELD then return 7 end
local limit=Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)
return limit>0 and limit or 7
end
function c19000.sumlimit(e,c)
local tp=e:GetHandlerPlayer()
if c:IsControler(1-tp) then
local mint,maxt=c:GetTributeRequirement()
local x=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
local y=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
local ex=Duel.GetMatchingGroupCount(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,EFFECT_EXTRA_RELEASE)
local exs=Duel.GetMatchingGroupCount(Card.IsHasEffect,tp,LOCATION_MZONE,0,nil,EFFECT_EXTRA_RELEASE_SUM)
if ex==0 and exs>0 then ex=1 end
return y-maxt+ex+1 > x-ex
else
return false
end
end
function c19000.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c19000.filter(c)
return c:IsCode(19001) and c:IsAbleToHand()
end
function c19000.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c19000.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c19000.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstMatchingCard(c19000.filter,tp,LOCATION_DECK,0,nil)
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
--铭时空 失落的时间
function c19001.initial_effect(c)
c:SetUniqueOnField(1,0,19001)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--cannot remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(19001,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,19001)
e3:SetCost(c19001.cost)
e3:SetTarget(c19001.target)
e3:SetOperation(c19001.operation)
c:RegisterEffect(e3)
end
function c19001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800)
end
function c19001.filter(c)
return c:IsSetCard(0x889) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c19001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19001.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c19001.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c19001.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--铭恶魔 风暴物质
function c19002.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c19002.condition)
e1:SetTarget(c19002.target)
e1:SetOperation(c19002.activate)
c:RegisterEffect(e1)
end
function c19002.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x888)
end
function c19002.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c19002.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c19002.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c19002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c19002.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c19002.filter,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c19002.filter,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c19002.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(Card.IsSSetable,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(19002,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil)
Duel.SSet(tp,sg,tp,false)
end
end
end
--铭恶魔 生命物质
function c19003.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c19003.activate)
e1:SetCondition(c19003.condition)
c:RegisterEffect(e1)
--ATK up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x888))
e2:SetValue(500)
c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(19003,1))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetCondition(c19003.reccon)
e3:SetTarget(c19003.rectg)
e3:SetOperation(c19003.recop)
c:RegisterEffect(e3)
end
function c19003.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x888)
end
function c19003.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c19003.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c19003.reccon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:GetFirst():IsControler(tp) and eg:GetFirst():IsSetCard(0x888)
end
function c19003.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ev)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
end
function c19003.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
--铭恶魔 命运物质
function c19004.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19004,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c19004.condition)
e1:SetTarget(c19004.target)
e1:SetOperation(c19004.activate)
c:RegisterEffect(e1)
--Activate2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19004,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c19004.condition1)
e2:SetTarget(c19004.target1)
e2:SetOperation(c19004.activate1)
c:RegisterEffect(e2)
end
function c19004.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c19004.condition1(c)
return Duel.GetTurnPlayer()~=tp
end
function c19004.filter(c)
return c:IsSetCard(0x888) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c19004.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c19004.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c19004.filter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c19004.filter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c19004.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c19004.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19004.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c19004.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c19004.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--铭龙王 无限
function c19005.initial_effect(c)
local m=19005
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddFusionProcCodeFunRep(c,19016,aux.FilterBoolFunction(Card.IsFusionAttribute,ATTRIBUTE_LIGHT),1,63,true,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,0,Duel.SendtoGrave,REASON_COST)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(cm.matcheck)
c:RegisterEffect(e2)
end
function cm.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function cm.matcheck(e,c)
local ct=c:GetMaterialCount()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*100)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
end
end
--铭兽 魔王化身
function c19006.initial_effect(c)
local m=19006
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_GRAVE)
e1:SetCode(EVENT_DESTROYED)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.spfilter(c,tp)
return c:IsSetCard(0x888) and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and (c:IsReason(REASON_BATTLE) and c:GetReasonPlayer()~=tp)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spfilter,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:Filter(cm.spfilter,nil,tp):GetFirst()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,1,tp,tp,true,false,POS_FACEUP) then
local atk=tc:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e2,true)
end
Duel.SpecialSummonComplete()
end
end
--铭兽 奇美拉
function c19007.initial_effect(c)
--dam
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e1:SetValue(1)
c:RegisterEffect(e1)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19007,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c19007.target)
e1:SetOperation(c19007.operation)
c:RegisterEffect(e1)
end
function c19007.filter(c)
return c:IsSetCard(0x888) and c:IsType(TYPE_MONSTER) and not c:IsCode(19007) and c:IsAbleToHand()
end
function c19007.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19007.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c19007.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c19007.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--铭兽 凯恩狮子
function c19008.initial_effect(c)
--handes
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19008,0))
e1:SetCategory(CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_GRAVE)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c19008.condition)
e1:SetTarget(c19008.target)
e1:SetOperation(c19008.operation)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19008,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c19008.tgtg)
e2:SetOperation(c19008.tgop)
c:RegisterEffect(e2)
end
function c19008.tgfilter(c)
return c:IsSetCard(0x888) and c:IsCode(19008) and not c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c19008.filter(c)
return c:IsSetCard(0x888) and c:IsType(TYPE_MONSTER)
end
function c19008.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19008.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c19008.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c19008.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c19008.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:GetFirst():GetControler()==tp and eg:GetFirst():IsSetCard(0x888)
end
function c19008.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,1-tp,1)
end
function c19008.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(ep,LOCATION_HAND,0,nil)
local sg=g:RandomSelect(ep,1)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
end
\ No newline at end of file
--铭恶魔的宝札
local m=19009
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,17183908+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsSetCard(0x888) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
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.filter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct==3 then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
end
\ No newline at end of file
--铭恶魔 防御物质
function c19010.initial_effect(c)
aux.AddCodeList(c,19010)
--Destroy and Draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19010,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c19010.descon)
e1:SetTarget(c19010.target)
e1:SetOperation(c19010.activate)
c:RegisterEffect(e1)
--Activate(effect)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_CHAINING)
e4:SetCondition(c19010.condition1)
e4:SetTarget(c19010.target1)
e4:SetOperation(c19010.activate1)
c:RegisterEffect(e4)
end
function c19010.descon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_DESTROY)~=0
and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and e:GetHandler():IsPreviousPosition(POS_FACEDOWN)
end
function c19010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c19010.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c19010.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x888)
end
function c19010.condition1(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c19010.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then return false end
if not Duel.IsChainNegatable(ev) then return false end
return re:IsActiveType(TYPE_MONSTER)
end
function c19010.target1(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)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c19010.activate1(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
\ No newline at end of file
--铭魔王的降临
function c19011.initial_effect(c)
aux.AddRitualProcGreater2(c,c19011.ritual_filter)
--ritual summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19011,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c19011.target)
e2:SetOperation(c19011.activate)
c:RegisterEffect(e2)
end
function c19011.ritual_filter(c)
return c:IsSetCard(0x890)
end
function c19011.filter(c,e,tp)
return c:IsType(TYPE_MONSTER)
end
function c19011.mfilter(c)
return c:GetLevel()>0 and c:IsAbleToRemove()
end
function c19011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(c19011.mfilter,tp,LOCATION_GRAVE,0,nil)
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c19011.filter,e,tp,mg1,mg2,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE)
end
function c19011.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(c19011.mfilter),tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,c19011.filter,e,tp,mg1,mg2,Card.GetLevel,"Greater")
local tc=g:GetFirst()
if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:Merge(mg2)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
local mat2=mat:Filter(Card.IsLocation,nil,LOCATION_GRAVE):Filter(Card.IsAttribute,nil,ATTRIBUTE_DARK)
mat:Sub(mat2)
Duel.ReleaseRitualMaterial(mat)
Duel.Remove(mat2,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
\ No newline at end of file
--铭魔王 杀戮者
function c19012.initial_effect(c)
c:EnableReviveLimit()
--Draw
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c19012.target)
e1:SetOperation(c19012.operation)
c:RegisterEffect(e1)
end
function c19012.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c19012.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--铭兽 魔王的使徒
function c19013.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19013,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,19013)
e1:SetCost(c19013.cost)
e1:SetTarget(c19013.target)
e1:SetOperation(c19013.operation)
c:RegisterEffect(e1)
end
function c19013.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c19013.filter(c)
return c:IsSetCard(0x890) and c:IsAbleToHand() and c:IsType(TYPE_RITUAL+TYPE_MONSTER)
end
function c19013.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19013.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c19013.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c19013.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--铭盟军 凯恩狙击兵
function c19014.initial_effect(c)
--extra atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19014,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c19014.condition)
e1:SetCost(c19014.cost)
e1:SetTarget(c19014.target)
e1:SetOperation(c19014.operation)
c:RegisterEffect(e1)
--cannot direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
c:RegisterEffect(e2)
--chain attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(19014,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(c19014.atcon)
e3:SetOperation(c19014.atop)
c:RegisterEffect(e3)
end
function c19014.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function c19014.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c19014.filter(c)
return c:IsFaceup() and c:IsSetCard(0x888) and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0
end
function c19014.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c19014.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c19014.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c19014.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
end
function c19014.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--extra atk
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c19014.ftarget)
e2:SetLabel(tc:GetFieldID())
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c19014.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
function c19014.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetAttacker()==c and aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and c:GetFlagEffect(19014)==0
and c:IsChainAttackable()
end
function c19014.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
\ No newline at end of file
--铭盟军 凯恩士兵
function c19015.initial_effect(c)
--pierce
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19015,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c19015.condition)
e2:SetTarget(c19015.target)
e2:SetOperation(c19015.operation)
c:RegisterEffect(e2)
local e3=e2:Clone()
e2:SetDescription(aux.Stringid(19015,1))
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,19015)
e3:SetCost(c19015.cost)
c:RegisterEffect(e3)
end
function c19015.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function c19015.filter(c)
return c:IsFaceup() and c:IsSetCard(0x888) and not c:IsHasEffect(EFFECT_PIERCE)
end
function c19015.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c19015.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c19015.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c19015.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PIERCE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c19015.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
--铭魔王 断罪
function c19016.initial_effect(c)
c:SetUniqueOnField(1,0,19016)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19016,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c19016.spcon1)
e1:SetOperation(c19016.spop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(19016,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c19016.spcon)
c:RegisterEffect(e2)
end
function c19016.spcon1(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)==0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c19016.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(2000)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
end
function c19016.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)==0
end
--铭盟军 凯恩龙
function c19017.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(19017,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c19017.sumtg)
e1:SetOperation(c19017.sumop)
c:RegisterEffect(e1)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTargetRange(0,1)
e2:SetValue(c19017.aclimit)
e2:SetCondition(c19017.actcon)
c:RegisterEffect(e2)
end
function c19017.filter(c,e,tp)
return c:IsSetCard(0x888) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c19017.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c19017.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c19017.sumop(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(c19017.filter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c19017.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)
end
function c19017.actcon(e)
local tp=e:GetHandlerPlayer()
local a=Duel.GetAttacker()
return a and a:IsSetCard(0x888) and a:IsControler(tp)
end
\ No newline at end of file
--铭恶魔的手镜
function c19018.initial_effect(c)
--Activate(effect)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_CHAINING)
e4:SetCost(c19018.cost)
e4:SetCondition(c19018.condition)
e4:SetTarget(c19018.target)
e4:SetOperation(c19018.activate)
c:RegisterEffect(e4)
end
function c19018.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c19018.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x888) and c:IsType(TYPE_MONSTER)
end
function c19018.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c19018.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then return false end
if not Duel.IsChainNegatable(ev) then return false end
return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c19018.target(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)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c19018.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--铭恶魔 雷恩
function c19019.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(c19019.spcon)
e1:SetOperation(c19019.spop)
c:RegisterEffect(e1)
--cannot mset
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_MSET)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
c:RegisterEffect(e2)
--Pos Change
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetDescription(aux.Stringid(19019,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c19019.postg)
e3:SetOperation(c19019.posop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4)
--devine light
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_DIVINE_LIGHT)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(0,1)
c:RegisterEffect(e5)
--cannot turn set
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_TURN_SET)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(0,LOCATION_MZONE)
c:RegisterEffect(e6)
--cannot release
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetRange(LOCATION_MZONE)
e7:SetCode(EFFECT_CANNOT_RELEASE)
e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e7:SetTargetRange(1,1)
c:RegisterEffect(e7)
end
function c19019.spfilter(c)
return c:IsSetCard(0x888) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function c19019.spcon(e,c)
if c==nil then return true end
if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
local tp=c:GetControler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
local g=Duel.GetMatchingGroup(c19019.spfilter,tp,LOCATION_HAND,0,nil)
if not c:IsAbleToGraveAsCost() or Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY) then
g:RemoveCard(c)
end
return g:CheckWithSumGreater(Card.GetLevel,8)
end
function c19019.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c19019.spfilter,c:GetControler(),LOCATION_HAND,0,nil)
if not c:IsAbleToGraveAsCost() or Duel.IsPlayerAffectedByEffect(tp,EFFECT_NECRO_VALLEY) then
g:RemoveCard(c)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=g:SelectWithSumGreater(tp,Card.GetLevel,8)
Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD)
end
function c19019.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDefensePos,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c19019.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDefensePos,tp,0,LOCATION_MZONE,nil)
Duel.ChangePosition(g,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true)
end
\ No newline at end of file
--铭魔王 雷恩
function c19020.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c19020.spcon)
e1:SetOperation(c19020.spop)
c:RegisterEffect(e1)
--cannot mset
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_MSET)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
c:RegisterEffect(e2)
--Pos Change
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetDescription(aux.Stringid(19019,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c19020.postg)
e3:SetOperation(c19020.posop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4)
--devine light
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_DIVINE_LIGHT)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(0,1)
c:RegisterEffect(e5)
--cannot turn set
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_TURN_SET)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(0,LOCATION_MZONE)
c:RegisterEffect(e6)
--cannot release
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetRange(LOCATION_MZONE)
e7:SetCode(EFFECT_CANNOT_RELEASE)
e7:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e7:SetTargetRange(1,1)
c:RegisterEffect(e7)
end
function c19020.spfilter(c,ft)
return c:IsFaceup() and c:IsCode(19019) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
end
function c19020.spcon(e,c)
if c==nil then return true end
if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c19020.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
end
function c19020.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c19020.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST)
end
function c19020.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDefensePos,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsDefensePos,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c19020.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDefensePos,tp,0,LOCATION_MZONE,nil)
Duel.ChangePosition(g,0,0,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,true)
end
\ No newline at end of file
--铭魔王 凯恩
function c19021.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--summon with 1 tribute
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(19021,0))
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SUMMON_PROC)
e3:SetCondition(c19021.otcon)
e3:SetOperation(c19021.otop)
e3:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e2)
--disable
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DISABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(c19021.distg)
c:RegisterEffect(e4)
--to hand
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(19021,0))
e5:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e5:SetCategory(CATEGORY_TOHAND)
e5:SetCode(EVENT_PHASE+PHASE_STANDBY)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,19021)
e5:SetCondition(c19021.condition)
e5:SetTarget(c19021.target)
e5:SetOperation(c19021.operation)
c:RegisterEffect(e5)
--return
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_SUMMON_SUCCESS)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetOperation(c19021.regop)
c:RegisterEffect(e6)
end
function c19021.otfilter(c)
return c:IsSetCard(0x888)
end
function c19021.otcon(e,c,minc)
if c==nil then return true end
local mg=Duel.GetMatchingGroup(c19021.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end
function c19021.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c19021.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 c19021.distg(e,c)
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c19021.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c19021.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c19021.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c19021.rmcon)
e1:SetOperation(c19021.rmop)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
function c19021.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c19021.filter(c)
return c:IsCode(19021) and c:IsAbleToRemove()
end
function c19021.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c19021.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function c19021.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCondition(c19021.regcon)
e1:SetTarget(c19021.rettg)
e1:SetOperation(c19021.retop)
c:RegisterEffect(e1)
end
function c19021.regcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c19021.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c19021.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--方舟之骑士·巫恋
c29010019.named_with_Arknight=1
function c29010019.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
......@@ -94,7 +93,7 @@ function c29010019.deop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Destroy(c,REASON_EFFECT)
end
function c29010019.ckfil(c,seq)
function c29010019.ckfil(c,seq)
return math.abs(seq-c:GetSequence())==1 or ((c:GetSequence()==5 and seq==3) or (c:GetSequence()==6 and seq==1))
end
function c29010019.adtg(e,c)
......
......@@ -2,7 +2,7 @@
c29065500.named_with_Arknight=1
function c29065500.initial_effect(c)
aux.AddCodeList(c,29065500)
c:EnableCounterPermit(0x1ae)
c:EnableCounterPermit(0x10ae)
--copy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065500,0))
......@@ -22,7 +22,7 @@ function c29065500.initial_effect(c)
e4:SetDescription(aux.Stringid(29065500,1))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetProperty((EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL))
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c29065500.thcon)
e4:SetTarget(c29065500.thtg)
......@@ -30,7 +30,7 @@ function c29065500.initial_effect(c)
c:RegisterEffect(e4)
end
function c29065500.efil(c,e,tp,eg,ep,ev,re,r,rp)
if not ((c:IsSetCard(0x87af) and c:IsType(TYPE_MONSTER)) or (_G["c"..c:GetCode()].named_with_Arknight) and not c:IsPublic() and not c:IsCode(29065500)) then return false end
if not ((c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() and not c:IsCode(29065500)) then return false end
local m=_G["c"..c:GetCode()]
if not m then return false end
local te=m.summon_effect if not te then return false end
......@@ -38,12 +38,9 @@ function c29065500.efil(c,e,tp,eg,ep,ev,re,r,rp)
return not tg or tg and tg(e,tp,eg,ep,ev,re,r,rp,0)
end
function c29065500.cocost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065500.efil,tp,LOCATION_HAND,0,1,nil,e,tp,eg,ep,ev,re,r,rp) end
local tc=Duel.SelectMatchingCard(tp,c29065500.efil,tp,LOCATION_HAND,0,1,1,nil,e,tp,eg,ep,re,r,rp):GetFirst()
Duel.ConfirmCards(1-tp,tc)
if e:GetHandler(tc):IsLocation(LOCATION_HAND) then
Duel.ShuffleHand(tp)
end
if chk==0 then return Duel.IsExistingMatchingCard(c29065500.efil,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,eg,ep,ev,re,r,rp) end
local tc=Duel.SelectMatchingCard(tp,c29065500.efil,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,eg,ep,re,r,rp):GetFirst()
Duel.SendtoGrave(tc,REASON_COST)
e:SetLabelObject(tc)
end
function c29065500.cotg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......@@ -79,5 +76,5 @@ end
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x1ae,n)
tc:AddCounter(0x10ae,n)
end
\ No newline at end of file
......@@ -2,7 +2,7 @@
c29065501.named_with_Arknight=1
function c29065501.initial_effect(c)
aux.AddCodeList(c,29065500)
c:EnableCounterPermit(0x1ae)
c:EnableCounterPermit(0x10ae)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065501,0))
......@@ -23,7 +23,7 @@ function c29065501.initial_effect(c)
e4:SetDescription(aux.Stringid(29065501,3))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetProperty((EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL))
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c29065501.thcon)
e4:SetTarget(c29065501.thtg)
......@@ -56,10 +56,10 @@ end
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x1ae,n)
tc:AddCounter(0x10ae,n)
end
function c29065501.xthfilter(c)
return aux.IsCodeListed(c,29065500) and not c:IsCode(29065501) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
return aux.IsCodeListed(c,29065500) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c29065501.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065501.xthfilter,tp,LOCATION_DECK,0,1,nil) end
......
--烁夜之刃·炎煌勇者
function c29065502.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065502,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,29065502)
e1:SetTarget(c29065502.sptg1)
e1:SetOperation(c29065502.spop1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e2)
c29065502.summon_effect=e1
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29065502,3))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c29065502.thcon)
e4:SetTarget(c29065502.thtg)
e4:SetOperation(c29065502.thop)
c:RegisterEffect(e4)
end
function c29065502.spfilter(c,e,tp)
return c:IsSetCard(0x87af) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29065502.cfilter(c)
return c:IsFaceup() and c:IsCode(29065500) or (c:IsType(TYPE_XYZ) and aux.IsCodeListed(c,29065500))
end
function c29065502.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29065502.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local op=0
if Duel.IsExistingMatchingCard(c29065502.cfilter,tp,LOCATION_MZONE,0,1,nil) then
op=1
else
op=0
end
e:SetLabel(op)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c29065502.spop1(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c29065502.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
if op==1 and Duel.IsExistingMatchingCard(c29065502.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(29065502,0)) then
local xc=Duel.SelectMatchingCard(tp,c29065502.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
Duel.SpecialSummon(xc,0,tp,tp,false,false,POS_FACEUP)
g:AddCard(xc)
end
end
end
function c29065502.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c29065502.thfilter(c)
return c:IsSetCard(0x87af) and c:IsCanAddCounter(0x11ae,1)
end
function c29065502.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065502.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
end
function c29065502.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,c29065502.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x11ae,n)
end
\ No newline at end of file
......@@ -2,7 +2,7 @@
c29065503.named_with_Arknight=1
function c29065503.initial_effect(c)
aux.AddCodeList(c,29065500)
c:EnableCounterPermit(0x1ae)
c:EnableCounterPermit(0x10ae)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065503,0))
......@@ -33,7 +33,7 @@ function c29065503.initial_effect(c)
e4:SetDescription(aux.Stringid(29065503,2))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetProperty((EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL))
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c29065503.thcon)
e4:SetTarget(c29065503.thtg)
......@@ -98,5 +98,5 @@ end
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x1ae,n)
tc:AddCounter(0x10ae,n)
end
\ No newline at end of file
......@@ -2,7 +2,7 @@
c29065505.named_with_Arknight=1
function c29065505.initial_effect(c)
aux.AddCodeList(c,29065500)
c:EnableCounterPermit(0x1ae)
c:EnableCounterPermit(0x10ae)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065505,0))
......@@ -23,7 +23,7 @@ function c29065505.initial_effect(c)
e4:SetDescription(aux.Stringid(29065505,1))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetProperty((EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL))
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(c29065505.thcon)
e4:SetTarget(c29065505.thtg)
......@@ -62,5 +62,5 @@ end
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
tc:AddCounter(0x1ae,n)
tc:AddCounter(0x10ae,n)
end
\ No newline at end of file
--方舟骑士-灰喉
local m=29065506
local cm=_G["c"..m]
cm.name="方舟骑士-灰喉"
cm.named_with_Arknight=1
function cm.initial_effect(c)
c:EnableCounterPermit(0x1ae)
aux.AddCodeList(c,29065500)
c:EnableCounterPermit(0x10ae)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29065506+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
local e3=e1:Clone()
--todeck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29065507)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c29065506.summon_effect=e2
--
--counter
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCondition(cm.spcon)
e4:SetTarget(cm.thtg2)
e4:SetOperation(cm.thop2)
e4:SetCondition(cm.ctcon)
e4:SetTarget(cm.cttg)
e4:SetOperation(cm.ctop)
c:RegisterEffect(e4)
end
function cm.ffilter(c)
return c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight and c:IsAbleToDeck()
function cm.spfilter(c)
return c:IsFaceup() and c:IsCode(29065500)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToDeck() end
if chk==0 then return Duel.IsExistingTarget(cm.ffilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.ffilter,tp,LOCATION_GRAVE,0,1,5,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.tdfilter(c)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsAbleToDeck()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp)
and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.SendtoDeck(tg,nil,5,REASON_EFFECT)
if Duel.IsPlayerCanDraw(tp,1)
and Duel.SelectYesNo(tp,aux.Stringid(63166095,0)) then
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(p,cm.tdfilter,p,LOCATION_GRAVE,0,1,5,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 then
Duel.ShuffleDeck(p)
Duel.BreakEffect()
Duel.Draw(p,1,REASON_EFFECT)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.thfilter(c)
return c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight
function cm.ctfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight)
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_ONFIELD,0,1,nil) end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.ctfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x10ae)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.ctfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
local tc=g:GetFirst()
if tc then
tc:AddCounter(0x10ae,1)
end
tc:AddCounter(0x1ae,n)
end
\ No newline at end of file
--倒影君主 阿米娅-奇美拉
function c29065507.initial_effect(c)
aux.AddCodeList(c,29065500)
c:EnableCounterPermit(0x1ae)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
......@@ -62,7 +61,7 @@ function c29065507.initial_effect(c)
c:RegisterEffect(e5)
end
function c29065507.lvtg(e,c)
return c:IsLevelAbove(1) and c:GetCounter(0x1ae)>0 and c:IsSetCard(0x87af)
return c:IsLevelAbove(1) and c:GetCounter(0x10ae)>0
end
function c29065507.lvval(e,c,rc)
local lv=c:GetLevel()
......
--乘云赤龙 陈-绝影
function c29065508.initial_effect(c)
aux.AddCodeList(c,29065505)
c:EnableCounterPermit(0x1ae)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
......@@ -59,7 +58,7 @@ function c29065508.initial_effect(c)
c:RegisterEffect(e5)
end
function c29065508.lvtg(e,c)
return c:IsLevelAbove(1) and c:GetCounter(0x1ae)>0 and c:IsSetCard(0x87af)
return c:IsLevelAbove(1) and c:GetCounter(0x10ae)>0
end
function c29065508.lvval(e,c,rc)
local lv=c:GetLevel()
......
......@@ -62,7 +62,7 @@ function c29065509.initial_effect(c)
c:RegisterEffect(e7)
end
function c29065509.lvtg(e,c)
return c:IsLevelAbove(1) and c:GetCounter(0x1ae)>0 and c:IsSetCard(0x87af)
return c:IsLevelAbove(1) and c:GetCounter(0x10ae)>0
end
function c29065509.lvval(e,c,rc)
local lv=c:GetLevel()
......
--明日的方舟·罗德岛
c29065510.named_with_Arknight=1
function c29065510.initial_effect(c)
c:EnableCounterPermit(0x1ae)
c:EnableCounterPermit(0x10ae)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
......@@ -37,20 +37,20 @@ function c29065510.atktg(e,c)
end
function c29065510.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.IsCanAddCounter(tp,0x1ae,1,c) end
if chk==0 then return Duel.IsCanAddCounter(tp,0x10ae,1,c) end
end
function c29065510.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(0x1ae,1)
c:AddCounter(0x10ae,1)
end
end
function c29065510.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1ae,1,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x1ae,1,REASON_COST)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x10ae,1,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x10ae,1,REASON_COST)
end
function c29065510.spfilter(c,e,tp)
return c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29065510.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -2,7 +2,6 @@
c29065511.named_with_Arknight=1
function c29065511.initial_effect(c)
aux.AddCodeList(c,29065500)
c:EnableCounterPermit(0x1ae)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
......
--方舟骑士怒号光明
c29065512.named_with_Arknight=1
function c29065512.initial_effect(c)
aux.AddCodeList(c,29065500)
--Activate
......
--交织宵影 阿米娅-青色怒火
function c29065513.initial_effect(c)
aux.AddCodeList(c,29065507,29065508)
c:EnableCounterPermit(0x1ae)
--xyz summon
aux.AddXyzProcedure(c,nil,9,2)
c:EnableReviveLimit()
......
local m=29065518
local cm=_G["c"..m]
cm.name="方舟骑士苦难行进"
cm.named_with_Arknight=1
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,29065518)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,29065519)
e3:SetCondition(cm.condition)
e3:SetTarget(cm.target)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsPlayerCanDraw(tp) and #g>0 end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(p,nil,p,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Draw(p,1,REASON_EFFECT)
if g:GetFirst():IsSetCard(0x87af) then
if Duel.GetFlagEffect(tp,29065518)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(cm.detg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,29065518,RESET_PHASE+PHASE_END,0,1)
end
end
end
end
function cm.detg(e,c)
return c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight
end
function cm.cfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil):GetFirst()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--方舟骑士-德克萨斯
function c29065521.initial_effect(c)
c:EnableCounterPermit(0x10ae)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29065521+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c29065521.spcon)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29065522)
e2:SetTarget(c29065521.cttg)
e2:SetOperation(c29065521.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c29065521.summon_effect=e2
end
function c29065521.spfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:IsType(TYPE_MONSTER)
end
function c29065521.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29065521.spfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
end
function c29065521.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanAddCounter(0x10ae,1) end
end
function c29065521.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():IsRelateToEffect(e) then
local n=1
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
e:GetHandler():AddCounter(0x10ae,n)
if Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(29065521,0)) then
Duel.BreakEffect()
local tc=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
end
\ No newline at end of file
--方舟骑士-桃金娘
c29065523.named_with_Arknight=1
function c29065523.initial_effect(c)
c:EnableCounterPermit(0x10ae)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29065523,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c29065523.spcon)
c:RegisterEffect(e1)
--counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065523,1))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,29065523)
e2:SetTarget(c29065523.cttg)
e2:SetOperation(c29065523.ctop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
c29065523.summon_effect=e2
end
function c29065523.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_ONFIELD,0)==0
end
function c29065523.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local n=2
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,n,0,0x10ae)
end
function c29065523.refilter(c)
return (c:IsSetCard(0x87af) or _G["c"..c:GetCode()].named_with_Arknight) and c:GetBaseAttack()>0
end
function c29065523.ctop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local n=2
if Duel.IsPlayerAffectedByEffect(tp,29065580) then
n=n+1
end
e:GetHandler():AddCounter(0x10ae,n)
end
if Duel.IsExistingMatchingCard(c29065523.refilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(29065523,1)) then
local tc=Duel.SelectMatchingCard(tp,c29065523.refilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
local atk=tc:GetBaseAttack()
Duel.Recover(tp,atk,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -14,7 +14,7 @@ function c33200015.initial_effect(c)
c:RegisterEffect(e1)
--ignore
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
......@@ -30,7 +30,7 @@ function c33200015.initial_effect(c)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,33200015)
e4:SetCountLimit(1,33200016)
e4:SetCondition(c33200015.thcon)
e4:SetTarget(c33200015.thtg)
e4:SetOperation(c33200015.thop)
......@@ -114,28 +114,25 @@ function c33200015.DRcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST)
end
function c33200015.igfilter(c,e,tp)
return Card.IsFaceup and c:IsSetCard(0x321)
return c:IsSetCard(0x321) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c33200015.igtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c33200015.igfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c33200015.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c33200015.igfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c33200015.igop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c33200015.igfilter then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(c33200015.efilter)
tc:RegisterEffect(e3)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33200015,0))
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33200015.igfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
function c33200015.efilter(e,te)
if te:GetHandlerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end
......
--业炎的魔神 Amy
function c33200018.initial_effect(c)
--fusion procedure
c:EnableReviveLimit()
aux.AddFusionProcMix(c,true,true,c33200018.ffilter1,c33200018.ffilter2,c33200018.ffilter2)
--pen special summon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(33200018,2))
e0:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_QUICK_O)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e0:SetProperty(EFFECT_FLAG_CARD_TARGET)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,33200020)
e0:SetTarget(c33200018.sptg)
e0:SetOperation(c33200018.spop)
c:RegisterEffect(e0)
--set as spell
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(c33200018.imop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33200018,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,33200018)
e2:SetCondition(c33200018.setcon)
e2:SetTarget(c33200018.settg)
e2:SetOperation(c33200018.setop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33200018,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c33200018.atktg)
e3:SetOperation(c33200018.atkop)
c:RegisterEffect(e3)
--to p
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,33200019)
e4:SetCondition(c33200018.tpcon)
e4:SetTarget(c33200018.tptg)
e4:SetOperation(c33200018.tpop)
c:RegisterEffect(e4)
end
--fusion
function c33200018.ffilter1(c)
return c:IsSetCard(0x321)
end
function c33200018.ffilter2(c)
return c:IsRace(RACE_PSYCHO) and c:IsAttribute(ATTRIBUTE_FIRE)
end
--e0
function c33200018.spfilter(c)
return c:IsRace(RACE_PSYCHO) and c:IsAttribute(ATTRIBUTE_FIRE)
end
function c33200018.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c33200018.spfilter(chkc) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(c33200018.spfilter,tp,LOCATION_MZONE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectTarget(tp,c33200018.spfilter,tp,LOCATION_MZONE,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c33200018.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=2 then return end
if Duel.Destroy(tg,REASON_EFFECT)>=2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--e2
function c33200018.imop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(33200018,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_PHASE+PHASE_END,0,1)
end
function c33200018.filter(c)
return c:IsFaceup()
end
function c33200018.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(33200018)>0
end
function c33200018.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and c33200018.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33200018.filter,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE,tp)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c33200018.filter,tp,0,LOCATION_MZONE,1,1,nil)
end
function c33200018.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE,tp)<=0 or not tc:IsRelateToEffect(e) then return end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetValue(RESET_TURN_SET)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EFFECT_DISABLE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
end
--e3
function c33200018.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_SZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,nil,0,0)
end
function c33200018.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_SZONE,0,1,nil) and c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_SZONE,0,1,99,nil)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
local dc=Duel.Destroy(sg,REASON_EFFECT)
if dc>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(dc*700)
c:RegisterEffect(e1)
end
end
end
end
--e4
function c33200018.tpcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsFaceup()
end
function c33200018.tptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c33200018.tpop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--渊风·死链
function c40008310.initial_effect(c)
local m=40008310
local cm=_G["c"..m]
cm.named_with_Abigail=1
function cm.Abigail(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Abigail
end
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--p link
......@@ -8,115 +15,55 @@ function c40008310.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c40008310.matcon)
e1:SetValue(c40008310.matval)
e1:SetValue(cm.matval)
c:RegisterEffect(e1)
--summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCondition(c40008310.ctcon)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetCondition(cm.ntcon)
c:RegisterEffect(e2)
--salvage
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetDescription(aux.Stringid(40008310,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(2,40008310)
e3:SetCost(c40008310.thcost)
e3:SetTarget(c40008310.thtg)
e3:SetOperation(c40008310.thop)
c:RegisterEffect(e3)
--cannot link material
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(1)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(40008310,1))
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(2,40008310)
e5:SetCost(c40008310.spcost)
e5:SetTarget(c40008310.sptg)
e5:SetOperation(c40008310.spop)
e5:SetCountLimit(1,m)
e5:SetCost(cm.spcost)
e5:SetTarget(cm.sptg)
e5:SetOperation(cm.spop)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TOHAND)
e6:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_TO_DECK)
e5:SetCountLimit(2,40008310)
e6:SetCondition(c40008310.con6)
e6:SetTarget(c40008310.target)
e6:SetOperation(c40008310.activate)
c:RegisterEffect(e6)
--redirect
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e7:SetValue(LOCATION_REMOVED)
e7:SetCondition(c40008310.rmcon)
c:RegisterEffect(e7)
end
function c40008310.rmcon(e)
local c=e:GetHandler()
return not c:IsReason(REASON_LINK)
function cm.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5)
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c40008310.matcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),40008310)==0
function cm.exmfilter(c)
return c:IsLocation(LOCATION_PZONE) and c:IsCode(m)
end
function c40008310.matval(e,c,mg)
return c:IsType(TYPE_LINK)
function cm.matval(e,mg,c,tp)
return true,not mg or not mg:IsExists(cm.exmfilter,1,nil)
end
function c40008310.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_PZONE)
end
function c40008310.thfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsAbleToRemoveAsCost()
end
function c40008310.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40008310.thfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c40008310.thfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c40008310.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c40008310.thfilter1(c)
return c:IsSetCard(0xf12) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c40008310.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,30459350) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c40008310.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function c40008310.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.spcost(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 c40008310.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xf12) and c:IsType(TYPE_PENDULUM) and not c:IsCode(40008310) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
function cm.spfilter(c,e,tp)
return c:IsFaceup() and cm.Abigail(c) and c:IsType(TYPE_PENDULUM) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c40008310.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
and Duel.IsExistingMatchingCard(c40008310.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c40008310.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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c40008310.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -126,23 +73,4 @@ function c40008310.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(LOCATION_DECK)
g:GetFirst():RegisterEffect(e1,true)
end
end
function c40008310.con6(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsFaceup() and c:IsLocation(LOCATION_EXTRA)
end
function c40008310.thfilter2(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c40008310.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40008310.thfilter2,tp,LOCATION_EXTRA,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
end
function c40008310.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c40008310.thfilter2,tp,LOCATION_EXTRA,0,1,1,e:GetHandler())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--狱炎之零点龙 德拉库玛
function c40009054.initial_effect(c)
local m=40009054
local cm=_G["c"..m]
cm.named_with_ZerothDragon=1
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),4)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),4,4)
c:EnableReviveLimit()
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -11,60 +14,96 @@ function c40009054.initial_effect(c)
e1:SetRange(LOCATION_EXTRA)
e1:SetValue(aux.synlimit)
c:RegisterEffect(e1)
--to hand
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40009054,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCondition(c40009054.thcon)
e2:SetCost(c40009054.cost)
e2:SetTarget(c40009054.target)
e2:SetOperation(c40009054.operation)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1)
e2:SetCondition(cm.con)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
--summon success
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetOperation(c40009054.sumsuc)
c:RegisterEffect(e3)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(cm.valcheck)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--disable search
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_TO_HAND)
e4:SetRange(LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(0,1)
e4:SetCondition(cm.con)
e4:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK))
c:RegisterEffect(e4)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_MATERIAL_CHECK)
e8:SetValue(cm.valcheck)
e8:SetLabelObject(e4)
c:RegisterEffect(e8)
end
function c40009054.sumsuc(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) then return end
Duel.SetChainLimitTillChainEnd(aux.FALSE)
end
function c40009054.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c40009054.costfilter(c)
return c:IsAbleToGraveAsCost()
end
function c40009054.costfilter1(c)
return c:IsAbleToRemove()
function cm.valcheck(e,c)
local g=c:GetMaterial()
if g:FilterCount(Card.IsType,nil,TYPE_SYNCHRO)==#g then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c40009054.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c40009054.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler()) end
local rt=Duel.GetTargetCount(c40009054.costfilter1,tp,0,LOCATION_ONFIELD,POS_FACEDOWN)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local cg=Duel.SelectMatchingCard(tp,c40009054.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,rt,e:GetHandler())
Duel.SendtoGrave(cg,REASON_COST)
e:SetLabel(cg:GetCount())
function cm.con(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1
end
function c40009054.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(c40009054.costfilter1,tp,0,LOCATION_ONFIELD,1,POS_FACEDOWN) end
local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectTarget(tp,c40009054.costfilter1,tp,0,LOCATION_ONFIELD,ct,ct,POS_FACEDOWN)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tg,ct,0,0)
function cm.filter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40009054.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local rg=tg:Filter(Card.IsRelateToEffect,nil,e)
if rg:GetCount()>0 then
Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
Duel.BreakEffect()
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)--检测全部手牌
if hg:GetCount()==0 then Duel.Win(tp,nil) return end--手牌数为0直接跳过
local ct=3
if hg==2 or hg==1 then
ct=hg
end
local sg3=hg:Select(1-tp,ct,ct,nil)--尽可能选3张手牌
local ct3=sg3:GetCount()
Duel.ConfirmCards(tp,sg3)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD)
local ct2=2
if sg3==1 then
ct2=1
end
local tg=sg3:Select(1-tp,ct2,ct2,nil)--尽可能选2张手牌
Duel.SendtoGrave(tg,REASON_EFFECT+REASON_DISCARD)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)--检测全部手牌
if hg:GetCount()==0 then Duel.Win(tp,nil) return end--手牌数为0直接跳过
ct3=sg3:GetCount()-tg:GetCount()
if ct3>0 then
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then Duel.Win(tp,nil) return end
local spg=Duel.SelectMatchingCard(1-tp,cm.filter2,1-tp,LOCATION_HAND,0,1,1,nil,e,1-tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=spg:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,1-tp,1-tp,false,false,POS_FACEUP)
else
Duel.Win(tp,nil)
end
end
Duel.ShuffleHand(1-tp)
end
......@@ -16,10 +16,14 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.spcon)
e1:SetCondition(cm.spcon1)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_RELEASE)
e2:SetCondition(cm.spcon2)
c:RegisterEffect(e2)
--Destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
......@@ -32,9 +36,12 @@ function cm.initial_effect(c)
e4:SetOperation(cm.operation)
c:RegisterEffect(e4)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
function cm.cfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect()
end
......
......@@ -2,6 +2,7 @@
local m=40010050
local cm=_G["c"..m]
cm.named_with_Revenger=1
cm.named_with_Reverse=1
function cm.Revenger(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Revenger
......
......@@ -81,7 +81,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=Duel.SelectMatchingCard(tp,cm.rfilter,tp,LOCATION_HAND,0,1,1)
local g2=Duel.SelectMatchingCard(tp,cm.rfilter,tp,LOCATION_HAND,0,1,1,nil)
if g2:GetCount()>0 and Duel.Release(g2,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil)
......
......@@ -41,7 +41,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e4)
end
function cm.atkval(e,c)
return e:GetHandler():GetCounter(0x5d)*100
return e:GetHandler():GetCounter(0x588)*100
end
function cm.cfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND)
......@@ -49,7 +49,7 @@ end
function cm.counter(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(cm.cfilter,nil)
if ct>0 then
e:GetHandler():AddCounter(0x5d,ct)
e:GetHandler():AddCounter(0x588,ct)
end
end
function cm.repfilter(c,tp)
......@@ -60,7 +60,7 @@ function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local count=eg:FilterCount(cm.repfilter,nil,tp)
e:SetLabel(count)
return count>0 and Duel.IsCanRemoveCounter(tp,1,0,0x5d,count,REASON_COST)
return count>0 and Duel.IsCanRemoveCounter(tp,1,0,0x588,count,REASON_COST)
end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
......@@ -70,5 +70,5 @@ function cm.repval(e,c)
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local count=e:GetLabel()
Duel.RemoveCounter(tp,1,0,0x5d,count,REASON_COST)
Duel.RemoveCounter(tp,1,0,0x588,count,REASON_COST)
end
\ No newline at end of file
--惩处的击退者
local m=40010138
local cm=_G["c"..m]
cm.named_with_Revenger=1
function cm.Revenger(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Revenger
end
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.rfilter(c)
return (cm.Revenger(c) or c:IsCode(40010072)) and c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local loc=LOCATION_MZONE
return Duel.IsExistingMatchingCard(cm.rfilter,tp,loc,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.rfilter,tp,loc,0,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,g:GetCount(),0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_MZONE
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.GetMatchingGroup(cm.rfilter,tp,loc,0,nil)
--if g:GetCount()>0 then
-- local sg=g:Select(tp,1,g,nil)
local ct=Duel.Release(g,REASON_EFFECT)
Duel.BreakEffect()
local op=0
local b1=Duel.IsPlayerCanDraw(tp,ct)
local b2=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.spfilter),tp,0,LOCATION_HAND+LOCATION_GRAVE,ct,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,0)
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,0))
elseif b2 then Duel.SelectOption(tp,aux.Stringid(m,1)) op=1
else return end
if op==0 then
Duel.Draw(tp,ct,REASON_EFFECT)
else
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>ct then ft=ct end
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local fg=sg:SelectSubGroup(tp,aux.dncheck,false,1,math.min(ft,ft))
Duel.SpecialSummon(fg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--击退者 幻影狂风-深渊-
local m=40010140
local cm=_G["c"..m]
cm.named_with_Revenger=1
cm.named_with_BLASTER=1
cm.named_with_BLASTERMirage=1
function cm.BLASTERdark(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_BLASTERdark
end
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.pcon)
e1:SetTarget(cm.rtg)
e1:SetOperation(cm.rop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_RELEASE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,m+2)
e3:SetTarget(cm.tgtg1)
e3:SetOperation(cm.tgop1)
c:RegisterEffect(e3)
--to grave
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_RELEASE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCountLimit(1,m+2)
e4:SetTarget(cm.tgtg2)
e4:SetOperation(cm.tgop2)
c:RegisterEffect(e4)
end
function cm.pcfilter(c)
return c:IsCode(40010056)
end
function cm.pcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function cm.rfilter(c,e,tp,mg,tc)
if bit.band(c:GetOriginalType(),0x81)~=0x81 or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) or c:IsLocation(LOCATION_PZONE) and c~=tc then return false end
mg:RemoveCard(c)
local lv=c:GetOriginalLevel()
aux.GCheckAdditional=aux.RitualCheckAdditional(c,lv,"Greater")
local res=mg:CheckSubGroup(aux.RitualCheck,1,lv,tp,c,lv,"Greater")
aux.GCheckAdditional=nil
return res
end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_HAND+LOCATION_PZONE,0,1,nil,e,tp,mg,e:GetHandler())
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_PZONE)
end
function cm.rop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rfilter),tp,LOCATION_HAND+LOCATION_PZONE,0,1,1,nil,e,tp,mg,e:GetHandler())
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:RemoveCard(tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local lv=tc:GetOriginalLevel()
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,lv,"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,lv,tp,tc,lv,"Greater")
aux.GCheckAdditional=nil
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
function cm.scfilter(c)
return c:IsCode(40010143) and c:IsFaceup()
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and not Duel.IsExistingMatchingCard(cm.scfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.spfilter(c,e,tp)
return cm.BLASTERdark(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_PZONE+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_PZONE+LOCATION_GRAVE)
end
function cm.spop(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,cm.spfilter,tp,LOCATION_HAND+LOCATION_PZONE+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,true,POS_FACEUP)
end
end
function cm.cfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect()
end
function cm.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,e:GetHandler())
if chk==0 then
local loc=LOCATION_MZONE
return #g>0 and Duel.IsExistingMatchingCard(cm.cfilter2,tp,loc,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0)
end
function cm.tgop1(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_MZONE
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter2,tp,loc,0,2,2,nil)
if g:GetCount()>0 and Duel.Release(g,REASON_EFFECT)>0 then
local g2=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,aux.ExceptThisCard(e))
if #g2>0 then
Duel.SendtoGrave(g2,REASON_EFFECT)
end
end
end
function cm.tgtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_SZONE,e:GetHandler())
if chk==0 then
local loc=LOCATION_MZONE
return #g>0 and Duel.IsExistingMatchingCard(cm.cfilter2,tp,loc,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0)
end
function cm.tgop2(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_MZONE
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter2,tp,loc,0,2,2,nil)
if g:GetCount()>0 and Duel.Release(g,REASON_EFFECT)>0 then
local g2=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_SZONE,aux.ExceptThisCard(e))
if #g2>0 then
Duel.SendtoGrave(g2,REASON_EFFECT)
end
end
end
--暗黑狂风·击退者-深渊-
local m=40010143
local cm=_G["c"..m]
cm.named_with_Revenger=1
cm.named_with_BLASTER=1
cm.named_with_BLASTERdark=1
function cm.Revenger(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Revenger
end
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_RELEASE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.tgcon)
e2:SetTarget(cm.tgtg)
e2:SetOperation(cm.tgop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_RELEASE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+2)
e3:SetCondition(cm.spcon2)
e3:SetTarget(cm.sptg2)
e3:SetOperation(cm.spop2)
c:RegisterEffect(e3)
end
function cm.thcfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD+LOCATION_HAND) and c:IsType(TYPE_MONSTER)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.thcfilter,1,nil,tp)
end
function cm.thfilter(c)
return cm.Revenger(c) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return e:GetHandler():IsReleasable()
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Release(e:GetHandler(),REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function cm.tgcfilter(c)
return c:IsFaceup() and c:IsCode(40010140)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.tgcfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_ONFIELD+LOCATION_HAND)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,1-tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_RULE)
end
end
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,40010072,0,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_WARRIOR,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,40010072,0,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_WARRIOR,ATTRIBUTE_DARK) then
local token=Duel.CreateToken(tp,40010072)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--遗品的封印术师
function c67210000.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spell/trap Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67210000,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE+TIMING_EQUIP)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetCost(c67210000.cost)
e1:SetTarget(c67210000.target)
e1:SetOperation(c67210000.operation)
c:RegisterEffect(e1)
end
function c67210000.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c67210000.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c67210000.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c67210000.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c67210000.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c67210000.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c67210000.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and tc:IsType(TYPE_EQUIP) and Duel.HintSelection(g)~=0 and tc:GetOwner()==1-tp then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(c67210000.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c67210000.aclimit(e,re,tp)
return re:GetHandler():IsType(TYPE_EQUIP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
......@@ -39,6 +39,7 @@ function c76029000.initial_effect(c)
e4:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e4)
end
c76029000.named_with_Kazimierz=true
function c76029000.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
......
......@@ -40,6 +40,7 @@ function c76029002.initial_effect(c)
e3:SetOperation(c76029002.deop)
c:RegisterEffect(e3)
end
c76029002.named_with_Kazimierz=true
function c76029002.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5)
......
--调试之造型 罗比菈塔
function c76029004.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76029004,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,76029004)
e1:SetCost(c76029004.thcost)
e1:SetTarget(c76029004.thtg)
e1:SetOperation(c76029004.thop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,06029004)
e2:SetCondition(c76029004.rhcon)
e2:SetCost(c76029004.rhcost)
e2:SetTarget(c76029004.rhtg)
e2:SetOperation(c76029004.rhop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(76029004,ACTIVITY_SPSUMMON,c76029004.counterfilter)
end
function c76029004.counterfilter(c)
return c:IsRace(RACE_SPELLCASTER)
end
function c76029004.dfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function c76029004.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable()
and Duel.IsExistingMatchingCard(c76029004.dfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c76029004.dfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c76029004.splimit(e,c)
return not (c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_DARK))
end
function c76029004.thfilter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
end
function c76029004.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76029004.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c76029004.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SOUND,0,aux.Stringid(76029004,0))
Debug.Message("上吧各位,我会为大家补妆的!")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c76029004.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c76029004.rhcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_MZONE,0,nil,RACE_SPELLCASTER)
end
function c76029004.rhcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(76029004,tp,ACTIVITY_SPSUMMON)==0
and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) 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(c76029004.splimit)
Duel.RegisterEffect(e1,tp)
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
end
function c76029004.splimit(e,c)
return not c:IsRace(RACE_SPELLCASTER)
end
function c76029004.rhfil(c)
return c:IsAbleToHand() and c:IsType(TYPE_SPELL)
end
function c76029004.rhtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c76029004.rhfil,tp,LOCATION_REMOVED,0,1,nil) end
local tc=Duel.SelectTarget(tp,c76029004.rhfil,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,tp,LOCATION_REMOVED)
end
function c76029004.rhop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SOUND,0,aux.Stringid(76029004,1))
Debug.Message("就算是在前线指挥作战,也有最合适的造型。")
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect() then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--救援之云雾 桑葚
function c76029006.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,76029006)
e1:SetCondition(c76029006.tgcon)
e1:SetCost(c76029006.tgcost)
e1:SetTarget(c76029006.tgtg)
e1:SetOperation(c76029006.tgop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,06029006)
e2:SetCost(c76029006.spcost)
e2:SetTarget(c76029006.sptg)
e2:SetOperation(c76029006.spop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(76029006,ACTIVITY_SPSUMMON,c76029006.counterfilter)
end
function c76029006.counterfilter(c)
return c:IsRace(RACE_SPELLCASTER)
end
function c76029006.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c76029006.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c76029006.tgfil(c)
return c:IsDisabled()
end
function c76029006.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76029006.tgfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,0,LOCATION_ONFIELD)
end
function c76029006.spfil(c,e,tp,lv)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsRace(RACE_SPELLCASTER) and c:IsLevelBelow(lv)
end
function c76029006.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c76029006.tgfil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SOUND,0,aux.Stringid(76029006,1))
Debug.Message("这里很危险!大家请快撤退,博士,请跟紧我!")
local x=Duel.SendtoGrave(g,REASON_EFFECT)
Duel.Recover(tp,x*200,REASON_EFFECT)
if Duel.IsExistingMatchingCard(c76029006.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,x) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(76029006,0)) then
Duel.Hint(HINT_SOUND,0,aux.Stringid(76029006,2))
Debug.Message("各位请多加小心!")
local sg=Duel.SelectMatchingCard(tp,c76029006.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,x)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c76029006.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(76029006,tp,ACTIVITY_SPSUMMON)==0 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(c76029006.splimit)
Duel.RegisterEffect(e1,tp)
end
function c76029006.splimit(e,c)
return not c:IsRace(RACE_SPELLCASTER)
end
function c76029006.ckfil(c,tp)
return c:IsControler(tp) and c:IsRace(RACE_SPELLCASTER)
end
function c76029006.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c76029006.ckfil,1,nil,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c76029006.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SOUND,0,aux.Stringid(76029006,3))
Debug.Message("救援小队桑葚,已就位!")
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--不退之感召 琴柳
function c76029008.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76029008,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_RELEASE)
e1:SetCountLimit(1,76029008)
e1:SetTarget(c76029008.thtg)
e1:SetOperation(c76029008.thop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,06029008)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c76029008.rhtg)
e2:SetOperation(c76029008.rhop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,16029008)
e3:SetCondition(c76029008.spcon)
e3:SetTarget(c76029008.sptg)
e3:SetOperation(c76029008.spop)
c:RegisterEffect(e3)
end
function c76029008.thfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(7) and c:IsAbleToHand()
end
function c76029008.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76029008.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c76029008.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SOUND,0,aux.Stringid(76029008,2))
Debug.Message("如果战斗无法避免,我不会放任自己的软弱。")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c76029008.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.CheckLPCost(tp,1500) and Duel.SelectYesNo(tp,aux.Stringid(76029008,0)) then
Duel.PayLPCost(tp,1500)
Duel.Hint(HINT_SOUND,0,aux.Stringid(76029008,3))
Debug.Message("跟着我,前进!")
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c76029008.rhfil(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(7) and c:IsAbleToHand() and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end
function c76029008.rhtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76029008.rhfil,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,0,LOCATION_ONFIELD)
end
function c76029008.rhop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c76029008.rhfil,tp,LOCATION_MZONE,0,nil)
if g:GetCount()<=0 then return end
local tc1=g:Select(tp,1,1,nil):GetFirst()
local tc2=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c):GetFirst()
local sg=Group.FromCards(tc1,tc2)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.Hint(HINT_SOUND,0,aux.Stringid(76029008,4))
Debug.Message("但愿他们已认清自己的不义。")
end
function c76029008.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)>0 and Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)==Duel.GetMatchingGroupCount(Card.IsAttribute,1-tp,LOCATION_MZONE,0,nil,ATTRIBUTE_DARK)
end
function c76029008.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c76029008.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SOUND,0,aux.Stringid(76029008,5))
Debug.Message("你有没有听见孩子们的悲鸣?")
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(76029008,1)) then
Duel.Hint(HINT_SOUND,0,aux.Stringid(76029008,6))
Debug.Message("我不会退缩。")
local dg=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
end
--终旅之审判
function c76029010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCountLimit(1,76029010+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c76029010.cost)
e1:SetTarget(c76029010.target)
e1:SetOperation(c76029010.operation)
c:RegisterEffect(e1)
end
function c76029010.ctfil(c)
return c:IsReleasable() and c:IsLevel(7) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c76029010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76029010.ctfil,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c76029010.ctfil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,REASON_EFFECT)
end
function c76029010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,0,LOCATION_MZONE,5,nil,ATTRIBUTE_DARK) end
local g=Duel.GetMatchingGroup(Card.IsAttribute,tp,0,LOCATION_MZONE,nil,ATTRIBUTE_DARK)
if g:GetCount()==6 then
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(76029010,0))
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(76029010,1))
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(76029010,2))
local tc=g:GetFirst()
local op=3
while tc do
Duel.HintSelection(Group.FromCards(tc))
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(76029010,op))
op=op+1
tc=g:GetNext()
end
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(76029010,9))
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(76029010,10))
Duel.HintSelection(Group.FromCards(e:GetHandler()))
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(76029010,11))
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(76029010,12))
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,1-tp,LOCATION_ONFIELD)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function c76029010.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
Duel.SetLP(tp,Duel.GetLP(tp)/2)
Duel.SetLP(1-tp,Duel.GetLP(1-tp)/2)
Duel.HintSelection(Group.FromCards(e:GetHandler()))
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(76029011,0))
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(76029011,1))
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(76029011,2))
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(76029011,3))
Duel.HintSelection(Group.FromCards(e:GetHandler()))
e:GetHandler():SetCardData(CARDDATA_CODE,76029011)
Duel.HintSelection(Group.FromCards(e:GetHandler()))
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(76029011,4))
Duel.Hint(HINT_MESSAGE,0,aux.Stringid(76029011,5))
end
end
--辉翼天骑 破晓之灿焰
function c76029015.initial_effect(c)
--summon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(76029015,0))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(c76029015.ntcon)
c:RegisterEffect(e0)
--summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,76029015)
e1:SetTarget(c76029015.smtg)
e1:SetOperation(c76029015.smop)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(76029015,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c76029015.atkcon2)
e2:SetCost(c76029015.atkcost2)
e2:SetOperation(c76029015.atkop2)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e3:SetCondition(c76029015.immcon)
e3:SetOperation(c76029015.immop)
c:RegisterEffect(e3)
end
c76029015.named_with_Kazimierz=true
function c76029015.ntcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0,nil)<Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE,nil)
end
function c76029015.ckfil(c)
return c.named_with_Kazimierz
end
function c76029015.smtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c76029015.ckfil,1,nil) and e:GetHandler():IsSummonable(true,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function c76029015.smop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSummonable(true,nil) then
Duel.Summon(tp,c,true,nil)
end
end
function c76029015.atkcon2(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
return bc~=nil
end
function c76029015.atkcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(76029015)==0 end
c:RegisterFlagEffect(76029015,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end
function c76029015.atkop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=c:GetAttack()*2
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+RESET_DISABLE+PHASE_DAMAGE_CAL)
c:RegisterEffect(e1)
end
end
function c76029015.immcon(e,tp,eg,ep,ev,re,r,rp)
local rc=e:GetHandler():GetReasonCard()
return bit.band(r,REASON_SYNCHRO+REASON_RITUAL)~=0 and rc.named_with_Kazimierz
end
function c76029015.immop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,76029015)
local rc=c:GetReasonCard()
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(76029015,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c76029015.atkcon2)
e2:SetCost(c76029015.atkcost2)
e2:SetOperation(c76029015.atkop2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2)
end
--辉翼天骑 逐夜之烁光
function c76029017.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.ritlimit)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,76029017)
e2:SetCost(c76029017.spcost)
e2:SetTarget(c76029017.sptg)
e2:SetOperation(c76029017.spop)
c:RegisterEffect(e2)
--to hand or SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,06029017)
e3:SetTarget(c76029017.tostg)
e3:SetOperation(c76029017.tosop)
c:RegisterEffect(e3)
--return
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(c76029017.retreg)
c:RegisterEffect(e3)
end
c76029017.named_with_Kazimierz=true
function c76029017.ctfil(c)
return c:IsReleasable() and c.named_with_Kazimierz
end
function c76029017.gcheck(g)
return Duel.GetMZoneCount(tp,g)>0
end
function c76029017.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local xg=Duel.GetMatchingGroup(c76029017.ctfil,tp,LOCATION_HAND+LOCATION_MZONE,0,c)
local b1=Duel.GetFlagEffect(tp,76029017)==0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
local b2=xg:CheckSubGroup(c76029017.gcheck,2,2)
if chk==0 then return b1 or b2 end
if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(76029017,0))) then
Duel.RegisterFlagEffect(tp,76029017,0,0,0)
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(76029017,1))
Duel.Hint(HINT_MESSAGE,tp,aux.Stringid(76029017,2))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(76029017,1))
Duel.Hint(HINT_MESSAGE,1-tp,aux.Stringid(76029017,2))
else
local g=xg:SelectSubGroup(tp,c76029017.gcheck,false,2,2)
Duel.Release(g,REASON_COST+REASON_MATERIAL+REASON_RITUAL)
c:SetMaterial(g)
end
end
function c76029017.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND)
end
function c76029017.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
end
end
function c76029017.filter(c,e,tp,ft)
return c.named_with_Kazimierz and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c76029017.tostg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.IsExistingMatchingCard(c76029017.filter,tp,LOCATION_DECK,0,1,nil,e,tp,ft) end
end
function c76029017.tosop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c76029017.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ft)
local tc=g:GetFirst()
if tc then
if ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
function c76029017.retreg(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(1104)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(aux.SpiritReturnConditionForced)
e1:SetTarget(c76029017.rettg)
e1:SetOperation(c76029017.retop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCondition(aux.SpiritReturnConditionOptional)
c:RegisterEffect(e2)
end
function c76029017.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1500)
end
function c76029017.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 then
Duel.Recover(tp,1500,REASON_EFFECT)
end
end
--辉翼天骑 耀阳之崇光
function c76029019.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,aux.Tuner(Card.IsType,TYPE_SYNCHRO),aux.Tuner(Card.IsType,TYPE_SYNCHRO),nil,aux.NonTuner(c76029019.mfilter),1,99)
c:EnableReviveLimit()
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetRange(LOCATION_EXTRA)
e1:SetValue(aux.synlimit)
c:RegisterEffect(e1)
--disable zone
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c76029019.dztg)
e2:SetOperation(c76029019.dzop)
c:RegisterEffect(e2)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(76029019,1))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c76029019.discon)
e2:SetTarget(c76029019.distg)
e2:SetOperation(c76029019.disop)
c:RegisterEffect(e2)
--Damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(76029019,1))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c76029019.dacon)
e3:SetCost(c76029019.dacost)
e3:SetOperation(c76029019.daop)
c:RegisterEffect(e3)
end
c76029019.named_with_Kazimierz=true
function c76029019.mfilter(c)
return c.named_with_Kazimierz
end
function c76029019.dztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local zone=Duel.SelectField(tp,1,0,LOCATION_MZONE,nil)
e:SetLabel(zone)
Duel.Hint(HINT_ZONE,tp,zone)
end
function c76029019.tgfil(c,seq)
return c:IsAbleToRemove() and c:GetSequence()==seq
end
function c76029019.dzop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local zone=e:GetLabel()
local seq=math.log(bit.rshift(zone,16),2)
local zone=aux.SequenceToGlobal(1-tp,LOCATION_MZONE,seq)
local g=Duel.GetMatchingGroup(c76029019.tgfil,tp,0,LOCATION_MZONE,0,seq)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(zone)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function c76029019.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c76029019.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c76029019.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEDOWN,REASON_EFFECT)
end
end
function c76029019.dacon(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetHandler():GetBattleTarget()
return bc~=nil
end
function c76029019.dacost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(76029019)==0 end
c:RegisterFlagEffect(76029019,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(c:GetBaseAttack())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,c:GetBaseAttack())
end
function c76029019.daop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,x=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,x,REASON_EFFECT)
end
--红松之焰心 焰尾
function c76029021.initial_effect(c)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,76029021)
e1:SetCost(c76029021.incost)
e1:SetTarget(c76029021.intg)
e1:SetOperation(c76029021.inop)
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(76029021,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,76029021)
e2:SetTarget(c76029021.sptg)
e2:SetOperation(c76029021.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
c76029021.named_with_Kazimierz=true
function c76029021.ctfil(c)
return c.named_with_Kazimierz and c:IsReleasable() and Duel.IsExistingMatchingCard(Card.IsRace,LOCATION_MZONE,0,1,c,RACE_BEASTWARRIOR+RACE_WINDBEAST)
end
function c76029021.incost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76029021.ctfil,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c76029021.ctfil,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c76029021.intg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return rp==1-tp end
end
function c76029021.inop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsRace,LOCATION_MZONE,0,nil,RACE_BEASTWARRIOR+RACE_WINDBEAST)
if g:GetCount()>0 then
local tc=g:Select(tp,1,1,nil):GetFirst()
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c76029021.efilter)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
e4:SetOwnerPlayer(tp)
tc:RegisterEffect(e4)
end
end
function c76029021.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function c76029021.filter(c,e,tp)
return c.named_with_Kazimierz and c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c76029021.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c76029021.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function c76029021.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c76029021.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local lv=g:GetFirst():GetLevel()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(-lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
--子母之螺旋 野鬃
function c76029023.initial_effect(c)
--Synchro
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,76029023)
e1:SetTarget(c76029023.sytg)
e1:SetOperation(c76029023.syop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,76029023)
e3:SetCondition(c76029023.thcon)
e3:SetTarget(c76029023.thtg)
e3:SetOperation(c76029023.thop)
c:RegisterEffect(e3)
end
c76029023.named_with_Kazimierz=true
function c76029023.ckfil(c)
return c:IsType(TYPE_TUNER) and c:IsRace(RACE_BEASTWARRIOR+RACE_WINDBEAST)
end
function c76029023.sytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c76029023.ckfil,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.SelectTarget(tp,c76029023.ckfil,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
end
function c76029023.syop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76029023,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_SYNCHRO)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76029023,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_SYNCHRO)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
--synchro limit
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(0xff,0xff)
e1:SetTarget(aux.NOT(aux.TargetBoolFunction(Card.IsRace,RACE_BEASTWARRIOR+RACE_WINDBEAST)))
e1:SetValue(c76029023.sumlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(c76029023.synlimit)
e1:SetTargetRange(0xff,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c76029023.synlimit(e,c)
if not c then return false end
return not c:IsRace(RACE_BEASTWARRIOR) and not c:IsRace(RACE_WINDBEAST)
end
function c76029023.sumlimit(e,c)
if not c then return false end
return c:IsControler(e:GetHandlerPlayer())
end
function c76029023.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and r==REASON_SYNCHRO
end
function c76029023.filter(c)
return c.named_with_Kazimierz and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c76029023.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76029023.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c76029023.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c76029023.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--辉翼天骑 终末逐魇
local m=76029025
local cm=_G["c"..m]
function cm.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.postg)
e1:SetOperation(cm.posop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCost(aux.bfgcost)
e3:SetCondition(cm.descon)
e3:SetTarget(cm.postg2)
e3:SetOperation(cm.posop2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e4)
end
c76029025.named_with_Kazimierz=true
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
end
function cm.filter(c)
return c:IsFaceup() and c.named_with_Kazimierz and c:IsCanTurnSet()
end
function cm.filter2(c,e,tp)
return c.named_with_Kazimierz and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if g:GetCount()<=0 or ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
local xg=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
Duel.ShuffleSetCard(xg)
local xc=xg:Select(1-tp,1,1,nil):GetFirst()
Duel.ConfirmCards(0,xc)
if xc~=tc then
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
else
Duel.SendtoGrave(xg,REASON_EFFECT)
end
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.cfilter4(c,tp)
return c:IsFaceup() and c.named_with_Kazimierz and c:IsControler(tp)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter4,1,nil,tp)
end
function cm.filter5(c)
return c:IsFaceup() and c:IsCanChangePosition()
end
function cm.postg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter5,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
end
function cm.posop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local tc=Duel.SelectTarget(tp,cm.filter5,tp,0,LOCATION_ONFIELD,1,1,nil):GetFirst()
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
--辉翼天骑 烛光蚀影
function c76029027.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c76029027.target)
e1:SetOperation(c76029027.activate)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(c76029027.rmcost)
e2:SetTarget(c76029027.rmtg)
e2:SetOperation(c76029027.rmop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_CHANGE_POS)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(76029027,2))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_HAND)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,76029027)
e4:SetTarget(c76029027.cptg)
e4:SetOperation(c76029027.cpop)
c:RegisterEffect(e4)
--remain field
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3)
end
c76029027.named_with_Kazimierz=true
function c76029027.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:GetHandler():SetTurnCounter(0)
local sg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,sg,sg:GetCount(),0,0)
--destroy
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c76029027.descon)
e1:SetOperation(c76029027.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,3)
e:GetHandler():RegisterEffect(e1)
e:GetHandler():RegisterFlagEffect(1082946,RESET_PHASE+PHASE_END+RESET_OPPO_TURN,0,3)
c76029027[e:GetHandler()]=e1
end
function c76029027.descon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c76029027.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==3 then
Duel.Destroy(c,REASON_RULE)
c:ResetFlagEffect(1082946)
end
end
function c76029027.cstfil(c)
return c.named_with_Kazimierz
end
function c76029027.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_MZONE,nil)
if sg:GetCount()>0 then
Duel.ChangePosition(sg,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE)
end
if Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_REMOVED,0,3,nil) and Duel.SelectYesNo(tp,aux.Stringid(76029027,0)) then
local xg=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_REMOVED,0,nil):RandomSelect(tp,3)
Duel.ConfirmCards(tp,xg)
Duel.ConfirmCards(1-tp,xg)
local x=xg:FilterCount(c76029027.cstfil,nil)
Duel.Draw(tp,x,REASON_EFFECT)
end
end
function c76029027.ckfil(c,tp)
return c.named_with_Kazimierz and c:IsControler(tp)
end
function c76029027.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,nil) end
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
if Duel.Remove(tc,POS_FACEDOWN,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetOperation(c76029027.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c76029027.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c76029027.ckfil,1,nil,tp) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500)
end
function c76029027.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function c76029027.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoHand(tc,tp,REASON_EFFECT)
end
function c76029027.cxkfil(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_REMOVED) and c:IsType(TYPE_MONSTER)
end
function c76029027.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c76029027.cxkfil,1,nil,tp) and Duel.IsExistingMatchingCard(c76029027.cstfil,tp,LOCATION_MZONE,0,1,nil) end
end
function c76029027.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c76029027.cstfil,tp,LOCATION_MZONE,0,nil)
local tc=eg:Filter(c76029027.cxkfil,nil,tp):Select(tp,1,1,nil):GetFirst()
Duel.ConfirmCards(1-tp,tc)
local xc=g:Select(tp,1,1,nil):GetFirst()
local code=tc:GetOriginalCodeRule()
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_CODE)
e1:SetValue(code)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
xc:RegisterEffect(e1)
xc:SetHint(CHINT_CARD,code)
if not tc:IsType(TYPE_TRAPMONSTER) then
xc:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1)
end
end
--辉翼天骑 秽血湮耀
local m=76029029
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,76029029)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.distg)
e1:SetOperation(cm.disop)
c:RegisterEffect(e1)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76029029,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DAMAGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,06029029)
e1:SetCondition(c76029029.stcon)
e1:SetCost(aux.bfgcost)
e1:SetTarget(c76029029.sttg)
e1:SetOperation(c76029029.stop)
c:RegisterEffect(e1)
end
c76029029.named_with_Kazimierz=true
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
and Duel.IsChainNegatable(ev)
end
function c76029029.ckfil(c)
return c.named_with_Kazimierz
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76029029.ckfil,tp,LOCATION_REMOVED,0,1,nil) end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_REMOVED,0,nil)
Duel.ConfirmCards(1-tp,g)
local x=g:FilterCount(c76029029.ckfil,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
local dg=Group.CreateGroup()
for i=1,ev do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
local tc=te:GetHandler()
dg:AddCard(tc)
end
local lg=dg:Select(tp,1,x,nil)
local lc=lg:GetFirst()
while lc do
lc:RegisterFlagEffect(m,RESET_CHAIN,0,1)
lc=lg:GetNext()
end
for i=1,ev do
local te=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)
local p=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_PLAYER)
local tc=te:GetHandler()
if tc:GetFlagEffect(m)~=0 then
Duel.NegateActivation(i)
end
end
end
function c76029029.stcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c76029029.setfilter(c)
return c.named_with_Kazimierz and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsSSetable()
end
function c76029029.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c76029029.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c76029029.stop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c76029029.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
--辉翼天骑 不畏苦暗
local m=76029031
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_BATTLE_START)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,76029031)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
c76029031.named_with_Kazimierz=true
function cm.filter(c,e,tp)
return c.named_with_Kazimierz
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,cm.filter,e,tp,mg,nil,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.mfilter(c)
return c.named_with_Kazimierz
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,cm.filter,e,tp,mg,nil,Card.GetLevel,"Greater")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if mat:IsExists(cm.mfilter,1,nil) and #g>0 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(76029031,0)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function cm.mfilter2(c)
return c.named_with_Kazimierz
end
function cm.filter2(c,mg)
return (c:IsRace(RACE_BEASTWARRIOR) or c:IsRace(RACE_WINDBEAST)) and c:IsSynchroSummonable(nil,mg)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetMatchingGroup(cm.mfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(cm.mfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end
end
\ No newline at end of file
......@@ -43,13 +43,13 @@ function c9910895.initial_effect(c)
e5:SetOperation(c9910895.immop)
c:RegisterEffect(e5)
--race
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_ADD_RACE)
e6:SetRange(LOCATION_MZONE)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e6:SetValue(c9910895.raval)
c:RegisterEffect(e6)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCountLimit(1)
e3:SetOperation(c9910895.raop)
c:RegisterEffect(e3)
--tograve
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(9910895,0))
......@@ -95,8 +95,10 @@ end
function c9910895.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c9910895.raval(e,c)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_GRAVE,LOCATION_GRAVE)
function c9910895.raop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,LOCATION_GRAVE)
local wg=g:Filter(Card.IsType,nil,TYPE_MONSTER)
local wbc=wg:GetFirst()
local race=0
......@@ -104,7 +106,12 @@ function c9910895.raval(e,c)
race=race|wbc:GetOriginalRace()
wbc=wg:GetNext()
end
return race
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_RACE)
e1:SetValue(race)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c9910895.remfilter(c)
return not c:IsType(TYPE_TOKEN)
......
......@@ -623,14 +623,11 @@
!setname 0xac9 青空下
#其空葵 其空あおい 290 0x7a0-0x7af
!setname 0x87af 方舟之骑士(方舟の騎士/アーク·ナイト)
!setname 0x87ad 战械人形(戦械人形/ワレアポン·ドール)
!setname 0x87ac 钢铁方舟(鋼鉄方舟/メタルアーク)
!counter 0x11ae COST指示物
!setname 0x7ad 战械(ワレアポン)
!setname 0x87a1 光明圣殿团(ライト·テンプルナイツ)
!setname 0x87aa 逆转的机壳(レブクリフォート)
!setname 0x77ad 战械死徒(戦械死徒/ワレアポン·アポッサル)
!setname 0x87ad 战械人形
!setname 0x7ad 战械
!setname 0x87af 方舟骑士
!setname 0x77af 深海猎人
!counter 0x10ae 战术指示物
#空想上の人格保持者
!setname 0xfec1 幼龙
......
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