Commit 659c7064 authored by Tachibana's avatar Tachibana

eme

parent 824a3f05
No preview for this file type
...@@ -1444,7 +1444,6 @@ ...@@ -1444,7 +1444,6 @@
65073004 0 --浮游星龙 月光咒龙 65073004 0 --浮游星龙 月光咒龙
65080043 0 --失落之妖精 艾尔兰缇娅 65080043 0 --失落之妖精 艾尔兰缇娅
65080044 0 --幻想之大妖精 艾尔希萝娅 65080044 0 --幻想之大妖精 艾尔希萝娅
65080051 2 --冥暗蜘蛛
#665 #665
66560001 0 --神器使 纱夜 66560001 0 --神器使 纱夜
#666 #666
......
--废地之网 瓦卜拉
function c65001038.initial_effect(c)
aux.AddCodeList(c,69408987)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_INSECT),1)
c:EnableReviveLimit()
--field
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_ENVIRONMENT)
e1:SetValue(69408987)
c:RegisterEffect(e1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65001038,1))
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,65001038)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c65001038.target)
e1:SetOperation(c65001038.operation)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65001038,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,65001039)
e2:SetCondition(c65001038.tkcon)
e2:SetTarget(c65001038.tktg)
e2:SetOperation(c65001038.tkop)
c:RegisterEffect(e2)
end
function c65001038.thfilter(c,e,tp)
return aux.IsCodeListed(c,69408987) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(4)
end
function c65001038.tkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
and e:GetHandler():GetReasonCard():IsRace(RACE_INSECT)
end
function c65001038.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c65001038.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP_DEFENSE)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c65001038.atkfil(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function c65001038.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c65001038.atkfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) and Duel.IsExistingTarget(c65001038.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
local g1=Duel.SelectTarget(tp,c65001038.atkfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
local g2=Duel.SelectTarget(tp,c65001038.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,0,0)
end
function c65001038.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc1=g:Filter(Card.IsOnField,nil):GetFirst()
local tc2=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetFirst()
if tc1:IsRelateToEffect(e) and tc1:IsAttackPos() and Duel.ChangePosition(tc1,POS_FACEUP_DEFENSE)~=0 then
if tc2:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 then
Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--蜘蛛恐慌
function c65001040.initial_effect(c)
aux.AddCodeList(c,69408987)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c65001040.condition)
e1:SetTarget(c65001040.target)
e1:SetOperation(c65001040.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,65001040)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c65001040.tg)
e2:SetOperation(c65001040.op)
c:RegisterEffect(e2)
end
function c65001040.tgfil(c,e,tp)
return c:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c65001040.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c65001040.tgfil(chkc,e,tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c65001040.tgfil,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0 end
local g=Duel.SelectTarget(tp,c65001040.tgfil,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c65001040.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 then
local op=1
if Duel.IsEnvironment(69408987) then
op=Duel.SelectOption(tp,aux.Stringid(65001040,1),aux.Stringid(65001040,2))
end
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
if op==1 then
local g2=Duel.GetOperatedGroup()
Duel.SendtoGrave(g2,REASON_EFFECT)
end
end
end
end
function c65001040.confil(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT)
end
function c65001040.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65001040.confil,tp,LOCATION_MZONE,0,1,nil)
end
function c65001040.filter(c)
return c:IsCanChangePosition()
end
function c65001040.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65001040.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c65001040.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c65001040.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c65001040.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end
--蜘蛛威吓
function c65001041.initial_effect(c)
aux.AddCodeList(c,69408987)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65001041,1))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_POSITION+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,65001041)
e1:SetCondition(c65001041.condition)
e1:SetTarget(c65001041.target)
e1:SetOperation(c65001041.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65001041,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,65001041)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c65001041.settg)
e2:SetOperation(c65001041.setop)
c:RegisterEffect(e2)
end
function c65001041.stfilter(c,tp)
return (aux.IsCodeListed(c,69408987) or c:IsCode(69408987)) and c:IsAbleToHand() and not c:IsCode(65001041)
end
function c65001041.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65001041.stfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c65001041.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c65001041.stfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.HintSelection(g)
end
end
function c65001041.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsPosition(POS_FACEUP_ATTACK) and Duel.IsChainNegatable(ev) and re:GetHandler():IsLocation(LOCATION_MZONE)
end
function c65001041.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.IsEnvironment(69408987) then
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
if re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsCanChangePosition() then
Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,1,0,0)
else
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
end
function c65001041.activate(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsCanChangePosition() and Duel.ChangePosition(eg,POS_FACEUP_DEFENSE)~=0 and Duel.IsEnvironment(69408987) then
Duel.NegateActivation(ev)
elseif Duel.Destroy(eg,REASON_EFFECT)~=0 and Duel.IsEnvironment(69408987) then
Duel.NegateActivation(ev)
end
end
end
\ No newline at end of file
--蜘蛛之丝
function c65001042.initial_effect(c)
aux.AddCodeList(c,69408987)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCountLimit(1,65001042+EFFECT_COUNT_CODE_OATH+EFFECT_COUNT_CODE_DUEL)
e1:SetCost(c65001042.cost)
e1:SetTarget(c65001042.tg)
e1:SetOperation(c65001042.op)
c:RegisterEffect(e1)
end
c65001042.toss_dice=true
function c65001042.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_EXTRA,0,1,nil,RACE_INSECT) end
local g=Duel.SelectMatchingCard(tp,Card.IsRace,tp,LOCATION_EXTRA,0,1,1,nil,RACE_INSECT)
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
e:SetLabel(tc:GetCode())
end
function c65001042.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)>1 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_EXTRA)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function c65001042.op(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)
local upup=mg:GetCount()
if upup<=1 then return end
local t={}
local i=1
for i=1,Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-1 do t[i]=i end
local a=Duel.AnnounceNumber(tp,table.unpack(t))
local g=mg:FilterSelect(tp,aux.TRUE,a,a,nil)
mg:Sub(g)
if Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)~=0 then
local ng=mg:RandomSelect(tp,1)
local nc=ng:GetFirst()
Duel.ConfirmCards(1-tp,nc)
if nc:IsCode(e:GetLabel()) and Duel.GetMZoneCount(tp)>0 and nc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
if Duel.SpecialSummon(nc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local dc1=0
local dc2=0
if upup<8 then
dc1=Duel.TossDice(tp,1)
else
dc1,dc2=Duel.TossDice(tp,2)
end
local num=dc1+dc2
if a>num then
local rg=Duel.GetMatchingGroup(c65001042.remofil,tp,LOCATION_ONFIELD,0,nil)
Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)
end
end
end
end
end
function c65001042.remofil(c)
return c:IsFacedown() or not c:IsCode(69408987)
end
\ No newline at end of file
--深林之茵瑟克塔
function c65011021.initial_effect(c)
c:EnableReviveLimit()
--special summon rule
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:SetCondition(c65011021.sprcon)
e0:SetOperation(c65011021.sprop)
c:RegisterEffect(e0)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65011021,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetTarget(c65011021.eqtg)
e1:SetOperation(c65011021.eqop)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c65011021.condition)
e2:SetCost(c65011021.cost)
e2:SetTarget(c65011021.target)
e2:SetOperation(c65011021.activate)
c:RegisterEffect(e2)
end
function c65011021.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandlerPlayer()~=tp and Duel.IsChainNegatable(ev)
end
function c65011021.costfil(c,nc,tc)
local att=tc:GetAttribute()
local rac=tc:GetRace()
if not tc:IsType(TYPE_MONSTER) then
att=tc:GetPreviousAttributeOnField()
rac=tc:GetPreviousRaceOnField()
end
return c:GetEquipTarget()==nc and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and (c:GetOriginalAttribute()==att or c:GetOriginalRace()==rac) and c:IsAbleToGraveAsCost()
end
function c65011021.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst()
local nc=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c65011021.costfil,tp,LOCATION_SZONE,0,1,nc,nc,tc) end
local g=Duel.SelectMatchingCard(tp,c65011021.costfil,tp,LOCATION_SZONE,0,1,1,nc,nc,tc)
Duel.SendtoGrave(g,REASON_COST)
end
function c65011021.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
end
function c65011021.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoDeck(eg,nil,2,REASON_EFFECT)
end
end
function c65011021.eqfil(c)
return c:IsPosition(POS_FACEUP_DEFENSE) and c:IsAbleToChangeControler()
end
function c65011021.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsPosition(POS_FACEUP_DEFENSE) and chkc:IsAbleToChangeControler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c65011021.eqfil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c65011021.eqfil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c65011021.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and tc:IsControler(1-tp) then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c65011021.eqlimit)
tc:RegisterEffect(e1)
end
end
function c65011021.eqlimit(e,c)
return e:GetOwner()==c
end
function c65011021.sprfilter(c)
return c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function c65011021.sprfilter1(c,tp,g,sc)
local lv=c:GetLevel()
return c:IsType(TYPE_TUNER) and g:IsExists(c65011021.sprfilter2,1,c,tp,c,sc,lv)
end
function c65011021.sprfilter2(c,tp,mc,sc,lv)
local sg=Group.FromCards(c,mc)
return c:GetLevel()==lv-6 and c:GetOriginalLevel()>0 and not c:IsType(TYPE_TUNER) and c:IsRace(RACE_INSECT)
and Duel.GetLocationCountFromEx(tp,tp,sg,sc)>0
end
function c65011021.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c65011021.sprfilter,tp,LOCATION_MZONE,0,nil)
return g:IsExists(c65011021.sprfilter1,1,nil,tp,g,c)
end
function c65011021.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c65011021.sprfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:FilterSelect(tp,c65011021.sprfilter1,1,1,nil,tp,g,c)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=g:FilterSelect(tp,c65011021.sprfilter2,1,1,mc,tp,mc,c,mc:GetLevel())
g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST)
end
\ No newline at end of file
--噩梦蜘蛛
function c65080046.initial_effect(c)
aux.AddCodeList(c,69408987)
--draw
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,65080046)
e1:SetCost(c65080046.cost)
e1:SetOperation(c65080046.operation)
c:RegisterEffect(e1)
end
function c65080046.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c65080046.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a,b=0,0
local op=99
if Duel.IsEnvironment(69408987) then
op=Duel.SelectOption(tp,aux.Stringid(65080046,0),aux.Stringid(65080046,1),aux.Stringid(65080046,2))
else
op=Duel.SelectOption(tp,aux.Stringid(65080046,0),aux.Stringid(65080046,1))
end
if op==0 or op==2 then a=1 end
if op==1 or op==2 then b=1 end
if a==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c65080046.poop)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e3,tp)
end
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_FIELD)
e10:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e10:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN)
e10:SetTargetRange(1,1)
e10:SetDescription(aux.Stringid(65080046,0))
Duel.RegisterEffect(e10,tp)
if b==1 then
--activate cost
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_ACTIVATE_COST)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,1)
e4:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN)
e4:SetTarget(c65080046.actarget)
e4:SetCost(c65080046.costchk)
e4:SetOperation(c65080046.costop)
Duel.RegisterEffect(e4,tp)
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_FIELD)
e11:SetProperty(EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_PLAYER_TARGET)
e11:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN)
e11:SetTargetRange(1,1)
e11:SetDescription(aux.Stringid(65080046,1))
Duel.RegisterEffect(e11,tp)
end
end
function c65080046.filter(c)
return c:IsFaceup() and c:IsAttackPos()
end
function c65080046.poop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c65080046.filter,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end
function c65080046.actarget(e,te,tp)
local c=te:GetHandler()
return c:IsType(TYPE_MONSTER) and c:IsAttackPos() and c:IsLocation(LOCATION_MZONE)
end
function c65080046.costchk(e,te,tp)
return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil)
end
function c65080046.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,65080046)
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST,nil)
end
\ No newline at end of file
--秘咒蜘蛛
function c65080047.initial_effect(c)
aux.AddCodeList(c,69408987)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,65080053)
e1:SetTarget(c65080047.target)
e1:SetOperation(c65080047.operation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e3:SetCountLimit(1,65080047)
e3:SetCondition(c65080047.con)
e3:SetTarget(c65080047.tg)
e3:SetOperation(c65080047.op)
c:RegisterEffect(e3)
end
function c65080047.thfil(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and (aux.IsCodeListed(c,69408987) or c:IsCode(69408987)) and c:IsAbleToHand()
end
function c65080047.changefil(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function c65080047.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c65080047.changefil(chkc) and chkc:IsLocation(LOCATION_MZONE) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c65080047.changefil,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) and Duel.IsExistingMatchingCard(c65080047.thfil,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.SelectTarget(tp,c65080047.changefil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c65080047.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsAttackPos() and tc:IsCanChangePosition() then
if Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)~=0 and Duel.IsExistingMatchingCard(c65080047.thfil,tp,LOCATION_DECK,0,1,nil) then
local g=Duel.SelectMatchingCard(tp,c65080047.thfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c65080047.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsPosition,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,POS_FACEUP_DEFENSE)
end
function c65080047.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0)
end
function c65080047.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if c:GetSummonLocation()==LOCATION_GRAVE and not Duel.IsEnvironment(69408987) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
end
\ No newline at end of file
--独猎蜘蛛
function c65080048.initial_effect(c)
aux.AddCodeList(c,69408987)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,65080048)
e1:SetCondition(c65080048.spcon)
e1:SetOperation(c65080048.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65080048,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c65080048.setcon)
e2:SetTarget(c65080048.settg)
e2:SetOperation(c65080048.setop)
c:RegisterEffect(e2)
end
function c65080048.setcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(e:GetHandler():GetSummonType(),SUMMON_VALUE_SELF)==SUMMON_VALUE_SELF
end
function c65080048.stfilter(c,tp)
return (aux.IsCodeListed(c,69408987) or c:IsCode(69408987)) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
end
function c65080048.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65080048.stfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c65080048.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c65080048.stfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
function c65080048.spfilter(c,tp)
return c:IsCanChangePosition() and c:IsPosition(POS_FACEUP_ATTACK) and Duel.GetMZoneCount(tp)>0
end
function c65080048.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local a=Duel.IsExistingMatchingCard(c65080048.spfilter,tp,0,LOCATION_MZONE,1,nil,tp) and not Duel.IsEnvironment(69408987)
local b=Duel.IsExistingMatchingCard(c65080048.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) and Duel.IsEnvironment(69408987)
return a or b
end
function c65080048.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if Duel.IsEnvironment(69408987) then
local g=Duel.SelectMatchingCard(tp,c65080048.spfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.HintSelection(g)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
else
local g=Duel.SelectMatchingCard(tp,c65080048.spfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.HintSelection(g)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end
end
\ No newline at end of file
--寂静蜘蛛
function c65080049.initial_effect(c)
aux.AddCodeList(c,69408987)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,65080049)
e1:SetCondition(c65080049.con)
e1:SetTarget(c65080049.tg)
e1:SetOperation(c65080049.op)
c:RegisterEffect(e1)
end
function c65080049.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c65080049.tgfil(c,tp)
return c:IsPosition(POS_FACEUP_DEFENSE) and Duel.GetMZoneCount(tp,c,tp)>1
end
function c65080049.spfil(c,e,tp)
local a=Duel.IsEnvironment(69408987) and c:IsLevelBelow(4) and c:IsRace(RACE_INSECT)
return (aux.IsCodeListed(c,69408987) or a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(65080049)
end
function c65080049.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsPosition(POS_FACEUP_DEFENSE) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c65080049.tgfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) and Duel.IsExistingMatchingCard(c65080049.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,nil,e,tp) and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
local g=Duel.SelectTarget(tp,c65080049.tgfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c65080049.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(c65080049.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then
local g=Duel.SelectMatchingCard(tp,c65080049.spfil,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--秽血蜘蛛
function c65080050.initial_effect(c)
aux.AddCodeList(c,69408987)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,65080050)
e1:SetCost(c65080050.cost)
e1:SetTarget(c65080050.tg)
e1:SetOperation(c65080050.op)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(65080050,ACTIVITY_SPSUMMON,c65080050.counterfilter)
end
function c65080050.counterfilter(c)
return c:IsRace(RACE_INSECT)
end
function c65080050.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(65080050,tp,ACTIVITY_SPSUMMON)==0 and e:GetHandler():IsDiscardable(REASON_COST) end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c65080050.splimit)
Duel.RegisterEffect(e1,tp)
end
function c65080050.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetRace()~=RACE_INSECT
end
function c65080050.filter(c,e,tp)
local a=c:IsLevelBelow(4) and c:IsRace(RACE_INSECT) and not c:IsType(TYPE_TUNER) and Duel.IsEnvironment(69408987)
return (aux.IsCodeListed(c,69408987) or a) and c:IsAttribute(ATTRIBUTE_EARTH) and ((c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or c:IsAbleToHand())
end
function c65080050.filter1(c,e,tp)
local a=c:IsLevelBelow(4) and c:IsRace(RACE_INSECT) and not c:IsType(TYPE_TUNER) and Duel.IsEnvironment(69408987)
return (aux.IsCodeListed(c,69408987) or a) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAbleToHand()
end
function c65080050.filter2(c,e,tp)
local a=c:IsLevelBelow(4) and c:IsRace(RACE_INSECT) and not c:IsType(TYPE_TUNER) and Duel.IsEnvironment(69408987)
return (aux.IsCodeListed(c,69408987) or a) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c65080050.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65080050.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c65080050.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c65080050.filter,tp,LOCATION_DECK,0,1,nil,e,tp) then return end
local b1=Duel.IsExistingMatchingCard(c65080050.filter1,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(c65080050.filter2,tp,LOCATION_DECK,0,1,nil,e,tp)
local m=0
if b1 and not b2 then m=0 end
if b1 and b2 then
local p=Duel.SelectOption(tp,aux.Stringid(65080050,0),aux.Stringid(65080050,1))
m=p
end
if m==0 then
local g=Duel.SelectMatchingCard(tp,c65080050.filter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
elseif m==1 then
local gn=Duel.SelectMatchingCard(tp,c65080050.filter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(gn,0,tp,tp,false,false,POS_FACEUP)
end
end
--冥暗蜘蛛
function c65080051.initial_effect(c)
aux.AddCodeList(c,69408987)
--summon with no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65080051,1))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c65080051.ntcon)
e1:SetOperation(c65080051.ntop)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetCondition(c65080051.spcon)
e2:SetOperation(c65080051.spop)
e2:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,65080051)
e3:SetTarget(c65080051.thtg)
e3:SetOperation(c65080051.thop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e4)
end
function c65080051.spfilter(c,tp)
return c:IsAbleToGraveAsCost() and c:IsPosition(POS_DEFENSE) and Duel.GetMZoneCount(tp,c,tp)>0
end
function c65080051.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c65080051.spfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c65080051.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c65080051.spfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_COST)
end
function c65080051.filter(c,e,tp)
return aux.IsCodeListed(c,69408987) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_INSECT) and (c:IsAbleToHand() or (Duel.IsEnvironment(69408987) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0))
end
function c65080051.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65080051.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
end
function c65080051.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c65080051.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.IsEnvironment(69408987) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (not tc:IsAbleToHand() or Duel.SelectYesNo(tp,aux.Stringid(65080051,0))) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
else
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
function c65080051.confil(c)
return c:IsFacedown() or not c:IsRace(RACE_INSECT)
end
function c65080051.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(c65080051.confil,tp,LOCATION_MZONE,0,nil)==0
end
function c65080051.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c65080051.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and 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:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c65080051.splimit)
Duel.RegisterEffect(e1,tp)
end
function c65080051.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:GetRace()~=RACE_INSECT
end
function c65080051.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c65080051.ntop(e,tp,eg,ep,ev,re,r,rp,c)
--change base attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+0xff0000)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(2)
c:RegisterEffect(e1)
end
\ No newline at end of file
--蜘蛛骚动
function c65080052.initial_effect(c)
aux.AddCodeList(c,69408987)
--act
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--pos
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65080052,1))
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,65080052)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c65080052.target)
e1:SetOperation(c65080052.operation)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65080052,2))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,65080052)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c65080052.target2)
e2:SetOperation(c65080052.operation2)
c:RegisterEffect(e2)
end
function c65080052.thfilter(c)
return ((aux.IsCodeListed(c,69408987) and c:IsRace(RACE_INSECT)) or c:IsCode(69408987)) and c:IsAbleToHand()
end
function c65080052.atkfil(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function c65080052.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsAttackPos() and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c65080052.atkfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(c65080052.thfilter,tp,LOCATION_DECK,0,1,nil) end
local g=Duel.SelectTarget(tp,c65080052.atkfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c65080052.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsAttackPos() and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)~=0 then
local g=Duel.SelectMatchingCard(tp,c65080052.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c65080052.spfilter(c,e,tp)
return aux.IsCodeListed(c,69408987) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c65080052.spfilter2(c,e,tp,code)
return c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) and not c:IsCode(code)
end
function c65080052.tgfil(c,tp)
return c:IsPosition(POS_FACEUP_DEFENSE) and Duel.GetMZoneCount(tp,c,tp)>0
end
function c65080052.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsPosition(POS_FACEUP_DEFENSE) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(c65080052.tgfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) and Duel.IsExistingMatchingCard(c65080052.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c65080052.tgfil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c65080052.operation2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local num=Duel.GetLocationCount(tp,LOCATION_MZONE)
if num>2 then num=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then num=1 end
local g=Duel.SelectMatchingCard(tp,c65080052.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,num,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
end
\ No newline at end of file
--网织贵女郎
function c65080053.initial_effect(c)
aux.AddCodeList(c,69408987)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_INSECT),1)
c:EnableReviveLimit()
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65080053,2))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetTarget(c65080053.tg)
e1:SetOperation(c65080053.op)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65080053,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,65080053)
e2:SetCondition(c65080053.condition)
e2:SetCost(c65080053.cost)
e2:SetTarget(c65080053.target)
e2:SetOperation(c65080053.activate)
c:RegisterEffect(e2)
end
function c65080053.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsPosition(POS_FACEUP_ATTACK) and Duel.IsChainNegatable(ev) and re:GetHandler():IsLocation(LOCATION_MZONE)
end
function c65080053.costfil(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c65080053.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65080053.costfil,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
local g=Duel.SelectMatchingCard(tp,c65080053.costfil,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c65080053.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsCanChangePosition() then
Duel.SetOperationInfo(0,CATEGORY_POSITION,eg,1,0,0)
else
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,eg,1,0,0)
end
end
end
function c65080053.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
if re:GetHandler():IsCanChangePosition() then
Duel.ChangePosition(eg,POS_FACEUP_DEFENSE)
else Duel.SendtoGrave(eg,REASON_EFFECT) end
end
end
function c65080053.filter(c,e,tp,spchk)
return c:IsPosition(POS_FACEUP_DEFENSE) and (c:IsAbleToGrave() or (spchk and c:IsControlerCanBeChanged()))
end
function c65080053.confil(c)
return not (c:IsFaceup() and c:IsRace(RACE_INSECT))
end
function c65080053.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local spchk=Duel.IsEnvironment(69408987)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c65080053.filter(c,e,tp,spchk) end
if chk==0 then return Duel.IsExistingTarget(c65080053.filter,tp,0,LOCATION_MZONE,1,nil,e,tp,spchk) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c65080053.filter,tp,0,LOCATION_MZONE,1,1,nil,e,tp,spchk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,0,0,0)
end
function c65080053.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if Duel.IsEnvironment(69408987)
and tc:IsControlerCanBeChanged()
and (not tc:IsAbleToGrave() or Duel.SelectYesNo(tp,aux.Stringid(65080053,0))) then
Duel.GetControl(tc,tp)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
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