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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment