Commit a1fd3202 authored by Nemo Ma's avatar Nemo Ma

opd

parent e8198940
......@@ -1730,6 +1730,61 @@
15004479 0
15004491 0
15004493 0
#「空隙」 - 沃亚森斯奥克斯
30008800 0
30008801 0
30008802 0
30008803 0
30008804 0
30008805 0
30008806 0
30008807 0
30008808 0
30008809 0
30008810 0
#「星光歌剧」 - 02
33405001 0
33405002 0
33405003 0
33405004 0
33405005 0
33405006 0
33405007 0
33405008 0
33405009 0
65010019 0
65010086 0
65010087 0
65010088 0
65010089 0
65010090 0
65010091 0
65010092 0
65010093 0
65010094 0
65010095 0
65010096 0
65010097 0
65010098 0
65010099 0
65010101 0
65010102 0
65010106 0
65010107 0
65010121 0
65010122 0
65010124 0
65010125 0
65010126 0
65010127 0
65010129 0
65010130 0
65010131 0
65010132 0
65010585 0
65010586 0
65010587 0
65020218 0
#Tears are now in Japari Park Again!
572850 1
4928565 0
......@@ -1746,6 +1801,31 @@
60362066 0
74920585 0
77103950 1
#230820
53755004 2
53755003 2
53755002 2
53755001 2
98940037 1
87498786 0
65010124 0
65010122 0
11451751 1
11451755 1
82209081 1
65010099 0
65010098 0
65010092 0
65010090 0
53799086 0
42620114 0
42620099 0
42620078 0
22348002 0
10150088 0
10106004 0
7489826 0
6109001 0
#230813
10105560 0
14010001 0
......@@ -1778,8 +1858,6 @@
11451701 0
79029550 0
82204264 0
82209088 0
82209090 0
82209146 0
91010023 0
9911075 1
......@@ -1833,10 +1911,8 @@
60001249 0
65130303 0
72100123 0
82209081 0
6109001 1
10105552 1
15000604 1
60159943 1
98920192 1
35399325 2
......@@ -1864,7 +1940,6 @@
11621401 1
11621406 1
19198178 1
22348002 1
22348003 1
22348004 1
25800252 1
......@@ -1899,10 +1974,8 @@
31423201 1
43990008 1
60002125 1
65010099 1
82209010 1
98920104 1
98940002 1
#230514
88880220 1
88888002 1
......@@ -1938,7 +2011,6 @@
10173079 2
#230423
9990226 0
11560703 0
11560717 0
22070340 0
30005016 0
......@@ -3468,8 +3540,6 @@
65010096 0
65010097 0
65010586 0
65010092 1
65010122 1
67200100 1
#211114
1000376 0
......@@ -5183,7 +5253,6 @@
14010206 1
33700311 1
33700903 1
#33700905 1
33700792 2
40008150 1
40008160 1
......@@ -5193,11 +5262,6 @@
40008590 1
40008610 1
40008420 1
#60150803 1
#60150806 1
65010090 1
65010124 1
#65010127 1
9951070 1
9951097 1
9951098 1
......@@ -5208,10 +5272,8 @@
9950998 1
9951062 1
9951067 1
#118038143 2
9950448 1
9950452 1
#33403500 1
9950624 1
9950681 0
9950425 1
......@@ -5292,7 +5354,6 @@
13257346 2
33700316 2
33700405 2
65010098 2
117960683 0
9950742 2
#Forbidden TCG
......@@ -6166,6 +6227,8 @@
!THE WILDEST LIST
#forbidden
44910027 0
60002302 0
82209077 0
#limit
121593977 1
121082832 1
......
No preview for this file type
This diff is collapsed.
--奥西里斯的万雷牢
function c11579800.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_STANDBY_PHASE)
c:RegisterEffect(e1)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c11579800.xxcon1)
e1:SetTarget(c11579800.xxtg1)
e1:SetOperation(c11579800.xxop1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c11579800.xxcon2)
e1:SetTarget(c11579800.xxtg2)
e1:SetOperation(c11579800.xxop2)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c11579800.xxcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsCode(10000020) end,tp,LOCATION_MZONE,0,1,nil) and eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp)
end
function c11579800.xckfil1(c,tp)
return c:IsFaceup() and c:IsAttackPos() and c:IsSummonPlayer(1-tp)
end
function c11579800.xxtg1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c11579800.xckfil1,nil,tp)
if chk==0 then return true end
Duel.SetTargetCard(g)
end
function c11579800.xxop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local dg=Group.CreateGroup()
local c=e:GetHandler()
local tc=g:GetFirst()
while tc do
local preatk=tc:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if preatk~=0 and tc:IsAttack(0) then dg:AddCard(tc) end
tc=g:GetNext()
end
Duel.Destroy(dg,REASON_EFFECT)
end
function c11579800.xxcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsCode(10000020) end,tp,LOCATION_MZONE,0,1,nil) and eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp)
end
function c11579800.xckfil2(c,tp)
return c:IsFaceup() and c:IsDefensePos() and c:IsSummonPlayer(1-tp)
end
function c11579800.xxtg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c11579800.xckfil2,nil,tp)
if chk==0 then return true end
Duel.SetTargetCard(g)
end
function c11579800.xxop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local dg=Group.CreateGroup()
local c=e:GetHandler()
local tc=g:GetFirst()
while tc do
local predef=tc:GetDefense()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(-2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if predef~=0 and tc:IsDefense(0) then dg:AddCard(tc) end
tc=g:GetNext()
end
Duel.Destroy(dg,REASON_EFFECT)
end
--クラリアの蟲惑魔
function c11601001.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_INSECT+RACE_PLANT),2,2)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c11601001.imcon)
e1:SetValue(c11601001.efilter)
c:RegisterEffect(e1)
--set instead of send to grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c11601001.setcon)
e2:SetOperation(c11601001.setop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11601001,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,11601001)
e3:SetCondition(c11601001.spcon)
e3:SetTarget(c11601001.sptg)
e3:SetOperation(c11601001.spop)
c:RegisterEffect(e3)
end
function c11601001.imcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c11601001.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
function c11601001.setcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return Duel.GetFlagEffect(tp,11601001)==0 and rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP)
and rc:GetType()==TYPE_TRAP and rc:IsRelateToEffect(re) and rc:IsCanTurnSet() and rc:IsStatus(STATUS_LEAVE_CONFIRMED) and rc:IsSetCard(0x4c,0x89)
end
function c11601001.setop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.SelectEffectYesNo(tp,rc,aux.Stringid(11601001,1)) then
rc:CancelToGrave()
Duel.ChangePosition(rc,POS_FACEDOWN)
Duel.RaiseEvent(rc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
Duel.RegisterFlagEffect(tp,11601001,RESET_PHASE+PHASE_END,0,0)
end
end
function c11601001.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c11601001.spfilter(c,e,tp)
return c:IsSetCard(0x108a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c11601001.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c11601001.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c11601001.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c11601001.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c11601001.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--シトリスの蟲惑魔
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetCondition(s.imcon)
e1:SetValue(s.efilter)
c:RegisterEffect(e1)
--Search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCost(s.thcost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--material
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CUSTOM+id)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o)
e3:SetTarget(s.mttg)
e3:SetOperation(s.mtop)
c:RegisterEffect(e3)
local g=Group.CreateGroup()
aux.RegisterMergedDelayedEvent(c,id,EVENT_TO_GRAVE,g)
aux.RegisterMergedDelayedEvent(c,id,EVENT_REMOVE,g)
end
function s.imcon(e)
local c=e:GetHandler()
return c:GetOverlayCount()>0
end
function s.efilter(e,re)
if re:IsActiveType(TYPE_TRAP) then return true end
local g=e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_MONSTER)
local race=0
for tc in aux.Next(g) do
race=race|tc:GetOriginalRace()
end
local rc=re:GetHandler()
return re:GetOwner()~=e:GetOwner() and race~=0
and rc:IsRace(race) and re:IsActivated()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.thfilter(c)
return c:IsSetCard(0x108a) and c:IsType(TYPE_MONSTER) 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
function s.cfilter(c,tp)
return not c:IsType(TYPE_TOKEN) and c:IsType(TYPE_MONSTER)
and c:GetOwner()==1-tp and c:IsReason(REASON_EFFECT)
and c:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED)
and c:IsFaceupEx() and c:IsCanOverlay()
end
function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(s.cfilter,nil,tp)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and #g>0 end
Duel.SetTargetCard(g)
end
function s.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=eg:Filter(s.cfilter,nil,tp)
local mg=g:Filter(aux.NecroValleyFilter(Card.IsRelateToChain),nil)
if #mg>0 and c:IsRelateToChain() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local og=mg:Select(tp,1,1,nil)
Duel.Overlay(c,og)
end
end
--フレシアの蟲惑魔
function c11601003.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetCondition(c11601003.imcon)
e1:SetValue(c11601003.efilter)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c11601003.imtg)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
--cannot be target
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
--copy trap
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(11601003,0))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetHintTiming(0x3c0)
e5:SetCountLimit(1)
e5:SetCost(c11601003.cost)
e5:SetTarget(c11601003.target)
e5:SetOperation(c11601003.operation)
c:RegisterEffect(e5)
end
function c11601003.imcon(e)
return e:GetHandler():GetOverlayCount()>0
end
function c11601003.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
function c11601003.imtg(e,c)
return c:IsSetCard(0x108a) and not c:IsCode(11601003,6511113)
end
function c11601003.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c11601003.filter(c)
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89) and c:IsAbleToGraveAsCost()
and c:CheckActivateEffect(false,true,false)~=nil
end
function c11601003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and Duel.IsExistingMatchingCard(c11601003.filter,tp,LOCATION_DECK,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c11601003.filter,tp,LOCATION_DECK,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.SendtoGrave(g,REASON_COST)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function c11601003.operation(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
--カズーラの蟲惑魔
function c11601004.initial_effect(c)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c11601004.efilter)
c:RegisterEffect(e1)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11601004,0))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,11601004)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c11601004.spcon)
e3:SetTarget(c11601004.sptg)
e3:SetOperation(c11601004.spop)
c:RegisterEffect(e3)
end
function c11601004.efilter(e,te)
local c=te:GetHandler()
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89)
end
function c11601004.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=re:GetHandler()
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89)
end
function c11601004.filter(c,e,tp,ft)
return c:IsSetCard(0x108a) and not c:IsCode(11601004) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function c11601004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.IsExistingMatchingCard(c11601004.filter,tp,LOCATION_DECK,0,1,nil,e,tp,ft) end
end
function c11601004.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c11601004.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ft)
local tc=g:GetFirst()
if tc then
if ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
--ジーナの蟲惑魔
function c11601005.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11601005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11601005)
e1:SetCost(c11601005.spcost)
e1:SetTarget(c11601005.sptg)
e1:SetOperation(c11601005.spop)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c11601005.efilter)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11601005,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,11601005)
e3:SetCondition(c11601005.setcon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c11601005.settg)
e3:SetOperation(c11601005.setop)
c:RegisterEffect(e3)
end
function c11601005.costfilter(c)
return c:IsFacedown() and c:IsType(TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function c11601005.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11601005.costfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c11601005.costfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c11601005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c11601005.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c11601005.efilter(e,te)
local c=te:GetHandler()
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89)
end
function c11601005.confilter(c)
return c:GetSequence()<5
end
function c11601005.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c11601005.confilter,tp,LOCATION_SZONE,0,nil)==0
end
function c11601005.setfilter(c)
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89) and c:IsSSetable()
end
function c11601005.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c11601005.setfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11601005.setfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c11601005.setfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function c11601005.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SSet(tp,tc)
end
end
--ティオの蟲惑魔
function c11601006.initial_effect(c)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c11601006.efilter)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11601006,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c11601006.sptg)
e2:SetOperation(c11601006.spop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11601006,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCountLimit(1,11601006)
e3:SetTarget(c11601006.settg)
e3:SetOperation(c11601006.setop)
c:RegisterEffect(e3)
end
function c11601006.efilter(e,te)
local c=te:GetHandler()
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89)
end
function c11601006.filter(c,e,tp)
return c:IsSetCard(0x108a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c11601006.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c11601006.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c11601006.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c11601006.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c11601006.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c11601006.setfilter(c)
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89) and c:IsSSetable()
end
function c11601006.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c11601006.setfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c11601006.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c11601006.setfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function c11601006.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then
local fid=e:GetHandler():GetFieldID()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
if Duel.GetTurnPlayer()==tp then
e1:SetLabel(Duel.GetTurnCount())
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1:SetLabel(0)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN)
end
e1:SetLabelObject(tc)
e1:SetValue(fid)
e1:SetCondition(c11601006.rmcon)
e1:SetOperation(c11601006.rmop)
Duel.RegisterEffect(e1,tp)
tc:RegisterFlagEffect(11601006,RESET_EVENT+RESETS_STANDARD,0,1,fid)
end
end
function c11601006.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()==tp
end
function c11601006.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(11601006)==e:GetValue() then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--アティプスの蟲惑魔
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,3,s.lcheck)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.imcon)
e1:SetValue(s.efilter)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetCondition(s.atkcon)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x108a))
e2:SetValue(1000)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE+CATEGORY_DESTROY+CATEGORY_GRAVE_ACTION)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(s.distg)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
end
function s.lcheck(g)
return g:IsExists(Card.IsLinkRace,1,nil,RACE_INSECT+RACE_PLANT)
end
function s.imcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
function s.cfilter(c)
return c:GetType()==TYPE_TRAP
end
function s.atkcon(e)
return Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil)
end
function s.filter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT+RACE_PLANT)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=Duel.GetMatchingGroupCount(s.filter,tp,LOCATION_MZONE,0,nil)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return ct>0 and 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,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,#g,0,0)
end
function s.rmfilter(c)
return c:GetType()==TYPE_TRAP and c:IsAbleToRemove()
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetTargetsRelateToChain():Filter(Card.IsFaceup,nil)
if #g==0 then return end
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+RESET_PHASE+PHASE_END)
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+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
tc=g:GetNext()
end
Duel.AdjustInstantly(c)
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.rmfilter),tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.rmfilter),tp,LOCATION_GRAVE,0,1,1,nil)
local tg=g:Filter(Card.IsFaceup,nil)
if #rg>0 and #tg>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=tg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end
end
end
--プティカの蟲惑魔
local s,id,o=GetID()
function s.initial_effect(c)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(s.efilter)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCountLimit(1,id+o)
e3:SetTarget(s.rmtg)
e3:SetOperation(s.rmop)
c:RegisterEffect(e3)
end
function s.efilter(e,te)
local c=te:GetHandler()
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89)
end
function s.thfilter(c)
return c:IsCode(12801833) 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
function s.rmfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:IsAbleToRemove()
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
if Duel.GetCurrentPhase()==PHASE_STANDBY then
e1:SetLabel(Duel.GetTurnCount())
e1:SetReset(RESET_PHASE+PHASE_STANDBY,2)
else
e1:SetLabel(0)
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
end
Duel.RegisterEffect(e1,1-tp)
end
function s.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,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
end
--アトラの蟲惑魔
function c11601009.initial_effect(c)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c11601009.efilter)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_HAND,0)
e2:SetTarget(c11601009.etarget)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_INACTIVATE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c11601009.chainfilter)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_DISEFFECT)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c11601009.chainfilter)
c:RegisterEffect(e4)
end
function c11601009.efilter(e,te)
local c=te:GetHandler()
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89)
end
function c11601009.etarget(e,c)
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89)
end
function c11601009.chainfilter(e,ct)
local p=e:GetHandlerPlayer()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return p==tp and te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetActiveType()==TYPE_TRAP
end
--アロメルスの蟲惑魔
function c11601010.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2,nil,nil,99)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetCondition(c11601010.imcon)
e1:SetValue(c11601010.efilter)
c:RegisterEffect(e1)
--spsummon1
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11601010,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11601010)
e2:SetCost(c11601010.spcost1)
e2:SetTarget(c11601010.sptg1)
e2:SetOperation(c11601010.spop1)
c:RegisterEffect(e2)
--spsummon2
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11601010,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CUSTOM+11601010)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,59071625)
e3:SetCondition(c11601010.spcon2)
e3:SetCost(c11601010.spcost2)
e3:SetTarget(c11601010.sptg2)
e3:SetOperation(c11601010.spop2)
c:RegisterEffect(e3)
local g=Group.CreateGroup()
aux.RegisterMergedDelayedEvent(c,11601010,EVENT_TO_GRAVE,g)
aux.RegisterMergedDelayedEvent(c,11601010,EVENT_REMOVE,g)
end
function c11601010.imcon(e)
return e:GetHandler():GetOverlayCount()>0
end
function c11601010.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
function c11601010.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c11601010.spfilter1(c,e,tp)
return c:IsLevel(4) and c:IsRace(RACE_INSECT+RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11601010.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11601010.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c11601010.spop1(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(c11601010.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
end
function c11601010.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE)
and (c:IsLocation(LOCATION_GRAVE) or (c:IsLocation(LOCATION_REMOVED) and c:IsFaceup()))
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==tp and c:IsPreviousControler(1-tp)
end
function c11601010.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11601010.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c11601010.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c11601010.spfilter2(c,e,tp,g)
return g:IsContains(c) and c11601010.cfilter(c,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c11601010.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c11601010.spfilter2(chkc,e,tp,eg) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c11601010.spfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil,e,tp,eg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c11601010.spfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil,e,tp,eg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c11601010.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--セラの蟲惑魔
function c11601011.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c11601011.matfilter,1,1)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c11601011.imcon)
e1:SetValue(c11601011.efilter)
c:RegisterEffect(e1)
--
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11601011,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,11601011)
e3:SetCondition(c11601011.spcon)
e3:SetTarget(c11601011.sptg)
e3:SetOperation(c11601011.spop)
c:RegisterEffect(e3)
--set
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(11601011,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,73639100)
e4:SetCondition(c11601011.setcon)
e4:SetTarget(c11601011.settg)
e4:SetOperation(c11601011.setop)
c:RegisterEffect(e4)
end
function c11601011.matfilter(c)
return c:IsLinkSetCard(0x108a) and not c:IsLinkType(TYPE_LINK)
end
function c11601011.imcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c11601011.efilter(e,te)
return te:IsActiveType(TYPE_TRAP)
end
function c11601011.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():GetType()==TYPE_TRAP
end
function c11601011.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c11601011.spfilter(c,e,tp)
return c:IsSetCard(0x108a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsExistingMatchingCard(c11601011.cfilter,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
end
function c11601011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11601011.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c11601011.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,c11601011.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c11601011.setcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc~=c and rc:IsSetCard(0x108a) and rc:IsControler(tp)
end
function c11601011.setfilter(c)
return c:IsSetCard(0x4c,0x89) and c:GetType()==TYPE_TRAP and c:IsSSetable()
end
function c11601011.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11601011.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c11601011.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c11601011.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
end
end
--キノの蟲惑魔
local s,id,o=GetID()
function s.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(s.efilter)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_SZONE,0)
e3:SetTarget(s.indtg)
e3:SetValue(s.indct)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:IsSetCard(0x108a) and c:IsFaceup()
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then return false end
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
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 e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsRace(RACE_INSECT+RACE_PLANT) and c:IsLocation(LOCATION_EXTRA)
end
function s.efilter(e,te)
local c=te:GetHandler()
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89)
end
function s.indtg(e,c)
return c:IsFacedown() and c:GetSequence()<5
end
function s.indct(e,re,r,rp)
if bit.band(r,REASON_EFFECT)~=0 then
return 1
else return 0 end
end
--ランカの蟲惑魔
function c11601013.initial_effect(c)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c11601013.efilter)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11601013,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c11601013.thtg)
e2:SetOperation(c11601013.thop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11601013,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetTarget(c11601013.rettg)
e3:SetOperation(c11601013.retop)
c:RegisterEffect(e3)
end
function c11601013.efilter(e,te)
local c=te:GetHandler()
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89)
end
function c11601013.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x108a) and c:IsAbleToHand()
end
function c11601013.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11601013.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11601013.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11601013.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c11601013.retfilter(c)
return c:IsFacedown() and c:IsAbleToHand()
end
function c11601013.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c11601013.retfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11601013.retfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c11601013.retfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c11601013.retop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFacedown()
and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
local g=Duel.GetMatchingGroup(Card.IsSSetable,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11601013,2)) then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil)
Duel.SSet(tp,sg,tp,false)
end
end
end
--リセの蟲惑魔
function c11601014.initial_effect(c)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c11601014.efilter)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_LEAVE_GRAVE)
e2:SetDescription(aux.Stringid(11601014,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,11601014)
e2:SetCost(c11601014.setcost)
e2:SetTarget(c11601014.settg)
e2:SetOperation(c11601014.setop)
c:RegisterEffect(e2)
end
function c11601014.efilter(e,te)
local c=te:GetHandler()
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89)
end
function c11601014.setfilter(c)
return c:IsSetCard(0x4c,0x89) and c:GetType()==TYPE_TRAP and c:IsSSetable()
end
function c11601014.fselect(g)
return g:GetClassCount(Card.GetLocation)==g:GetCount() and aux.dncheck(g)
end
function c11601014.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c11601014.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c11601014.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>=2 and g:CheckSubGroup(c11601014.fselect,2,2) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end
function c11601014.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<2 then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c11601014.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:SelectSubGroup(tp,c11601014.fselect,false,2,2)
if sg and #sg==2 then
if Duel.SSet(tp,sg)==0 then return end
local tc=sg:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e1)
tc=sg:GetNext()
end
end
end
--トリオンの蟲惑魔
function c11601015.initial_effect(c)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c11601015.efilter)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11601015,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c11601015.thtg)
e2:SetOperation(c11601015.thop)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11601015,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c11601015.destg)
e3:SetOperation(c11601015.desop)
c:RegisterEffect(e3)
end
function c11601015.efilter(e,te)
local c=te:GetHandler()
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89)
end
function c11601015.filter(c)
return c:GetType()==TYPE_TRAP and c:IsSetCard(0x4c,0x89) and c:IsAbleToHand()
end
function c11601015.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11601015.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11601015.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11601015.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c11601015.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c11601015.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c11601015.desfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c11601015.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c11601015.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--隐匿虫 蟑螂
local m=11626300
local cm=_G["c"..m]
function c11626300.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11626300)
e1:SetCondition(c11626300.htdcon)
e1:SetCost(c11626300.htdcost)
e1:SetTarget(c11626300.htdtg)
e1:SetOperation(c11626300.htdop)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c11626300.descon)
e2:SetTarget(c11626300.destg)
e2:SetOperation(c11626300.desop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11626300,2))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c11626300.indtg)
e3:SetCondition(c11626300.indcon)
e3:SetOperation(c11626300.indop)
c:RegisterEffect(e3)
if not c11626300.global_check then
c11626300.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c11626300.checkop)
Duel.RegisterEffect(ge1,0)
end
Duel.AddCustomActivityCounter(11626300,ACTIVITY_SPSUMMON,c11626300.counterfilter)
end
c11626300.SetCard_YM_Crypticinsect=true
function c11626300.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsType(TYPE_MONSTER) and not rc:IsRace(RACE_INSECT) then
Duel.RegisterFlagEffect(rp,11626300,RESET_PHASE+PHASE_END,0,1)
end
end
function c11626300.counterfilter(c)
return c:IsRace(RACE_INSECT)
end
--01
function c11626300.htdcon(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetOwner()
return tp==p and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c11626300.htdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,11626300)==0 and Duel.GetCustomActivityCount(11626300,tp,ACTIVITY_SPSUMMON)==0 end
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(c11626300.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetTarget(c11626300.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c11626300.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsRace(RACE_INSECT)
end
function c11626300.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_INSECT)
end
function c11626300.htdfil(c)
return c:IsAbleToDeck() and c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER)
end
function c11626300.htdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function c11626300.hsrfil(c)
return c.SetCard_YM_Crypticinsect and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c11626300.htdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if (not c:IsRelateToEffect(e)) or (not c:IsLocation(LOCATION_HAND)) then return end
Duel.SendtoDeck(c,1-tp,1,REASON_EFFECT)
if not c:IsLocation(LOCATION_DECK) then return end
Duel.ShuffleDeck(1-tp)
c:ReverseInDeck()
if Duel.IsExistingMatchingCard(c11626300.hsrfil,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11626300,0)) then
Duel.BreakEffect()
local dg=Duel.SelectMatchingCard(tp,c11626300.hsrfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(dg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,dg)
--
if Duel.GetFlagEffect(tp,1111111)==0 then
Duel.RegisterFlagEffect(tp,1111111,0,0,0)
if not cm.gchk then
cm.gchk=true
cm[0]=3
cm[1]=3
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c11626300.hxspecon)
e1:SetOperation(c11626300.hxspeop)
Duel.RegisterEffect(e1,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11626300,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(11626300)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c11626300.damval)
Duel.RegisterEffect(e1,1-tp)
end
end
end
function c11626300.hxspecon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonPlayer,1,nil,tp)
end
function c11626300.pbfil(c)
return not c:IsPublic() and c:IsAbleToDeck() and not c.SetCard_YM_Crypticinsect
end
function c11626300.hxspeop(e,tp,eg,ep,ev,re,r,rp)
if cm[rp]<=1 then
cm[rp]=3
local c=e:GetHandler()
if eg:IsExists(Card.IsSummonPlayer,1,nil,tp) then
Duel.Hint(HINT_CARD,0,11626300)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.IsExistingMatchingCard(c11626300.pbfil,tp,LOCATION_HAND,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=8 then
local sg=Duel.GetMatchingGroup(c11626300.pbfil,tp,LOCATION_HAND,0,nil):RandomSelect(tp,1)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoDeck(sg,nil,1,REASON_EFFECT)
end
end
else cm[rp]=cm[rp]-1 end
end
function c11626300.damval(e,re,val,r,rp)
if r&REASON_EFFECT~=0 and re then
local rc=re:GetHandler()
if not rc.SetCard_YM_Crypticinsect then
return 100
end
end
return val
end
--02
function c11626300.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c11626300.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11626300.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,1-tp,1-tp,false,false,POS_FACEUP)
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.Destroy(c,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--03
--mxph
function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and cm.desfilter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler().SetCard_YM_Crypticinsect -- and re:GetHandler():IsType(TYPE_MONSTER)
end
function cm.thfil(c)
return c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,cm.desfilter,1-tp,LOCATION_ONFIELD,0,1,2,nil)
if Duel.Destroy(dg,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.thfil,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfil,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
\ No newline at end of file
--隐匿虫 木卫二画皮
local m=11626301
local cm=_G["c"..m]
function c11626301.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11626301)
e1:SetCondition(c11626301.htdcon)
e1:SetCost(c11626301.htdcost)
e1:SetTarget(c11626301.htdtg)
e1:SetOperation(c11626301.htdop)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c11626301.descon)
e2:SetTarget(c11626301.destg)
e2:SetOperation(c11626301.desop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11626301,2))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c11626301.indtg)
e3:SetCondition(c11626301.indcon)
e3:SetOperation(c11626301.indop)
c:RegisterEffect(e3)
if not c11626301.global_check then
c11626301.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c11626301.checkop)
Duel.RegisterEffect(ge1,0)
end
Duel.AddCustomActivityCounter(11626301,ACTIVITY_SPSUMMON,c11626301.counterfilter)
end
c11626301.SetCard_YM_Crypticinsect=true
function c11626301.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsType(TYPE_MONSTER) and not rc:IsRace(RACE_INSECT) then
Duel.RegisterFlagEffect(rp,11626301,RESET_PHASE+PHASE_END,0,1)
end
end
function c11626301.counterfilter(c)
return c:IsRace(RACE_INSECT)
end
--01
function c11626301.htdcon(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetOwner()
return tp==p and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c11626301.htdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,11626301)==0 and Duel.GetCustomActivityCount(11626301,tp,ACTIVITY_SPSUMMON)==0 end
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(c11626301.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetTarget(c11626301.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c11626301.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsRace(RACE_INSECT)
end
function c11626301.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_INSECT)
end
function c11626301.htdfil(c)
return c:IsAbleToDeck() and c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER)
end
function c11626301.htdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND)
end
function c11626301.hsrfil(c)
return c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c11626301.htdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if (not c:IsRelateToEffect(e)) or (not c:IsLocation(LOCATION_HAND)) then return end
Duel.SendtoDeck(c,1-tp,1,REASON_EFFECT)
if not c:IsLocation(LOCATION_DECK) then return end
Duel.ShuffleDeck(1-tp)
c:ReverseInDeck()
if Duel.IsExistingMatchingCard(c11626301.hsrfil,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11626301,0)) then
Duel.BreakEffect()
local dg=Duel.SelectMatchingCard(tp,c11626301.hsrfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(dg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,dg)
--
if Duel.GetFlagEffect(tp,1111112)==0 then
Duel.RegisterFlagEffect(tp,1111112,0,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c11626301.hxtgecon)
e1:SetOperation(c11626301.hxtgeop)
Duel.RegisterEffect(e1,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11626301,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(11626301)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c11626301.damval)
Duel.RegisterEffect(e1,1-tp)
end
end
end
function c11626301.hxtgecon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,tp) and Duel.GetCurrentPhase()~=PHASE_END --and not Duel.GetCurrentPhase()==PHASE_END
end
function c11626301.pbfil(c)
return not c:IsPublic() and c:IsAbleToDeck() and not c.SetCard_YM_Crypticinsect
end
function c11626301.hxtgeop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if eg:IsExists(Card.IsControler,1,nil,tp) then
Duel.Hint(HINT_CARD,0,11626301)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.IsExistingMatchingCard(c11626301.pbfil,tp,LOCATION_HAND,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=8 then
local sg=Duel.GetMatchingGroup(c11626301.pbfil,tp,LOCATION_HAND,0,nil):RandomSelect(tp,1)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoDeck(sg,nil,1,REASON_EFFECT)
end
end
end
function c11626301.damval(e,re,val,r,rp)
if r&REASON_EFFECT~=0 and re then
local rc=re:GetHandler()
if not rc.SetCard_YM_Crypticinsect then
return 100
end
end
return val
end
--02
function c11626301.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c11626301.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11626301.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,1-tp,1-tp,false,false,POS_FACEUP)
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.Destroy(c,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--03
--fex
function cm.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler().SetCard_YM_Crypticinsect -- and re:GetHandler():IsType(TYPE_MONSTER)
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=g:FilterSelect(tp,Card.IsAbleToRemove,1,1,nil)
if tg:GetCount()>0 then
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
Duel.ShuffleExtra(1-tp)
end
end
\ No newline at end of file
--隐匿虫 寄生蛹
local m=11626302
local cm=_G["c"..m]
function c11626302.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11626302)
e1:SetCondition(c11626302.htdcon)
e1:SetCost(c11626302.htdcost)
e1:SetTarget(c11626302.htdtg)
e1:SetOperation(c11626302.htdop)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c11626302.descon)
e2:SetTarget(c11626302.destg)
e2:SetOperation(c11626302.desop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11626302,2))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c11626302.indcon)
e3:SetOperation(c11626302.indop)
c:RegisterEffect(e3)
if not c11626302.global_check then
c11626302.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c11626302.checkop)
Duel.RegisterEffect(ge1,0)
end
Duel.AddCustomActivityCounter(11626302,ACTIVITY_SPSUMMON,c11626302.counterfilter)
end
c11626302.SetCard_YM_Crypticinsect=true
function c11626302.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsType(TYPE_MONSTER) and not rc:IsRace(RACE_INSECT) then
Duel.RegisterFlagEffect(rp,11626302,RESET_PHASE+PHASE_END,0,1)
end
end
function c11626302.counterfilter(c)
return c:IsRace(RACE_INSECT)
end
--01
function c11626302.htdcon(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetOwner()
return tp==p and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c11626302.htdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,11626302)==0 end
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(c11626302.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetTarget(c11626302.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c11626302.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsRace(RACE_INSECT)
end
function c11626302.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_INSECT)
end
function c11626302.htdfil(c)
return c:IsAbleToDeck() and c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER)
end
function c11626302.htdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function c11626302.htdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if (not c:IsRelateToEffect(e)) or (not c:IsLocation(LOCATION_HAND)) then return end
Duel.SendtoDeck(c,1-tp,1,REASON_EFFECT)
if not c:IsLocation(LOCATION_DECK) then return end
Duel.ShuffleDeck(1-tp)
c:ReverseInDeck()
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(11626302,0)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
--
if Duel.GetFlagEffect(tp,1111113)==0 then
Duel.RegisterFlagEffect(tp,1111113,0,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_HAND)
e1:SetCondition(c11626302.hxthecon)
e1:SetOperation(c11626302.hxtheop)
Duel.RegisterEffect(e1,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11626302,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(11626302)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c11626302.damval)
Duel.RegisterEffect(e1,1-tp)
end
end
end
function c11626302.hxthckfil(c,tp)
return c:IsControler(tp) and not c:IsReason(REASON_DRAW)
end
function c11626302.hxthecon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11626302.hxthckfil,1,nil,tp)
end
function c11626302.pbfil(c)
return not c:IsPublic() and c:IsAbleToDeck() and not c.SetCard_YM_Crypticinsect
end
function c11626302.hxtheop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if eg:IsExists(Card.IsControler,1,nil,tp) then
Duel.Hint(HINT_CARD,0,11626302)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.IsExistingMatchingCard(c11626302.pbfil,tp,LOCATION_HAND,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=8 then
local sg=Duel.GetMatchingGroup(cm.pbfil,tp,LOCATION_HAND,0,nil):RandomSelect(tp,1)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoDeck(sg,nil,1,REASON_EFFECT)
end
end
end
function c11626302.damval(e,re,val,r,rp)
if r&REASON_EFFECT~=0 and re then
local rc=re:GetHandler()
if not rc.SetCard_YM_Crypticinsect then
return 100
end
end
return val
end
--02
function c11626302.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c11626302.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11626302.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,1-tp,1-tp,false,false,POS_FACEUP)
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.Destroy(c,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--03
--tk
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler().SetCard_YM_Crypticinsect and Duel.IsAbleToEnterBP() -- and re:GetHandler():IsType(TYPE_MONSTER)
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetCountLimit(1)
e1:SetCondition(cm.xtdcon)
e1:SetOperation(cm.xtdop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.xtdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.xtdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SendtoDeck(sg,nil,1,REASON_EFFECT)
end
end
\ No newline at end of file
--隐匿虫 苍蝇
local m=11626303
local cm=_G["c"..m]
function c11626303.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11626303)
e1:SetCondition(c11626303.htdcon)
e1:SetCost(c11626303.htdcost)
e1:SetTarget(c11626303.htdtg)
e1:SetOperation(c11626303.htdop)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c11626303.descon)
e2:SetTarget(c11626303.destg)
e2:SetOperation(c11626303.desop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11626303,2))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c11626303.indtg)
e3:SetCondition(c11626303.indcon)
e3:SetOperation(c11626303.indop)
c:RegisterEffect(e3)
if not c11626303.global_check then
c11626303.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c11626303.checkop)
Duel.RegisterEffect(ge1,0)
end
Duel.AddCustomActivityCounter(11626303,ACTIVITY_SPSUMMON,c11626303.counterfilter)
end
c11626303.SetCard_YM_Crypticinsect=true
function c11626303.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsType(TYPE_MONSTER) and not rc:IsRace(RACE_INSECT) then
Duel.RegisterFlagEffect(rp,11626303,RESET_PHASE+PHASE_END,0,1)
end
end
function c11626303.counterfilter(c)
return c:IsRace(RACE_INSECT)
end
--01
function c11626303.htdcon(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetOwner()
return tp==p and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c11626303.htdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,11626303)==0 and Duel.GetCustomActivityCount(11626303,tp,ACTIVITY_SPSUMMON)==0 end
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(c11626303.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetTarget(c11626303.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c11626303.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsRace(RACE_INSECT)
end
function c11626303.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_INSECT)
end
function c11626303.htdfil(c)
return c:IsAbleToDeck() and c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER)
end
function c11626303.htdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND)
end
function c11626303.hsrfil(c)
return c.SetCard_YM_Crypticinsect and c:IsAbleToHand()
end
function c11626303.htdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if (not c:IsRelateToEffect(e)) or (not c:IsLocation(LOCATION_HAND)) then return end
Duel.SendtoDeck(c,1-tp,1,REASON_EFFECT)
if not c:IsLocation(LOCATION_DECK) then return end
Duel.ShuffleDeck(1-tp)
c:ReverseInDeck()
if Duel.IsExistingMatchingCard(c11626303.hsrfil,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11626303,0)) then
Duel.BreakEffect()
local dg=Duel.SelectMatchingCard(tp,c11626303.hsrfil,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(dg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,dg)
--
if Duel.GetFlagEffect(tp,1111114)==0 then
Duel.RegisterFlagEffect(tp,1111114,0,0,0)
if not cm.gchk then
cm.gchk=true
cm[0]=3
cm[1]=3
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c11626303.hxtgecon)
e1:SetOperation(c11626303.hxtgeop)
Duel.RegisterEffect(e1,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11626303,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(11626303)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c11626303.damval)
Duel.RegisterEffect(e1,1-tp)
end
end
end
function c11626303.hxtgecon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp
end
function c11626303.pbfil(c)
return not c:IsPublic() and c:IsAbleToDeck() and not c.SetCard_YM_Crypticinsect
end
function c11626303.hxtgeop(e,tp,eg,ep,ev,re,r,rp)
if cm[rp]<=1 then
cm[rp]=3
local c=e:GetHandler()
if rp==tp then
Duel.Hint(HINT_CARD,0,11626303)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.IsExistingMatchingCard(c11626303.pbfil,tp,LOCATION_HAND,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=8 then
local sg=Duel.GetMatchingGroup(cm.pbfil,tp,LOCATION_HAND,0,nil):RandomSelect(tp,1)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoDeck(sg,nil,1,REASON_EFFECT)
end
end
else cm[rp]=cm[rp]-1 end
end
function c11626303.damval(e,re,val,r,rp)
if r&REASON_EFFECT~=0 and re then
local rc=re:GetHandler()
if not rc.SetCard_YM_Crypticinsect then
return 100
end
end
return val
end
--02
function c11626303.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c11626303.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11626303.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,1-tp,1-tp,false,false,POS_FACEUP)
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.Destroy(c,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--03
function c11626303.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE+CATEGORY_DISABLE,g,1,0,0)
end
function c11626303.indcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler().SetCard_YM_Crypticinsect -- and re:GetHandler():IsType(TYPE_MONSTER)
end
function c11626303.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
local dg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=dg: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)
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
-- if tc:IsType(TYPE_MONSTER) then
-- local e0=Effect.CreateEffect(c)
-- e0:SetType(EFFECT_TYPE_SINGLE)
-- e0:SetCode(EFFECT_SET_ATTACK_FINAL)
-- e0:SetValue(0)
-- e0:SetReset(RESET_EVENT+RESETS_STANDARD)
-- tc:RegisterEffect(e0)
-- end
end
end
--隐匿虫 蚂蚁
local m=11626304
local cm=_G["c"..m]
function c11626304.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11626304)
e1:SetCondition(c11626304.htdcon)
e1:SetCost(c11626304.htdcost)
e1:SetTarget(c11626304.htdtg)
e1:SetOperation(c11626304.htdop)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c11626304.descon)
e2:SetTarget(c11626304.destg)
e2:SetOperation(c11626304.desop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11626304,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c11626304.indtg)
e3:SetCondition(c11626304.indcon)
e3:SetOperation(c11626304.indop)
c:RegisterEffect(e3)
if not c11626304.global_check then
c11626304.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c11626304.checkop)
Duel.RegisterEffect(ge1,0)
end
Duel.AddCustomActivityCounter(11626304,ACTIVITY_SPSUMMON,c11626304.counterfilter)
end
c11626304.SetCard_YM_Crypticinsect=true
function c11626304.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsType(TYPE_MONSTER) and not rc:IsRace(RACE_INSECT) then
Duel.RegisterFlagEffect(rp,11626304,RESET_PHASE+PHASE_END,0,1)
end
end
function c11626304.counterfilter(c)
return c:IsRace(RACE_INSECT)
end
--01
function c11626304.htdcon(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetOwner()
return tp==p and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c11626304.htdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,11626304)==0 and Duel.GetCustomActivityCount(11626304,tp,ACTIVITY_SPSUMMON)==0 end
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(c11626304.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetTarget(c11626304.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c11626304.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsRace(RACE_INSECT)
end
function c11626304.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_INSECT)
end
function c11626304.htdfil(c)
return c:IsAbleToDeck() and c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER)
end
function c11626304.htdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND)
end
function c11626304.hsrfil(c)
return c.SetCard_YM_Crypticinsect and c:IsAbleToHand()
end
function c11626304.htdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if (not c:IsRelateToEffect(e)) or (not c:IsLocation(LOCATION_HAND)) then return end
Duel.SendtoDeck(c,1-tp,1,REASON_EFFECT)
if not c:IsLocation(LOCATION_DECK) then return end
Duel.ShuffleDeck(1-tp)
c:ReverseInDeck()
if Duel.IsExistingMatchingCard(c11626304.htdfil,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11626304,0)) then
Duel.BreakEffect()
local dc=Duel.SelectMatchingCard(tp,c11626304.htdfil,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
Duel.SendtoDeck(dc,1-tp,2,REASON_EFFECT)
if not dc:IsLocation(LOCATION_DECK) then return end
Duel.ShuffleDeck(1-tp)
dc:ReverseInDeck()
--
if Duel.GetFlagEffect(tp,1111115)==0 then
Duel.RegisterFlagEffect(tp,1111115,0,0,0)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_ATTACK_COST)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetCost(c11626304.atcost)
e3:SetOperation(c11626304.atop)
Duel.RegisterEffect(e3,1-tp)
--accumulate
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(0x10000000+11626304)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
Duel.RegisterEffect(e4,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11626304,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(11626304)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c11626304.damval)
Duel.RegisterEffect(e1,1-tp)
end
end
end
function c11626304.atcost(e,c,tp)
local ct=Duel.GetFlagEffect(tp,11626304)
return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil)
end
function c11626304.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,11626304)
local sg=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,nil):RandomSelect(tp,1)
Duel.SendtoDeck(sg,nil,2,REASON_COST)
Duel.Draw(tp,1,REASON_COST)
end
function c11626304.damval(e,re,val,r,rp)
if r&REASON_EFFECT~=0 and re then
local rc=re:GetHandler()
if not rc.SetCard_YM_Crypticinsect then
return 100
end
end
return val
end
--02
function c11626304.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c11626304.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11626304.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,1-tp,1-tp,false,false,POS_FACEUP)
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.Destroy(c,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--03
--ph
function cm.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler().SetCard_YM_Crypticinsect -- and re:GetHandler():IsType(TYPE_MONSTER)
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) then
local dg=Duel.SelectMatchingCard(tp,nil,1-tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
end
end
\ No newline at end of file
--隐匿虫 蜈蚣
local m=11626305
local cm=_G["c"..m]
function c11626305.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11626305)
e1:SetCondition(c11626305.htdcon)
e1:SetCost(c11626305.htdcost)
e1:SetTarget(c11626305.htdtg)
e1:SetOperation(c11626305.htdop)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c11626305.descon)
e2:SetTarget(c11626305.destg)
e2:SetOperation(c11626305.desop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11626305,2))
e3:SetCategory(CATEGORY_CONTROL)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(c11626305.indtg)
e3:SetCondition(c11626305.indcon)
e3:SetOperation(c11626305.indop)
c:RegisterEffect(e3)
if not c11626305.global_check then
c11626305.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c11626305.checkop)
Duel.RegisterEffect(ge1,0)
end
Duel.AddCustomActivityCounter(11626305,ACTIVITY_SPSUMMON,c11626305.counterfilter)
end
c11626305.SetCard_YM_Crypticinsect=true
function c11626305.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsType(TYPE_MONSTER) and not rc:IsRace(RACE_INSECT) then
Duel.RegisterFlagEffect(rp,11626305,RESET_PHASE+PHASE_END,0,1)
end
end
function c11626305.counterfilter(c)
return c:IsRace(RACE_INSECT)
end
--01
function c11626305.htdcon(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetOwner()
return tp==p and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c11626305.htdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,11626305)==0 and Duel.GetCustomActivityCount(11626305,tp,ACTIVITY_SPSUMMON)==0 end
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(c11626305.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetTarget(c11626305.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c11626305.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsRace(RACE_INSECT)
end
function c11626305.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_INSECT)
end
function c11626305.htdfil(c)
return c:IsAbleToDeck() and c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER)
end
function c11626305.htdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND)
end
function c11626305.hsrfil(c)
return c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c11626305.htdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if (not c:IsRelateToEffect(e)) or (not c:IsLocation(LOCATION_HAND)) then return end
Duel.SendtoDeck(c,1-tp,1,REASON_EFFECT)
if not c:IsLocation(LOCATION_DECK) then return end
Duel.ShuffleDeck(1-tp)
c:ReverseInDeck()
local mg=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
if mg:GetCount()>2 and Duel.SelectYesNo(tp,aux.Stringid(11626305,0)) then
Duel.BreakEffect()
Duel.SortDecktop(tp,1-tp,3)
--
if Duel.GetFlagEffect(tp,1111116)==0 then
Duel.RegisterFlagEffect(tp,1111116,0,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SSET)
e1:SetCondition(c11626305.hxthecon)
e1:SetOperation(c11626305.hxtheop)
Duel.RegisterEffect(e1,1-tp)
local e2=e1:Clone()
e2:SetCode(EVENT_MSET)
Duel.RegisterEffect(e2,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11626305,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(11626305)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c11626305.damval)
Duel.RegisterEffect(e1,1-tp)
end
end
end
function c11626305.hxthecon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,tp)
end
function c11626305.pbfil(c)
return not c:IsPublic() and c:IsAbleToDeck() and not c.SetCard_YM_Crypticinsect
end
function c11626305.hxtheop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if eg:IsExists(Card.IsControler,1,nil,tp) then
Duel.Hint(HINT_CARD,0,11626305)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.IsExistingMatchingCard(c11626305.pbfil,tp,LOCATION_HAND,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=8 then
local sg=Duel.GetMatchingGroup(cm.pbfil,tp,LOCATION_HAND,0,nil):RandomSelect(tp,1)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoDeck(sg,nil,1,REASON_EFFECT)
end
end
end
function c11626305.damval(e,re,val,r,rp)
if r&REASON_EFFECT~=0 and re then
local rc=re:GetHandler()
if not rc.SetCard_YM_Crypticinsect then
return 100
end
end
return val
end
--02
function c11626305.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c11626305.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11626305.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,1-tp,1-tp,false,false,POS_FACEUP)
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.Destroy(c,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--03
--ntr
function cm.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler().SetCard_YM_Crypticinsect -- and re:GetHandler():IsType(TYPE_MONSTER)
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local dg=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
local tc=dg:GetFirst()
if tc then
Duel.GetControl(tc,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_INSECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
This diff is collapsed.
--害虫滋生
function c11626307.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11626307,1))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c11626307.accost)
e1:SetTarget(c11626307.actg)
e1:SetOperation(c11626307.acop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11626307,2))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c11626307.accost2)
e2:SetTarget(c11626307.actg2)
e2:SetOperation(c11626307.acop2)
c:RegisterEffect(e2)
if not c11626307.global_check then
c11626307.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c11626307.checkop)
Duel.RegisterEffect(ge1,0)
end
Duel.AddCustomActivityCounter(11626307,ACTIVITY_SPSUMMON,c11626307.counterfilter)
end
function c11626307.counterfilter(c)
return c.SetCard_YM_Crypticinsect
end
function c11626307.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsType(TYPE_MONSTER) and not rc.SetCard_YM_Crypticinsect then
Duel.RegisterFlagEffect(rp,11626307,RESET_PHASE+PHASE_END,0,1)
end
end
function c11626307.accost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,11626307)==0 and Duel.GetCustomActivityCount(11626307,tp,ACTIVITY_SPSUMMON)==0 end
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(c11626307.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(c11626307.splimit)
Duel.RegisterEffect(e2,tp)
end
function c11626307.splimit(e,c)
return not c.SetCard_YM_Crypticinsect
end
function c11626307.actlimit(e,re,tp)
local rc=re:GetHandler()
return rc:IsType(TYPE_MONSTER) and not rc.SetCard_YM_Crypticinsect
end
function c11626307.dpbfil(c)
return c:IsAbleToDeck() and c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER)
end
function c11626307.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11626307.dpbfil,tp,LOCATION_DECK,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11626307.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c11626307.dpbfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
local sg=g:Select(tp,2,2,nil)
Duel.ConfirmCards(1-tp,sg)
local tc=sg:RandomSelect(1-tp,1):GetFirst()
Duel.ShuffleDeck(tp)
Duel.SendtoDeck(tc,1-tp,2,REASON_EFFECT)
if not tc:IsLocation(LOCATION_DECK) then return end
Duel.ShuffleDeck(1-tp)
tc:ReverseInDeck()
local xg=sg:Filter(aux.TRUE,tc)
Duel.SendtoHand(xg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,xg)
end
end
--
function c11626307.costfil(c)
return c:IsRace(RACE_INSECT) and c:IsType(TYPE_MONSTER)
end
function c11626307.accost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,11626307)==0 and Duel.GetCustomActivityCount(11626307,tp,ACTIVITY_SPSUMMON)==0 and Duel.CheckReleaseGroup(tp,c11626307.costfil,1,nil,tp) end
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(c11626307.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
e2:SetTarget(c11626307.splimit)
Duel.RegisterEffect(e2,tp)
local g=Duel.SelectReleaseGroup(tp,c11626307.costfil,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c11626307.actg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11626307.dpbfil,tp,LOCATION_DECK,0,2,nil) and Duel.IsPlayerCanDraw(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11626307.acop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c11626307.dpbfil,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then
local sg=g:Select(tp,2,2,nil)
Duel.ConfirmCards(1-tp,sg)
local tc=sg:RandomSelect(1-tp,1):GetFirst()
Duel.ShuffleDeck(tp)
Duel.SendtoDeck(tc,1-tp,2,REASON_EFFECT)
if not tc:IsLocation(LOCATION_DECK) then return end
Duel.ShuffleDeck(1-tp)
tc:ReverseInDeck()
local xg=sg:Filter(aux.TRUE,tc)
Duel.SendtoHand(xg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,xg)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--隐匿虫堆积的角落
function c11626308.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11626308)
e1:SetOperation(c11626308.activate)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,21626308)
e2:SetCondition(c11626308.tdcon)
e2:SetTarget(c11626308.tdtg)
e2:SetOperation(c11626308.tdop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(c11626308.drcon)
e3:SetTarget(c11626308.drtg)
e3:SetOperation(c11626308.drop)
c:RegisterEffect(e3)
if not c11626308.global_check then
c11626308.global_check=true
local ge1=Effect.CreateEffect(c)
c11626308[0]=0
c11626308[1]=0
ge1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ge1:SetCode(EVENT_RELEASE)
ge1:SetOperation(c11626308.addcount)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c11626308.clearop)
Duel.RegisterEffect(ge2,0)
end
end
c11626308.SetCard_YM_Crypticinsect=true
function c11626308.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsType(TYPE_MONSTER) and tc.SetCard_YM_Crypticinsect then
local p=tc:GetReasonPlayer()
c11626308[p]=c11626308[p]+1
end
tc=eg:GetNext()
end
end
function c11626308.clearop(e,tp,eg,ep,ev,re,r,rp)
c11626308[0]=0
c11626308[1]=0
end
--
function c11626308.thfilter(c)
return c:IsType(TYPE_MONSTER) and c.SetCard_YM_Crypticinsect and c:IsAbleToHand()
end
function c11626308.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c11626308.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(11626308,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c11626308.tdcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and rc and rc.SetCard_YM_Crypticinsect
end
function c11626308.tdfil(c,rc)
return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and c.SetCard_YM_Crypticinsect and not c:IsCode(rc:GetCode())
end
function c11626308.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c11626308.tdfil,tp,LOCATION_DECK,0,1,nil,rc) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_DECK)
end
function c11626308.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
local g=Duel.GetMatchingGroup(c11626308.tdfil,tp,LOCATION_DECK,0,nil,rc)
if g:GetCount()>0 then
local sg=g:Select(tp,1,2,nil)
Duel.SendtoDeck(sg,1-tp,2,REASON_EFFECT)
if sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)~=sg:GetCount() then return end
Duel.ShuffleDeck(1-tp)
local tc=sg:GetFirst()
while tc do
tc:ReverseInDeck()
tc=sg:GetNext()
end
end
end
--
function c11626308.dackfil(c)
local re=c:GetReasonEffect()
return c.SetCard_YM_Crypticinsect and c:IsReason(REASON_EFFECT) and re:IsActiveType(TYPE_MONSTER)
end
function c11626308.drcon(e,tp,eg,ep,ev,re,r,rp)
return c11626308[tp]>0
end
function c11626308.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return true end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,nil,0,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c11626308.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,c11626308[tp],nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
--隐匿虫 阴险蝎
local m=11626309
local cm=_G["c"..m]
function c11626309.initial_effect(c)
--to deck
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11626309)
e1:SetCondition(c11626309.htdcon)
e1:SetCost(c11626309.htdcost)
e1:SetTarget(c11626309.htdtg)
e1:SetOperation(c11626309.htdop)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c11626309.descon)
e2:SetTarget(c11626309.destg)
e2:SetOperation(c11626309.desop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11626309,2))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c11626309.indcon)
e3:SetTarget(c11626309.indtg)
e3:SetOperation(c11626309.indop)
c:RegisterEffect(e3)
if not c11626309.global_check then
c11626309.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c11626309.checkop)
Duel.RegisterEffect(ge1,0)
end
Duel.AddCustomActivityCounter(11626309,ACTIVITY_SPSUMMON,c11626309.counterfilter)
end
c11626309.SetCard_YM_Crypticinsect=true
function c11626309.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsType(TYPE_MONSTER) and not rc:IsRace(RACE_INSECT) then
Duel.RegisterFlagEffect(rp,11626309,RESET_PHASE+PHASE_END,0,1)
end
end
function c11626309.counterfilter(c)
return c:IsRace(RACE_INSECT)
end
--01
function c11626309.htdcon(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetOwner()
return tp==p and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c11626309.htdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,11626309)==0 and Duel.GetCustomActivityCount(11626309,tp,ACTIVITY_SPSUMMON)==0 end
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(c11626309.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetTarget(c11626309.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c11626309.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsRace(RACE_INSECT)
end
function c11626309.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_INSECT)
end
function c11626309.htdfil(c)
return c:IsAbleToDeck() and c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER)
end
function c11626309.htdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND)
end
function c11626309.htgfil(c)
return c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c11626309.htdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if (not c:IsRelateToEffect(e)) or (not c:IsLocation(LOCATION_HAND)) then return end
Duel.SendtoDeck(c,1-tp,1,REASON_EFFECT)
if not c:IsLocation(LOCATION_DECK) then return end
Duel.ShuffleDeck(1-tp)
c:ReverseInDeck()
if Duel.IsExistingMatchingCard(c11626309.htgfil,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(11626309,0)) then
Duel.BreakEffect()
local dg=Duel.SelectMatchingCard(tp,c11626309.htgfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(dg,REASON_EFFECT)
--
if Duel.GetFlagEffect(tp,1111110)==0 then
Duel.RegisterFlagEffect(tp,1111110,0,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetCountLimit(1)
e1:SetCondition(c11626309.hxbtecon)
e1:SetOperation(c11626309.hxbteop)
Duel.RegisterEffect(e1,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11626309,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(11626309)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(c11626309.damval)
Duel.RegisterEffect(e1,1-tp)
end
end
end
function c11626309.hxbtecon(e,tp,eg,ep,ev,re,r,rp)
local x=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
return Duel.IsPlayerCanDraw(tp,x)
end
function c11626309.pbfil(c)
return not c:IsPublic() and c:IsAbleToDeck() and not c.SetCard_YM_Crypticinsect
end
function c11626309.hxbteop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local x=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
if Duel.IsPlayerCanDraw(tp,x) then
Duel.Hint(HINT_CARD,0,11626309)
if Duel.Draw(tp,x,REASON_EFFECT)>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>8 then
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK)
local sg=Duel.GetMatchingGroup(cm.pbfil,tp,LOCATION_HAND,0,nil):RandomSelect(tp,g:GetCount()-8)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
end
function c11626309.damval(e,re,val,r,rp)
if r&REASON_EFFECT~=0 and re then
local rc=re:GetHandler()
if not rc.SetCard_YM_Crypticinsect then
return 100
end
end
return val
end
--02
function c11626309.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function c11626309.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11626309.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,1-tp,1-tp,false,false,POS_FACEUP)
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.Destroy(c,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--03
--st
function cm.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(1-tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,ct)
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler().SetCard_YM_Crypticinsect -- and re:GetHandler():IsType(TYPE_MONSTER)
end
function cm.pbfil(c)
return c:IsAbleToDeck() and not c.SetCard_YM_Crypticinsect
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if ct==0 then return end
if Duel.Draw(1-tp,ct,REASON_EFFECT)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>7 then
ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(1-tp,cm.pbfil,1-tp,LOCATION_HAND,0,ct-7,ct-7,nil)
Duel.ConfirmCards(tp,sg)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
--分裂的隐匿虫
function c11626310.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11626310,0))
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,11626310+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetTarget(c11626310.target)
e1:SetOperation(c11626310.activate)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11626310,1))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,11626310+EFFECT_COUNT_CODE_OATH)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetTarget(c11626310.target2)
e2:SetOperation(c11626310.activate2)
c:RegisterEffect(e2)
end
c11626310.SetCard_YM_Crypticinsect=true
function c11626310.filter(c)
return c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER) and c:IsReleasable()
end
function c11626310.filter2(c)
return c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c11626310.posfilter(c)
return not c:IsPublic() and c:IsAbleToDeck() and not c.SetCard_YM_Crypticinsect
end
function c11626310.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11626310.filter,tp,LOCATION_DECK,0,1,nil) and Duel.IsPlayerCanDraw(1-tp,2) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_DECK)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,2)
end
function c11626310.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c11626310.filter2,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.Draw(p,d,REASON_EFFECT)
if Duel.IsExistingMatchingCard(c11626310.posfilter,1-tp,LOCATION_HAND,0,2,nil) then
local sg=Duel.SelectMatchingCard(1-tp,c11626310.posfilter,1-tp,LOCATION_HAND,0,2,2,nil)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
---
function c11626310.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11626310.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerCanDraw(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c11626310.activate2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c11626310.filter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 and Duel.Release(g,REASON_EFFECT)~=0 then
Duel.Draw(p,d,REASON_EFFECT)
end
end
--隐匿虫的赠礼
function c11626311.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c11626311.target)
e1:SetOperation(c11626311.operation)
c:RegisterEffect(e1)
end
c11626311.SetCard_YM_Crypticinsect=true
function c11626311.filter(c)
return c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c11626311.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c11626311.filter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingTarget(c11626311.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,4,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c11626311.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,4,4,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,4,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c11626311.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=4 then return end
if tg:GetCount()>0 then
local tc=tg:GetFirst()
while tc do
if tc:IsType(TYPE_LINK) then
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
tc=tg:GetNext()
else
Duel.SendtoDeck(tc,1-tp,1,REASON_EFFECT)
Duel.ShuffleDeck(1-tp)
tc:ReverseInDeck()
tc=tg:GetNext()
end
end
local ct=tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA+LOCATION_DECK)
if ct>0 then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--隐匿虫 蜘蛛
local m=11626312
local cm=_G["c"..m]
function c11626312.initial_effect(c)
--RELEASE
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.htdcon)
e1:SetCost(cm.htdcost)
e1:SetTarget(cm.htdtg)
e1:SetOperation(cm.htdop)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(cm.descon)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetTarget(cm.indtg)
e3:SetCondition(cm.indcon)
e3:SetOperation(cm.indop)
c:RegisterEffect(e3)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
cm.SetCard_YM_Crypticinsect=true
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsType(TYPE_MONSTER) and not rc:IsRace(RACE_INSECT) then
Duel.RegisterFlagEffect(rp,m,RESET_PHASE+PHASE_END,0,1)
end
end
function cm.counterfilter(c)
return c:IsRace(RACE_INSECT)
end
--01
function cm.htdcon(e,tp,eg,ep,ev,re,r,rp)
local p=e:GetHandler():GetOwner()
return tp==p and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function cm.htdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsRace(RACE_INSECT)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_INSECT)
end
--
function cm.htdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_HAND)
end
function cm.hsrfil(c)
return c:IsReleasableByEffect() and c:IsType(TYPE_MONSTER)
end
function cm.htdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if (not c:IsRelateToEffect(e)) or (not c:IsLocation(LOCATION_HAND)) then return end
Duel.SendtoDeck(c,1-tp,1,REASON_EFFECT)
if not c:IsLocation(LOCATION_DECK) then return end
Duel.ShuffleDeck(1-tp)
c:ReverseInDeck()
if Duel.IsExistingMatchingCard(cm.hsrfil,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerCanDraw(tp,2) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
local dg=Duel.SelectMatchingCard(tp,cm.hsrfil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(dg)
Duel.Release(dg,REASON_EFFECT)
Duel.Draw(tp,2,REASON_EFFECT)
--
if Duel.GetFlagEffect(tp,1111122)==0 then
Duel.RegisterFlagEffect(tp,1111122,0,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_REMOVE)
e1:SetCondition(cm.hxtgecon)
e1:SetOperation(cm.hxtgeop)
Duel.RegisterEffect(e1,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(m)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,1-tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(cm.damval)
Duel.RegisterEffect(e1,1-tp)
end
end
end
function cm.hxtgecon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.remfilter,1,nil) and eg:IsExists(Card.IsControler,1,nil,tp)
end
function cm.remfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function cm.pbfil(c)
return not c:IsPublic() and c:IsAbleToDeck() and not c.SetCard_YM_Crypticinsect
end
function cm.hxtgeop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if eg:IsExists(Card.IsControler,1,nil,tp) then
Duel.Hint(HINT_CARD,0,m)
Duel.Draw(tp,1,REASON_EFFECT)
if Duel.IsExistingMatchingCard(cm.pbfil,tp,LOCATION_HAND,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=8 then
local sg=Duel.GetMatchingGroup(cm.pbfil,tp,LOCATION_HAND,0,nil):RandomSelect(tp,1)
Duel.ConfirmCards(1-tp,sg)
Duel.SendtoDeck(sg,nil,1,REASON_EFFECT)
end
end
end
function cm.damval(e,re,val,r,rp)
if r&REASON_EFFECT~=0 and re then
local rc=re:GetHandler()
if not rc.SetCard_YM_Crypticinsect then
return 100
end
end
return val
end
--02
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,1-tp,1-tp,false,false,POS_FACEUP)
Duel.Draw(tp,1,REASON_EFFECT)
else
Duel.Destroy(c,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--03
--fex
function cm.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler().SetCard_YM_Crypticinsect -- and re:GetHandler():IsType(TYPE_MONSTER)
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
tc:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(cm.fuslimit)
tc:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e5)
local e6=e1:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e6)
end
end
function cm.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
\ No newline at end of file
--隐匿虫的繁衍
local m=11626313
local cm=_G["c"..m]
function c11626313.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--02
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.activate2)
c:RegisterEffect(e2)
end
cm.SetCard_YM_Crypticinsect=true
function cm.thfilter(c)
return c:IsFaceup() and c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.tfilter(c)
return c.SetCard_YM_Crypticinsect and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.tafilter(c,e)
return c:IsFaceup() and c:IsCanBeEffectTarget(e)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and cm.ctfilter(chkc) end
if chk==0 then
local g=Duel.GetMatchingGroup(cm.tafilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e)
local gg=Duel.GetMatchingGroup(cm.tfilter,tp,LOCATION_MZONE,0,nil)
return gg:GetCount()>0 and g:GetCount()>1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g2=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,1,0,0)
end
function cm.spfilter(c,e,tp,ra)
return c:IsRace(ra) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local hc=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
if tc==hc then tc=g:GetNext() end
local sg=Duel.GetMatchingGroup(cm.spfilter,1-tp,LOCATION_DECK,0,nil,e,1-tp,tc:GetRace())
if hc:IsRelateToEffect(e) and hc:IsControler(tp) and Duel.SendtoHand(hc,nil,REASON_EFFECT)~=0 and hc:IsLocation(LOCATION_HAND) and tc:IsRelateToEffect(e) then
if tc:IsControler(tp) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
Duel.Draw(tp,1,REASON_EFFECT)
if tc:IsControler(1-tp) and sg:GetCount()>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(1-tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local sg1=sg:Select(1-tp,1,1,nil)
Duel.SpecialSummon(sg1,0,1-tp,1-tp,false,false,POS_FACEUP)
local tc2=sg1:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_INSECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc2:RegisterEffect(e1)
end
end
end
--
function cm.costfil(c,tp)
return c:IsRace(RACE_INSECT) and c:IsType(TYPE_MONSTER) and Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_MZONE,0,1,c)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfil,1,nil,tp) end
local g=Duel.SelectReleaseGroupEx(tp,cm.costfil,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and cm.ctfilter(chkc) end
if chk==0 then
local g=Duel.GetMatchingGroup(cm.tafilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e)
local gg=Duel.GetMatchingGroup(cm.tfilter,tp,LOCATION_MZONE,0,nil)
return gg:GetCount()>0 and g:GetCount()>1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,cm.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g2=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,1,0,0)
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local hc=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
if tc==hc then tc=g:GetNext() end
local sg=Duel.GetMatchingGroup(cm.spfilter,1-tp,LOCATION_DECK,0,nil,e,1-tp,tc:GetRace())
if hc:IsRelateToEffect(e) and hc:IsControler(tp) and Duel.SendtoHand(hc,nil,REASON_EFFECT)~=0 and hc:IsLocation(LOCATION_HAND) and tc:IsRelateToEffect(e) then
if tc:IsControler(tp) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
Duel.Draw(tp,1,REASON_EFFECT)
if tc:IsControler(1-tp) and sg:GetCount()>0 and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(1-tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local sg1=sg:Select(1-tp,1,1,nil)
Duel.SpecialSummon(sg1,0,1-tp,1-tp,false,false,POS_FACEUP)
local tc2=sg1:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_INSECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc2:RegisterEffect(e1)
end
end
if Duel.IsExistingMatchingCard(cm.tfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
local dg=Duel.SelectMatchingCard(tp,cm.tfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(dg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,dg)
end
end
\ No newline at end of file
--煌海舰-
local m=25800308
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetValue(SUMMON_TYPE_XYZ)
e0:SetCondition(cm.sprcon)
e0:SetOperation(cm.sprop)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.drcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e2:SetCondition(cm.spcon2)
e2:SetTarget(cm.sptg2)
c:RegisterEffect(e2)
end
function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.sprfilter(c,tp,g,sc)
return ((c:GetOriginalAttribute()&ATTRIBUTE_WATER~=0 and c:GetOriginalLevel()==4 and c:IsLocation(LOCATION_SZONE))
or (c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_WATER)))
and c:IsCanBeXyzMaterial(nil)
end
function cm.spgckfil(g,e,tp)
return Duel.GetLocationCountFromEx(tp,tp,g,nil)
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_ONFIELD,0,nil)
return g:CheckSubGroup(cm.spgckfil,2,2,e,tp)
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g1=g:SelectSubGroup(tp,cm.spgckfil,false,2,2,e,tp)
c:SetMaterial(g1)
Duel.Overlay(c,g1)
end
----
function cm.spfilter(c,e,tp,mc)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsRank(4)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
end
----2
function cm.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSetCard(0x6212)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
\ No newline at end of file
--
function c67200910.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200910,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,67200910)
e2:SetCondition(c67200910.spcon)
e2:SetTarget(c67200910.sptg)
e2:SetOperation(c67200910.spop)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(67200910,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,67200911)
e3:SetCondition(c67200910.descon)
e3:SetTarget(c67200910.destg)
e3:SetOperation(c67200910.desop)
c:RegisterEffect(e3)
end
function c67200910.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(67200912,PLAYER_ALL,LOCATION_FZONE)
end
function c67200910.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c67200910.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
---
function c67200910.descon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c67200910.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c67200910.desop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetCountLimit(1)
e1:SetOperation(c67200910.desop1)
e1:SetReset(RESET_PHASE+PHASE_BATTLE_START)
Duel.RegisterEffect(e1,tp)
end
function c67200910.desop1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200910,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=g:Select(tp,1,1,nil)
Duel.Destroy(g1,REASON_EFFECT)
end
end
\ No newline at end of file
--废都死境
function c67200912.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200912+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c67200912.activate)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c67200912.atktg)
e2:SetValue(500)
c:RegisterEffect(e2)
--Special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(67200912,0))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_DESTROYED)
e4:SetCountLimit(1,67200913)
e4:SetTarget(c67200912.sptg)
e4:SetOperation(c67200912.spop)
c:RegisterEffect(e4)
end
function c67200912.filter(c)
return c:IsSetCard(0x967b) and c:IsAbleToHand()
end
function c67200912.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,e:GetHandler())
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
local g11=Duel.GetOperatedGroup()
local g2=g11:GetCount()
if Duel.IsExistingMatchingCard(c67200912.filter,tp,LOCATION_DECK,0,g2,nil) and Duel.SelectYesNo(tp,aux.Stringid(67200912,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,c67200912.filter,tp,LOCATION_DECK,0,g2,g2,nil)
Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
end
end
end
--
function c67200912.atktg(e,c)
return c:IsSetCard(0x967b)
end
--
function c67200912.spfilter(c,e,tp)
return c:IsSetCard(0x967b) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsType(TYPE_MONSTER)
end
function c67200912.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c67200912.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c67200912.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c67200912.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c67200912.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
--废都界碑
function c67200927.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200927,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,67200927+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c67200927.target)
e1:SetOperation(c67200927.activate)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,67200928)
e3:SetCondition(c67200927.spcon)
e3:SetTarget(c67200927.sptg)
e3:SetOperation(c67200927.spop)
c:RegisterEffect(e3)
end
function c67200927.filter1(c)
return c:IsSetCard(0x967b) and c:IsDestructable()
end
function c67200927.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200927.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_DECK)
end
function c67200927.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c67200927.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--
function c67200927.spcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function c67200927.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,67200927,0,TYPES_EFFECT_TRAP_MONSTER,0,2000,5,RACE_ZOMBIE,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c67200927.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,67200927,0,TYPES_EFFECT_TRAP_MONSTER,0,2000,5,RACE_ZOMBIE,ATTRIBUTE_DARK) then return end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP)
Duel.SpecialSummon(c,SUMMON_VALUE_SELF,tp,tp,true,false,POS_FACEUP)
end
\ No newline at end of file
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