Commit ae6dd4c9 authored by tsubaki's avatar tsubaki

1.999zz2

parent 93bce532
Pipeline #14774 passed with stage
in 1 minute and 33 seconds
No preview for this file type
--
Gds={}
--
local GDS = false
local Gdslist = {}
local Gdsflag=286379010
local Gdsflag2=386379010
local Gdsflag=86300000
local Gdsflag2=86400000
--梦符自定义时点
function Gds.Adjustdreamsequence(c)
if GDS == true then return end
GDS = true
--adjust
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e1:SetOperation(Gds.dsop)
Duel.RegisterEffect(e1,0)
local e2=Effect.GlobalEffect()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetOperation(Gds.dsop2)
Duel.RegisterEffect(e2,0)
if Gds.Adjustdream == nil then
Gds.Adjustdream = true
--adjust
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PREDRAW)
e1:SetOperation(Gds.dsop)
Duel.RegisterEffect(e1,0)
local e2=Effect.GlobalEffect()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
e2:SetOperation(Gds.dsop2)
Duel.RegisterEffect(e2,0)
end
end
function Gds.dsop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(0,Gdsflag)>0 then return end
Duel.RegisterFlagEffect(0,Gdsflag,RESET_PHASE+PHASE_END,0,1)
local g=Duel.GetMatchingGroup(aux.TRUE,0,0xff,0xff,nil)
if g:GetCount()>0 then
local gc=g:GetCount()
......@@ -44,6 +45,7 @@ function Gds.dsop(e,tp,eg,ep,ev,re,r,rp)
end
end
function Gds.dsop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(0,Gdsflag)<=0 then return end
local g=Duel.GetMatchingGroup(aux.TRUE,0,LOCATION_DECK,LOCATION_DECK,nil):Filter(Card.IsOriginalSetCard,nil,0x279)
local tc=g:GetFirst()
while tc do
......@@ -79,3 +81,43 @@ function Gds.dsop2(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext()
end
end
--检查卡组中公开的卡
function Gds.Checkdeckpublic(c)
if Gds.Checkdeck == nil then
Gds.Checkdeck = true
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379011,2))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_DECK)
e1:SetCondition(Gds.cdpcon)
e1:SetOperation(Gds.cdpop)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetTargetRange(LOCATION_DECK,LOCATION_DECK)
e2:SetTarget(Gds.efcdptg)
e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,0)
end
end
function Gds.cdpcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
local c=e:GetHandler()
return Duel.GetCurrentChain()==0 and (c:IsFaceup() or Duel.IsPlayerAffectedByEffect(tp,31027))
end
function Gds.cdpfilter(c)
return c:IsFaceup() or Duel.IsPlayerAffectedByEffect(c:GetControler(),31027)
end
function Gds.cdpop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
local g=Duel.GetMatchingGroup(Gds.cdpfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
end
end
function Gds.efcdptg(e,c)
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(Gds.cdpfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return false end
return g:IsContains(c)
end
......@@ -11,6 +11,6 @@ function Arcol.GetLostCode(c)
elseif c:IsOriginalSetCard(0xaa5) then
return 86379744
elseif c:IsOriginalSetCard(0x226,0x703) then
return 86379015
return 86379009
else return false end
end
\ No newline at end of file
......@@ -125,9 +125,9 @@ if not TET.ELCounter then
local gh=Duel.GetFieldGroup(tp,LOCATION_HAND,0):RandomSelect(tp,1)
local gd=Duel.GetFieldGroup(tp,LOCATION_DECK,0):RandomSelect(tp,1)
gd:Merge(gh)
Duel.RegisterFlagEffect(tp,50429,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,50429,RESET_PHASE+PHASE_END,0,2)
if Duel.SendtoGrave(gd,REASON_EFFECT)>0 then
Duel.Damage(tp,Mystery*400,REASON_EFFECT)
Duel.Damage(tp,Mystery*600,REASON_EFFECT)
end
end
end
......@@ -193,9 +193,9 @@ if not TET.ELCounter then
local gh=Duel.GetFieldGroup(tp,LOCATION_HAND,0):RandomSelect(tp,1)
local gd=Duel.GetFieldGroup(tp,LOCATION_DECK,0):RandomSelect(tp,1)
gd:Merge(gh)
Duel.RegisterFlagEffect(tp,50429,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,50429,RESET_PHASE+PHASE_END,0,2)
if Duel.SendtoGrave(gd,REASON_EFFECT)>0 then
Duel.Damage(tp,Mystery*400,REASON_EFFECT)
Duel.Damage(tp,Mystery*600,REASON_EFFECT)
end
end
end
......
......@@ -20,6 +20,7 @@
!counter 0x245 气质指示物
!counter 0x254c 虚幻指示物
!counter 0x500d 结晶指示物
!counter 0x1999 算数指示物
!counter 0x373 粲辉指示物
!counter 0x1700 灵力指示物
......@@ -295,10 +296,11 @@
!setname 0x87f3 叛逆型
!setname 0x77f4 玛纳历亚
!setname 0x7f5 公主连接
!setname 0x7f6 苍空 グランブルー
!setname 0x37f6 苍空
!setname 0x95de 堕天司
!setname 0x5d1 十天众
!setname 0x5da 星晶兽
!setname 0x67f3 异人格
!setname 0x57f6 星晶兽
!setname 0x37f5 失落公主
!setname 0x97f5 /公主形态
......
No preview for this file type
pics/17033000.jpg

23.3 KB | W: | H:

pics/17033000.jpg

24.2 KB | W: | H:

pics/17033000.jpg
pics/17033000.jpg
pics/17033000.jpg
pics/17033000.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/86379654.jpg

55 KB | W: | H:

pics/86379654.jpg

52.7 KB | W: | H:

pics/86379654.jpg
pics/86379654.jpg
pics/86379654.jpg
pics/86379654.jpg
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
--天界之门
local m=17033000
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
--灾转福为
local s,id,o=GetID()
function c17033000.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(cm.activate)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if g:GetCount()<1 or (not c:IsRelateToEffect(e)) then return end
Duel.ConfirmCards(tp,g)
if g:GetClassCount(Card.GetCode)==g:GetCount() then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(17033000,2))
--Effect Draw
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DRAW_COUNT)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,0)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(2)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(17033000,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(17033000,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_FZONE)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetCountLimit(1)
e4:SetCondition(cm.thcon)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
end
function s.qfilter(c)
if c:IsCode(40516623,71614230,77511331) then return end
return c:IsType(TYPE_FUSION+TYPE_RITUAL+TYPE_SYNCHRO+TYPE_XYZ+TYPE_SPSUMMON+TYPE_LINK+TYPE_SPIRIT)
end
function s.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and
(c:IsStatus(STATUS_PROC_COMPLETE) or not s.qfilter(c))
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,nil,e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
and Duel.GetOverlayGroup(tp,1,1):IsExists(s.filter,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,nil)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
function s.activate(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,Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,1,nil,e,0,tp,false,false)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local g=Duel.GetOverlayGroup(tp,1,1)
if g:IsExists(s.filter,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:FilterSelect(tp,s.filter,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--核心敢达
local s,id,o=GetID()
function c17033010.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_MACHINE),1)
c:EnableReviveLimit()
--cannot target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.indcon)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetDescription(aux.Stringid(17033010,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetTarget(s.eqtg)
e2:SetOperation(s.eqop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(17033010,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(s.descost)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
end
function s.indcon(e)
local ph=Duel.GetCurrentPhase()
return not (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
function s.eqfilter(c)
return c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(s.eqlimit)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(500)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(17033000,RESET_EVENT+RESETS_STANDARD,0,0)
end
end
function s.eqlimit(e,c)
return e:GetOwner()==c
end
function s.costfilter(c,tp)
return c:IsControler(tp) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil,c)
end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEquipGroup():IsExists(s.costfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=e:GetHandler():GetEquipGroup():FilterSelect(tp,s.costfilter,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--苍空的旅者·古兰
--连结的命运
local m=17060830
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
--Special Summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(17060830,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CUSTOM+17060830)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED)
ge1:SetCondition(cm.regcon)
ge1:SetOperation(cm.regop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.spcfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(cm.spcfilter,1,nil,0) then v=v+1 end
if eg:IsExists(cm.spcfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+17060830,re,r,rp,ep,e:GetLabel())
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return ev==tp or ev==PLAYER_ALL
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,17060830+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x7f6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x57f6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then
return
function cm.pcfilter(c)
return c:IsSetCard(0x37f6) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA))
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(cm.pcfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil)
if chk==0 then return b1 or b2 end
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(91501248,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(91501248,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op]
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,0,nil,e,0,tp,false,false)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(17060830,1)) then
Duel.BreakEffect()
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local sel=e:GetLabel()
local g=nil
if sel==1 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
else
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.pcfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
\ No newline at end of file
end
......@@ -3,85 +3,44 @@ local m=17060840
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.EnablePendulumAttribute(c)
--spsummon(p)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,17060840)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--spsummon
--indestructable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(17060840,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,17060841)
e2:SetCondition(cm.hspcon)
e2:SetTarget(cm.hsptg)
e2:SetOperation(cm.hspop)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.indcon)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x5da) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
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 tc=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(17060840,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(cm.thcon)
e1:SetOperation(cm.thop)
Duel.RegisterEffect(e1,tp)
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(17060840)~=e:GetLabel() then
e:Reset()
return false
else return true end
--to hand
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_PZONE)
e5:SetCountLimit(1,17060840)
e5:SetCondition(cm.thcon)
e5:SetTarget(cm.thtg)
e5:SetOperation(cm.thop)
c:RegisterEffect(e5)
end
function cm.indfilter(c)
return c:IsFaceup() and c:IsSetCard(0x57f6)
end
function cm.indcon(e)
return Duel.IsExistingMatchingCard(cm.indfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
function cm.thfilter(c)
return c:IsCode(17060830,17061210,17061220) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return 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)
Duel.SendtoHand(e:GetLabelObject(),nil,REASON_EFFECT)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7f6)
end
function cm.hspcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,2,nil)
end
function cm.hsptg(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 cm.hspop(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)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.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
\ No newline at end of file
......@@ -11,8 +11,8 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,17060860)
e1:SetTarget(cm.atktg)
e1:SetOperation(cm.atkop)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--spsummon proc
local e2=Effect.CreateEffect(c)
......@@ -31,31 +31,21 @@ function cm.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(cm.atkcon)
e3:SetOperation(cm.atkop1)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
end
function cm.filter1(c)
return c:IsType(TYPE_MONSTER)
return c:IsSetCard(0x37f6) and c:IsFaceup()
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.nzatk(chkc) end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsType(TYPE_MONSTER) and chkc~=e:GetHandler() end
if chk==0 then return e:GetHandler():IsDestructable()
and Duel.IsExistingTarget(aux.nzatk,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 and not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(math.ceil(tc:GetAttack()/2))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
and Duel.IsExistingTarget(cm.filter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_MONSTER) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.filter1,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
......@@ -72,10 +62,10 @@ end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.atkop1(e,tp,eg,ep,ev,re,r,rp)
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0x7f6)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0x37f6)
local tc=g:GetFirst()
while tc do
local e3=Effect.CreateEffect(c)
......
......@@ -67,6 +67,6 @@ function c19500039.spcon(e,c)
end
function c19500039.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c19500039.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c19500039.spfilter,tp,LOCATION_GRAVE,0,1,1nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
......@@ -5,7 +5,7 @@ function c20238.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_GRAVE)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e1:SetCountLimit(1,20238)
e1:SetCondition(c20238.spcon)
e1:SetOperation(c20238.spop)
......@@ -40,12 +40,12 @@ function c20238.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetTurnCount()<=6
and Duel.IsExistingMatchingCard(c20238.spfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c20238.spfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(c20238.spfilter,tp,LOCATION_HAND,0,1,c)
and Duel.IsExistingMatchingCard(c20238.spfilter,tp,LOCATION_DECK,0,1,c)
end
function c20238.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g1=Duel.GetMatchingGroup(c20238.spfilter,tp,LOCATION_HAND,0,nil)
local g2=Duel.GetMatchingGroup(c20238.spfilter,tp,LOCATION_DECK,0,nil)
local g1=Duel.GetMatchingGroup(c20238.spfilter,tp,LOCATION_HAND,0,c)
local g2=Duel.GetMatchingGroup(c20238.spfilter,tp,LOCATION_DECK,0,c)
local sg=g1:RandomSelect(tp,1)
local sg2=g2:RandomSelect(tp,1)
sg:Merge(sg2)
......
......@@ -71,6 +71,6 @@ function c20350.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c20350.val(e,c)
local num1=Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_SPELL)*200
local num1=Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_GRAVE,0,nil,TYPE_SPELL)*700
return -num1
end
--全人类都飞上天
function c22201501.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--qiang zhi tuo chu
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22201501,0))
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_FZONE)
e4:SetProperty(EFFECT_FLAG_BOTH_SIDE+EFFECT_FLAG_PLAYER_TARGET)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e4:SetTarget(c22201501.tg)
e4:SetOperation(c22201501.op)
c:RegisterEffect(e4)
end
function c22201501.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,0,1)
end
function c22201501.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
local tc=g:RandomSelect(tp,1):GetFirst()
local dg=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and c==tc and dg:GetCount()>0 and tc:GetControler()==tp then
local dc=dg:RandomSelect(tp,1):GetFirst()
Duel.Destroy(dc,REASON_EFFECT)
end
end
......@@ -92,6 +92,20 @@ function c22249.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.tsfilter40(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(86379841)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22249.tsfilter41(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_FIRE+ATTRIBUTE_WATER))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter42,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22249.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter42(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22249.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22249.tsfilter43(c)
return ((c:GetAttribute()==0 and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x181) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22249.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
......@@ -104,7 +118,8 @@ function c22249.target(e,tp,eg,ep,ev,re,r,rp,chk)
local res1=exg:IsExists(c22249.tsfilter11,1,nil) and Duel.IsExistingMatchingCard(c22249.tsfilter10,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res2=exg:IsExists(c22249.tsfilter21,1,nil) and Duel.IsExistingMatchingCard(c22249.tsfilter20,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res3=exg:IsExists(c22249.tsfilter31,1,nil) and Duel.IsExistingMatchingCard(c22249.tsfilter30,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3) then
local res4=exg:IsExists(c22249.tsfilter41,1,nil) and Duel.IsExistingMatchingCard(c22249.tsfilter40,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3 or res4) then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
......@@ -113,7 +128,7 @@ function c22249.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c22249.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res or res0 or res1 or res2 or res3
return res or res0 or res1 or res2 or res3 or res4
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
......
......@@ -91,6 +91,20 @@ function c22250.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22250.tsfilter40(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(86379841)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22250.tsfilter41(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_FIRE+ATTRIBUTE_EARTH))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter42,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22250.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter42(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22250.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22250.tsfilter43(c)
return ((c:GetAttribute()==0 and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x181) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22250.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
......@@ -103,7 +117,8 @@ function c22250.target(e,tp,eg,ep,ev,re,r,rp,chk)
local res1=exg:IsExists(c22250.tsfilter11,1,nil) and Duel.IsExistingMatchingCard(c22250.tsfilter10,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res2=exg:IsExists(c22250.tsfilter21,1,nil) and Duel.IsExistingMatchingCard(c22250.tsfilter20,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res3=exg:IsExists(c22250.tsfilter31,1,nil) and Duel.IsExistingMatchingCard(c22250.tsfilter30,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3) then
local res4=exg:IsExists(c22250.tsfilter41,1,nil) and Duel.IsExistingMatchingCard(c22250.tsfilter40,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3 or res4) then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
......@@ -112,7 +127,7 @@ function c22250.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c22250.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res or res0 or res1 or res2 or res3
return res or res0 or res1 or res2 or res3 or res4
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
......@@ -121,7 +136,7 @@ function c22250.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(22249)
e1:SetCode(22250)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
--
......
......@@ -91,6 +91,20 @@ function c22251.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.tsfilter40(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(86379841)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22251.tsfilter41(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter42,c:GetControler(),LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22251.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter42(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22251.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22251.tsfilter43(c)
return ((c:GetAttribute()==0 and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x181) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22251.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
......@@ -103,7 +117,8 @@ function c22251.target(e,tp,eg,ep,ev,re,r,rp,chk)
local res1=exg:IsExists(c22251.tsfilter11,1,nil) and Duel.IsExistingMatchingCard(c22251.tsfilter10,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res2=exg:IsExists(c22251.tsfilter21,1,nil) and Duel.IsExistingMatchingCard(c22251.tsfilter20,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res3=exg:IsExists(c22251.tsfilter31,1,nil) and Duel.IsExistingMatchingCard(c22251.tsfilter30,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3) then
local res4=exg:IsExists(c22251.tsfilter41,1,nil) and Duel.IsExistingMatchingCard(c22251.tsfilter40,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3 or res4) then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
......@@ -112,7 +127,7 @@ function c22251.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c22251.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res or res0 or res1 or res2 or res3
return res or res0 or res1 or res2 or res3 or res4
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
......
......@@ -91,6 +91,20 @@ function c22252.tsfilter33(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x183) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.tsfilter40(c,e,tp,m,f,chkf,exg)
return c:IsType(TYPE_FUSION) and c:IsOriginalCodeRule(86379841)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c22252.tsfilter41(c)
return (((c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)) and not c:IsLocation(LOCATION_DECK)) or (c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_WIND+ATTRIBUTE_EARTH))) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter42,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(c22252.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter42(c)
return ((c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x184) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0 and Duel.IsExistingMatchingCard(c22252.tsfilter43,c:GetControler(),LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
function c22252.tsfilter43(c)
return ((c:GetAttribute()==0 and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0x181) or c:IsCode(22200)) and Duel.GetLocationCountFromEx(c:GetControler(),c:GetControler(),c,TYPE_FUSION)>0
end
--
function c22252.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
......@@ -103,7 +117,8 @@ function c22252.target(e,tp,eg,ep,ev,re,r,rp,chk)
local res1=exg:IsExists(c22252.tsfilter11,1,nil) and Duel.IsExistingMatchingCard(c22252.tsfilter10,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res2=exg:IsExists(c22252.tsfilter21,1,nil) and Duel.IsExistingMatchingCard(c22252.tsfilter20,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
local res3=exg:IsExists(c22252.tsfilter31,1,nil) and Duel.IsExistingMatchingCard(c22252.tsfilter30,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3) then
local res4=exg:IsExists(c22252.tsfilter41,1,nil) and Duel.IsExistingMatchingCard(c22252.tsfilter40,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not (res or res0 or res1 or res2 or res3 or res4) then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
......@@ -112,7 +127,7 @@ function c22252.target(e,tp,eg,ep,ev,re,r,rp,chk)
res=Duel.IsExistingMatchingCard(c22252.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res or res0 or res1 or res2 or res3
return res or res0 or res1 or res2 or res3 or res4
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
......
......@@ -92,5 +92,5 @@ function c23099.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c23099.val(e,c)
return c:GetEquipCount()*100*c:GetLevel()
return c:GetEquipCount()*200*c:GetLevel()
end
......@@ -80,7 +80,7 @@ function c25349.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x778)
end
function c25349.con(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c25349.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(c25349.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)>=e:GetLabel()
end
function c25349.filter(c)
......@@ -88,7 +88,7 @@ function c25349.filter(c)
end
function c25349.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c25349.atkfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(c25349.atkfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
if g:GetClassCount(Card.GetCode)>=e:GetLabel() and Duel.IsExistingMatchingCard(c25349.filter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(25349,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c25349.filter,tp,LOCATION_DECK,0,1,1,nil)
......@@ -102,7 +102,7 @@ function c25349.gfilter(c,tp)
return c:GetPreviousControler()==tp
end
function c25349.thcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c25349.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(c25349.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetTurnPlayer()==tp
and eg:IsExists(c25349.gfilter,1,nil,tp) and g:GetClassCount(Card.GetCode)>=e:GetLabel()
end
......@@ -157,7 +157,7 @@ function c25349.kfilter(c,tp)
return c:GetSummonPlayer()==1-tp and c:IsControlerCanBeChanged()
end
function c25349.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c25349.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(c25349.atkfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
local fg=eg:Filter(c25349.kfilter,nil,tp)
return g:GetClassCount(Card.GetCode)>=e:GetLabel() and fg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=fg:GetCount()-1
end
......
......@@ -9,7 +9,7 @@ function c50106.initial_effect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,50106+EFFECT_COUNT_CODE_DUEL)
e4:SetCountLimit(1,50106)
e4:SetCost(c50106.bcost)
e4:SetTarget(c50106.btg)
e4:SetOperation(c50106.bop)
......@@ -23,7 +23,7 @@ function c50106.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c50106.bfilter(c,e,tp,atk)
return c:GetAttack()<=atk/2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:GetDefense()<=atk/2 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c50106.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......@@ -55,5 +55,8 @@ function c50106.bop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e2,true)
end
end
......@@ -32,7 +32,7 @@ function c50219.bcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c50219.btg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c50219.natfilter,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
end
function c50219.natfilter(c)
return not c:IsType(TYPE_TOKEN)
......@@ -44,9 +44,10 @@ function c50219.bop(e,tp,eg,ep,ev,re,r,rp)
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50219,num,e)
local ct=Duel.GetMatchingGroupCount(c50219.natfilter,tp,0,LOCATION_MZONE,nil)
local lss=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_MZONE,nil)/2
local ct=math.floor(lss)
Duel.Draw(tp, ct, REASON_EFFECT)
Duel.Recover(tp, ct*400, REASON_EFFECT)
Duel.Recover(tp, ct*1000, REASON_EFFECT)
end
function c50219.value(e,c)
local ct=400
......
......@@ -46,7 +46,7 @@ end
function c50277.cop(e,tp,eg,ep,ev,re,r,rp)
local atk=e:GetLabelObject():GetAttack()
Duel.Recover(tp,atk*2,REASON_EFFECT)
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<3 then
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)<2 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
......@@ -31,7 +31,6 @@ function c50346.bop(e,tp,eg,ep,ev,re,r,rp)
local genso,count=TET.ELCounter.Get(1-tp)
if genso==50219 and count>1 then num=3-count end
if num<0 then num=0 end
TET.ELCounter.Add(nil,1-tp,50219,num,e)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
......
......@@ -52,19 +52,15 @@ end
Duel.PayLPCost(tp,4000)
end
function c50501.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(c50501.spfilter4,tp,LOCATION_DECK,0,1,nil,e,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c50501.spfilter5,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end
function c50501.operation1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local g4=Duel.GetMatchingGroup(c50501.spfilter4,tp,LOCATION_DECK,0,nil,e,tp)
local g5=Duel.GetMatchingGroup(c50501.spfilter5,tp,LOCATION_DECK,0,nil,e,tp)
local g1=g4:RandomSelect(tp, 1)
local g2=g5:RandomSelect(tp, 1)
g1:Merge(g2)
local g1=g5:RandomSelect(tp, 1)
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -63,7 +63,7 @@ function c50503.initial_effect(c)
e6:SetCode(EFFECT_UPDATE_ATTACK)
e6:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(LOCATION_MZONE,0)
e6:SetTargetRange(LOCATION_MZONE+LOCATION_GRAVE,0)
e6:SetCondition(c50503.gcon)
e6:SetValue(600)
c:RegisterEffect(e6)
......
--火☪冰的消融
function c50513.initial_effect(c)
--act
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--level
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_LEVEL)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetValue(-1)
c:RegisterEffect(e2)
--element
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_SZONE)
e5:SetCondition(c50513.discon)
e5:SetOperation(c50513.disop)
c:RegisterEffect(e5)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCountLimit(1)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c50513.ficon)
e4:SetTarget(c50513.eltg)
e4:SetOperation(c50513.elop)
c:RegisterEffect(e4)
local e3=e4:Clone()
e3:SetCondition(c50513.wacon)
c:RegisterEffect(e3)
end
function c50513.discon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and re:GetHandler():IsLocation(LOCATION_MZONE)
and not re:GetHandler():IsAttribute(ATTRIBUTE_FIRE) and not re:GetHandler():IsAttribute(ATTRIBUTE_DARK)
end
function c50513.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_RULE)
end
function c50513.ficon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and re:GetHandler():IsAttribute(ATTRIBUTE_FIRE) and re:GetHandler():IsLocation(LOCATION_MZONE)
end
function c50513.wacon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and re:GetHandler():IsAttribute(ATTRIBUTE_DARK) and re:GetHandler():IsLocation(LOCATION_MZONE)
end
function c50513.discfilter(c,att)
return c:GetAttribute()~=att and c:IsSetCard(0x250) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c50513.cfilter(c)
return c:GetPreviousLocation()==LOCATION_EXTRA
end
function c50513.eltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local att=re:GetHandler():GetAttribute()
return Duel.IsExistingMatchingCard(c50513.discfilter, tp, LOCATION_DECK, 0, 1, nil, att) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if not Duel.IsExistingMatchingCard(c50513.cfilter, tp, LOCATION_MZONE, 0, 1, nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND)
end
end
function c50513.elop(e,tp,eg,ep,ev,re,r,rp)
local att=re:GetHandler():GetAttribute()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c50513.discfilter,tp,LOCATION_DECK,0,1,1,nil,att)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if not Duel.IsExistingMatchingCard(c50513.cfilter, tp, LOCATION_MZONE, 0, 1, nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp, aux.Stringid(50513,0)) then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--水☪雷的纠缠
function c50514.initial_effect(c)
--act
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(-400)
c:RegisterEffect(e2)
local e6=e2:Clone()
e6:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e6)
--element
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_SZONE)
e5:SetCondition(c50514.discon)
e5:SetOperation(c50514.disop)
c:RegisterEffect(e5)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCountLimit(1)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c50514.licon)
e4:SetTarget(c50514.eltg)
e4:SetOperation(c50514.elop)
c:RegisterEffect(e4)
local e3=e4:Clone()
e3:SetCondition(c50514.dacon)
c:RegisterEffect(e3)
end
function c50514.discon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and re:GetHandler():IsLocation(LOCATION_MZONE)
and not re:GetHandler():IsAttribute(ATTRIBUTE_LIGHT) and not re:GetHandler():IsAttribute(ATTRIBUTE_WATER)
end
function c50514.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_RULE)
end
function c50514.licon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and re:GetHandler():IsAttribute(ATTRIBUTE_LIGHT) and re:GetHandler():IsLocation(LOCATION_MZONE)
end
function c50514.dacon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and re:GetHandler():IsAttribute(ATTRIBUTE_WATER) and re:GetHandler():IsLocation(LOCATION_MZONE)
end
function c50514.discfilter(c,att)
return c:GetAttribute()~=att and c:IsSetCard(0x250) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function c50514.cfilter(c)
return c:IsType(TYPE_LINK)
end
function c50514.filter(c)
return c:IsType(TYPE_XYZ)
end
function c50514.eltg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local att=re:GetHandler():GetAttribute()
return Duel.IsExistingMatchingCard(c50514.discfilter, tp, LOCATION_DECK, 0, 1, nil, att) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c50514.elop(e,tp,eg,ep,ev,re,r,rp)
local att=re:GetHandler():GetAttribute()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c50514.discfilter,tp,LOCATION_DECK,0,1,1,nil,att)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if not Duel.IsExistingMatchingCard(c50514.cfilter, tp, LOCATION_MZONE, 0, 1, nil)
and Duel.IsExistingMatchingCard(c50514.filter, tp, LOCATION_MZONE, 0, 1, nil)
and Duel.SelectYesNo(tp, aux.Stringid(50514,0)) then
local tg=Duel.SelectMatchingCard(tp, c50514.filter, tp, LOCATION_MZONE, 0, 1, 1, nil):GetFirst()
Duel.Overlay(tg,g)
end
end
end
--圣女的号令
function c66919016.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(c66919016.target)
e1:SetOperation(c66919016.spop)
c:RegisterEffect(e1)
end
function c66919016.filter(c)
return c:IsCode(66919015) and c:IsCanTurnSet()
end
function c66919016.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66919016.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
end
function c66919016.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c66919016.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
e:SetLabel(tc.dfc_front_side)
local c=e:GetHandler()
local mcode=tc:GetOriginalCode()
if Duel.ChangePosition(tc,POS_FACEDOWN_ATTACK,POS_FACEDOWN_DEFENSE,POS_FACEDOWN_ATTACK,POS_FACEDOWN_DEFENSE)>0 then
local tcode=e:GetLabel()
tc:SetEntityCode(tcode,true)
tc:ReplaceEffect(tcode,0,0)
Duel.SetMetatable(tc,_G["c"..tcode])
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not mcode then return end
c:SetEntityCode(mcode)
c:ReplaceEffect(mcode,0,0)
Duel.SetMetatable(c,_G["c"..mcode])
end)
tc:RegisterEffect(e2)
end
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(1000)
e1:SetTarget(c66919016.indtg)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c66919016.indtg)
e2:SetValue(1)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e2,tp)
Duel.SpecialSummonComplete()
end
end
function c66919016.indtg(e,c)
return c:IsRace(RACE_FAIRY)
end
\ No newline at end of file
--月之妖精☆琪露诺✿
require "expansions/script/nef/darksyn"
local Cardno=74561060
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
DS.DarkTunerLimit(c)
--defence
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Cardno,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cCardno.defcost)
e1:SetOperation(cCardno.defop)
c:RegisterEffect(e1)
--rebirth
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(Cardno,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,Cardno)
e2:SetCost(cCardno.rbcost)
e2:SetTarget(cCardno.rbtg)
e2:SetOperation(cCardno.rbop)
c:RegisterEffect(e2)
end
--rebirth
function cCardno.rbfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function cCardno.rbcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cCardno.rbfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local cc=Duel.SelectMatchingCard(tp,cCardno.rbfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(cc,REASON_COST)
Duel.SetTargetCard(cc)
end
function cCardno.rbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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,tp,LOCATION_GRAVE)
end
function cCardno.rbop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local tc = Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and tc:IsSetCard(0x999) and Duel.SelectYesNo(tp,aux.Stringid(Cardno,2)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(tc:GetLevel())
c:RegisterEffect(e1)
end
end
--defence
function cCardno.defcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function cCardno.defop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local defnum=Duel.GetFlagEffectLabel(tp,Cardno)
if defnum then
defnum=defnum+3
Duel.SetFlagEffectLabel(tp,Cardno,defnum)
c:SetTurnCounter(defnum)
else
Duel.RegisterFlagEffect(tp,Cardno,RESET_PHASE+PHASE_END,0,1,3)
c:SetTurnCounter(3)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetTarget(cCardno.aatg)
e1:SetValue(cCardno.aaval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetTargetRange(1,0)
e3:SetValue(cCardno.dmgval)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function cCardno.aafilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD+LOCATION_FZONE) and c:IsSetCard(0x999)
end
function cCardno.aatg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local defnum=Duel.GetFlagEffectLabel(tp,Cardno)
if chk==0 then return defnum>0 and eg:IsExists(cCardno.aafilter,1,nil,tp) end
if Duel.SelectYesNo(tp,aux.Stringid(Cardno,0)) then
local g=eg:Filter(cCardno.aafilter,nil,tp)
local lc=defnum
local gc=g:GetCount()
local cg
if gc>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
if gc > lc then
cg=g:Select(tp,1,lc,nil)
else
cg=g:Select(tp,1,gc,nil)
end
else
cg=g
end
local cgc=cg:GetCount()
defnum=defnum-cgc
Duel.SetFlagEffectLabel(tp,Cardno,defnum)
if r&REASON_EFFECT ~= 0 then
e:SetLabelObject(cg)
e:SetLabel(1)
else
e:SetLabelObject(cg:GetFirst())
e:SetLabel(2)
end
if defnum>0 then
c:SetTurnCounter(defnum)
else
Duel.Hint(HINT_CARD,1-tp,Cardno)
Duel.Hint(HINT_CARD,tp,Cardno)
end
return true
else return false end
end
function cCardno.aaval(e,c)
local la=e:GetLabel()
local g=e:GetLabelObject()
Debug.Message(la)
if la==1 then return Group.IsContains(g,c) else return g==c end
end
function cCardno.dmgval(e,re,val,r,rp,rc)
if val>900 then
--local defnum=Duel.GetFlagEffectLabel(tp,Cardno)
--if defnum and defnum>0 then
-- defnum=defnum-1
-- Duel.SetFlagEffectLabel(tp,Cardno,defnum)
-- Duel.Hint(HINT_NUMBER,tp,defnum)
-- return 900
--else
-- return val
--end
return 900
else
return val
end
end
\ No newline at end of file
--庭师剑-雷云剑
local Cardno=74561067
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--Equip limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_EQUIP_LIMIT)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetValue(1)
c:RegisterEffect(e0)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Cardno,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(cCardno.target)
e1:SetOperation(cCardno.operation)
c:RegisterEffect(e1)
--Atkup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
c:RegisterEffect(e2)
--cant active
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_CANNOT_TRIGGER)
e3:SetValue(1)
c:RegisterEffect(e3)
--cant be target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetValue(1)
c:RegisterEffect(e4)
--SpecialSummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(Cardno,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetCountLimit(1,Cardno)
e5:SetRange(LOCATION_SZONE+LOCATION_GRAVE)
e5:SetCost(cCardno.spcost)
e5:SetTarget(cCardno.sptg)
e5:SetOperation(cCardno.spop)
c:RegisterEffect(e5)
--tohand
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(Cardno,2))
e6:SetCategory(CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_GRAVE)
e6:SetCountLimit(1,Cardno+1)
e6:SetCost(cCardno.thcost)
e6:SetTarget(cCardno.thtg)
e6:SetOperation(cCardno.thop)
c:RegisterEffect(e6)
end
--tohand
function cCardno.thfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x713) or c:IsAttribute(ATTRIBUTE_LIGHT))
end
function cCardno.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cCardno.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cCardno.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cCardno.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cCardno.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsAbleToHand() then
Duel.SendtoHand(c,tp,REASON_EFFECT)
end
end
--SpecialSummon
function cCardno.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tc=c:GetEquipTarget()
if chk==0 then return tc and tc:IsReleasable() end
Duel.Release(tc,REASON_COST)
end
function cCardno.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x713,0x5208)
end
function cCardno.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cCardno.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetMZoneCount(tp)>0 and Duel.IsExistingTarget(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cCardno.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) and Duel.Equip(tp,c,tc) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end
end
end
function cCardno.eqlimit(e,c)
return e:GetOwner()==c
end
--Activate
function cCardno.filter(c)
return c:IsFaceup()
end
function cCardno.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cCardno.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cCardno.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,cCardno.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function cCardno.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
\ No newline at end of file
--超必杀『白罗灭精』
local Cardno=74561071
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Cardno,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cCardno.target)
e1:SetOperation(cCardno.activate)
c:RegisterEffect(e1)
end
--Activate
function cCardno.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(Cardno,0))
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+EVENT_CHAIN_END)
e1:SetValue(cCardno.efilter)
tc:RegisterEffect(e1,true)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300)
end
function cCardno.efilter(e,te)
return te:GetHandler()~=e:GetHandler()
end
function cCardno.actfilter(c)
return c:GetAttack() <= 0
end
function cCardno.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local num=3
local i=1
while i <= num do
Duel.Damage(1-tp,300,REASON_EFFECT)
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
local g2=Duel.GetMatchingGroup(cCardno.actfilter,tp,0,LOCATION_MZONE,nil)
if g2:GetCount()>0 then
local add=Duel.Destroy(g2,REASON_EFFECT)
num=num+add
end
i=i+1
Duel.BreakEffect()
end
end
\ No newline at end of file
......@@ -3,13 +3,6 @@ local Cardno=74562002
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(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.FALSE)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
......
......@@ -5,7 +5,7 @@ function cCardno.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Cardno,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_REMOVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cCardno.condition)
......@@ -34,6 +34,27 @@ function cCardno.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ShuffleDeck(tp)
else
Duel.Remove(dg,POS_FACEDOWN,REASON_EFFECT)
--氪金
local kj=dg:Filter(Card.IsCode,nil,50501)
if kj:GetCount() > 0 and Duel.SelectYesNo(tp,aux.Stringid(Cardno,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rmg=kj:Select(tp,1,kj:GetCount(),nil)
local kjnum=rmg:GetCount()
--再抽
local newnum=kjnum*10+10
Duel.ConfirmDecktop(tp,newnum)
local dg2=Duel.GetDecktopGroup(tp,newnum)
Duel.Remove(rmg,POS_FACEUP,REASON_EFFECT)
if dg2:IsContains(tc) then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ShuffleDeck(tp)
else
Duel.Remove(dg,POS_FACEDOWN,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
else
Duel.Remove(dg,POS_FACEDOWN,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--绯想✿融合
local Cardno=74562035
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Cardno,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,Cardno+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cCardno.condition)
e1:SetTarget(cCardno.target)
e1:SetOperation(cCardno.activate)
c:RegisterEffect(e1)
end
function cCardno.cfilter(c)
return c:IsOriginalSetCard(0x700,0x702)
end
function cCardno.cfilter2(c)
return c:IsSetCard(0x701) and c:IsFaceup()
end
function cCardno.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cCardno.cfilter,tp,LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)>=4 and Duel.IsExistingMatchingCard(cCardno.cfilter2,tp,LOCATION_FZONE,0,1,nil)
end
function cCardno.filter0(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function cCardno.filter1(c,e)
return not c:IsImmuneToEffect(e) and c:IsLocation(LOCATION_HAND)
end
function cCardno.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cCardno.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsLocation,nil,LOCATION_HAND)
local mg2=Duel.GetMatchingGroup(cCardno.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(cCardno.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(cCardno.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cCardno.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cCardno.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(cCardno.filter0,tp,LOCATION_DECK,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(cCardno.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cCardno.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
tc:RegisterFlagEffect(Cardno,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCondition(cCardno.descon)
e1:SetOperation(cCardno.desop)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetLabelObject(tc)
Duel.RegisterEffect(e1,tp)
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(cCardno.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cCardno.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(Cardno)~=0
end
function cCardno.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Destroy(tc,REASON_EFFECT)
end
function cCardno.splimit(e,c)
return not c:IsSetCard(0x700) and (c:IsLocation(LOCATION_DECK) or c:IsLocation(LOCATION_GRAVE))
end
\ No newline at end of file
--鸟符『美味的夜雀锅』
local Cardno=74562036
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Cardno,0))
e1:SetCategory(CATEGORY_RECOVER+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cCardno.target)
e1:SetOperation(cCardno.activate)
c:RegisterEffect(e1)
end
function cCardno.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,0,0)
end
function cCardno.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) then
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
local ctp=tc:GetControler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPTION)
sel=Duel.SelectOption(tp,aux.Stringid(Cardno,0),aux.Stringid(Cardno,1))
local rec=tc:GetAttack()
if sel==1 then rec=tc:GetDefense() end
Duel.Release(tc,REASON_EFFECT)
if rec>0 then Duel.Recover(ctp,rec,REASON_EFFECT) end
end
end
\ No newline at end of file
......@@ -14,6 +14,7 @@ function c74563049.initial_effect(c)
c:RegisterEffect(e4)
--lv
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74563049,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
......@@ -23,6 +24,18 @@ function c74563049.initial_effect(c)
e2:SetTarget(c74563049.sptg)
e2:SetOperation(c74563049.spop)
c:RegisterEffect(e2)
--lv
local e21=Effect.CreateEffect(c)
e21:SetDescription(aux.Stringid(74563049,1))
e21:SetType(EFFECT_TYPE_IGNITION)
e21:SetCategory(CATEGORY_TOGRAVE)
e21:SetCode(EVENT_FREE_CHAIN)
e21:SetRange(LOCATION_GRAVE)
e21:SetCost(c74563049.cost)
e21:SetCondition(c74563049.con)
e21:SetTarget(c74563049.sptg1)
e21:SetOperation(c74563049.spop1)
c:RegisterEffect(e21)
if not c74563049.global_check then
c74563049.global_check=true
local ge1=Effect.CreateEffect(c)
......@@ -49,7 +62,6 @@ function c74563049.con(e,tp,eg,ep,ev,re,r,rp)
end
function c74563049.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c74563049.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......@@ -58,4 +70,19 @@ function c74563049.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c74563049.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost(POS_FACEDOWN) end
Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_COST)
end
function c74563049.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
end
function c74563049.spop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RULE)
end
end
\ No newline at end of file
......@@ -12,19 +12,15 @@ function c74563606.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(c74563606.lvtg)
e2:SetOperation(c74563606.lvop)
c:RegisterEffect(e2)
end
function c74563606.lvfilter(c,lv)
return c:IsFaceup() and (c:IsLevelAbove(0) and not c:IsLevel(lv)) or (c:IsRankAbove(0) and not c:IsRank(lv))
end
function c74563606.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74563606.lvfilter,tp,LOCATION_MZONE,0,1,nil,6) end
end
function c74563606.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c74563606.lvfilter,tp,LOCATION_MZONE,0,nil,6)
local g=Duel.GetMatchingGroup(c74563606.lvfilter,tp,LOCATION_MZONE,0,nil,0)
local lc=g:GetFirst()
while lc do
if lc:IsLevelAbove(0) then
......
......@@ -23,8 +23,8 @@ function c74563607.cost1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then
local sel=0
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,nil,e:GetHandler()) then sel=sel+1 end
if Duel.CheckLPCost(tp,6660) or (Duel.CheckLPCost(tp,666) and Duel.IsPlayerAffectedByEffect(tp,74563666)) then sel=sel+2 end
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,e:GetHandler()) then sel=sel+1 end
if Duel.CheckLPCost(tp,3666) or (Duel.CheckLPCost(tp,666) and Duel.IsPlayerAffectedByEffect(tp,74563666)) then sel=sel+2 end
e:SetLabel(sel)
return sel~=0
end
......@@ -43,11 +43,7 @@ function c74563607.cost1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,2,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
else
if Duel.IsPlayerAffectedByEffect(tp,74563666) then
Duel.PayLPCost(tp,666)
else
Duel.PayLPCost(tp,6660)
end
Duel.PayLPCost(tp,3666)
end
end
--
......@@ -57,7 +53,7 @@ function c74563607.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c74563607.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -25,11 +25,11 @@ function c74563608.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,nil,REASON_RETURN+REASON_COST)
end
function c74563608.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE)
end
function c74563608.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
......@@ -41,8 +41,8 @@ function c74563608.cost1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then
local sel=0
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,e:GetHandler()) then sel=sel+1 end
if Duel.CheckLPCost(tp,3666) or (Duel.CheckLPCost(tp,666) and Duel.IsPlayerAffectedByEffect(tp,74563666)) then sel=sel+2 end
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,nil,e:GetHandler()) then sel=sel+1 end
if Duel.CheckLPCost(tp,3660) or (Duel.CheckLPCost(tp,666) and Duel.IsPlayerAffectedByEffect(tp,74563666)) then sel=sel+2 end
e:SetLabel(sel)
return sel~=0
end
......@@ -69,16 +69,16 @@ function c74563608.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil)
end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE+LOCATION_ONFIELD,nil)
local counter=math.min(4,g:GetCount())
local counter=math.min(5,g:GetCount())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,counter,0,0)
end
function c74563608.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil)
local gx=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
g:Merge(gx)
local counter=math.min(4,g:GetCount())
local counter=math.min(5,g:GetCount())
while counter>0 do
if counter<4 then Duel.BreakEffect() end
if counter<5 then Duel.BreakEffect() end
local g1=g:RandomSelect(tp,1):GetFirst()
if g1:IsLocation(LOCATION_GRAVE) then
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
......
......@@ -26,11 +26,11 @@ function c74563609.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,nil,REASON_RETURN+REASON_COST)
end
function c74563609.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE)
end
function c74563609.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
......@@ -42,8 +42,8 @@ function c74563609.cost1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then
local sel=0
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,e:GetHandler()) then sel=sel+1 end
if Duel.CheckLPCost(tp,3666) or (Duel.CheckLPCost(tp,666) and Duel.IsPlayerAffectedByEffect(tp,74563666)) then sel=sel+2 end
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,nil,e:GetHandler()) then sel=sel+1 end
if Duel.CheckLPCost(tp,3660) or (Duel.CheckLPCost(tp,666) and Duel.IsPlayerAffectedByEffect(tp,74563666)) then sel=sel+2 end
e:SetLabel(sel)
return sel~=0
end
......
......@@ -25,11 +25,11 @@ function c74563610.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,nil,REASON_RETURN+REASON_COST)
end
function c74563610.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE)
end
function c74563610.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND+LOCATION_GRAVE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
......@@ -41,8 +41,8 @@ function c74563610.cost1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then
local sel=0
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,e:GetHandler()) then sel=sel+1 end
if Duel.CheckLPCost(tp,3666) or (Duel.CheckLPCost(tp,666) and Duel.IsPlayerAffectedByEffect(tp,74563666)) then sel=sel+2 end
if Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_ONFIELD+LOCATION_HAND,0,2,nil,e:GetHandler()) then sel=sel+1 end
if Duel.CheckLPCost(tp,3660) or (Duel.CheckLPCost(tp,666) and Duel.IsPlayerAffectedByEffect(tp,74563666)) then sel=sel+2 end
e:SetLabel(sel)
return sel~=0
end
......@@ -69,14 +69,22 @@ function c74563610.target(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local count=sg:GetCount()
local count1=0
count1=math.ceil(count/3*2)
if count%3~=0 then
count1=(count//3+1)*2
else
count1=count//3*2
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,count1,0,0)
end
function c74563610.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local count=sg:GetCount()
local count1=0
count1=math.ceil(count/3*2)
if count%3~=0 then
count1=(count//3+1)*2
else
count1=count//3*2
end
local sg1=sg:RandomSelect(1-tp,count1)
Duel.Destroy(sg1,REASON_EFFECT)
end
\ No newline at end of file
--冰狱之王·撒旦
function c74563666.initial_effect(c)
c:EnableReviveLimit()
--special summon 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)
c:RegisterEffect(e1)
--Cost Change
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
......@@ -8,7 +15,7 @@ function c74563666.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
e2:SetValue(c74563666.costchange)
c:RegisterEffect(e2)
c:RegisterEffect(e2)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -25,7 +32,7 @@ function c74563666.initial_effect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_REMOVED)
e5:SetLabelObject(e1)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_UNCOPYABLE)
e5:SetCondition(c74563666.con)
e5:SetOperation(c74563666.sprop1)
c:RegisterEffect(e5)
......@@ -42,7 +49,7 @@ function c74563666.initial_effect(c)
c:RegisterEffect(e2)
end
function c74563666.costchange(e,re,rp,val)
if re and re:GetHandler():IsSetCard(0x996) then
if re and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(0x996) then
return 666
else
return val
......@@ -56,16 +63,13 @@ function c74563666.sprcon(e,c)
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c74563666.sprfilter,tp,LOCATION_MZONE,0,3,nil)
and (c74563666.special or not c:IsLocation(LOCATION_REMOVED))
end
function c74563666.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c74563666.sprfilter,tp,LOCATION_MZONE,0,3,3,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
c74563666.special=false
end
function c74563666.sprop1(e,tp,eg,ep,ev,re,r,rp,chk)
c74563666.special=true
Duel.SpecialSummonRule(e:GetHandler():GetControler(),e:GetHandler())
end
function c74563666.cpfilter(c)
......@@ -73,10 +77,7 @@ function c74563666.cpfilter(c)
and c:CheckActivateEffect(true,true,false)~=nil
end
function c74563666.con(e,tp,eg,ep,ev,re,r,rp)
c74563666.special=true
local cansp=e:GetHandler():IsCanBeSpecialSummoned(e:GetLabelObject(),0,tp,false,true)
c74563666.special=false
return Duel.GetCurrentChain()==0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(c74563666.sprfilter,tp,LOCATION_MZONE,0,3,nil) and cansp
return Duel.GetCurrentChain()==0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(c74563666.sprfilter,tp,LOCATION_MZONE,0,3,nil)
end
function c74563666.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
......
--星辉女神
function c77002001.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,2)
--lv change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(77002001,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c77002001.tg)
e1:SetOperation(c77002001.op)
c:RegisterEffect(e1)
end
function c77002001.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(77002001,0))
e:SetLabel(Duel.AnnounceLevel(tp,1,12))
end
function c77002001.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_ALLOW_SYNCHRO_KOISHI)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e11:SetCode(EFFECT_ADD_TYPE)
e11:SetValue(TYPE_TUNER)
e11:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e11)
end
end
\ No newline at end of file
--冰狱·恶意的炎帝
function c77002002.initial_effect(c)
--summon proc
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(77002002,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(c77002002.sumcon)
e0:SetOperation(c77002002.sumop)
e0:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e0)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCost(c77002002.drcost)
e2:SetTarget(c77002002.rmtg)
e2:SetOperation(c77002002.rmop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4)
local e5=e2:Clone()
e5:SetCode(EVENT_ATTACK_ANNOUNCE)
c:RegisterEffect(e5)
--damage
local e22=Effect.CreateEffect(c)
e22:SetDescription(aux.Stringid(77002002,1))
e22:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e22:SetCode(EVENT_REMOVE)
e22:SetRange(LOCATION_MZONE)
e22:SetCondition(c77002002.damcon)
e22:SetOperation(c77002002.damop)
c:RegisterEffect(e22)
end
function c77002002.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,666666) end
Duel.PayLPCost(tp,666666)
end
function c77002002.sumcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetDecktopGroup(tp,3)
return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEUP)==3
end
function c77002002.sumop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetDecktopGroup(tp,3)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c77002002.chkfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsAbleToRemove() and c:IsFaceup()
end
function c77002002.rmfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove() and c:IsFaceup()
end
function c77002002.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(c77002002.rmfilter,tp,0,LOCATION_ONFIELD,1,nil)
and not Duel.IsExistingMatchingCard(c77002002.chkfilter,tp,0,LOCATION_ONFIELD,1,nil)
end
local g=Duel.GetMatchingGroup(c77002002.rmfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c77002002.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c77002002.rmfilter,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c77002002.damfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsPreviousControler(1-tp)
end
function c77002002.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c77002002.damfilter,1,nil,tp)
end
function c77002002.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,77002002)
local ct=eg:FilterCount(c77002002.damfilter,nil,tp)
Duel.Damage(1-tp,ct*666,REASON_EFFECT)
end
\ No newline at end of file
--冰狱·欲望缠身者
function c77002003.initial_effect(c)
--summon proc
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(77002003,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(c77002003.sumcon)
e0:SetOperation(c77002003.sumop)
e0:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e0)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCost(c77002003.drcost)
e2:SetTarget(c77002003.rmtg)
e2:SetOperation(c77002003.rmop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4)
local e5=e2:Clone()
e5:SetCode(EVENT_ATTACK_ANNOUNCE)
c:RegisterEffect(e5)
--damage
local e22=Effect.CreateEffect(c)
e22:SetDescription(aux.Stringid(77002003,1))
e22:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e22:SetCode(EVENT_TO_GRAVE)
e22:SetRange(LOCATION_MZONE)
e22:SetCondition(c77002003.damcon)
e22:SetOperation(c77002003.damop)
c:RegisterEffect(e22)
end
function c77002003.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,666666) end
Duel.PayLPCost(tp,666666)
end
function c77002003.sumcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetDecktopGroup(tp,3)
return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEUP)==3
end
function c77002003.sumop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetDecktopGroup(tp,3)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c77002003.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
end
function c77002003.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RULE)
end
end
function c77002003.damfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsPreviousControler(1-tp)
end
function c77002003.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c77002003.damfilter,1,nil,tp)
end
function c77002003.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,77002003)
local ct=eg:Filter(c77002003.damfilter,nil,tp)
local rec=math.ceil(ct:GetSum(Card.GetAttack)/2)
Duel.Recover(tp,rec,REASON_EFFECT)
end
\ No newline at end of file
--冰狱·贪婪的毒蝎
function c77002004.initial_effect(c)
--summon proc
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(77002004,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(c77002004.sumcon)
e0:SetOperation(c77002004.sumop)
e0:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e0)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCost(c77002004.drcost)
e2:SetTarget(c77002004.rmtg)
e2:SetOperation(c77002004.rmop)
e2:SetCountLimit(1,77002004)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4)
local e5=e2:Clone()
e5:SetCode(EVENT_ATTACK_ANNOUNCE)
c:RegisterEffect(e5)
--damage
local e22=Effect.CreateEffect(c)
e22:SetDescription(aux.Stringid(77002002,1))
e22:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e22:SetCode(EVENT_REMOVE)
e22:SetRange(LOCATION_MZONE)
e22:SetCondition(c77002004.damcon)
e22:SetOperation(c77002004.damop)
c:RegisterEffect(e22)
end
function c77002004.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,666666) end
Duel.PayLPCost(tp,666666)
end
function c77002004.sumcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetDecktopGroup(tp,3)
return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEUP)==3
end
function c77002004.sumop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetDecktopGroup(tp,3)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c77002004.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetDecktopGroup(tp,4)
if chk==0 then return rg:FilterCount(Card.IsAbleToRemove,nil)==4 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,4,0,0)
end
function c77002004.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetDecktopGroup(tp,4)
if #g<=0 then return end
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function c77002004.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(aux.TRUE,1,nil,tp)
end
function c77002004.damop(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(aux.TRUE,nil,tp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*300)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
\ No newline at end of file
--冰狱·狂怒的冰魔
function c77002005.initial_effect(c)
--summon proc
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(77002005,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(c77002005.sumcon)
e0:SetOperation(c77002005.sumop)
e0:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e0)
--search
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCost(c77002005.drcost)
e2:SetTarget(c77002005.rmtg)
e2:SetOperation(c77002005.rmop)
e2:SetCountLimit(1,77002005)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4)
local e5=e2:Clone()
e5:SetCode(EVENT_ATTACK_ANNOUNCE)
c:RegisterEffect(e5)
--atk down
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c77002005.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
function c77002005.atkval(e)
return Duel.GetTurnCount()*-200
end
function c77002005.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,666666) end
Duel.PayLPCost(tp,666666)
end
function c77002005.sumcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetDecktopGroup(tp,3)
return g:FilterCount(Card.IsAbleToRemoveAsCost,nil,POS_FACEUP)==3
end
function c77002005.sumop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetDecktopGroup(tp,3)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c77002005.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c77002005.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local turn=Duel.GetTurnCount()
Duel.SetLP(1-tp,Duel.GetLP(1-tp)-turn*300)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_SKIP_TURN)
e1:SetTargetRange(0,1)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
Duel.RegisterEffect(e2,1-tp)
end
\ No newline at end of file
--悲叹冥河
function c77002006.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c77002006.target)
e1:SetOperation(c77002006.activate)
c:RegisterEffect(e1)
--Cost Change
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_LPCOST_CHANGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,0)
e2:SetValue(c77002006.costchange)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetTarget(c77002006.target)
e3:SetOperation(c77002006.activate)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4)
end
function c77002006.costchange(e,re,rp,val)
if re and re:GetHandler():IsSetCard(0x996) then
return 666
else
return val
end
end
function c77002006.target(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetDecktopGroup(tp,1)
if chk==0 then return rg:FilterCount(Card.IsAbleToRemove,nil)==1 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,1,0,0)
end
function c77002006.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetDecktopGroup(tp,1)
if #g<=0 then return end
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--荣光剑士·奥蕾莉亚
function c77002007.initial_effect(c)
--Synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--cannot target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
--gain ATK
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c77002007.atkval)
c:RegisterEffect(e2)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(77002007,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,77002007)
e1:SetCost(c77002007.spcost)
e1:SetTarget(c77002007.sptg)
e1:SetOperation(c77002007.spop)
c:RegisterEffect(e1)
end
function c77002007.atkval(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*800
end
function c77002007.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost(POS_FACEDOWN) end
Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_COST)
end
function c77002007.filter(c,e,tp)
return c:IsCode(77002008)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c77002007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c77002007.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c77002007.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c77002007.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--黑暗剑士·奥蕾莉亚
function c77002008.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),9,2)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(77002008,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,77002008)
e1:SetCost(c77002008.spcost)
e1:SetTarget(c77002008.sptg)
e1:SetOperation(c77002008.spop)
c:RegisterEffect(e1)
--Immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c77002008.efilter)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(77002008,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLED)
e2:SetCondition(c77002008.rmcon)
e2:SetTarget(c77002008.rmtg)
e2:SetOperation(c77002008.rmop)
c:RegisterEffect(e2)
end
function c77002008.efilter(e,te)
local c=e:GetHandler()
local ec=te:GetHandler()
if ec:IsHasCardTarget(c) or (te:IsHasType(EFFECT_TYPE_ACTIONS) and te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and c:IsRelateToEffect(te)) then return false end
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c77002008.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost(POS_FACEDOWN) end
Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_COST)
end
function c77002008.filter(c,e,tp)
return c:IsCode(77002007)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c77002008.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c77002008.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c77002008.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c77002008.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c77002008.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
e:SetLabelObject(bc)
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsStatus(STATUS_OPPO_BATTLE)
end
function c77002008.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetLabelObject(),1,0,0)
end
function c77002008.rmop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc:IsRelateToBattle() and bc:IsAbleToRemove() then
Duel.Remove(bc,POS_FACEDOWN,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -53,7 +53,8 @@ function c86379005.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c86379005.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c86379005.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingTarget(c86379005.eqfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.GetFlagEffect(e:GetHandlerPlayer(),86379005)<2 end
Duel.RegisterFlagEffect(e:GetHandlerPlayer(),86379005,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c86379005.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
......
--梦符『漆黑的宇宙梦』
require "expansions/script/nef/Gds"
function c86379025.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
Gds.Checkdeckpublic(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
......
--梦符『漆黑的宇宙梦』
require "expansions/script/nef/Gds"
function c86379027.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
Gds.Checkdeckpublic(c)
--dream
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
......
--梦符『取而代之的蝴蝶』
require "expansions/script/nef/Gds"
function c86379029.initial_effect(c)
--
Gds.Adjustdreamsequence(c)
Gds.Checkdeckpublic(c)
--dream1
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379029,0))
......
......@@ -20,7 +20,7 @@ function c86379519.initial_effect(c)
e2:SetTarget(c86379519.destg)
e2:SetOperation(c86379519.desop)
c:RegisterEffect(e2)
--equip
--[[--equip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379519,1))
e3:SetCategory(CATEGORY_EQUIP)
......@@ -30,6 +30,16 @@ function c86379519.initial_effect(c)
e3:SetCondition(c86379519.thcon)
e3:SetTarget(c86379519.thtg)
e3:SetOperation(c86379519.thop)
c:RegisterEffect(e3)]]
--field
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379519,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCondition(c86379519.scon)
e3:SetTarget(c86379519.stg)
e3:SetOperation(c86379519.sop)
c:RegisterEffect(e3)
end
--
......@@ -90,7 +100,8 @@ function c86379519.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT)
end
end
--
--[[--
function c86379519.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
......@@ -192,4 +203,60 @@ function c86379519.op4(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,86379519)
Duel.Destroy(a,REASON_EFFECT)
end
end]]
--
function c86379519.scon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c86379519.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c86379519.sop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local Tpe=c:GetOriginalType()
Card.SetCardData(c,4,TYPE_FIELD+TYPE_SPELL)
if Duel.MoveToField(c,tp,tp,LOCATION_FZONE,POS_FACEUP,true) then
Card.SetCardData(c,4,Tpe)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetValue(TYPE_SPELL+TYPE_FIELD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetProperty(EFFECT_CANNOT_DISABLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_FZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e2:SetCondition(c86379519.con2)
e2:SetOperation(c86379519.op2)
c:RegisterEffect(e2)
end
end
end
function c86379519.con2(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local g=Group.CreateGroup()
local lg=Duel.GetMatchingGroup(c86379519.conditionfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tc=lg:GetFirst()
while tc do
local dg=Nef.GetLinkArrowGroup(tc)
if dg:GetCount()>0 then
g:Merge(dg)
end
tc=lg:GetNext()
end
return g:IsContains(rc)
end
function c86379519.op2(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) then
Duel.Hint(HINT_CARD,0,86379519)
Duel.Destroy(rc,REASON_EFFECT)
end
end
......@@ -8,6 +8,7 @@ function c86379654.initial_effect(c)
e1:SetDescription(aux.Stringid(86379654,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,86379654)
e1:SetCondition(c86379654.condition)
......@@ -106,16 +107,17 @@ end
function c86379654.spfilter(c,e,tp)
return c:IsSetCard(0x225a) and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c86379654.target(e,tp,eg,ep,ev,re,r,rp,chk)
function c86379654.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c86379654.spfilter(chkc,e,tp) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c86379654.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c86379654.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c86379654.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c86379654.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=g:GetFirst()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
......
......@@ -40,7 +40,7 @@ function c86379748.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
local tg=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379748,1))
e1:SetDescription(aux.Stringid(86379748,1)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
......@@ -56,7 +56,7 @@ function c86379748.activate(e,tp,eg,ep,ev,re,r,rp)
end
tg:KeepAlive()
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379748,0))
e2:SetDescription(aux.Stringid(86379748,0)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1)
......
......@@ -68,7 +68,7 @@ function c86379797.sccon(e,tp,eg,ep,ev,re,r,rp)
end
function c86379797.syfilter(c,e,tp,ml)
local lv=c:GetLevel()
return ml>lv and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and c:IsSetCard(0x14a) and c:IsType(TYPE_SYNCHRO)
return ml>=lv and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and c:IsSetCard(0x14a) and c:IsType(TYPE_SYNCHRO)
end
function c86379797.smfilter(c)
return c:IsReleasable() and c:IsSetCard(0x14a) and c:IsFaceup() and c:GetLevel()>0
......@@ -100,7 +100,7 @@ function c86379797.scop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc then
local lv=tc:GetLevel()
if lv<ml+clv then
if lv=<ml+clv then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rm=rg:FilterSelect(tp,c86379797.rsfilter,1,1,nil,lv-clv)
rm:AddCard(c)
......@@ -113,7 +113,7 @@ function c86379797.scop(e,tp,eg,ep,ev,re,r,rp)
end
function c86379797.rsfilter(c,lv)
return c:GetLevel()>lv
return c:GetLevel()>=lv
end
--
......
......@@ -62,6 +62,7 @@ function c86379867.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c86379867.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
tc:CompleteProcedure()
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
......
......@@ -37,7 +37,7 @@ function c86379872.spop(e,tp,eg,ep,ev,re,r,rp,c)
end
--
function c86379872.shcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and Duel.GetTurnPlayer()~=tp
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c86379872.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 and (Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)-Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,0,nil))>0 end
......
--小小智将✿大妖精☆
function c99999004.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,c99999004.matfilter1,nil,nil,aux.NonTuner(nil),1,99)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(99999004,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,99999004)
e1:SetTarget(c99999004.thtg)
e1:SetOperation(c99999004.thop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c99999004.reptg)
e2:SetValue(c99999004.repval)
e2:SetOperation(c99999004.repop)
c:RegisterEffect(e2)
end
function c99999004.thfilter(c)
return c:IsSetCard(0x999) and (c:IsAbleToGrave() or (tohand and c:IsAbleToHand())) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c99999004.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x999) and c:IsType(TYPE_MONSTER)
end
function c99999004.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local tohand=Duel.IsExistingMatchingCard(c99999004.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
return Duel.IsExistingMatchingCard(c99999004.thfilter,tp,LOCATION_DECK,0,1,nil,tohand)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c99999004.thop(e,tp,eg,ep,ev,re,r,rp)
local tohand=Duel.IsExistingMatchingCard(c99999004.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c99999004.thfilter,tp,LOCATION_DECK,0,1,1,nil,tohand)
local tc=g:GetFirst()
if not tc then return end
if tohand and tc:IsAbleToHand() and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1191,1190)==1) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function c99999004.matfilter1(c)
return (c:IsSynchroType(TYPE_TUNER) and c:IsSetCard(0x999)) or c:IsSetCard(0xc999)
end
function c99999004.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x999) and c:IsLocation(LOCATION_MZONE)
and c:IsControler(tp)
end
function c99999004.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c99999004.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c99999004.repval(e,c)
return c99999004.repfilter(c,e:GetHandlerPlayer())
end
function c99999004.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
--妖精☆联合作战会议
function c99999005.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,99999005+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c99999005.activate)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(99999005,1))
e2:SetCategory(CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(c99999005.eqcon)
e2:SetTarget(c99999005.eqtg)
e2:SetOperation(c99999005.eqop)
c:RegisterEffect(e2)
--cannot be target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_SPELL+TYPE_TRAP))
e3:SetValue(aux.indsval)
c:RegisterEffect(e3)
--act in hand
local e21=Effect.CreateEffect(c)
e21:SetType(EFFECT_TYPE_SINGLE)
e21:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e21:SetCondition(c99999005.handcon)
c:RegisterEffect(e21)
end
function c99999005.eqcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c99999005.handcon(e)
return Duel.IsExistingMatchingCard(c99999005.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,2,nil)
end
function c99999005.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x999)
end
function c99999005.thfilter(c)
return c:IsDefense(900) and c:IsAbleToGrave()
end
function c99999005.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c99999005.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(99999005,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
function c99999005.setfilter(c)
return c:IsSetCard(0x999) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c99999005.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c99999005.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end
function c99999005.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c99999005.setfilter),tp,LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if #g==0 or ft<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tg=g:Select(tp,1,1,nil)
Duel.SSet(tp,tg)
end
\ No newline at end of file
--⑨的完美数学教室
function c99999007.initial_effect(c)
c:SetUniqueOnField(1,0,99999007)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_SET_ATTACK_FINAL)
e7:SetRange(LOCATION_SZONE)
e7:SetTargetRange(0,LOCATION_MZONE)
e7:SetCondition(c99999007.effcon2)
e7:SetValue(900)
c:RegisterEffect(e7)
--instant
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(99999007,0))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1)
e3:SetCondition(c99999007.effcon1)
e3:SetTarget(c99999007.target2)
e3:SetOperation(c99999007.activate2)
c:RegisterEffect(e3)
--atk up
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetCondition(c99999007.effcon)
e4:SetValue(c99999007.val)
c:RegisterEffect(e4)
local e14=Effect.CreateEffect(c)
e14:SetDescription(aux.Stringid(99999007,1))
e14:SetCategory(CATEGORY_SPECIAL_SUMMON)
e14:SetType(EFFECT_TYPE_IGNITION)
e14:SetRange(LOCATION_SZONE)
e14:SetCountLimit(1)
e14:SetCondition(c99999007.effcon3)
e14:SetTarget(c99999007.sptg)
e14:SetOperation(c99999007.spop)
c:RegisterEffect(e14)
end
function c99999007.effcon(e)
return Duel.GetCounter(e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,0x1999)>=3
end
function c99999007.effcon1(e)
return Duel.GetCounter(e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,0x1999)>=5
end
function c99999007.effcon2(e)
return Duel.GetCounter(e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,0x1999)>=7
end
function c99999007.effcon3(e)
return Duel.GetCounter(e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,0x1999)>=9
end
function c99999007.val(e)
return Duel.GetCounter(e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD,0x1999)*100
end
function c99999007.sp(c,e,tp)
return c:IsSetCard(0x999) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c99999007.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c99999007.sp,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c99999007.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c99999007.sp,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,ft)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
end
end
function c99999007.sumfilter(c,lv)
return c:IsSummonable(true,nil) and c:IsLevelBelow(lv)
end
function c99999007.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=Duel.GetCounter(tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0x1999)
if chk==0 then return Duel.IsExistingMatchingCard(c99999007.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,lv) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c99999007.activate2(e,tp,eg,ep,ev,re,r,rp)
local lv=Duel.GetCounter(tp,LOCATION_ONFIELD,LOCATION_ONFIELD,0x1999)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,c99999007.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,lv)
if sg:GetCount()>0 then
if Duel.Summon(tp,sg:GetFirst(),true,nil)~=0 then
lv=sg:GetFirst():GetLevel()
Duel.BreakEffect()
Duel.RemoveCounter(tp,1,1,0x1999,lv,REASON_EFFECT)
end
end
end
\ No newline at end of file
--自称✿最聪明的妖精☆琪露诺
function c99999008.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(99999008,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,99999008)
e1:SetTarget(c99999008.thtg)
e1:SetOperation(c99999008.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--to deck
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(99999008,2))
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_PHASE+PHASE_STANDBY)
e7:SetCountLimit(1)
e7:SetRange(LOCATION_MZONE)
e7:SetCondition(c99999008.rtdcon)
e7:SetTarget(c99999008.tg)
e7:SetOperation(c99999008.op)
c:RegisterEffect(e7)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(99999004,1))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c99999008.thtg1)
e1:SetOperation(c99999008.thop1)
c:RegisterEffect(e1)
end
function c99999008.thfilter(c)
return c:IsCode(99999007) and c:IsAbleToHand()
end
function c99999008.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c99999008.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c99999008.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c99999008.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 c99999008.rtdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c99999008.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function c99999008.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
math.randomseed(os.time())
local dice = math.random(1,12)
Duel.Hint(HINT_NUMBER,tp,dice)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(dice)
c:RegisterEffect(e1)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e12:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e12:SetValue(1)
e12:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e12)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e4)
end
function c99999008.ctfilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x1999,1)
end
function c99999008.ctfilter1(c,lv)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsLevel(lv)
end
function c99999008.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c99999008.ctfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(c99999008.ctfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),e:GetHandler():GetLevel()) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x1999)
end
function c99999008.thop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local g=Duel.SelectMatchingCard(tp,c99999008.ctfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
g:GetFirst():AddCounter(0x1999,1)
end
math.randomseed(os.time())
local dice = math.random(1,12)
Duel.Hint(HINT_NUMBER,tp,dice)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(dice)
c:RegisterEffect(e1)
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e12:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e12:SetValue(1)
e12:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e12)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e4)
end
\ No newline at end of file
--冻符『完美冻结』
function c99999010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetTarget(c99999010.target)
e1:SetOperation(c99999010.activate)
c:RegisterEffect(e1)
end
function c99999010.dafilter(c,e)
return c:GetSequence()<5 and c:GetFlagEffect(99999010)==0
end
function c99999010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c99999010.dafilter,tp,0,LOCATION_ONFIELD,1,nil,e) end
local g=Duel.GetMatchingGroup(c99999010.dafilter,tp,0,LOCATION_ONFIELD,nil,e)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c99999010.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x99cc) and c:IsType(TYPE_SYNCHRO)
end
function c99999010.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c99999010.dafilter,tp,0,LOCATION_ONFIELD,1,1,nil,e)
if #g>0 then
local nseq=0
local seq=g:GetFirst():GetSequence()
if seq==0 then nseq=1
elseif seq==4 then nseq=3
else
local ran=Duel.TossCoin(tp,1)
if ran==1 then
nseq=seq-1
else
nseq=seq+1
end
end
local field=0
if g:GetFirst():IsType(TYPE_MONSTER) then
field=LOCATION_MZONE
else
field=LOCATION_SZONE
end
local tc=Duel.GetFieldCard(1-tp,field,nseq)
if tc then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Destroy(g:GetFirst(),REASON_EFFECT)
if (g:GetFirst():IsHasEffect(EFFECT_INDESTRUCTABLE_EFFECT) or g:GetFirst():IsHasEffect(EFFECT_INDESTRUCTABLE)) then
local tc1=Duel.GetFieldCard(1-tp,LOCATION_ONFIELD,seq+1)
local tc2=Duel.GetFieldCard(1-tp,LOCATION_ONFIELD,seq-1)
if seq==0 and tc1 then
if tc1:IsImmuneToEffect(e) or tc1:IsHasEffect(EFFECT_INDESTRUCTABLE_EFFECT) or tc1:IsHasEffect(EFFECT_INDESTRUCTABLE) then
g:GetFirst():RegisterFlagEffect(99999010,RESET_CHAIN,0,1)
end
end
if seq==4 and tc2 then
if tc2:IsImmuneToEffect(e) or tc2:IsHasEffect(EFFECT_INDESTRUCTABLE_EFFECT) or tc2:IsHasEffect(EFFECT_INDESTRUCTABLE) then
g:GetFirst():RegisterFlagEffect(99999010,RESET_CHAIN,0,1)
end
end
if tc1 and tc2 then
if (tc2:IsImmuneToEffect(e) or tc2:IsHasEffect(EFFECT_INDESTRUCTABLE_EFFECT) or tc2:IsHasEffect(EFFECT_INDESTRUCTABLE)) and (tc1:IsImmuneToEffect(e) or tc1:IsHasEffect(EFFECT_INDESTRUCTABLE_EFFECT) or tc1:IsHasEffect(EFFECT_INDESTRUCTABLE)) then
g:GetFirst():RegisterFlagEffect(99999010,RESET_CHAIN,0,1)
end
end
end
else
if g:GetFirst():IsType(TYPE_MONSTER) then
Duel.MoveSequence(g:GetFirst(),nseq)
g:GetFirst():RegisterFlagEffect(99999010,RESET_CHAIN,0,1)
else
Duel.MoveSequence(g:GetFirst(),nseq)
g:GetFirst():RegisterFlagEffect(99999010,RESET_CHAIN,0,1)
end
end
end
if Duel.IsExistingMatchingCard(c99999010.dafilter,tp,0,LOCATION_ONFIELD,1,nil,e) and Duel.IsExistingMatchingCard(c99999010.atkfilter,tp,LOCATION_MZONE,0,1,nil) then
local cg=Duel.GetMatchingGroup(c99999010.dafilter,tp,0,LOCATION_ONFIELD,1,nil,e)
local opt=cg:GetCount()
while opt>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c99999010.dafilter,tp,0,LOCATION_ONFIELD,1,1,nil,e)
if #g>0 then
local nseq=0
local seq=g:GetFirst():GetSequence()
if seq==0 then nseq=1
elseif seq==4 then nseq=3
else
local ran=Duel.TossCoin(tp,1)
if ran==1 then
nseq=seq-1
else
nseq=seq+1
end
end
local field=0
if g:GetFirst():IsType(TYPE_MONSTER) then
field=LOCATION_MZONE
else
field=LOCATION_SZONE
end
local tc=Duel.GetFieldCard(1-tp,field,nseq)
if tc then
Duel.Destroy(tc,REASON_EFFECT)
if Duel.Destroy(g:GetFirst(),REASON_EFFECT)==0 and (g:GetFirst():IsHasEffect(EFFECT_INDESTRUCTABLE_EFFECT) or g:GetFirst():IsHasEffect(EFFECT_INDESTRUCTABLE)) then
local tc1=Duel.GetFieldCard(1-tp,LOCATION_ONFIELD,seq+1)
local tc2=Duel.GetFieldCard(1-tp,LOCATION_ONFIELD,seq-1)
if seq==0 and tc1 then
if tc1:IsImmuneToEffect(e) or tc1:IsHasEffect(EFFECT_INDESTRUCTABLE_EFFECT) or tc1:IsHasEffect(EFFECT_INDESTRUCTABLE) then
g:GetFirst():RegisterFlagEffect(99999010,RESET_CHAIN,0,1)
end
end
if seq==4 and tc2 then
if tc2:IsImmuneToEffect(e) or tc2:IsHasEffect(EFFECT_INDESTRUCTABLE_EFFECT) or tc2:IsHasEffect(EFFECT_INDESTRUCTABLE) then
g:GetFirst():RegisterFlagEffect(99999010,RESET_CHAIN,0,1)
end
end
if tc1 and tc2 then
if (tc2:IsImmuneToEffect(e) or tc2:IsHasEffect(EFFECT_INDESTRUCTABLE_EFFECT) or tc2:IsHasEffect(EFFECT_INDESTRUCTABLE)) and (tc1:IsImmuneToEffect(e) or tc1:IsHasEffect(EFFECT_INDESTRUCTABLE_EFFECT) or tc1:IsHasEffect(EFFECT_INDESTRUCTABLE)) then
g:GetFirst():RegisterFlagEffect(99999010,RESET_CHAIN,0,1)
end
end
end
else
if g:GetFirst():IsType(TYPE_MONSTER) then
Duel.MoveSequence(g:GetFirst(),nseq)
g:GetFirst():RegisterFlagEffect(99999010,RESET_CHAIN,0,1)
else
Duel.MoveSequence(g:GetFirst(),nseq)
g:GetFirst():RegisterFlagEffect(99999010,RESET_CHAIN,0,1)
end
end
end
opt=opt-1
end
end
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment