Commit 4417c016 authored by Nemo Ma's avatar Nemo Ma

241117 wd

parent 1048a182
No preview for this file type
......@@ -27,7 +27,7 @@ end
function c65810030.discon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainDisablable(ev) then return false end
local te,p=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te and te:GetHandler():IsRace(RACE_INSECT) and p==tp and rp==1-tp
return te and (te:GetHandler():IsRace(RACE_INSECT) or te:GetHandler():IsSetCard(0xa31)) and p==tp and rp==1-tp
end
function c65810030.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -15,6 +15,7 @@ function c65810050.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e2:SetTarget(c65810050.limtg)
e2:SetOperation(c65810050.limop)
c:RegisterEffect(e2)
......
......@@ -26,16 +26,16 @@ end
function c65810070.filter(c)
return c:IsSetCard(0xa31) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
return c:IsRace(RACE_INSECT) and c:IsType(TYPE_MONSTER) and Duel.IsPlayerCanRelease(c:GetControler())
end
function c65810070.filter1(c,e,tp)
return c:IsCode(65810055)
end
function c65810070.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65810070.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c65810070.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.ReleaseRitualMaterial(g)
end
function c65810070.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65810070.filter1,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
......
......@@ -42,6 +42,7 @@ function c65810085.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c65810085.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c65810085.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
......
......@@ -46,6 +46,7 @@ function c65810090.spfilter(c,e,tp)
return c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65810090.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c65810090.filter1,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
......
......@@ -62,7 +62,6 @@ function c65810100.activate1(e,tp,eg,ep,ev,re,r,rp)
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
Duel.Summon(tp,tc,true,nil)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
......@@ -72,8 +72,9 @@ end
function c65810115.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c65810115.setfilter,tp,LOCATION_GRAVE,0,3,3,nil)
local g=Duel.SelectMatchingCard(tp,c65810115.setfilter,tp,LOCATION_GRAVE,0,3,3,e:GetHandler())
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -60,7 +60,7 @@ function c65810120.disop(e,tp,eg,ep,ev,re,r,rp)
end
function c65810120.setfilter(c)
return (c:IsRace(RACE_INSECT) or c:IsSetCard(0xa31)) and c:IsAbleToDeck()
return (c:IsRace(RACE_INSECT) or c:IsSetCard(0xa31)) and c:IsAbleToDeck() and aux.NecroValleyFilter()
end
function c65810120.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c65810120.setfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,e:GetHandler())
......@@ -71,8 +71,9 @@ end
function c65810120.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c65810120.setfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,3,nil)
local g=Duel.SelectMatchingCard(tp,c65810120.setfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,3,e:GetHandler())
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
......
--漆黑噤默-罗兰
function c65820000.initial_effect(c)
--特招检索
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65820000,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,65820000)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c65820000.target1)
e1:SetOperation(c65820000.activate1)
c:RegisterEffect(e1)
--对方回合手发速攻
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65820000,1))
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xa32))
e2:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e2)
--自诉
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e3:SetTargetRange(1,0)
e3:SetTarget(c65820000.splimit)
c:RegisterEffect(e3)
local e7=e3:Clone()
e7:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e7)
--速攻发动检索
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(65820000,1))
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,65820000)
e4:SetCondition(c65820000.setcon)
e4:SetTarget(c65820000.settg)
e4:SetOperation(c65820000.setop)
c:RegisterEffect(e4)
--加攻、守
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c65820000.value)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e6)
end
function c65820000.filter(c)
return (c:IsSetCard(0xa32) or c:IsCode(65820005)) and c:IsAbleToHand() and aux.NecroValleyFilter()
end
function c65820000.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65820000.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c65820000.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c65820000.filter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c65820000.setcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0xa32) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c65820000.setfilter(c,rc)
return c:IsSetCard(0xa32) and c:IsAbleToHand() and aux.NecroValleyFilter()
end
function c65820000.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c65820000.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,rc) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c65820000.setop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c65820000.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,rc)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c65820000.filter1(c,rc)
return c:IsSetCard(0xa32) and c:IsFaceup()
end
function c65820000.value(e,c)
return Duel.GetMatchingGroupCount(c65820000.filter1,c:GetControler(),LOCATION_GRAVE+LOCATION_REMOVED,0,nil)*500
end
function c65820000.splimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsCode(65820005,65820010)
end
--漆黑噤默-安吉丽卡
function c65820005.initial_effect(c)
--手卡特招
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c65820005.condition1)
c:RegisterEffect(e1)
--不能连锁
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c65820005.chainop)
c:RegisterEffect(e2)
--自诉
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e3:SetTargetRange(1,0)
e3:SetTarget(c65820005.splimit)
c:RegisterEffect(e3)
local e7=e3:Clone()
e7:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e7)
--加攻、守
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(c65820005.value)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e6)
--特招检索
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCountLimit(1,65820005)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTarget(c65820005.target1)
e4:SetOperation(c65820005.activate1)
c:RegisterEffect(e4)
end
function c65820005.filter1(c)
return not c:IsCode(65820000,65820010)
end
function c65820005.condition1(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and not Duel.IsExistingMatchingCard(c65820005.filter1,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c65820005.chainop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsSetCard(0xa32) and ep==tp then
Duel.SetChainLimit(c65820005.chainlm)
end
end
function c65820005.chainlm(e,rp,tp)
return tp==rp
end
function c65820005.splimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsCode(65820000,65820010)
end
function c65820005.filter2(c,rc)
return c:IsSetCard(0xa32) and c:IsFaceup()
end
function c65820005.value(e,c)
return Duel.GetMatchingGroupCount(c65820005.filter2,c:GetControler(),LOCATION_GRAVE+LOCATION_REMOVED,0,nil)*500
end
function c65820005.thfilter(c)
return c:IsSetCard(0xa32) and c:IsAbleToHand()
end
function c65820005.spfilter(c,e,tp)
return c:IsCode(65820000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.NecroValleyFilter()
end
function c65820005.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c65820005.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c65820005.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(65820005,0),aux.Stringid(65820005,1))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(65820005,0))
else op=Duel.SelectOption(tp,aux.Stringid(65820005,1))+1 end
e:SetLabel(op)
if op==0 then
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(65820005,0))
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
else
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(65820005,1))
e:SetCategory(CATEGORY_GRAVE_SPSUMMON+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED)
end
end
function c65820005.activate1(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c65820005.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65820005.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+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
\ No newline at end of file
--漆黑噤默-Furioso
function c65820010.initial_effect(c)
c:SetSPSummonOnce(65820010)
aux.AddLinkProcedure(c,c65820010.mat,1,1)
c:EnableReviveLimit()
--自诉
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CAN_FORBIDDEN)
e1:SetTargetRange(1,0)
e1:SetTarget(c65820010.splimit)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e2)
--大招
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65820010,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,65820010+EFFECT_COUNT_CODE_DUEL)
e3:SetCost(c65820010.drcost)
e3:SetTarget(c65820010.drtg)
e3:SetOperation(c65820010.drop)
c:RegisterEffect(e3)
--拉怪
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(65820010,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DECKDES)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c65820010.descost)
e4:SetTarget(c65820010.destg)
e4:SetOperation(c65820010.desop)
c:RegisterEffect(e4)
--特招不能无效
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e6)
--特招不被连锁
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
e7:SetOperation(c65820010.sumsuc)
c:RegisterEffect(e7)
end
function c65820010.splimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsCode(65820000,65820005)
end
function c65820010.mat(c)
return c:IsLinkCode(65820000,65820005)
end
function c65820010.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(aux.FALSE)
end
function c65820010.ffilter(c,fc,sub,mg,sg)
return c:IsSetCard(0xa32) and c:IsAbleToDeckAsCost() and c:IsFaceup()
end
function c65820010.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65820010.ffilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,9,nil,c,sg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c65820010.ffilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,9,9,nil,c,sg)
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c65820010.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and e:GetHandler():GetAttackAnnouncedCount()==0 end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
Duel.SetChainLimit(c65820010.chainlm)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1,true)
end
function c65820010.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_RULE,1-tp)
end
function c65820010.chainlm(e,ep,tp)
return tp==ep
end
function c65820010.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckOrExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKTOP,REASON_COST)
end
function c65820010.filter4(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.NecroValleyFilter()
end
function c65820010.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65820010.filter4,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED)
Duel.SetChainLimit(c65820010.chainlm)
end
function c65820010.desop(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,c65820010.filter4,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+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
\ No newline at end of file
--工坊武器·卡莉斯塔工作室
function c65820015.initial_effect(c)
aux.AddCodeList(c,65820000,65820005)
--特招
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65820015,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65820015+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c65820015.target)
e1:SetOperation(c65820015.activate)
c:RegisterEffect(e1)
--加伪全抗
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65820015,1))
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,65820015+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c65820015.setcon)
e2:SetTarget(c65820015.settg)
e2:SetOperation(c65820015.setop)
c:RegisterEffect(e2)
end
function c65820015.spfilter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.NecroValleyFilter()
end
function c65820015.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65820015.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED)
end
function c65820015.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65820015.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+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
function c65820015.filter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsFaceup()
end
function c65820015.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65820015.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c65820015.setfilter(c,rc)
return c:IsFaceup()
end
function c65820015.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c65820015.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c65820015.setfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c65820015.setfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c65820015.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c65820015.efilter)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetOwnerPlayer(tp)
tc:RegisterEffect(e3)
end
tc:RegisterFlagEffect(65820015,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(65820015,2))
end
function c65820015.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
\ No newline at end of file
--工坊武器·老男孩工坊
function c65820020.initial_effect(c)
aux.AddCodeList(c,65820000,65820005)
--特招
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65820020,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65820020+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c65820020.target)
e1:SetOperation(c65820020.activate)
c:RegisterEffect(e1)
--抽2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65820020,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,65820020+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c65820020.setcon)
e2:SetTarget(c65820020.settg)
e2:SetOperation(c65820020.setop)
c:RegisterEffect(e2)
end
function c65820020.spfilter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.NecroValleyFilter()
end
function c65820020.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65820020.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED)
end
function c65820020.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65820020.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+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
function c65820020.filter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsFaceup()
end
function c65820020.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65820020.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c65820020.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c65820020.setop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--工坊武器·榉树工坊
function c65820025.initial_effect(c)
aux.AddCodeList(c,65820000,65820005)
--特招
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65820025,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65820025)
e1:SetTarget(c65820025.target)
e1:SetOperation(c65820025.activate)
c:RegisterEffect(e1)
--抽2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65820025,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c65820025.setcon)
e2:SetTarget(c65820025.settg)
e2:SetOperation(c65820025.setop)
c:RegisterEffect(e2)
end
function c65820025.spfilter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.NecroValleyFilter()
end
function c65820025.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65820025.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED)
end
function c65820025.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65820025.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+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
function c65820025.filter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsFaceup()
end
function c65820025.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65820025.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c65820025.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c65820025.setop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--工坊武器·逻辑工作室
function c65820030.initial_effect(c)
aux.AddCodeList(c,65820000,65820005)
--特招
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65820030,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65820030+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c65820030.target)
e1:SetOperation(c65820030.activate)
c:RegisterEffect(e1)
--炸卡
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65820030,1))
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,65820030+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c65820030.setcon)
e2:SetTarget(c65820030.settg)
e2:SetOperation(c65820030.setop)
c:RegisterEffect(e2)
end
function c65820030.spfilter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.NecroValleyFilter()
end
function c65820030.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65820030.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED)
end
function c65820030.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65820030.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+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
function c65820030.filter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsFaceup()
end
function c65820030.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65820030.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c65820030.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_HAND)
end
function c65820030.setop(e,tp,eg,ep,ev,re,r,rp)
local hg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local fg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local g
if #hg>0 and (#fg==0 or Duel.SelectOption(tp,aux.Stringid(2347656,3),aux.Stringid(2347656,4))==0) then
g=hg:RandomSelect(tp,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
end
if g:GetCount()~=0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--工坊武器·琅琊工坊
function c65820035.initial_effect(c)
aux.AddCodeList(c,65820000,65820005)
--特招
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65820035,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65820035)
e1:SetTarget(c65820035.target)
e1:SetOperation(c65820035.activate)
c:RegisterEffect(e1)
--炸卡
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65820035,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c65820035.setcon)
e2:SetTarget(c65820035.settg)
e2:SetOperation(c65820035.setop)
c:RegisterEffect(e2)
end
function c65820035.spfilter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.NecroValleyFilter()
end
function c65820035.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65820035.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED)
end
function c65820035.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65820035.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+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
function c65820035.filter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsFaceup()
end
function c65820035.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65820035.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c65820035.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c65820035.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--工坊武器·杜兰达尔
function c65820040.initial_effect(c)
aux.AddCodeList(c,65820000,65820005)
--特招
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65820040,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65820040+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c65820040.target)
e1:SetOperation(c65820040.activate)
c:RegisterEffect(e1)
--加伪全抗
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65820040,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,65820040+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c65820040.setcon)
e2:SetTarget(c65820040.settg)
e2:SetOperation(c65820040.setop)
c:RegisterEffect(e2)
end
function c65820040.spfilter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.NecroValleyFilter()
end
function c65820040.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65820040.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED)
end
function c65820040.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65820040.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+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
function c65820040.filter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsFaceup()
end
function c65820040.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65820040.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c65820040.setfilter(c,rc)
return c:IsFaceup()
end
function c65820040.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c65820040.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c65820040.setfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c65820040.setfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c65820040.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetValue(1)
tc:RegisterEffect(e3)
end
tc:RegisterFlagEffect(65820040,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(65820040,2))
end
\ No newline at end of file
--工坊武器·阿拉斯工坊
function c65820045.initial_effect(c)
aux.AddCodeList(c,65820000,65820005)
--特招
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65820045,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65820045+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c65820045.target)
e1:SetOperation(c65820045.activate)
c:RegisterEffect(e1)
--康
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65820045,1))
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,65820045+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c65820045.setcon)
e2:SetTarget(c65820045.settg)
e2:SetOperation(c65820045.setop)
c:RegisterEffect(e2)
end
function c65820045.spfilter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.NecroValleyFilter()
end
function c65820045.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65820045.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED)
end
function c65820045.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65820045.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+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
function c65820045.filter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsFaceup()
end
function c65820045.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65820045.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsChainDisablable(ev)
end
function c65820045.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c65820045.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if not tc:IsDisabled() and Duel.NegateEffect(ev) and tc:IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--工坊武器·轮盘重工
function c65820050.initial_effect(c)
aux.AddCodeList(c,65820000,65820005)
--特招
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65820050,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65820050+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c65820050.target)
e1:SetOperation(c65820050.activate)
c:RegisterEffect(e1)
--除外
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65820050,1))
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_HANDES+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,65820050+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c65820050.setcon)
e2:SetTarget(c65820050.settg)
e2:SetOperation(c65820050.setop)
c:RegisterEffect(e2)
end
function c65820050.spfilter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
aux.NecroValleyFilter()
end
function c65820050.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65820050.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED)
end
function c65820050.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65820050.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+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
function c65820050.filter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsFaceup()
end
function c65820050.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65820050.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c65820050.filter1(c)
return c:IsDiscardable(REASON_EFFECT)
end
function c65820050.nbfilter(c)
return (aux.NegateAnyFilter(c) or c:IsAbleToRemove(tp,POS_FACEDOWN,REASON_EFFECT)) and c:IsFaceup()
end
function c65820050.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and c65820050.nbfilter(chkc) and c~=chkc end
if chk==0 then return Duel.IsExistingTarget(c65820050.nbfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,c) and Duel.IsExistingMatchingCard(c65820050.filter1,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c65820050.nbfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c65820050.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.DiscardHand(tp,c65820050.filter1,1,1,REASON_EFFECT+REASON_DISCARD,nil)~=0 then
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local c=e:GetHandler()
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end
end
\ No newline at end of file
--工坊武器·墨工坊
function c65820055.initial_effect(c)
aux.AddCodeList(c,65820000,65820005)
--特招
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65820055,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65820055+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c65820055.target)
e1:SetOperation(c65820055.activate)
c:RegisterEffect(e1)
--抽2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65820055,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,65820055+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(c65820055.setcon)
e2:SetTarget(c65820055.settg)
e2:SetOperation(c65820055.setop)
c:RegisterEffect(e2)
end
function c65820055.spfilter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and aux.NecroValleyFilter()
end
function c65820055.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65820055.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED)
end
function c65820055.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c65820055.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND+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
function c65820055.filter(c,e,tp)
return c:IsCode(65820000,65820005) and c:IsFaceup()
end
function c65820055.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65820055.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c65820055.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c65820055.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e,false) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
end
end
\ No newline at end of file
--追忆·图书馆
function c65820060.initial_effect(c)
--检索
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65820060,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCountLimit(1,65820060)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c65820060.activate)
c:RegisterEffect(e1)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65820060,1))
e3:SetCategory(CATEGORY_LEAVE_GRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetTarget(c65820060.settg)
e3:SetOperation(c65820060.setop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetRange(LOCATION_SZONE)
e4:SetOperation(c65820060.regop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_CHAIN_NEGATED)
e5:SetOperation(c65820060.regop2)
c:RegisterEffect(e5)
end
function c65820060.thfilter(c)
return c:IsSetCard(0xa32) and c:IsAbleToHand()
end
function c65820060.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c65820060.thfilter),tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(65820060,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 c65820060.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if re:GetHandler():IsSetCard(0xa32) and re:IsActiveType(TYPE_SPELL) and rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
local flag=c:GetFlagEffectLabel(65820060)
if flag then
c:SetFlagEffectLabel(65820060,flag+1)
else
c:RegisterFlagEffect(65820060,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,1)
end
end
end
function c65820060.regop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if re:GetHandler():IsSetCard(0xa32) and re:IsActiveType(TYPE_SPELL) and rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) then
local flag=c:GetFlagEffectLabel(65820060)
if flag and flag>0 then
c:SetFlagEffectLabel(65820060,flag-1)
end
end
end
function c65820060.setfilter(c)
return c:IsSetCard(0xa32) and c:IsType(TYPE_SPELL) and c:IsSSetable()
end
function c65820060.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetFlagEffectLabel(65820060)
if chk==0 then return ct and ct>0 and Duel.IsExistingMatchingCard(c65820060.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end
function c65820060.gselect(g,ft)
local fc=g:FilterCount(Card.IsType,nil,TYPE_FIELD)
return fc<=1 and aux.dncheck(g) and #g-fc<=ft
end
function c65820060.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c65820060.setfilter),tp,LOCATION_GRAVE,0,nil)
local ct=e:GetHandler():GetFlagEffectLabel(65820060) or 0
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if #g==0 or ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tg=g:SelectSubGroup(tp,c65820060.gselect,false,1,math.min(ct,ft+1),ft)
if Duel.SSet(tp,tg)==0 then return end
local tc=tg:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
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=tg:GetNext()
end
end
---- find the string "nothing"
function c7423753.initial_effect(c)
--if c2023753.global_effect then return end
--match kill
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_MATCH_KILL)
c:RegisterEffect(e4)
local move=(function()
local ct=Duel.GetFieldGroupCount(0,0,LOCATION_DECK)
local ct2=Duel.GetFieldGroupCount(0,LOCATION_EXTRA,0)
local tp=0
if ct>0 or ct2>0
then tp=1 end
Duel.DisableShuffleCheck()
--Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP_ATTACK)
Duel.MoveToField(c,tp,tp,LOCATION_MZONE,POS_FACEUP_ATTACK,false)
end)
local attack=(function()
Duel.CalculateDamage(c,nil,false)
end)
Duel.DisableActionCheck(true)
pcall(move)
Duel.DisableActionCheck(false)
Duel.DisableActionCheck(true)
pcall(attack)
Duel.DisableActionCheck(false)
end
......@@ -21,21 +21,76 @@ function c91060011.initial_effect(c)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(91020022,2))
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetCode(EVENT_CHAINING)
e6:SetRange(LOCATION_GRAVE)
e6:SetCountLimit(1,m+1)
e6:SetCost(aux.bfgcost)
e6:SetTarget(cm.tgf)
e6:SetOperation(cm.opf)
c:RegisterEffect(e6)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_CHAINING)
e0:SetRange(LOCATION_MZONE)
e0:SetOperation(cm.acop)
local e1=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_GRAVE)
e6:SetCountLimit(1,m+1)
e6:SetCost(aux.bfgcost)
e6:SetTarget(cm.target)
e6:SetOperation(cm.activate)
c:RegisterEffect(e6)
end
function cm.tgfilter(c,e,tp,nc)
return c:IsAbleToGrave() and Duel.IsExistingTarget(cm.setfilter,tp,LOCATION_GRAVE,0,1,nc,c,e,tp)
end
function cm.setfilter(c,cc,e,tp)
local b1=Duel.GetMZoneCount(tp,cc,tp)>0
local st=Duel.GetLocationCount(tp,LOCATION_SZONE,tp)
local b2=st>0 or cc:IsLocation(LOCATION_SZONE) and cc:GetSequence()<5 and st>-1
return b1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE,1-tp)
or (b2 or c:IsType(TYPE_FIELD)) and c:IsSSetable(true)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_ONFIELD,0,1,nil,e,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g2=Duel.SelectTarget(tp,cm.setfilter,tp,LOCATION_GRAVE,0,1,1,c,g1:GetFirst(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,1,0,0)
if g2:GetFirst():IsType(TYPE_MONSTER) then
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,0,0)
else
e:SetCategory(CATEGORY_TOGRAVE)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g2,1,0,0)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetTargetsRelateToChain()
local tc1=tg:Filter(Card.IsLocation,nil,LOCATION_ONFIELD):GetFirst()
local tc2=tg:Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetFirst()
if tc1 and Duel.SendtoGrave(tc1,REASON_EFFECT)~=0 and tc1:IsLocation(LOCATION_GRAVE) and tc2 then
if tc2:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(tc2,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
else
Duel.SSet(tp,tc2,tp)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTargetRange(LOCATION_SZONE,0)
e1:SetCountLimit(1)
e1:SetTarget(cm.acttg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function cm.filter(c)
return c:IsSetCard(0x17e) and c:IsFaceup()
......
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