Commit 5a682a89 authored by POLYMER's avatar POLYMER

update 240513 partA

parent d4903aa6
......@@ -2188,10 +2188,9 @@
6109001 0
#230813
10105560 0
14010001 0
14010001 1
33701402 0
79083105 0
82221058 2
#230806
9300018 0
10105555 0
......@@ -6105,7 +6104,7 @@
871100006 1
75030002 1
75030028 1
40009748 1
40009748 2
98920592 1
98920664 1
11451654 1
......@@ -8112,7 +8111,7 @@
14001018 0
14001019 0
14001051 0
14010001 2
14010001 1
14010007 1
14010008 0
14010023 1
......
No preview for this file type
expansions/pics/60010056.jpg

52.3 KB | W: | H:

expansions/pics/60010056.jpg

52.8 KB | W: | H:

expansions/pics/60010056.jpg
expansions/pics/60010056.jpg
expansions/pics/60010056.jpg
expansions/pics/60010056.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/65140034.jpg

52.4 KB | W: | H:

expansions/pics/65140034.jpg

53.5 KB | W: | H:

expansions/pics/65140034.jpg
expansions/pics/65140034.jpg
expansions/pics/65140034.jpg
expansions/pics/65140034.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/9911567.jpg

54.8 KB | W: | H:

expansions/pics/9911567.jpg

54.6 KB | W: | H:

expansions/pics/9911567.jpg
expansions/pics/9911567.jpg
expansions/pics/9911567.jpg
expansions/pics/9911567.jpg
  • 2-up
  • Swipe
  • Onion skin
--海啸之天气模样
function c10202927.initial_effect(c)
aux.AddCodeList(c,22702055)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c10202927.activate)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10202927,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,10202927)
e2:SetCost(c10202927.remcost)
e2:SetTarget(c10202927.remtg)
e2:SetOperation(c10202927.remop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10202927,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,10202928)
e3:SetCost(c10202927.spcost)
e3:SetCondition(c10202927.setcon1)
e3:SetTarget(c10202927.sptg)
e3:SetOperation(c10202927.spop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetCountLimit(1,10202928)
e4:SetCondition(c10202927.setcon2)
c:RegisterEffect(e4)
end
function c10202927.filter(c,tp)
return c:IsCode(22702055) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and c:GetActivateEffect() and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function c10202927.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c10202927.filter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,nil,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(10202927,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c10202927.filter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
local field=tc:IsType(TYPE_FIELD)
if field then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
else
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
if field then
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
end
end
--2
function c10202927.costfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemoveAsCost()
end
function c10202927.remcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c10202927.costfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10202927.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
if Duel.Remove(g,0,REASON_COST+REASON_TEMPORARY)~=0 then
local rc=g:GetFirst()
if rc:IsType(TYPE_TOKEN) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(rc)
e1:SetCountLimit(1)
e1:SetOperation(c10202927.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c10202927.thfilter(c)
return c:IsAbleToHand() and (aux.IsCodeListed(c,22702055) or (c:IsType(TYPE_NORMAL) and c:IsAttribute(ATTRIBUTE_WATER)) or c:IsSetCard(0x177))
end
function c10202927.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10202927.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c10202927.remop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10202927.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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_SPELL+TYPE_TRAP))
e1:SetValue(aux.indoval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c10202927.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
--3
function c10202927.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 c10202927.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10202927.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c10202927.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c10202927.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c10202927.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--这个效果在对方回合也能发动。
function c10202927.setcfilter(c)
return c:IsFaceup() and c:IsCode(23931679)
end
function c10202927.setcon1(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
return not Duel.IsExistingMatchingCard(c10202927.setcfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
function c10202927.setcon2(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler()
return Duel.IsExistingMatchingCard(c10202927.setcfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
--风暴之天气模样
function c10202928.initial_effect(c)
aux.AddCodeList(c,22702055)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10202928,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,10202928)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c10202928.descon)
e2:SetTarget(c10202928.destg)
e2:SetOperation(c10202928.desop)
c:RegisterEffect(e2)
--cannot be target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c10202928.eftg)
e3:SetValue(c10202928.efilter)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10202928,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_BATTLE_START)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c10202928.econ)
e4:SetCondition(c10202928.desecon)
e4:SetTarget(c10202928.desetg)
e4:SetOperation(c10202928.deseop)
c:RegisterEffect(e4)
end
function c10202928.cfilter(c)
return c:IsFaceup() and (c:IsCode(22702055) or c:IsLocation(LOCATION_MZONE) and aux.IsCodeListed(c,22702055))
end
function c10202928.descon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsExistingMatchingCard(c10202928.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c10202928.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(nil,tp,LOCATION_ONFIELD,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,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c10202928.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() then Duel.Destroy(tc,REASON_EFFECT) end
end
--2
function c10202928.eftg(e,c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c10202928.efilter(e,re,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsControler(1-e:GetHandlerPlayer()) and rc:IsNonAttribute(ATTRIBUTE_WATER)
end
--3
function c10202928.econ(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(10202928)
end
function c10202928.desecon(e,tp,eg,ep,ev,re,r,rp)
if not c10202928.econ(e,tp,eg,ep,ev,re,r,rp) then return false end
local tc=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
if not bc then return false end
if tc:IsControler(1-tp) then tc,bc=bc,tc end
if tc:IsFaceup() and tc:GetOriginalLevel()>=0 and tc:IsAttribute(ATTRIBUTE_WATER) then
e:SetLabelObject(bc)
return true
else return false end
end
function c10202928.desetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local bc=e:GetLabelObject()
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end
function c10202928.deseop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT)
end
end
\ No newline at end of file
--涡潜渊 无底城邦乌加里特
function c10202929.initial_effect(c)
aux.AddCodeList(c,22702055)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--decrease tribute
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10202929,0))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetCountLimit(1,10202929)
e2:SetCondition(c10202929.ntcon)
e2:SetTarget(c10202929.nttg)
c:RegisterEffect(e2)
--act limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_FZONE)
e3:SetOperation(c10202929.chainop)
c:RegisterEffect(e3)
--todeck and draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10202929,1))
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1,10202930)
e4:SetTarget(c10202929.drtg)
e4:SetOperation(c10202929.drop)
c:RegisterEffect(e4)
end
function c10202929.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c10202929.nttg(e,c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
--2
function c10202929.chainop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsCodeListed(c,22702055) and ep==tp then
Duel.SetChainLimit(c10202929.chainlm)
end
end
function c10202929.chainlm(e,rp,tp)
return tp==rp
end
--3
function c10202929.tdfilter(c)
return c:IsAbleToDeck() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and (aux.IsCodeListed(c,22702055) or (c:IsType(TYPE_NORMAL) and c:IsAttribute(ATTRIBUTE_WATER)) or c:IsSetCard(0x177))
end
function c10202929.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c10202929.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingTarget(c10202929.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,4,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c10202929.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,4,4,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c10202929.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #tg==0 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--海神的使者
function c10202932.initial_effect(c)
aux.AddCodeList(c,22702055)
--pendulum summon
aux.EnablePendulumAttribute(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10202932,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,10202932)
e1:SetTarget(c10202932.sptg)
e1:SetOperation(c10202932.spop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1,10202935+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c10202932.hspcon)
c:RegisterEffect(e2)
--spsummon condition
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e3)
--remove
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10202932,1))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_REMOVE)
e4:SetCountLimit(1,10202933)
e4:SetTarget(c10202932.rmtg)
e4:SetOperation(c10202932.rmop)
c:RegisterEffect(e4)
--negate
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10202932,2))
e5:SetCategory(CATEGORY_NEGATE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e5:SetCode(EVENT_CHAINING)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,10202934)
e5:SetCondition(c10202932.negcon1)
e5:SetCost(c10202932.negcost)
e5:SetTarget(c10202932.negtg)
e5:SetOperation(c10202932.negop)
c:RegisterEffect(e5)
end
--p
function c10202932.pcfilter(c,tp)
return c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x178)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c10202932.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c10202932.pcfilter,tp,LOCATION_DECK,0,1,nil,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c10202932.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c10202932.pcfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
if #g==0 or not Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) then return end
if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--ps
function c10202932.filter(c)
return c:IsAttribute(ATTRIBUTE_WATER) or c:IsFacedown()
end
function c10202932.hspcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE)==0
and Duel.IsExistingMatchingCard(c10202932.filter,tp,LOCATION_MZONE,0,1,nil)
end
--1
function c10202932.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
end
function c10202932.rmop(e,tp,eg,ep,ev,re,r,rp)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if hg:GetCount()==0 then return end
Duel.ConfirmCards(tp,hg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=hg:Select(tp,1,1,nil)
local tc=g:GetFirst()
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
Duel.ShuffleHand(1-tp)
local c=e:GetHandler()
local fid=c:GetFieldID()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c10202932.retcon)
e1:SetOperation(c10202932.retop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
tc:RegisterFlagEffect(10202932,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
end
function c10202932.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(10202932)==e:GetLabel() then
return true
else
e:Reset()
return false
end
end
function c10202932.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
--2
function c10202932.cfilter(c)
return c:IsFaceup() and c:IsCode(22702055)
end
function c10202932.negcon1(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and Duel.IsExistingMatchingCard(c10202932.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c10202932.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0x178) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost()
end
function c10202932.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10202932.costfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c10202932.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c10202932.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c10202932.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
\ No newline at end of file
--星海航线 空元行者
function c11560720.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,c11560720.mfilter,c11560720.xyzcheck,2,99)
--xx
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_ADD_ATTRIBUTE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(0xff)
e0:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e0)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_ADD_RACE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(0xff)
e0:SetValue(RACE_SPELLCASTER)
c:RegisterEffect(e0)
--ov
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c11560720.ovcon)
e1:SetOperation(c11560720.ovop)
c:RegisterEffect(e1)
--def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(function(e,c)
return c:GetOverlayCount()*400 end)
c:RegisterEffect(e1)
--cannot target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(aux.tgoval)
e2:SetCondition(function(e)
local seq=e:GetHandler():GetSequence()
return seq==0 or seq==1 end)
c:RegisterEffect(e2)
--ov
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c11560720.xovcon)
e2:SetOperation(c11560720.xovop)
c:RegisterEffect(e2)
--r d
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c11560720.rdcon)
e2:SetOperation(c11560720.rdop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCountLimit(1,11560720+EFFECT_COUNT_CODE_DUEL)
e3:SetCondition(c11560720.spcon)
e3:SetTarget(c11560720.sptg)
e3:SetOperation(c11560720.spop)
c:RegisterEffect(e3)
end
c11560720.SetCard_SR_Saier=true
function c11560720.mfilter(c,xyzc)
return c:IsXyzLevel(xyzc,1)
end
function c11560720.xyzcheck(g)
return g:GetClassCount(Card.GetRace)==g:GetCount() and g:GetClassCount(Card.GetAttribute)==g:GetCount()
end
function c11560720.ovfil(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsControler(1-tp)
end
function c11560720.ovcon(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c11560720.ovfil,nil,tp)
return g:GetCount()>0 and e:GetHandler():IsType(TYPE_XYZ)
end
function c11560720.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(c11560720.ovfil,nil,tp)
if g:GetCount()>0 and c:IsType(TYPE_XYZ) then
Duel.Hint(HINT_CARD,0,11560720)
local tc=g:GetFirst()
while tc do
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
Duel.Overlay(c,og)
end
Duel.Overlay(c,tc)
tc=g:GetNext()
end
if c:GetSequence()==2 then
c11560720.xovop(e,tp,eg,ep,ev,re,r,rp)
end
if c:GetSequence()==3 or c:GetSequence()==4 then
c11560720.rdop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c11560720.xovfil(c)
return c:IsCanOverlay() and c:IsType(TYPE_XYZ) and c:IsFaceup() and c:GetOverlayCount()==0
end
function c11560720.xovcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
local g1=Duel.GetMatchingGroup(c11560720.xovfil,tp,0,LOCATION_MZONE,nil)
local g2=Duel.GetOverlayGroup(tp,0,1)
g1:Merge(g2)
return re:GetHandler()==e:GetHandler() and e:GetHandler():IsType(TYPE_XYZ) and g1:GetCount()>0 and seq==2
end
function c11560720.xovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(c11560720.xovfil,tp,0,LOCATION_MZONE,nil)
local g2=Duel.GetOverlayGroup(tp,0,1)
g1:Merge(g2)
if g1:GetCount()>0 and c:IsType(TYPE_XYZ) then
Duel.Hint(HINT_CARD,0,11560720)
local xoc=g1:Select(tp,1,1,nil):GetFirst()
local oc=xoc:GetOverlayTarget()
Duel.Overlay(c,xoc)
if oc then
Duel.RaiseSingleEvent(oc,EVENT_DETACH_MATERIAL,e,0,0,0,0)
Duel.RaiseEvent(oc,EVENT_DETACH_MATERIAL,e,0,0,0,0)
end
end
end
function c11560720.rdcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
return re:GetHandler()==e:GetHandler() and (seq==3 or seq==4)
end
function c11560720.rdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,11560720)
Duel.Damage(1-tp,400,REASON_EFFECT)
Duel.Recover(tp,400,REASON_EFFECT)
end
function c11560720.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetOverlayCount()>0 and c:GetReasonPlayer()==1-tp and c:IsPreviousControler(tp)
end
function c11560720.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11560720.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetOperation(c11560720.rmop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function c11560720.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,11560720)
local og=c:GetOverlayGroup()
if og:GetCount()>0 and og:FilterCount(Card.IsAbleToRemove,nil,POS_FACEDOWN)==og:GetCount() and Duel.Remove(og,POS_FACEDOWN,REASON_EFFECT)~=0 then
else
Duel.Destroy(c,REASON_EFFECT)
end
end
......@@ -12,7 +12,7 @@ function c11561025.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11561025)
e1:SetTarget(c11561025.sptg)
......@@ -22,7 +22,7 @@ function c11561025.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_BECOME_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11561025)
e1:SetCondition(c11561025.spcon)
......@@ -34,7 +34,7 @@ function c11561025.initial_effect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e2:SetCountLimit(1,21561025)
e2:SetTarget(c11561025.drmtg)
e2:SetOperation(c11561025.drmop)
......@@ -43,7 +43,7 @@ function c11561025.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,21561025)
e2:SetCondition(c11561025.drmcon)
......
local m=15005334
local cm=_G["c"..m]
cm.name="『繁育』的荒潮-塔伊兹育罗斯"
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,3,3,nil,nil,99)
c:EnableReviveLimit()
--cannot disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(cm.effcon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(15005334)
e2:SetRange(LOCATION_MZONE)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(cm.desreptg)
e3:SetValue(cm.desrepval)
e3:SetOperation(cm.desrepop)
c:RegisterEffect(e3)
--
if not cm.TayzzyronthTDDCheck then
cm.TayzzyronthTDDCheck=true
--spsummon check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
e3:SetTarget(cm.sumlimit)
Duel.RegisterEffect(e3,0)
--hack1
TayzzyronthTDDSpecialSummon=Duel.SpecialSummon
function Duel.SpecialSummon(sg,typ,sp,tp,nochk,nolim,pos,zone)
if not zone then zone=0xff end
local p=0
local mchk=false
if Duel.IsExistingMatchingCard(cm.Tayzzyronthfilter,0,0xff,0,1,nil) then
p=0
mchk=true
end
if Duel.IsExistingMatchingCard(cm.Tayzzyronthfilter,1,0xff,0,1,nil) then
p=1
mchk=true
end
if Duel.IsExistingMatchingCard(cm.Tayzzyronthfilter,0,0xff,0,1,nil) and Duel.IsExistingMatchingCard(cm.Tayzzyronthfilter,1,0xff,0,1,nil) then
p=PLAYER_ALL
mchk=true
end
local count=0
local removechk=false
local chk=false
if aux.GetValueType(sg)=="Card" then
count=1
removechk=sg:IsAbleToRemove(p,POS_FACEDOWN,REASON_EFFECT+REASON_REPLACE)
chk=cm.sumfilter(sg)
end
if aux.GetValueType(sg)=="Group" then
count=#sg
removechk=sg:IsExists(Card.IsAbleToRemove,#sg,nil,p,POS_FACEDOWN,REASON_EFFECT+REASON_REPLACE)
chk=sg:IsExists(cm.sumfilter,#sg,nil)
end
if mchk and chk and removechk and Duel.IsPlayerCanSpecialSummonMonster(sp,15005335,nil,0x4011,0,0,1,RACE_INSECT,ATTRIBUTE_EARTH,POS_FACEUP,tp) and Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT+REASON_REPLACE) then
local x=0
sg=Group.CreateGroup()
while x<count do
local token=Duel.CreateToken(tp,15005335)
TayzzyronthTDDSpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local ec=Duel.GetFirstMatchingCard(cm.Tayzzyronthfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local e1=Effect.CreateEffect(ec)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
token:RegisterEffect(e2,true)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
token:RegisterEffect(e3,true)
local e4=e2:Clone()
e4:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
token:RegisterEffect(e4,true)
local e5=e2:Clone()
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e5,true)
x=x+1
end
Duel.SpecialSummonComplete()
else
local x=TayzzyronthTDDSpecialSummon(sg,typ,sp,tp,nochk,nolim,pos,zone)
end
return x
end
--hack2
TayzzyronthTDDSpecialSummonStep=Duel.SpecialSummonStep
function Duel.SpecialSummonStep(sg,typ,sp,tp,nochk,nolim,pos,zone)
if not zone then zone=0xff end
local p=0
local mchk=false
if Duel.IsExistingMatchingCard(cm.Tayzzyronthfilter,0,LOCATION_MZONE,0,1,nil) then
p=0
mchk=true
end
if Duel.IsExistingMatchingCard(cm.Tayzzyronthfilter,1,LOCATION_MZONE,0,1,nil) then
p=1
mchk=true
end
if Duel.IsExistingMatchingCard(cm.Tayzzyronthfilter,0,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.Tayzzyronthfilter,1,LOCATION_MZONE,0,1,nil) then
p=PLAYER_ALL
mchk=true
end
local count=0
local removechk=false
local chk=false
if aux.GetValueType(sg)=="Card" then
count=1
removechk=sg:IsAbleToRemove(p,POS_FACEDOWN,REASON_EFFECT+REASON_REPLACE)
chk=cm.sumfilter(sg)
end
if aux.GetValueType(sg)=="Group" then
count=#sg
removechk=sg:IsExists(Card.IsAbleToRemove,#sg,nil,p,POS_FACEDOWN,REASON_EFFECT+REASON_REPLACE)
chk=sg:IsExists(cm.sumfilter,#sg,nil)
end
if mchk and chk and removechk and Duel.IsPlayerCanSpecialSummonMonster(sp,15005335,nil,0x4011,0,0,1,RACE_INSECT,ATTRIBUTE_EARTH,POS_FACEUP,tp) and Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT+REASON_REPLACE) then
local x=0
local res=false
while x<count do
local token=Duel.CreateToken(tp,15005335)
res=TayzzyronthTDDSpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local ec=Duel.GetFirstMatchingCard(cm.Tayzzyronthfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local e1=Effect.CreateEffect(ec)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
token:RegisterEffect(e2,true)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
token:RegisterEffect(e3,true)
local e4=e2:Clone()
e4:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
token:RegisterEffect(e4,true)
local e5=e2:Clone()
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e5,true)
x=x+1
end
Duel.SpecialSummonComplete()
else
local res=TayzzyronthTDDSpecialSummonStep(sg,typ,sp,tp,nochk,nolim,pos,zone)
end
return res
end
end
end
function cm.effcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.Tayzzyronthfilter(c)
return c:GetEffectCount(15005334)~=0 and c:IsFaceup()
end
function cm.sumfilter(c)
return c:GetFlagEffect(15005334)~=0
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
if se:IsActivated() and se:IsHasType(EFFECT_TYPE_ACTIONS) then
c:RegisterFlagEffect(15005334,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,EFFECT_FLAG_SET_AVAILABLE,1)
end
return false
end
function cm.repfilter(c)
return c:IsOnField() and c:IsFaceup() and c:IsRace(RACE_INSECT)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function cm.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(cm.repfilter,1,nil)
and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
return true
end
function cm.desrepval(e,c)
return cm.repfilter(c)
end
function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
Duel.Hint(HINT_CARD,0,15005334)
end
\ No newline at end of file
......@@ -68,7 +68,7 @@ function c22348086.spop1(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c22348083.spfilter1),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c22348086.spfilter1),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -81,14 +81,14 @@ function s.filter(c,e,tp)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsCanRemoveCounter(tp,LOCATION_ONFIELD,0,0x32b,3,REASON_EFFECT) and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsCanRemoveCounter(tp,LOCATION_ONFIELD,0,0x32b,1,REASON_EFFECT) and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) and Duel.IsCanRemoveCounter(tp,LOCATION_ONFIELD,0,0x32b,3,REASON_EFFECT) and Duel.RemoveCounter(tp,LOCATION_ONFIELD,0,0x32b,3,REASON_EFFECT) then
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) and Duel.IsCanRemoveCounter(tp,LOCATION_ONFIELD,0,0x32b,1,REASON_EFFECT) and Duel.RemoveCounter(tp,LOCATION_ONFIELD,0,0x32b,1,REASON_EFFECT) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -134,9 +134,9 @@ end
function XY_VHisc.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsCanRemoveCounter(tp,LOCATION_ONFIELD,0,0x32b,4,REASON_COST) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return Duel.IsCanRemoveCounter(tp,LOCATION_ONFIELD,0,0x32b,2,REASON_COST) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function XY_VHisc.spop(e,tp,eg,ep,ev,re,r,rp,c)
if chk==0 then return Duel.IsCanRemoveCounter(tp,LOCATION_ONFIELD,0,0x32b,4,REASON_COST) end
Duel.RemoveCounter(tp,LOCATION_ONFIELD,0,0x32b,4,REASON_COST)
if chk==0 then return Duel.IsCanRemoveCounter(tp,LOCATION_ONFIELD,0,0x32b,2,REASON_COST) end
Duel.RemoveCounter(tp,LOCATION_ONFIELD,0,0x32b,2,REASON_COST)
end
\ No newline at end of file
......@@ -64,6 +64,6 @@ function s.reop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
local rect=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.RemoveCounter(tp,LOCATION_ONFIELD,0,0x32b,rect,REASON_EFFECT)
Duel.Recover(tp,rect*500,REASON_EFFECT)
Duel.Recover(tp,rect*800,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -21,6 +21,18 @@ function s.initial_effect(c)
e2:SetCode(EVENT_REMOVE_COUNTER+0x32b)
e2:SetOperation(s.recop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,id+10000)
e3:SetCondition(s.thcon)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
end
s.VHisc_Vampire=true
......@@ -46,3 +58,23 @@ end
function s.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,500,REASON_EFFECT)
end
--e3
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function s.thfilter(c)
return c:IsCode(33201052) or c:IsCode(33201059) or c:IsCode(33201069) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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
......@@ -46,7 +46,7 @@ function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler(),0,0x32b)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Damage(1-tp,1000,REASON_EFFECT) then
if e:GetHandler():IsRelateToEffect(e) and Duel.Damage(1-tp,1000,REASON_EFFECT) then
e:GetHandler():AddCounter(0x32b,2)
end
end
......@@ -75,6 +75,13 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+0x32b,e,REASON_EFFECT,tp,tp,ev)
tc:AddCounter(0x32b,ct)
Duel.BreakEffect()
Duel.Recover(tp,ct*500,REASON_EFFECT)
Duel.Recover(tp,ct*800,REASON_EFFECT)
if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
\ No newline at end of file
--晶化血裔 吉尔雷比斯
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableCounterPermit(0x32b)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,33201068+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetCondition(s.ctcon)
e0:SetOperation(s.ctop)
e0:SetLabelObject(e1)
c:RegisterEffect(e0)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,33211068)
e2:SetTarget(s.sttg)
e2:SetOperation(s.stop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(function(e)
return e:GetHandler():GetCounter(0x32b)>=5 end)
e3:SetValue(500)
c:RegisterEffect(e3)
end
s.VHisc_Vampire=true
--e1
function s.srlfil(c)
return c:IsLocation(LOCATION_GRAVE) and c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost()
end
function s.srlgck(g)
return Duel.GetMZoneCount(tp,g)>0
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.srlfil,tp,LOCATION_GRAVE,0,c)
return g:CheckSubGroup(s.srlgck,2,2)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(s.srlfil,tp,LOCATION_GRAVE,0,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:SelectSubGroup(tp,s.srlgck,false,2,2)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
local rec=0
for tc in aux.Next(rg) do
rec=rec+tc:GetAttack()
end
e:SetLabel(rec)
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
return re==te
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local rec=re:GetLabel()
Duel.Recover(tp,rec,REASON_EFFECT)
re:SetLabel(0)
end
--e2
function s.stfil(c)
return c.VHisc_Vampire and c:IsSSetable() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end
function s.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.stfil,tp,LOCATION_GRAVE,0,1,nil) end
end
function s.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.stfil,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 and (tc:IsType(TYPE_QUICKPLAY) or tc:IsType(TYPE_TRAP)) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
--血晶激活
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.cttg)
e1:SetOperation(s.ctop)
c:RegisterEffect(e1)
--atkup
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCondition(aux.exccon)
e2:SetTarget(s.retg)
e2:SetOperation(s.reop)
c:RegisterEffect(e2)
end
s.VHisc_Vampire=true
--e1
function s.ctfilter(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsCanAddCounter(0x32b,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler(),0,0x32b)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_MZONE,0,nil)
local ctc=0
for tc in aux.Next(g) do
tc:AddCounter(0x32b,4)
ctc=ctc+4
end
if ctc>=8 then Duel.Recover(tp,2000,REASON_EFFECT) end
end
--e2
function s.atkfilter(c)
return c:IsFaceup() and c:GetCounter(0x32b)>0
end
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function s.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) and Duel.IsExistingMatchingCard(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) then
local g=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local atk=tc:GetCounter(0x32b)*200
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(atk)
tc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--血裔的新王 吉尔雷比斯
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableCounterPermit(0x32b)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_ZOMBIE),8,3)
c:EnableReviveLimit()
--special summon rule
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,1))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(s.spcon)
e0:SetOperation(s.spop)
e0:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCondition(s.ctcon)
e1:SetOperation(s.ctop)
e1:SetLabelObject(e0)
c:RegisterEffect(e1)
--spsm
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCost(s.spcost2)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(s.efilter)
c:RegisterEffect(e3)
--add counter
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,3))
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(s.ctcon2)
e4:SetTarget(s.cttg2)
e4:SetOperation(s.ctop2)
c:RegisterEffect(e4)
end
s.VHisc_Vampire=true
--xyz
function s.ovfilter(c)
return c:IsFaceup() and c:IsCode(33201068) and c:GetCounter(0x32b)>=8
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingMatchingCard(s.ovfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0))
local g=Duel.SelectMatchingCard(tp,s.ovfilter,tp,LOCATION_MZONE,0,1,1,nil)
local mc=g:GetFirst()
local ct=mc:GetCounter(0x32b)
local mg=mc:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(c,mg)
end
c:SetMaterial(g)
Duel.Overlay(c,g)
e:SetLabel(ct)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
return re==te
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local ct=re:GetLabel()
e:GetHandler():AddCounter(0x32b,ct)
re:SetLabel(0)
end
--e2
function s.spfilter(c,e,tp)
return c.VHisc_Vampire and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x32b,4,REASON_EFFECT) end
e:GetHandler():RemoveCounter(tp,0x32b,4,REASON_EFFECT)
Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+0x32b,e,REASON_EFFECT,tp,tp,ev)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.spop2(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,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--e3
function s.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER) and te:GetOwner():GetControler()~=e:GetOwner():GetControler() and te:GetOwner():IsRace(RACE_ZOMBIE)
end
--e4
function s.rafilter(c)
return c:IsFaceup() and not c:IsRace(RACE_ZOMBIE)
end
function s.cttg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsCanAddCounter(0x32b,2) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler(),0,0x32b)
end
function s.ctop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x32b,2)
if Duel.IsExistingMatchingCard(s.rafilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,4)) then
local tc=Duel.SelectMatchingCard(tp,s.rafilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_ZOMBIE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(1000)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
function s.ctcon2(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL)
end
\ No newline at end of file
--始祖血脉觉醒+
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.con)
e1:SetTarget(s.negtg)
e1:SetOperation(s.negop)
c:RegisterEffect(e1)
--spsm
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.cttg)
e2:SetOperation(s.ctop)
c:RegisterEffect(e2)
end
s.VHisc_Vampire=true
--e1
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCounter(tp,LOCATION_ONFIELD,0,0x32b)>=10
end
function s.xyzfilter(c)
return c:IsCode(33201070) and c:IsXyzSummonable(nil)
end
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
local g=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
end
--e2
function s.filter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x32b,1) and c:IsAttackAbove(500)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.filter(chkc,tp) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x32a)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsAttackAbove(500) then
local ct=math.floor(tc:GetAttack()/500)
tc:AddCounter(0x32b,ct)
end
end
\ No newline at end of file
--御影零夜的抗击
local s,id,o=GetID()
Duel.LoadScript("c33201050.lua")
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.con)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
c:RegisterEffect(e1)
--spsm
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.cttg)
e2:SetOperation(s.ctop)
c:RegisterEffect(e2)
end
s.VHisc_Vampire=true
--e1
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCounter(tp,LOCATION_ONFIELD,0,0x32b)>=10
end
function s.xyzfilter(c)
return c:IsCode(33201062) and c:IsXyzSummonable(nil)
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local g=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)>0 and g:GetCount()>0 and Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
end
--e2
function s.ctfilter(c)
return c:IsFaceup() and c:IsCanAddCounter(0x32b,1)
end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.CheckLPCost(tp,500,true) and Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,e:GetHandler(),0,0x32b)
end
function s.ctop(e,tp,eg,ep,ev,re,r,rp)
if Duel.CheckLPCost(tp,500,true) and Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_ONFIELD,0,1,nil) then
local ct=XY_VHisc.LPcost(tp)
while ct>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local sg=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
local tc=sg:GetFirst()
tc:AddCounter(0x32b,1)
ct=ct-1
end
end
end
\ No newline at end of file
--新老血液的交替
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.tdtg)
e1:SetOperation(s.tdop)
c:RegisterEffect(e1)
--Recover
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_RECOVER)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+10000)
e2:SetCondition(aux.exccon)
e2:SetTarget(s.retg)
e2:SetOperation(s.reop)
c:RegisterEffect(e2)
end
s.VHisc_Vampire=true
--e1
function s.tdfilter(c)
return c.VHisc_Vampire and c:IsAbleToDeck()
end
function s.tgfilter(c,tdg)
return c.VHisc_Vampire and not tdg:IsExists(Card.IsCode,1,nil,c:GetCode()) and c:IsAbleToGrave()
end
function s.fselect1(g,tp)
local tgg=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil,g)
return g:GetClassCount(Card.GetCode)==g:GetCount() and tgg:CheckSubGroup(s.fselect2,g:GetCount(),g:GetCount())
end
function s.fselect2(g)
return g:GetClassCount(Card.GetCode)==g:GetCount()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE,0,nil)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.tdfilter(chkc) end
if chk==0 then return g:CheckSubGroup(s.fselect1,1,2,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,s.fselect1,false,1,2,tp)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,sg:GetCount(),0,0)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local dg=g:Filter(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
local tdc=dg:GetCount()
local tgg=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil,dg)
if tdc>0 and tgg:CheckSubGroup(s.fselect2,dg:GetCount(),dg:GetCount()) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=tgg:SelectSubGroup(tp,s.fselect2,false,dg:GetCount(),dg:GetCount())
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
--e2
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function s.reop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then
Duel.BreakEffect()
Duel.Recover(tp,1000,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -24,6 +24,20 @@ function VHisc_CNTdb.spck(e,tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end
-------------grave act limit------------------
function VHisc_CNTdb.glm(e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(VHisc_CNTdb.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function VHisc_CNTdb.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE
end
-------------code check------------------
function VHisc_CNTdb.nck(c)
......@@ -61,7 +75,7 @@ local m=33201350
local cm=_G["c"..m]
if not cm then return end
function cm.initial_effect(c)
VHisc_CNTdb.the(c,m,0x200,0x10000)
VHisc_CNTdb.the(c,m,0x1+0x200,0x10000)
--deckes
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......@@ -93,7 +107,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
Duel.ShuffleDeck(tp)
local desg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
if tgc==5 and desg:GetCount()>0 then
if tgc>4 and desg:GetCount()>0 then
Duel.Destroy(desg,REASON_EFFECT)
end
end
......@@ -107,31 +121,12 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local dg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=dg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
--atk up
local e12=Effect.CreateEffect(e:GetHandler())
e12:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e12:SetCode(EVENT_PHASE+PHASE_END)
e12:SetLabel(500)
e12:SetCountLimit(1)
e12:SetOperation(cm.turnop)
Duel.RegisterEffect(e12,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetLabelObject(e12)
e1:SetValue(cm.atkval)
Duel.RegisterEffect(e1,tp)
e12:SetLabelObject(e1)
end
function cm.atkval(e,c)
return e:GetLabelObject():GetLabel()
end
function cm.turnop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(e:GetLabel()-100)
if e:GetLabel()<=0 then
e:GetLabelObject():Reset()
e:Reset()
end
end
\ No newline at end of file
......@@ -18,7 +18,7 @@ local m=33201351
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c33201350") end,function() require("script/c33201350") end)
function cm.initial_effect(c)
VHisc_CNTdb.the(c,m,0x200,0x10000)
VHisc_CNTdb.the(c,m,0x40+0x200,0x10000)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
......@@ -64,16 +64,20 @@ end
--e0
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return VHisc_CNTdb.spck(e,tp) end
if chk==0 then return VHisc_CNTdb.spck(e,tp) and Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) and Duel.IsPlayerCanDiscardDeck(tp,1) then
Duel.BreakEffect()
Duel.DiscardDeck(tp,3,REASON_EFFECT)
VHisc_CNTdb.glm(e,tp)
end
end
--e3
function cm.destg(e,c)
local tp=e:GetHandler():GetControler()
......
......@@ -60,50 +60,40 @@ cm.VHisc_CNTreasure=true
--e1
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,3,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,3,tp,LOCATION_DECK)
end
function cm.tgfilter(c)
return VHisc_CNTdb.nck(c) and c:IsAbleToGrave() and not c:IsCode(m)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,2,2,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 then
for tc in aux.Next(g) do
--to grave
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetOperation(cm.tgop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOGRAVE+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD-RESET_TOGRAVE+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
end
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,3,3,nil)
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(e:GetHandler(),tp,REASON_EFFECT)
end
--e0
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local hlp=Duel.GetFlagEffect(tp,m)*1200+1200
if chk==0 then return VHisc_CNTdb.spck(e,tp) end
local hlp=1200
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(hlp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,hlp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Recover(p,d,REASON_EFFECT)
end
function cm.acop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabelObject()==re and e:GetHandler():GetFlagEffect(1)>0 then
Duel.RegisterFlagEffect(tp,m,nil,EFFECT_FLAG_OATH,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetValue(HALF_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e2,tp)
end
end
\ No newline at end of file
......@@ -18,7 +18,7 @@ local m=33201353
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c33201350") end,function() require("script/c33201350") end)
function cm.initial_effect(c)
VHisc_CNTdb.the(c,m,0x1000,0x10000)
VHisc_CNTdb.the(c,m,0x200+0x1000,0x10000)
--destroy replace
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......@@ -104,15 +104,20 @@ function cm.posfilter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and VHisc_CNTdb.spck(e,tp) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,nil,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 and e:GetHandler():IsRelateToEffect(e) then
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sg=g:Select(tp,1,99,nil)
Duel.HintSelection(sg)
Duel.ChangePosition(sg,POS_FACEUP_DEFENSE)
end
end
end
\ No newline at end of file
......@@ -30,7 +30,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_CUSTOM+33201355)
......@@ -58,8 +58,9 @@ function cm.tgfilter(c)
return VHisc_CNTdb.nck(c) and c:IsAbleToGrave() and not c:IsCode(m)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) and e:GetHandler():IsAbleToGrave() end
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) and e:GetHandler():IsAbleToGrave() and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......@@ -67,6 +68,7 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
g:AddCard(e:GetHandler())
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
......@@ -86,13 +88,13 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabel(tp)
e1:SetOperation(cm.lfop)
tc:RegisterEffect(e1,true)
-- local e1=Effect.CreateEffect(e:GetHandler())
-- e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
-- e1:SetCode(EVENT_LEAVE_FIELD)
-- e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
-- e1:SetLabel(tp)
-- e1:SetOperation(cm.lfop)
-- tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
......@@ -105,9 +107,9 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
----------------code table add code----------------------
if not VHisc_CNTdb.codeck(VHisc_CNTN,tc) then
VHisc_CNTN[#VHisc_CNTN+1]=tc:GetOriginalCode()
end
-- if not VHisc_CNTdb.codeck(VHisc_CNTN,tc) then
-- VHisc_CNTN[#VHisc_CNTN+1]=tc:GetOriginalCode()
-- end
end
function cm.lfop(e,tp,eg,ep,ev,re,r,rp)
local tdp=e:GetLabel()
......
......@@ -18,19 +18,22 @@ local m=33201356
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c33201350") end,function() require("script/c33201350") end)
function cm.initial_effect(c)
--shan chu de xiao guo
--send to deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(cm.tdtg)
e1:SetOperation(cm.tdop)
c:RegisterEffect(e1)
-- local e1=Effect.CreateEffect(c)
-- e1:SetDescription(aux.Stringid(m,0))
-- e1:SetCategory(CATEGORY_TODECK)
-- e1:SetType(EFFECT_TYPE_QUICK_O)
-- e1:SetCode(EVENT_FREE_CHAIN)
-- e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
-- e1:SetCountLimit(1,m)
-- e1:SetRange(LOCATION_MZONE)
-- e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
-- e1:SetTarget(cm.tdtg)
-- e1:SetOperation(cm.tdop)
-- c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
......@@ -108,22 +111,22 @@ end
--e0
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return VHisc_CNTdb.nck(re:GetHandler()) and re:GetHandler()~=e:GetHandler()
return re:GetHandler()~=e:GetHandler()
end
function cm.cfilter(c,cg)
return cg:IsExists(Card.IsCode,1,nil,c:GetCode()) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=e:GetLabelObject()
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil,cg) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil,cg) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local cg=e:GetLabelObject()
if c:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil,cg) then
if c:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil,cg) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil,cg)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,cg)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -18,7 +18,7 @@ local m=33201357
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c33201350") end,function() require("script/c33201350") end)
function cm.initial_effect(c)
VHisc_CNTdb.the(c,m,0x200+0x4,0x10000)
VHisc_CNTdb.the(c,m,0x200+0x40,0x10000)
--Equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......@@ -116,11 +116,14 @@ end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return VHisc_CNTdb.spck(e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if c:IsRelateToEffect(e) and Duel.IsPlayerCanDiscardDeck(tp,1) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
Duel.DiscardDeck(tp,3,REASON_EFFECT)
VHisc_CNTdb.glm(e,tp)
local g=Duel.GetMatchingGroup(cm.ffilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
if g:GetClassCount(Card.GetCode)>=4 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
......
......@@ -88,12 +88,12 @@ function cm.espfilter(c,e,tp)
return VHisc_CNTdb.nck(c) and c:IsCanBeSpecialSummoned(e,SUMMON_VALUE_GLADIATOR,tp,true,false) and ((c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) or (c:IsLocation(LOCATION_DECK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0))
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.espfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_DECK)
if chk==0 then return Duel.IsExistingMatchingCard(cm.espfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.espfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,cm.espfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_VALUE_GLADIATOR,tp,tp,true,false,POS_FACEUP)
end
......
......@@ -120,9 +120,9 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,sg)
local tc=sg:GetFirst()
----------------code table add code----------------------
if not VHisc_CNTdb.codeck(VHisc_CNTN,tc) then
VHisc_CNTN[#VHisc_CNTN+1]=tc:GetOriginalCode()
end
-- if not VHisc_CNTdb.codeck(VHisc_CNTN,tc) then
-- VHisc_CNTN[#VHisc_CNTN+1]=tc:GetOriginalCode()
-- end
end
end
end
\ No newline at end of file
......@@ -20,81 +20,37 @@ xpcall(function() require("expansions/script/c33201350") end,function() require(
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.matfilter,1,1)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.sthtg)
e2:SetOperation(cm.sthop)
c:RegisterEffect(e2)
end
cm.VHisc_CNTreasure=true
function cm.matfilter(c)
return VHisc_CNTdb.nck(c) and not c:IsCode(m)
end
function cm.cfilter(c)
return c:IsFaceup() and VHisc_CNTdb.nck(c)
end
function cm.negfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_NORMAL)
end
--e2
function cm.thfilter(c)
return VHisc_CNTdb.nck(c) and c:IsAbleToHand()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(cm.cfilter,1,nil)
return VHisc_CNTdb.nck(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(cm.negfilter,1,nil) or Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,0,tp,LOCATION_ONFIELD)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local op=2
if eg:IsExists(cm.negfilter,1,nil) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) then
op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
else
if eg:IsExists(cm.negfilter,1,nil) then op=0 end
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) then op=1 end
end
local g=eg:Filter(cm.negfilter,nil)
if op==0 and g:GetCount()>0 then
local tc=g:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
if op==1 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) then
function cm.sthtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,nil) end
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
local g=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_HANDES,0,0,tp,1)
end
function cm.sthop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
--血晶骰子
local s,id,o=GetID()
function s.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetCode(EFFECT_CANNOT_REMOVE)
e0:SetRange(LOCATION_MZONE)
e0:SetTargetRange(1,1)
e0:SetTarget(s.rmlimit)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
s.toss_dice=true
function s.rmlimit(e,c,tp,r)
return c==e:GetHandler()
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
local sg=g:Filter(Card.IsFaceup,nil)
return sg:GetCount()<=0
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetChainLimit(s.chainlm)
end
function s.chainlm(e,ep,tp)
return tp==ep
end
function s.thfilter(c)
return c:IsAbleToHand()
end
function s.thfilter1(c,tp)
return c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,c,c)
end
function s.thfilter2(c,ec)
return c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
and c:GetAttribute()==ec:GetAttribute()
and c:GetRace()==ec:GetRace()
and c:GetLevel()==ec:GetLevel()
and not c:IsCode(ec:GetCode())
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local dc1,dc2=Duel.TossDice(tp,2)
if (dc1==1 or dc1==2 or dc1==5 or dc1==6) and (dc2==1 or dc2==2 or dc2==5 or dc2==6) then
if Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter1,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc2=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_DECK,0,1,1,tc,tc):GetFirst()
g:AddCard(tc2)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local dg=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
for dc in aux.Next(dg) do
Duel.NegateRelatedChain(dc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e2)
if dc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e3)
end
end
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local dg=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
for dc in aux.Next(dg) do
Duel.NegateRelatedChain(dc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e2)
if dc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
dc:RegisterEffect(e3)
end
end
end
end
end
else
Duel.Draw(1-tp,1,REASON_EFFECT)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetTarget(s.disable)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function s.disable(e,c)
return not c:IsCode(id) and (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT))
end
\ No newline at end of file
--蔚蓝之界
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,57300203)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SSET)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,0)
e2:SetCondition(s.condition)
e2:SetTarget(s.setlimit)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(1,0)
e3:SetCondition(s.condition)
e3:SetValue(s.actlimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(0,LOCATION_ONFIELD)
e4:SetTarget(s.indtg)
e4:SetValue(s.efilter)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,0))
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_CHAINING)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetRange(LOCATION_FZONE)
e5:SetCountLimit(1)
e5:SetCondition(s.reccon)
e5:SetTarget(s.rectg)
e5:SetOperation(s.recop)
c:RegisterEffect(e5)
end
function s.setfilter(c,tp)
return c:IsCode(57300203) and c:IsType(TYPE_FIELD) and not c:IsForbidden() and c:CheckUniqueOnField(1-tp)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil,tp) end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
local fc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,1-tp,LOCATION_FZONE,POS_FACEUP,true)
end
end
function s.condition(e)
return Duel.IsEnvironment(57300203)
end
function s.setlimit(e,c,tp)
return c:IsType(TYPE_FIELD)
end
function s.actlimit(e,re,tp)
return re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function s.indtg(e,c)
return c:IsCode(57300203)
end
function s.efilter(e,re)
return e:GetHandlerPlayer()==re:GetOwnerPlayer() and re:GetHandler()~=e:GetHandler()
end
function s.reccon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and rp==1-tp
end
function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,re:GetHandler():GetDefense())
end
function s.recop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local c=e:GetHandler()
local rc=re:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local lp=rc:GetDefense()
if lp>0 and Duel.Recover(p,lp,REASON_EFFECT)~=0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(s.distg)
e1:SetLabelObject(rc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(s.discon)
e2:SetOperation(s.disop)
e2:SetLabelObject(rc)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
end
function s.distg(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--霞红之界
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,57300202)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SSET)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(1,0)
e2:SetCondition(s.condition)
e2:SetTarget(s.setlimit)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(1,0)
e3:SetCondition(s.condition)
e3:SetValue(s.actlimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(0,LOCATION_ONFIELD)
e4:SetTarget(s.indtg)
e4:SetValue(s.efilter)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,0))
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_CHAINING)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetRange(LOCATION_FZONE)
e5:SetCountLimit(1)
e5:SetCondition(s.reccon)
e5:SetTarget(s.rectg)
e5:SetOperation(s.recop)
c:RegisterEffect(e5)
end
function s.setfilter(c,tp)
return c:IsCode(57300202) and c:IsType(TYPE_FIELD) and not c:IsForbidden() and c:CheckUniqueOnField(1-tp)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil,tp) end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
local fc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,1-tp,LOCATION_FZONE,POS_FACEUP,true)
end
end
function s.condition(e)
return Duel.IsEnvironment(57300202)
end
function s.setlimit(e,c,tp)
return c:IsType(TYPE_FIELD)
end
function s.actlimit(e,re,tp)
return re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function s.indtg(e,c)
return c:IsCode(57300202)
end
function s.efilter(e,re)
return e:GetHandlerPlayer()==re:GetOwnerPlayer() and re:GetHandler()~=e:GetHandler()
end
function s.reccon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and rp==1-tp
end
function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,re:GetHandler():GetAttack())
end
function s.recop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local c=e:GetHandler()
local rc=re:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local lp=rc:GetAttack()
if lp>0 and Duel.Recover(p,lp,REASON_EFFECT)~=0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(s.distg)
e1:SetLabelObject(rc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(s.discon)
e2:SetOperation(s.disop)
e2:SetLabelObject(rc)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
end
function s.distg(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
\ No newline at end of file
--草琥珀
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.filter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_PLANT) and (c:IsAbleToHand() or c:IsAbleToDeck())
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE,0,1,nil) end
end
function s.tdfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_PLANT) and c:IsAbleToHand()
end
function s.thfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_PLANT) and c:IsAbleToDeck()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local op=0
if Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) then
op=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2))+1
elseif Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) then
op=Duel.SelectOption(tp,aux.Stringid(id,1))+1
elseif Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) then
op=Duel.SelectOption(tp,aux.Stringid(id,2))+2
end
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
local tc=g:GetFirst()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and tc:IsLocation(LOCATION_HAND) and tc:IsLevelBelow(3) and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.ConfirmCards(1-tp,g)
end
end
end
end
\ No newline at end of file
--德拉格沥青
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsRace,RACE_DRAGON),2)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.synlimit)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(s.sumcon)
e3:SetOperation(s.sucop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(s.discon)
e4:SetTarget(s.distg)
e4:SetOperation(s.disop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCountLimit(1,id)
e5:SetCondition(s.spcon)
e5:SetTarget(s.sptg)
e5:SetOperation(s.spop)
c:RegisterEffect(e5)
end
function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.sucop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=c:GetMaterial():FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WIND)*600
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainDisablable(ev)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function s.cfilter(c,tp)
return c:IsAbleToRemove(tp,POS_FACEDOWN)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and Duel.IsExistingMatchingCard(s.cfilter,tp,0,LOCATION_ONFIELD,1,nil,tp) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp):GetFirst()
Duel.Remove(g2,POS_FACEDOWN,REASON_EFFECT)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--有相幻兽 奇美拉
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_FUSION_MATERIAL)
e0:SetCondition(s.Chimera_Fusion_Condition())
e0:SetOperation(s.Chimera_Fusion_Operation())
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.drcon)
e1:SetTarget(s.drtg)
e1:SetOperation(s.drop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(s.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(s.sumcon)
e3:SetOperation(s.sucop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e4:SetCountLimit(1)
e4:SetValue(s.indct)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,1))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetTarget(s.destg)
e5:SetOperation(s.desop)
c:RegisterEffect(e5)
end
function s.Chimera_Fusion_Gcheck(g,fc,tp,chkf,gc)
if g:IsExists(aux.TuneMagicianCheckX,1,nil,g,EFFECT_TUNE_MAGICIAN_F) then return false end
if gc and not g:IsContains(gc) then return false end
if aux.FCheckAdditional and not aux.FCheckAdditional(tp,sg,fc)
or aux.FGoalCheckAdditional and not aux.FGoalCheckAdditional(tp,sg,fc) then return false end
return g:GetClassCount(Card.GetFusionCode)==g:GetCount()
and (chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(tp,tp,sg,fc)>0)
end
function s.Chimera_Fusion_Condition()
return function(e,g,gc,chkf)
if g==nil then return aux.MustMaterialCheck(nil,e:GetHandlerPlayer(),EFFECT_MUST_BE_FMATERIAL) end
local fc=e:GetHandler()
local tp=e:GetHandlerPlayer()
if gc then
if not g:IsContains(gc) then return false end
return g:IsExists(s.Alba_System_Drugmata_Fusion_Filter,1,nil,g,fc,tp,chkf,gc)
end
return g:CheckSubGroup(s.Chimera_Fusion_Gcheck,3,99,fc,tp,chkf,gc)
end
end
function s.Chimera_Fusion_Operation()
return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local fc=e:GetHandler()
local tp=e:GetHandlerPlayer()
local fg=eg:Clone()
aux.GCheckAdditional=aux.dncheck
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
sg=eg:SelectSubGroup(tp,s.Chimera_Fusion_Gcheck,true,3,99,fc,tp,chkf)
aux.GCheckAdditional=nil
Duel.SetFusionMaterial(sg)
end
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local gc,dr=e:GetLabel()
if chk==0 then return dr and gc>=5 and Duel.IsPlayerCanDraw(tp,dr) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,0,dr,tp,0)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(dr)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local gc,dr=e:GetLabel()
Duel.Draw(tp,dr,REASON_EFFECT)
end
function s.valcheck(e,c)
local mg=c:GetMaterial()
local gc=mg:GetCount()
local dr=mg:GetClassCount(Card.GetRace)
e:GetLabelObject():SetLabel(gc,dr)
end
function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.sucop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=c:GetMaterialCount()*300
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function s.indct(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAttackBelow,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler():GetAttack())
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsAttackBelow,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e:GetHandler():GetAttack())
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--幻蛇利昂尼达斯
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddXyzProcedureLevelFree(c,s.mfilter,s.xyzcheck,2,2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(s.lvtg)
e1:SetValue(s.lvval)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_ADD_ATTRIBUTE)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetValue(ATTRIBUTE_LIGHT)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetCondition(s.atkcon)
e3:SetValue(s.atkval)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(s.discon)
e4:SetTarget(s.distg)
e4:SetOperation(s.disop)
c:RegisterEffect(e4)
end
function s.mfilter(c,xyzc)
return c:IsXyzLevel(xyzc,13) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT)
end
function s.xyzcheck(g)
return g:GetClassCount(Card.GetAttribute)==2
end
function s.lvtg(e,c)
return c:IsLevelAbove(1) and c:IsRace(RACE_REPTILE)
end
function s.lvval(e,c,rc)
local lv=c:GetLevel()
if rc==e:GetHandler() then return 13
else return lv end
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayCount()~=0
end
function s.atkval(e,c)
return e:GetHandler():GetAttack()*2
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainDisablable(ev)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsAttribute,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
if chk==0 then return g:FilterCount(s.tgfilter,nil)>0 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function s.tgfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsAbleToGrave()
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
local g=c:GetOverlayGroup():Filter(Card.IsAttribute,nil,ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
if c:IsRelateToEffect(e) and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sc=g:FilterSelect(tp,s.tgfilter,1,1,nil,tp):GetFirst()
if sc and Duel.SendtoGrave(sc,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_GRAVE) then
if sc:IsAttribute(ATTRIBUTE_LIGHT) and Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
Duel.Destroy(rc,REASON_EFFECT)
elseif sc:IsAttribute(ATTRIBUTE_DARK) and Duel.NegateEffect(ev) and rc:IsRelateToEffect(re) then
Duel.SendtoDeck(rc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--龙战
local s,id,o=GetID()
function s.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(s.tkcon)
e1:SetTarget(s.tktg)
e1:SetOperation(s.tkop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.tg)
e2:SetValue(1)
c:RegisterEffect(e2)
end
function s.cfilter(c,tp)
return c:IsPreviousControler(tp)
end
function s.tkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.GetMZoneCount(tp,sg)>0
and sg:GetCount()>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,57300209,0,TYPES_TOKEN_MONSTER,3000,2950,11,RACE_DRAGON,ATTRIBUTE_FIRE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function s.tkop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
if Duel.Destroy(sg,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,57300209,0,TYPES_TOKEN_MONSTER,3000,2950,11,RACE_DRAGON,ATTRIBUTE_FIRE) then
local token=Duel.CreateToken(tp,57300209)
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ATTACK_ALL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
end
function s.tg(e,c)
return c:IsCode(57300209)
end
\ No newline at end of file
--殘照
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddLinkProcedure(c,aux.NOT(aux.FilterBoolFunction(Card.IsLinkCode,id)),1,1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.sumcon)
e1:SetOperation(s.sucop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_REMOVE)
e2:SetCondition(s.atkcon)
e2:SetOperation(s.atkop)
c:RegisterEffect(e2)
end
function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.atkfilter(c,e)
return c:IsFaceup() and not c:IsImmuneToEffect(e)
end
function s.sucop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_MZONE,0,c,e)
if g:GetCount()>0 then
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.atkfilter,tp,0,LOCATION_MZONE,c,e)
if g:GetCount()>0 then
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--灵魂献祭
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsLocation(LOCATION_HAND)
end
function s.tgfilter(c)
return c:IsAbleToGrave()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>2 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>2 end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,PLAYER_ALL,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g1=Duel.GetFieldGroup(p,0,LOCATION_HAND)
local g2=Duel.GetFieldGroup(1-p,0,LOCATION_HAND)
if g1:GetCount()>0 and g2:GetCount()>0 then
Duel.ConfirmCards(p,g1)
Duel.ConfirmCards(1-p,g2)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg1=g1:Select(p,1,1,nil)
Duel.SendtoGrave(sg1,REASON_EFFECT)
if sg1:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_FORBIDDEN)
e1:SetTargetRange(0xff,0xff)
e1:SetTarget(s.bantg)
e1:SetLabel(sg1:GetFirst():GetOriginalCodeRule())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
Duel.RegisterEffect(e1,tp)
end
Duel.ShuffleHand(1-p)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg2=g2:Select(1-p,1,1,nil)
Duel.SendtoGrave(sg2,REASON_EFFECT)
if sg2:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)>0 then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_FORBIDDEN)
e2:SetTargetRange(0xff,0xff)
e2:SetTarget(s.bantg)
e2:SetLabel(sg2:GetFirst():GetOriginalCodeRule())
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
Duel.RegisterEffect(e2,tp)
end
Duel.ShuffleHand(p)
if Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK+LOCATION_ONFIELD+LOCATION_EXTRA,0,1,nil) then
local g3=Duel.GetFieldGroup(1-p,0,LOCATION_DECK+LOCATION_ONFIELD+LOCATION_EXTRA)
Duel.ConfirmCards(1-p,g3)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg3=Duel.SelectMatchingCard(1-tp,s.tgfilter,tp,LOCATION_DECK+LOCATION_ONFIELD+LOCATION_EXTRA,0,1,1,nil)
if sg3:GetCount()>0 then
Duel.SendtoGrave(sg3,REASON_EFFECT)
if sg3:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)>0 then
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_FORBIDDEN)
e3:SetTargetRange(0xff,0xff)
e3:SetTarget(s.bantg)
e3:SetLabel(sg3:GetFirst():GetOriginalCodeRule())
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
Duel.RegisterEffect(e3,tp)
end
end
end
end
end
function s.bantg(e,c)
local fcode=e:GetLabel()
return c:IsOriginalCodeRule(fcode)
end
\ No newline at end of file
--UC对决
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsLocation(LOCATION_HAND) or Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,PLAYER_ALL,LOCATION_ONFIELD)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not s.target(e,tp,eg,ep,ev,re,r,rp,0) then return end
local es=true
local chk=true
if Duel.IsChainDisablable(0) then
while chk do
if Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToDeck,tp,0,LOCATION_HAND,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
if Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
else
es=false
chk=false
end
else
chk=false
end
end
end
if es==false then
Duel.NegateEffect(0)
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
\ No newline at end of file
--超级牛头人
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,5053103)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1)
e3:SetCondition(s.ccon)
e3:SetTarget(s.ctg)
e3:SetOperation(s.cop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
end
function s.filter(c)
return aux.IsCodeListed(c,5053103) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.cfilter(c)
return c:IsRace(RACE_BEASTWARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAttack(1700) and c:IsFaceup()
end
function s.ccon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil) and not eg:IsContains(e:GetHandler())
end
function s.ctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
function s.cop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.GetControl(tc,tp)
end
end
\ No newline at end of file
--顶级牛头人
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(s.ccon)
e3:SetTarget(s.ctg)
e3:SetOperation(s.cop)
c:RegisterEffect(e3)
end
function s.filter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_BEASTWARRIOR) and c:IsLevel(4) and c:IsAttack(1700) and c:IsDefense(1000) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.cfilter(c)
return c:IsRace(RACE_BEASTWARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAttack(1700) and c:IsFaceup()
end
function s.ccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function s.ctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
function s.cop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.GetControl(tc,tp)
end
end
\ No newline at end of file
--牛头人米诺陶
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddLinkProcedure(c,nil,2,3,s.lcheck)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(s.matcheck)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.ccon)
e2:SetTarget(s.ctg)
e2:SetOperation(s.cop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(s.discon)
e3:SetTarget(s.distg)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
end
function s.lcheck(g,lc)
return g:IsExists(s.cfilter,1,nil)
end
function s.cfilter(c)
return c:IsLinkAttribute(ATTRIBUTE_EARTH) and c:IsLinkRace(RACE_BEASTWARRIOR) and c:IsLevel(4) and c:IsAttack(1700) and c:IsDefense(1000)
end
function s.matfilter(c,tp)
return c:GetOwner()~=tp
end
function s.matcheck(e,c)
local atk=c:GetMaterial():FilterCount(s.matfilter,nil,c:GetOwner())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk*2000)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
end
function s.ccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.ctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
function s.cop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.GetControl(tc,tp)
end
end
function s.cffilter(c)
return c:GetControler()~=c:GetOwner()
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cffilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(s.cffilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetMatchingGroupCount(s.cffilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
if g:GetCount()>0 then
for tc in aux.Next(g) do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
end
\ No newline at end of file
--牛头人怒火
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,5053103)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCondition(s.actcon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_SZONE)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(id,2))
e3:SetTarget(s.lktg)
e3:SetOperation(s.lkop)
c:RegisterEffect(e3)
end
function s.actfilter(c)
return c:GetControler()~=c:GetOwner()
end
function s.actcon(e)
return Duel.IsExistingMatchingCard(s.actfilter,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function s.filter(c,e,sp)
return (aux.IsCodeListed(c,5053103) or c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_BEASTWARRIOR) and c:IsLevel(4) and c:IsAttack(1700) and c:IsDefense(1000)) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,1))
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.lkfilter(c)
return c:IsLinkSummonable(nil) and c:IsLinkAttribute(ATTRIBUTE_EARTH) and c:IsLinkRace(RACE_BEASTWARRIOR) and c:IsAttack(1700)
end
function s.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.lkfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(id,2))
end
function s.lkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.lkfilter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.LinkSummon(tp,tc,nil)
end
end
--牛头人士卒
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,5053103)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(s.ratg)
e2:SetOperation(s.raop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_BEASTWARRIOR) and c:IsLevel(4) and c:IsAttack(1700) and c:IsDefense(1000) and c:IsFaceup()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function s.filter(c,e,tp)
return c:IsCode(5053103,57300213,57300214) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGrave() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SendtoGrave(c,REASON_EFFECT)==0 or not c:IsLocation(LOCATION_GRAVE) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.rafilter(c)
return c:GetControler()~=c:GetOwner()
end
function s.ratg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.rafilter(chkc) end
if chk==0 then return c:IsAbleToRemove()
and Duel.IsExistingTarget(s.rafilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.rafilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
end
function s.raop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT) and c:IsLocation(LOCATION_REMOVED)
and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_EARTH)
if Duel.GetTurnPlayer()==tp then
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
else
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2)
end
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_BEASTWARRIOR)
tc:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetValue(1700)
tc:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_SET_DEFENSE_FINAL)
e4:SetValue(1000)
tc:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetCode(EFFECT_CHANGE_LEVEL)
e5:SetValue(4)
tc:RegisterEffect(e5)
end
end
\ No newline at end of file
--不相见的羁绊
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.tgfilter(c,e,tp)
return c:IsCode(14575467) and c:IsAbleToGrave()
end
function s.spfilter(c,e,tp)
return c:IsCode(81616639) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
Duel.BreakEffect()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetCountLimit(1)
e1:SetCondition(s.chcon)
e1:SetTarget(s.chtg)
e1:SetOperation(s.chop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(s.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function s.splimit(e,c)
return not c:IsCode(14575467)
end
function s.chcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function s.repfilter(c)
return c:IsCode(81616639) and c:IsFaceup()
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.repfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,s.repop)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.repfilter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--抓捕
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setfilter(c)
return c:IsCode(85562745) and not c:IsForbidden()
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCondition(s.damcon)
e1:SetOperation(s.damop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.Damage(1-tp,100,REASON_EFFECT)
end
\ No newline at end of file
--追加免疫护罩
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetValue(1)
e1:SetCondition(s.actcon)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetCondition(s.actcon)
e2:SetTarget(s.disable)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BP)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
Duel.RegisterEffect(e3,tp)
Duel.RegisterFlagEffect(tp,id,0,0,1)
end
function s.actcon(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function s.disable(e,c)
return (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT))
end
\ No newline at end of file
--黑天鹅-镜映婆娑-
local cm,m,o=GetID()
function cm.initial_effect(c)
aux.AddCodeList(c,60010029)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
......@@ -29,7 +30,6 @@ function cm.spcfilter(c,tp)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
--Debug.Message(eg:IsExists(cm.spcfilter,1,nil,tp))
return eg:IsExists(cm.spcfilter,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
--米莎-美梦华侍-
local cm,m,o=GetID()
function cm.initial_effect(c)
aux.AddCodeList(c,60010029)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.con)
......
--花火-焰锦游鱼-
local cm,m,o=GetID()
function cm.initial_effect(c)
aux.AddCodeList(c,60010029)
--material
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(31755044,0))
......
--砂金-囚石铸金-
local cm,m,o=GetID()
function cm.initial_effect(c)
aux.AddCodeList(c,60010029)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......@@ -13,12 +14,11 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(27548199,1))
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.discon)
e2:SetTarget(cm.distg)
......@@ -32,6 +32,9 @@ end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local d1,d2,d3=Duel.TossDice(tp,3)
Debug.Message(d1)
Debug.Message(d2)
Debug.Message(d3)
local i=0
if d1==6 then
i=i+1
......@@ -93,7 +96,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and Duel.GetTurnPlayer()==1-tp
return rp==tp and Duel.IsChainNegatable(ev) and Duel.GetTurnPlayer()==1-tp
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -103,6 +106,12 @@ end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) and Duel.IsExistingMatchingCard(cm.ffil,tp,LOCATION_FZONE,0,1,nil) then
Duel.Recover(tp,3000,REASON_EFFECT)
end
end
end
function cm.ffil(c)
return c:IsCode(60010029) and c:IsFaceup()
end
\ No newline at end of file
--黄泉-远辞畴昔-
local cm,m,o=GetID()
function cm.initial_effect(c)
aux.AddCodeList(c,60010029)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -30,6 +31,9 @@ function cm.initial_effect(c)
Duel.RegisterEffect(ge1,0)
end
end
function cm.ffil(c)
return c:IsCode(60010029) and c:IsFaceup()
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if rp==tp then
Duel.RegisterFlagEffect(rp,m,RESET_PHASE+PHASE_END,0,1)
......@@ -40,9 +44,10 @@ function cm.retcon(e,tp,eg,ep,ev,re,r,rp,tc)
return Duel.GetFlagEffect(tp,m)>=9 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetTurnPlayer()==tp
end
function cm.retop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if #g~=0 then
if #g~=0 and Duel.IsExistingMatchingCard(cm.ffil,tp,LOCATION_FZONE,0,1,nil) then
Duel.SendtoGrave(g,REASON_EFFECT)
if #Duel.GetOperatedGroup()>=5 then
Duel.SelectOption(tp,aux.Stringid(m,0))
......@@ -53,6 +58,7 @@ function cm.retop1(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
......
--星-同谐-
local cm,m,o=GetID()
function cm.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1,m)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CUSTOM+m)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
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_ADJUST)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
atkall=0
atkchange=0
function cm.adfilter(c,f)
return math.max(f(c),0)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
local c=e:GetHandler()
if atkall~=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetSum(cm.adfilter,Card.GetAttack) then
atkchange=math.abs(atkall-Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetSum(cm.adfilter,Card.GetAttack))
atkall=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetSum(cm.adfilter,Card.GetAttack)
Duel.RaiseEvent(c,EVENT_CUSTOM+m,nil,0,tp,tp,0)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,0,1,nil)
end
function cm.target(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.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
--negate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(cm.lvcon)
e2:SetOperation(cm.lvop)
c:RegisterEffect(e2)
end
end
function cm.lvfil(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_LINK)
end
function cm.lvcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and e:GetHandler():IsLevelBelow(12)
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
if Duel.IsExistingMatchingCard(cm.lvfil,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local tc=Duel.GetMatchingGroup(cm.lvfil,tp,0,LOCATION_MZONE,nil):Select(tp,1,1,nil):GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-500)
tc:RegisterEffect(e1)
end
end
function cm.defil(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsDefense(0) and not c:IsType(TYPE_LINK)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)<e:GetHandler():GetLevel()
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(m+10000000)~=0 then
if Duel.IsExistingMatchingCard(cm.defil,tp,0,LOCATION_MZONE,1,nil) then
local tc=Duel.GetMatchingGroup(cm.defil,tp,0,LOCATION_MZONE,nil):Select(tp,1,1,nil):GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(-atkchange)
tc:RegisterEffect(e1)
else
Duel.Damage(1-tp,atkchange,REASON_EFFECT)
end
Duel.RegisterFlagEffect(e:GetHandlerPlayer(),m,RESET_PHASE+PHASE_END,0,1)
else
e:GetHandler():RegisterFlagEffect(m+10000000,RESET_PHASE+PHASE_END,0,1)
end
end
--穹-同谐-
local cm,m,o=GetID()
function cm.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1,m)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CUSTOM+m)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.con)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
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_ADJUST)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
atkall=0
atkchange=0
function cm.adfilter(c,f)
return math.max(f(c),0)
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
local c=e:GetHandler()
if atkall~=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetSum(cm.adfilter,Card.GetAttack) then
atkchange=math.abs(atkall-Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetSum(cm.adfilter,Card.GetAttack))
atkall=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):GetSum(cm.adfilter,Card.GetAttack)
Duel.RaiseEvent(c,EVENT_CUSTOM+m,nil,0,tp,tp,0)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,0,1,nil)
end
function cm.target(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.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
--negate
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(cm.lvcon)
e2:SetOperation(cm.lvop)
c:RegisterEffect(e2)
end
end
function cm.lvfil(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_LINK)
end
function cm.lvcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and e:GetHandler():IsLevelBelow(12)
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
if Duel.IsExistingMatchingCard(cm.lvfil,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local tc=Duel.GetMatchingGroup(cm.lvfil,tp,0,LOCATION_MZONE,nil):Select(tp,1,1,nil):GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-500)
tc:RegisterEffect(e1)
end
end
function cm.defil(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsDefense(0) and not c:IsType(TYPE_LINK)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)<e:GetHandler():GetLevel()
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetFlagEffect(m+10000000)~=0 then
if Duel.IsExistingMatchingCard(cm.defil,tp,0,LOCATION_MZONE,1,nil) then
local tc=Duel.GetMatchingGroup(cm.defil,tp,0,LOCATION_MZONE,nil):Select(tp,1,1,nil):GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-atkchange)
tc:RegisterEffect(e1)
else
Duel.Damage(1-tp,atkchange,REASON_EFFECT)
end
Duel.RegisterFlagEffect(e:GetHandlerPlayer(),m,RESET_PHASE+PHASE_END,0,1)
else
e:GetHandler():RegisterFlagEffect(m+10000000,RESET_PHASE+PHASE_END,0,1)
end
end
--知更鸟-翼声纯律-
local cm,m,o=GetID()
function cm.initial_effect(c)
aux.AddCodeList(c,60010029)
--special summon
local e11=Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(m,1))
e11:SetCategory(CATEGORY_SPECIAL_SUMMON)
e11:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e11:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
e11:SetCountLimit(1,m+10000000)
e11:SetCondition(cm.spcon)
e11:SetTarget(cm.sptg)
e11:SetOperation(cm.spop)
c:RegisterEffect(e11)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,4))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.thcon)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.cfilter(c,tp)
return c:IsSummonPlayer(1-tp) and c:IsPreviousLocation(LOCATION_EXTRA)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ag=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
return ag:GetClassCount(Card.GetRace)==ag:GetCount() and ag:GetClassCount(Card.GetAttribute)==ag:GetCount()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local count=Duel.AnnounceNumber(tp,1,2,3,4,5,6,7,8,9,10,11,12)
local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local mc=mg:GetFirst()
for i=1,#mg do
if not mc:IsLevel(count) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(count)
e1:SetReset(RESET_EVENT+0xff0000)
mc:RegisterEffect(e1)
end
mc=mg:GetNext()
end
if Duel.IsExistingMatchingCard(cm.ffil,tp,LOCATION_FZONE,0,1,nil) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m+20000000)
e1:SetCondition(cm.con)
e1:SetTarget(cm.lktg)
e1:SetOperation(cm.lkop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+30000000)
e3:SetCondition(cm.con)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+40000000)
e3:SetCondition(cm.con)
e3:SetTarget(cm.xyztg)
e3:SetOperation(cm.xyzop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+50000000)
e3:SetCondition(cm.con)
e3:SetTarget(cm.pftg)
e3:SetOperation(cm.pfop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
end
end
function cm.ffil(c)
return c:IsCode(60010029) and c:IsFaceup()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function cm.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
function cm.xyzfilter(c)
return c:IsXyzSummonable(nil)
end
function cm.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
function cm.pffilter1(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.pffilter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsRace(RACE_DRAGON) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.pftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(cm.pffilter2,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(cm.pffilter2,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 cm.pfop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.pffilter1,nil,e)
local sg1=Duel.GetMatchingGroup(cm.pffilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(cm.pffilter2,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,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
\ No newline at end of file
--波提欧-扬尘孤星-
local cm,m,o=GetID()
function cm.initial_effect(c)
aux.AddCodeList(c,60010029)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m+10000000)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local xl=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):Select(tp,1,1,nil):GetFirst()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetLabel(xl:GetCode())
e2:SetCondition(cm.discon)
e2:SetOperation(cm.disop)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e2)
end
function cm.defil(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and not c:IsDefense(0) and not c:IsType(TYPE_LINK)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsCode(e:GetLabel())
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(cm.defil,tp,0,LOCATION_MZONE,1,nil) then
local tg=Duel.GetMatchingGroup(cm.defil,tp,0,LOCATION_MZONE,nil)
local tc=tg:GetFirst()
for i=1,#tg do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(-1000)
tc:RegisterEffect(e1)
tc=tg:GetNext()
end
else
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
function cm.spcfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsCode(60010029)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return eg:IsExists(cm.spcfilter,1,nil,tp)
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,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.filter(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
end
end
--黑暗界里设菲
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.tg)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
end
function s.df1(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function s.df2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDiscardable()
end
function s.df3(c,ck1,ck2)
return ((c:IsType(TYPE_MONSTER) and ck1) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and ck2)) and c:IsDiscardable()
end
function s.mf(c)
return c:IsControlerCanBeChanged() and c:IsFaceup()
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ck1=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_SZONE,1,nil)
local ck2=Duel.IsExistingMatchingCard(s.mf,tp,0,LOCATION_MZONE,1,nil)
if chk==0 then return (ck1 and Duel.IsExistingMatchingCard(s.df1,tp,LOCATION_HAND,0,1,e:GetHandler())) or (ck2 and Duel.IsExistingMatchingCard(s.df2,tp,LOCATION_HAND,0,1,e:GetHandler())) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=Duel.SelectMatchingCard(tp,s.df3,tp,LOCATION_HAND,0,1,1,nil,ck1,ck2):GetFirst()
Duel.SendtoGrave(tc,REASON_DISCARD+REASON_COST)
if tc:IsType(TYPE_MONSTER) then
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,0,LOCATION_SZONE)
end
if tc:IsType(TYPE_SPELL+TYPE_TRAP) then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_SZONE,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_SZONE,1,1,nil)
if g:GetCount()>0 then
local tgc=g:GetFirst()
Duel.HintSelection(g)
if Duel.SendtoGrave(tgc,REASON_EFFECT) and rc:IsSSetable(true) and Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 and not tgc:IsForbidden() and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
if tgc:IsType(TYPE_CONTINUOUS) then
Duel.MoveToField(tgc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
else
Duel.SSet(tp,tgc)
end
end
end
end
if e:GetLabel()==1 and Duel.IsExistingMatchingCard(s.mf,tp,0,LOCATION_MZONE,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local tc=Duel.SelectMatchingCard(tp,s.mf,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
if Duel.GetControl(tc,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
\ No newline at end of file
--祖先的最后仪式
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,64800230)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetTarget(s.target)
e0:SetOperation(s.activate)
c:RegisterEffect(e0)
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,id)
e1:SetLabel(0)
e1:SetCost(s.cost)
e1:SetTarget(s.mtg)
e1:SetOperation(s.mop)
c:RegisterEffect(e1)
--MJspsm
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetLabel(1)
e2:SetCost(s.cost)
e2:SetTarget(s.stg)
e2:SetOperation(s.sop)
c:RegisterEffect(e2)
end
--e1
function s.cfilter(c,e,tp)
return c:IsCode(64800230)
end
function s.mfilter(c)
return c:IsCode(64800230) and c:IsAbleToGrave()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_DECK,0,nil):GetFirst()
local mg3=Duel.GetRitualMaterial(tp):Filter(Card.IsLevelBelow,nil,7)
return Duel.IsExistingMatchingCard(s.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,nil,e,tp,mg1,mg2,Card.GetLevel,"Greater") or Duel.IsExistingMatchingCard(s.RitualUltimateFilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,s.cfilter,e,tp,mg3,nil,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_DECK,0,nil)
local mg3=Duel.GetRitualMaterial(tp):Filter(Card.IsLevelBelow,nil,7)
local g=Duel.GetMatchingGroup(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,nil,nil,e,tp,mg1,mg2,Card.GetLevel,"Greater")
local g1=Duel.GetMatchingGroup(s.RitualUltimateFilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,s.cfilter,e,tp,mg3,nil,Card.GetLevel,"Greater")
g:Merge(g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc and tc:IsLocation(LOCATION_DECK) then
mg3=mg3:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg3=mg3:Filter(tc.mat_filter,tc,tp)
else
mg3:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg3:SelectSubGroup(tp,s.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
else
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:AddCard(mg2)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,s.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
local mat2=mat:Filter(Card.IsLocation,nil,LOCATION_DECK):Filter(s.mfilter,nil)
mat:Sub(mat2)
Duel.ReleaseRitualMaterial(mat)
Duel.SendtoGrave(mat2,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
--e2
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(id,e:GetLabel()))
end
function s.thfilter1(c,ec)
local ce=c:GetReasonEffect()
return c:IsAbleToHand() and ce and ce:GetHandler()==ec and c:IsType(TYPE_MONSTER)
end
function s.mtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_GRAVE,0,1,nil,e:GetHandler()) and e:GetHandler():IsAbleToRemove() end
local g=Duel.GetMatchingGroup(s.thfilter1,tp,LOCATION_GRAVE,0,nil,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function s.mop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_GRAVE,0,1,nil,e:GetHandler()) and Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e:GetHandler())
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end
function s.thfilter2(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function s.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_GRAVE,0,1,nil) and e:GetHandler():IsAbleToHand() end
local g=Duel.GetMatchingGroup(s.thfilter2,tp,LOCATION_GRAVE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.sop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.HintSelection(g)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
------------------------------------------------------------------------
function s.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_equal,chk)
if bit.band(c:GetType(),0x81)~=0x81 or (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then
mg:AddCard(m2)
end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
local lv=level_function(c)
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(c,lv,greater_or_equal)
local res=mg:CheckSubGroup(Auxiliary.RitualCheck,1,lv,tp,c,lv,greater_or_equal)
Auxiliary.GCheckAdditional=nil
return res
end
function s.dcfilter(c)
return c:IsCode(64800230) and c:IsLocation(LOCATION_DECK)
end
function s.RitualCheck(g,tp,c,lv,greater_or_equal)
return Auxiliary["RitualCheck"..greater_or_equal](g,c,lv) and Duel.GetMZoneCount(tp,g,tp)>0 and (not c.mat_group_check or c.mat_group_check(g,tp))
and (not Auxiliary.RCheckAdditional or Auxiliary.RCheckAdditional(tp,g,c))
and g:Filter(s.dcfilter,nil):GetCount()<=1
end
\ No newline at end of file
--源祀少女 提姆提姆
local m=64800232
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.ct1)
e1:SetTarget(cm.tg1)
e1:SetOperation(cm.op1)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m+10000)
e3:SetCondition(cm.tkcon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.tktg)
e3:SetOperation(cm.tkop)
c:RegisterEffect(e3)
end
function cm.counterfilter(c)
return not c:IsPreviousLocation(LOCATION_EXTRA)
end
--e1
function cm.ct1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.tgfilter(c,e,tp)
return c:IsCode(m+3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,c,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(4)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function cm.cfilter(c)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsCode(m-2)
and c:IsPreviousLocation(LOCATION_MZONE)
end
function cm.tkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,e:GetHandler())
end
function cm.spfilter(c,e,tp)
return c:IsCode(m-2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3))
end
end
\ No newline at end of file
--源祀使 塞勒姆
local m=64800233
local cm=_G["c"..m]
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.atktg1)
e2:SetOperation(cm.atkop1)
c:RegisterEffect(e2)
local e1=e2:Clone()
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,m+10000)
e3:SetTarget(cm.tg3)
e3:SetOperation(cm.op3)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_REMOVE)
c:RegisterEffect(e4)
end
function cm.filter(c)
return c:IsSetCard(0x5411) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function cm.atktg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.atkop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.filter2(c)
return c:IsCode(m+5) and c:IsAbleToHand()
end
function cm.tgfilter(c)
return (c:IsSetCard(0x5411) or c:IsType(TYPE_RITUAL)) and c:IsFaceup()
end
function cm.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(cm.tgfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil) and ct>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter2,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
--源祀使 雷蒙
local m=64800234
local cm=_G["c"..m]
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.atktg1)
e2:SetOperation(cm.atkop1)
c:RegisterEffect(e2)
local e1=e2:Clone()
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1)
--special summon (self)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m+10000)
e1:SetCost(cm.cost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsCode(m+2) and c:IsAbleToHand()
end
function cm.atktg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.atkop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,c)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_HAND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--源祀使 菲涅
local m=64800235
local cm=_G["c"..m]
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.atktg1)
e2:SetOperation(cm.atkop1)
c:RegisterEffect(e2)
local e1=e2:Clone()
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+10000)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
function cm.filter(c)
return c:IsCode(m+2) and c:IsAbleToHand()
end
function cm.atktg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.atkop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.tgfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsFaceup()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(cm.tgfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and ct>0 end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
end
\ No newline at end of file
--祖先的最后殿堂
local m=64800236
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetTarget(cm.tdtg)
e2:SetOperation(cm.tdop)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x5411) and c:IsAbleToHand()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function cm.tdfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsAbleToDeck()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and cm.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #tg==0 then return end
Duel.SendtoDeck(tg,nil,1,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--祖先的最后呼唤
local m=64800237
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
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:SetCountLimit(1,m+10000)
e2:SetTarget(cm.reptg)
e2:SetValue(cm.repval)
e2:SetOperation(cm.repop)
c:RegisterEffect(e2)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.filter(c,tp)
return c:IsSetCard(0x5411) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil,c)
end
function cm.filter2(c,mc)
return c:IsCode(m-6) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()>0 then
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.filter2),tp,LOCATION_DECK,0,nil,g:GetFirst())
if mg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=mg:Select(tp,1,1,nil)
g:Merge(sg)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function cm.repfilter(c,tp)
return c:IsFaceup() and c:IsCode(m-7)
and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(cm.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function cm.repval(e,c)
return cm.repfilter(c,e:GetHandlerPlayer())
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--祖先的最后雷电
local m=64800238
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--copy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetTarget(cm.copytg)
e2:SetOperation(cm.copyop)
c:RegisterEffect(e2)
--act in hand
local e31=Effect.CreateEffect(c)
e31:SetType(EFFECT_TYPE_SINGLE)
e31:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e31:SetCondition(cm.handcon)
c:RegisterEffect(e31)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
end
function cm.copyfilter(c,e,tp)
if not c:IsCode(64800231) or not c:IsAbleToGrave() then return false end
return c:CheckActivateEffect(false,true,false)~=nil
end
function cm.copytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.copyfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function cm.copyop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,cm.copyfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil):GetFirst()
if not tc or Duel.SendtoGrave(tc,REASON_EFFECT)<=0 or not tc:IsLocation(LOCATION_GRAVE) then return end
local te=tc:GetActivateEffect()
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
function cm.handcon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil):FilterCount(Card.IsCode,nil,m-8)>0 and Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)>0
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.repop)
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,1-tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,0,1,nil,TYPE_RITUAL) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,0,nil,TYPE_RITUAL)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_MZONE,0,1,1,nil,TYPE_RITUAL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
if #sg>0 then
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,s.matfilter,5,true)
aux.AddFusionProcFunRep(c,s.matfilter,3,true)
aux.AddContactFusionProcedure(c,s.matfilter2,LOCATION_MZONE+LOCATION_GRAVE+LOCATION_EXTRA,0,aux.tdcfop(c))
--spsummon condition
local e1=Effect.CreateEffect(c)
......@@ -12,24 +12,13 @@ function s.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65130321,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.retcon)
e2:SetCost(s.retcost)
e2:SetTarget(s.rettg)
e2:SetOperation(s.retop)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(s.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--attack cost
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ATTACK_COST)
e1:SetCost(s.atcost)
e1:SetOperation(s.atop)
c:RegisterEffect(e1)
end
function s.matfilter(c)
return c:IsAttack(878) and c:IsDefense(1157)
......@@ -43,34 +32,38 @@ end
function s.eftg(e,c)
return c:GetBaseAttack()==878
end
function s.retcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and c:IsRelateToBattle() and bc:IsRelateToBattle()
end
function s.retcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHandAsCost() or c:IsAbleToExtraAsCost() end
if c:IsAbleToHandAsCost() then Duel.SendtoHand(c,nil,REASON_COST)
elseif c:IsAbleToExtraAsCost() then Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_COST) end
end
function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler():GetBattleTarget(),1,0,0)
function s.tdfilter(c,atk)
return c:IsAbleToDeckAsCost() and c:IsAttack(atk) and c:IsFaceup() and c:GetOriginalType()&TYPE_MONSTER>0
end
function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
function s.atcost(e,c,tp)
return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil,c:GetAttack())
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
function s.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if bc:IsRelateToBattle() then
if Duel.SendtoHand(bc,nil,REASON_EFFECT)>0 and bc:IsLocation(LOCATION_HAND) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(65130321,1))then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
local g=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil,c:GetAttack())
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_ACTION)
local tg=Duel.GetOperatedGroup()
local sg=Group.CreateGroup()
for tc in aux.Next(tg) do
if not sg:IsExists(Card.IsCode,1,nil,tc:GetCode()) then
sg:AddCard(tc)
--damage change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(s.damop)
c:RegisterEffect(e1)
end
end
end
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,e:GetLabel())
Duel.Damage(1-tp,ev,REASON_EFFECT)
end
\ No newline at end of file
--天井伊吕波
function c65130342.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65130342,2))
e1:SetDescription(aux.Stringid(id,2))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetHintTiming(TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,65130342)
e1:SetCost(c65130342.spcost)
e1:SetCondition(c65130342.spcon)
e1:SetTarget(c65130342.sptg)
e1:SetOperation(c65130342.spop)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--scale
local e2=Effect.CreateEffect(c)
......@@ -22,104 +21,68 @@ function c65130342.initial_effect(c)
e2:SetCode(EFFECT_UPDATE_LSCALE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(c65130342.sccon)
e2:SetValue(c65130342.scvl)
e2:SetCondition(s.sccon)
e2:SetValue(s.scvl)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_RSCALE)
e3:SetValue(c65130342.scvr)
e3:SetValue(s.scvr)
c:RegisterEffect(e3)
end
function c65130342.spcon(e,tp,eg,ep,ev,re,r,rp)
return true
end
function c65130342.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToExtra() end
Duel.SendtoExtraP(c,1-tp,REASON_COST)
end
function c65130342.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(1-tp,1-tp,nil,TYPE_PENDULUM)>0 or Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE)
if chk==0 then return c:IsAbleToExtra() and (Duel.GetLocationCountFromEx(1-tp,1-tp,nil,TYPE_PENDULUM)>0 or c:IsAbleToGrave()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,1-tp,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,c,1,1-tp,0)
end
function c65130342.spfilter(c,e,tp)
function s.spfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c65130342.spop(e,tp,eg,ep,ev,re,r,rp)
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=Duel.GetLocationCountFromEx(1-tp,1-tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,1-tp,false,false)
if Duel.SendtoExtraP(c,1-tp,REASON_COST)>0 and c:IsLocation(LOCATION_EXTRA) then
local b1=Duel.GetLocationCountFromEx(1-tp,1-tp,nil,c)>0 and c:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEDOWN_DEFENSE)
local b2=c:IsAbleToGrave()
local s=0
if b1 and not b2 then
s=Duel.SelectOption(1-tp,aux.Stringid(65130342,3))
end
if not b1 and b2 then
s=Duel.SelectOption(1-tp,aux.Stringid(65130342,4))+1
local op=aux.SelectFromOptions(1-tp,{b1,aux.Stringid(id,3)},{b2,aux.Stringid(id,4)})
if op==1 then
Duel.SpecialSummon(c,0,1-tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)
end
if b1 and b2 then
s=Duel.SelectOption(1-tp,aux.Stringid(65130342,3),aux.Stringid(65130342,4))
end
if not b1 and not b2 then return end
if s==0 then
if c then
Duel.SpecialSummonStep(c,0,1-tp,1-tp,false,false,POS_FACEDOWN_DEFENSE)
if op==2 then
if Duel.SendtoGrave(c,REASON_EFFECT)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_HAND)
c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
end
if s==1 then
if c and Duel.SendtoGrave(c,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(65130342,0)) then
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil):GetFirst()
local val=aux.SequenceToGlobal(tc:GetControler(),LOCATION_MZONE,tc:GetSequence())
if Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCategory(CATEGORY_DISABLE_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
e1:SetLabelObject(tc)
e1:SetCode(EVENT_SPSUMMON)
e1:SetCountLimit(1)
e1:SetOperation(c65130342.retop)
e1:SetLabel(c:GetDefense())
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(s.necon)
e1:SetOperation(s.neop)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE_FIELD)
e2:SetLabelObject(tc)
e2:SetCondition(c65130342.discon)
e2:SetValue(val)
Duel.RegisterEffect(e2,tp)
end
end
end
end
function c65130342.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
function s.nefilter(c,e)
return not (c:GetDefense()>e:GetLabel())
end
function c65130342.discon(e,c)
if e:GetLabelObject():IsLocation(LOCATION_REMOVED) then
return true
else
e:Reset()
return false
end
function s.necon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.nefilter,1,nil,e)
end
function s.neop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.NegateSummon(eg:Filter(s.nefilter,nil,e))
end
function c65130342.sccon(e)
function s.sccon(e)
return Duel.IsExistingMatchingCard(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler())
end
function c65130342.scvl(e)
function s.scvl(e)
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
if tc then return -tc:GetLeftScale() end
return 0
end
function c65130342.scvr(e)
function s.scvr(e)
local tc=Duel.GetMatchingGroup(nil,e:GetHandlerPlayer(),LOCATION_PZONE,0,e:GetHandler()):GetFirst()
if tc then return -tc:GetRightScale() end
return 0
......
--想法鲜明
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(s.handcon)
c:RegisterEffect(e2)
end
function s.cfilter(c,e,tp,atk)
return c:GetAttack()+c:GetDefense()==atk and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.filter(c,e,tp)
return (c:IsFaceup() or c:IsControler(tp)) and c:IsAbleToDeck() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,c:GetAttack()+c:GetDefense())
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
end
local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp,tc:GetAttack()+tc:GetDefense())
if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and (tc:IsLocation(LOCATION_DECK) or tc:IsLocation(LOCATION_EXTRA)) and g:GetCount()>0 then
Duel.SpecialSummon(g:Select(tp,1,1,nil),0,tp,tp,false,false,POS_FACEUP)
end
end
end
function s.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)>0
end
\ No newline at end of file
--想法鲜明
function c65130359.initial_effect(c)
end
--忒提斯守卫 沄
local s,id,o=GetID()
function s.initial_effect(c)
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.distg)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CUSTOM+id)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
if not s.global_check then
s.global_check=true
local ge=Effect.GlobalEffect()
ge:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge:SetCode(EVENT_LEAVE_FIELD_P)
ge:SetCondition(s.regcon)
ge:SetOperation(s.regop)
Duel.RegisterEffect(ge,0)
end
end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetMaxGroup(Card.GetAttack)
return Group.__band(g,eg):GetCount()>0
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+id,re,r,rp,ep,ev)
end
function s.disfilter(c,tp)
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,LOCATION_MZONE,0,nil):GetMaxGroup(Card.GetAttack)
return g and #g>0 and g:IsContains(c)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.disfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.disfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
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 c:IsFaceup() and tc:IsFaceup() and tc:IsRelateToEffect(e)
and not tc:IsImmuneToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetCondition(s.rcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if tc:IsType(TYPE_TRAPMONSTER) then
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_TRAPMONSTER)
tc:RegisterEffect(e2)
end
end
end
function s.rcon(e)
return e:GetOwner():IsHasCardTarget(e:GetHandler())
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x835) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (c:IsLocation(LOCATION_HAND) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) or c:IsLocation(LOCATION_MZONE) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=nil
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if e:GetActivateLocation(LOCATION_HAND) then
tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
elseif e:GetActivateLocation(LOCATION_MZONE) then
tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
end
if tc~=nil and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) then
Duel.BreakEffect()
if tc:IsSummonLocation(LOCATION_GRAVE) then
Duel.SendtoGrave(c,REASON_EFFECT)
elseif tc:IsSummonLocation(LOCATION_HAND) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
......@@ -9,8 +9,6 @@ function c91030008.initial_effect(c)
c:RegisterEffect(e1)
--act qp in hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DELAY)
......@@ -20,33 +18,41 @@ function c91030008.initial_effect(c)
e2:SetTarget(cm.tg1)
e2:SetOperation(cm.op1)
c:RegisterEffect(e2)
--control
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.condition)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsActiveType(TYPE_SPELL) and re:IsActiveType(TYPE_QUICKPLAY) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and re:GetHandler():IsSetCard(0x9d3)
end
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.filter(chkc) end
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 or (Duel.IsPlayerCanDraw(tp)
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED,0,1,nil))end
local b1=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3
local b2=Duel.IsPlayerCanDraw(tp)
local b3=Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED,0,1,nil)
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(m,0)},
{b2 and b3,aux.Stringid(m,1)})
if op==1 then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
e:GetHandler():RegisterFlagEffect(1,RESET_PHASE+PHASE_END,0,1)
elseif op==2 then
e:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_REMOVED,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,#g)
e:GetHandler():RegisterFlagEffect(2,RESET_PHASE+PHASE_END,0,1)
end
end
function cm.thfilter(c)
return c:IsSetCard(0x9d3) and c:IsAbleToHand()
end
function cm.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(1)>0 then
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
if g:GetCount()>0 then
......@@ -60,20 +66,8 @@ function cm.op1(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
function cm.filter(c)
return c:IsSetCard(0x9d3) and c:IsFaceup() and c:IsAbleToDeck()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp)
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_REMOVED,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,#g)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
c:ResetFlagEffect(1)
elseif c:GetFlagEffect(2)>0 then
local sg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #sg==0 then return end
Duel.SendtoDeck(sg,nil,SEQ_DECKTOP,REASON_EFFECT)
......@@ -86,4 +80,10 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
c:ResetFlagEffect(2)
end
end
function cm.filter(c)
return c:IsSetCard(0x9d3) and c:IsFaceup() and c:IsAbleToDeck()
end
......@@ -81,7 +81,8 @@ function cm.matfilter(c)
return c:IsLinkSetCard(0x9d3) and c:IsLinkAttribute(ATTRIBUTE_ALL&~ATTRIBUTE_FIRE)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonLocation(LOCATION_EXTRA) and e:GetHandler():GetFlagEffect(91030021)~=0
local ph=Duel.GetCurrentPhase()
return e:GetHandler():IsSummonLocation(LOCATION_EXTRA) and e:GetHandler():GetFlagEffect(91030021)~=0 and ((ph>PHASE_BATTLE_START and ph<PHASE_BATTLE) or (ph==PHASE_END)) and Duel.GetTurnPlayer()==tp
end
function cm.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
......
......@@ -12,7 +12,7 @@ function c91030024.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCountLimit(1,m)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_START+TIMING_BATTLE_END)
e1:SetTarget(cm.rmtg)
......
......@@ -21,9 +21,8 @@ function c91030025.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(cm.cpcost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
......@@ -60,40 +59,20 @@ end
function c91030025.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x9d3)
end
function cm.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function cm.cpfilter(c)
return c:IsType(TYPE_QUICKPLAY) and c:IsSetCard(0x9d3) and c:CheckActivateEffect(true,true,false)
end
function c91030025.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return tg and tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(cm.cpfilter,tp,LOCATION_GRAVE,0,1,nil)
end
e:SetLabel(0)
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.cpfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(true,true,true)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c91030025.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -5,7 +5,7 @@ function c9910011.initial_effect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c9910011.target)
e1:SetOperation(c9910011.operation)
c:RegisterEffect(e1)
......
......@@ -5,7 +5,7 @@ function c9910017.initial_effect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c9910017.target)
e1:SetOperation(c9910017.operation)
c:RegisterEffect(e1)
......
......@@ -5,7 +5,7 @@ function c9910021.initial_effect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c9910021.target)
e1:SetOperation(c9910021.operation)
c:RegisterEffect(e1)
......
......@@ -5,7 +5,7 @@ function c9910026.initial_effect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c9910026.target)
e1:SetOperation(c9910026.operation)
c:RegisterEffect(e1)
......
......@@ -5,7 +5,7 @@ function c9910037.initial_effect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetTarget(c9910037.target)
e1:SetOperation(c9910037.operation)
c:RegisterEffect(e1)
......
......@@ -24,7 +24,7 @@ function c9911563.initial_effect(c)
e3:SetTarget(c9911563.sptg)
e3:SetOperation(c9911563.spop)
c:RegisterEffect(e3)
--search
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(9911563,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_SPECIAL_SUMMON)
......
......@@ -2,29 +2,33 @@
function c9911567.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--level
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9911567,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,9911567)
e1:SetTarget(c9911567.lvtg)
e1:SetOperation(c9911567.lvop)
e1:SetCondition(c9911567.spcon)
e1:SetTarget(c9911567.sptg)
e1:SetOperation(c9911567.spop)
c:RegisterEffect(e1)
--turn set
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9911567,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,9911568)
e2:SetCost(c9911567.poscost)
e2:SetTarget(c9911567.postg)
e2:SetOperation(c9911567.posop)
e2:SetCondition(c9911567.thcon)
e2:SetCost(c9911567.thcost)
e2:SetTarget(c9911567.thtg)
e2:SetOperation(c9911567.thop)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
......@@ -38,122 +42,70 @@ function c9911567.initial_effect(c)
e3:SetTarget(c9911567.drtg)
e3:SetOperation(c9911567.drop)
c:RegisterEffect(e3)
if not c9911567.global_check then
c9911567.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BECOME_TARGET)
ge1:SetOperation(c9911567.checkop1)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_ADJUST)
ge2:SetOperation(c9911567.checkop2)
Duel.RegisterEffect(ge2,0)
end
end
function c9911567.checkop1(e,tp,eg,ep,ev,re,r,rp)
local tg=eg:Filter(Card.IsOnField,nil)
if #tg>0 then
for tc in aux.Next(tg) do
tc:RegisterFlagEffect(9911567,RESET_EVENT+0x1fc0000,EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9911567,5))
end
end
end
function c9911567.checkop2(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(c9911567.ctgfilter,0,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if #tg>0 then
for tc in aux.Next(tg) do
tc:RegisterFlagEffect(9911567,RESET_EVENT+0x1fc0000,EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(9911567,5))
end
end
function c9911567.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasCategory(CATEGORY_SPECIAL_SUMMON)
end
function c9911567.ctgfilter(c)
return c:GetOwnerTargetCount()>0 and c:GetFlagEffect(9911567)==0
function c9911567.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9911567.filter(c)
return c:IsFaceup() and c:GetLevel()>0
function c9911567.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c9911567.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c9911567.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c9911567.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9911567.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c9911567.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
function c9911567.posfilter(c)
return c:IsLocation(LOCATION_MZONE) and (c:IsCanTurnSet() or not c:IsPosition(POS_FACEUP_ATTACK))
end
function c9911567.lvop(e,tp,eg,ep,ev,re,r,rp)
function c9911567.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(9911567,2))
local lv=Duel.AnnounceNumber(tp,1,2,3)
local sel=0
if tc:GetLevel()<=lv then
sel=Duel.SelectOption(tp,aux.Stringid(9911567,3))
if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=1
or Duel.IsPlayerAffectedByEffect(tp,59822133) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c9911567.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if #g1>0 then
g1:AddCard(c)
if Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)>0 then
local g2=Duel.GetMatchingGroup(c9911567.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if #g2==0 then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sc=g2:Select(tp,1,1,nil):GetFirst()
if sc:IsPosition(POS_FACEUP_ATTACK) then
Duel.ChangePosition(sc,POS_FACEDOWN_DEFENSE)
elseif sc:IsPosition(POS_FACEDOWN_DEFENSE) then
Duel.ChangePosition(sc,POS_FACEUP_ATTACK)
elseif sc:IsCanTurnSet() then
local pos=Duel.SelectPosition(tp,sc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
Duel.ChangePosition(sc,pos)
else
sel=Duel.SelectOption(tp,aux.Stringid(9911567,3),aux.Stringid(9911567,4))
Duel.ChangePosition(sc,POS_FACEUP_ATTACK)
end
if sel==1 then
lv=-lv
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_PZONE)
e1:SetTarget(c9911567.desreptg)
e1:SetValue(c9911567.desrepval)
e1:SetOperation(c9911567.desrepop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function c9911567.repfilter(c,tp)
return c:IsControler(tp) and c:IsOnField()
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c9911567.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c9911567.repfilter,1,nil,tp) and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
return true
end
function c9911567.desrepval(e,c)
return c9911567.repfilter(c,e:GetHandlerPlayer())
function c9911567.thcfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6952)
end
function c9911567.desrepop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
g:AddCard(c)
Duel.Hint(HINT_CARD,0,9911567)
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
function c9911567.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9911567.thcfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c9911567.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
function c9911567.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c9911567.posfilter(c,mc)
local g=Group.FromCards(c)
g:Merge(c:GetColumnGroup())
return c:IsCanTurnSet() and g:IsExists(function(c) return c:GetFlagEffect(9911567)>0 end,1,mc)
end
function c9911567.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9911567.posfilter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler()) end
local g=Duel.GetMatchingGroup(c9911567.posfilter,tp,0,LOCATION_MZONE,nil,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
function c9911567.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c9911567.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c9911567.posfilter,tp,0,LOCATION_MZONE,nil,nil)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
function c9911567.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end
end
function c9911567.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetCount()>1 and eg:IsContains(e:GetHandler())
......
--紫炎蔷薇一决胜负
function c9911570.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,9911570)
e1:SetCondition(c9911570.condition)
e1:SetTarget(c9911570.target)
e1:SetOperation(c9911570.operation)
c:RegisterEffect(e1)
--salvage
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,9911571)
e2:SetTarget(c9911570.thtg)
e2:SetOperation(c9911570.thop)
c:RegisterEffect(e2)
end
function c9911570.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainNegatable(ev)
end
function c9911570.unlockedzone(tp,mg)
local zone=0
for i=0,4 do
if Duel.GetMZoneCount(1-tp,mg,tp,LOCATION_REASON_TOFIELD,1<<(4-i))>0 then
zone=zone|(1<<i)
end
end
return zone
end
function c9911570.thfilter(c,e,tp,zone)
return c:IsAbleToHand() and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_TOFIELD,zone)>0
and Duel.IsExistingMatchingCard(c9911570.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
end
function c9911570.spfilter(c,e,tp)
return c:IsSetCard(0x6952) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9911570.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
local zone=c9911570.unlockedzone(tp,mg)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c9911570.thfilter(chkc,e,tp,zone) and chkc~=e:GetHandler() end
if chk==0 then return zone>0 and Duel.IsExistingTarget(c9911570.thfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp,zone)
and Duel.IsPlayerCanSpecialSummonMonster(tp,9911570,0x6952,TYPES_NORMAL_TRAP_MONSTER,1500,1500,5,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP,1-tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c9911570.thfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),e,tp,zone)
local tc=g:GetFirst()
if tc:IsAbleToExtra() then
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
else
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c9911570.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.NegateActivation(ev) then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or Duel.SendtoHand(tc,nil,REASON_EFFECT)==0
or not tc:IsLocation(LOCATION_HAND+LOCATION_EXTRA) then return end
local mg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
local zone=c9911570.unlockedzone(tp,mg)
if zone==0 or Duel.GetMZoneCount(tp,nil,tp,LOCATION_REASON_TOFIELD,zone)==0
or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9911570.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g==0 then return end
Duel.BreakEffect()
Duel.SpecialSummonStep(g:GetFirst(),0,tp,tp,false,false,POS_FACEUP,zone)
local seq=g:GetFirst():GetSequence()
local dc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,4-seq)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,9911570,0x6952,TYPES_NORMAL_TRAP_MONSTER,1500,1500,5,RACE_FIEND,ATTRIBUTE_DARK,POS_FACEUP,1-tp) then
if dc then Duel.Destroy(dc,REASON_RULE) end
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummonStep(c,0,tp,1-tp,true,false,POS_FACEUP,1<<(4-seq))
end
Duel.SpecialSummonComplete()
end
function c9911570.thcfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6952)
end
function c9911570.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand()
and Duel.IsExistingMatchingCard(c9911570.thcfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c9911570.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
......@@ -105,12 +105,13 @@
#零儿/02 648&650
!setname 0x6da0 幻梦迷境
!setname 0x341a 深层幻夜
!setname 0x5410 终末旅者
!setname 0x541a 燃煤
!setname 0x6410 星光歌剧
!setname 0x641a 神代丰
!setname 0x5411 源祀
!setname 0x412 圣地友爱团
!setname 0x341a 深层幻夜
!setname 0x541a 燃煤
!setname 0x641a 神代丰
#星眼 334 0x340-0x34f
!setname 0x340 灵装
......@@ -523,6 +524,7 @@
!setname 0x3f3c MirageKnights(幻象骑士)
!setname 0x5f3c Divicale(神之鳞)
!setname 0x9f3c Hypkain(武神锋)
!setname 0xaf3c 龙衣
!setname 0xcf3c 迷忆渊
!setname 0xf3d 刻证兽
!setname 0x3f3d 春之刻证兽
......@@ -789,6 +791,7 @@
!setname 0x643 埃亚隆
!setname 0x644 那塔拉
!setname 0x645 玛纳
!setname 0x646 无色之白
#MEKK
!setname 0x730 圣印
......@@ -1138,6 +1141,7 @@
!setname 0x9d0 真神
!setname 0x9d1 真神兽
!setname 0x9d2 武装战姬
!setname 0x9d3 神婢
#神威子/tt 750 0x750~0x75f
!setname 0x755 焰刃
......@@ -1197,18 +1201,17 @@
#锦依卫66ccff 745
!setname 0x745 人偶
!setname 0x746 银河列车
!setname 0x747 星核猎手
!counter 0x1745 除灵指示物
!counter 0x1746 界限指示物
#查理大帝 1727044211 500 0x990-0x99f
!setname 0x999 虹猫蓝兔七侠传
!setname 0xa999 虹猫蓝兔七侠传魔教
!setname 0x998 仗剑走天涯
!setname 0x99a 星空闪耀
#真武 216
!setname 0x555 灵光
#王某人 320
!setname 0x3d4 抵抗巨炮
#齿轮 1097693897 676 0x1b1-0x1bf
!setname 0x1b7 重兵装
......@@ -1250,9 +1253,6 @@
!setname 0x67e0 研讨会
#???
!setname 0xaf3c 龙衣
!setname 0x746 银河列车
!setname 0x747 星核猎手
#TYGOC Submissions
#Desruc_6872 987
......
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