Commit 6e1d5cbb authored by POLYMER's avatar POLYMER

fix

parent 8b25ce6e
No preview for this file type
......@@ -55,15 +55,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
-- 自肃效果
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetValue(s.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsRace(RACE_DINOSAUR) and c:IsLocation(LOCATION_EXTRA)
function s.aclimit(e,re,tp)
return not re:GetHandler():IsRace(RACE_DINOSAUR) and re:GetHandler():GetLocation()==LOCATION_MZONE and re:GetHandler():GetControler()==tp
end
function s.thfilter(c)
......
--Protoss·探机
function c65870000.initial_effect(c)
--special summon (self)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65870000,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,65870000)
e1:SetCondition(c65870000.damcon)
e1:SetCost(c65870000.cost)
e1:SetTarget(c65870000.sptg)
e1:SetOperation(c65870000.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,65870000+1)
e2:SetTarget(c65870000.sttg)
e2:SetOperation(c65870000.stop)
c:RegisterEffect(e2)
end
function c65870000.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c65870000.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,c)
end
function c65870000.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 c65870000.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c65870000.stfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x3a37) and c:IsSSetable()
end
function c65870000.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65870000.stfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function c65870000.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c65870000.stfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65870000,0))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
end
\ No newline at end of file
--Protoss·狂热者
function c65870005.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65870005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,65870005)
e1:SetLabelObject(e0)
e1:SetCondition(c65870005.spcon)
e1:SetTarget(c65870005.sptg)
e1:SetOperation(c65870005.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65870005,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c65870005.thcon)
e3:SetTarget(c65870005.thtg)
e3:SetOperation(c65870005.thop)
c:RegisterEffect(e3)
--extra attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EXTRA_ATTACK)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c65870005.cfilter(c,tp,se)
return c:IsSetCard(0x3a37) and c:IsSummonPlayer(tp) and c:IsFaceup()
end
function c65870005.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c65870005.cfilter,1,nil,tp)
end
function c65870005.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 c65870005.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c65870005.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c65870005.thfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3a37) and c:IsAbleToHand()
end
function c65870005.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65870005.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c65870005.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c65870005.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--Protoss·追猎者
function c65870010.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65870010,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,65870010)
e1:SetTarget(c65870010.destg)
e1:SetOperation(c65870010.desop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65870010,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,65870010)
e2:SetCost(c65870010.discost)
e2:SetTarget(c65870010.destg1)
e2:SetOperation(c65870010.desop1)
c:RegisterEffect(e2)
end
function c65870010.destg(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 c65870010.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c65870010.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function c65870010.destg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function c65870010.desop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--Protoss·水晶塔
function c65870015.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--immume
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_FZONE)
e1:SetCondition(c65870015.econ)
e1:SetValue(c65870015.efilter)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65870015,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,65870015)
e2:SetTarget(c65870015.sptg)
e2:SetOperation(c65870015.spop)
c:RegisterEffect(e2)
end
function c65870015.sumfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3a37)
end
function c65870015.econ(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c65870015.sumfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
function c65870015.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c65870015.thfilter(c)
return c:IsSetCard(0x3a37) and c:IsType(TYPE_SPELL+TYPE_MONSTER) and c:IsAbleToHand()
end
function c65870015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65870015.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c65870015.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c65870015.thfilter,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
\ No newline at end of file
--Protoss·折跃
function c65870020.initial_effect(c)
aux.AddCodeList(c,65870015)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e3:SetCondition(c65870020.excondition)
e3:SetDescription(aux.Stringid(65870020,3))
c:RegisterEffect(e3)
--set
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(65870020,0))
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
--e0:SetCost(c65870020.cost)
e0:SetTarget(c65870020.target0)
e0:SetOperation(c65870020.operation)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65870020,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
--e1:SetCost(c65870020.cost)
e1:SetTarget(c65870020.target)
e1:SetOperation(c65870020.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65870020,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
--e2:SetCost(c65870020.cost)
e2:SetTarget(c65870020.target1)
e2:SetOperation(c65870020.activate1)
c:RegisterEffect(e2)
end
function c65870020.cfilter(c)
return c:IsCode(65870015) and c:IsFaceup()
end
function c65870020.excondition(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c65870020.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c65870020.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,c)
end
function c65870020.pfilter(c,tp)
return c:IsCode(65870015) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c65870020.target0(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65870020.pfilter,tp,LOCATION_DECK,0,1,nil,tp) end
end
function c65870020.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c65870020.pfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
end
function c65870020.filter(c)
return c:IsSetCard(0x3a37) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsLevelBelow(4) and aux.NecroValleyFilter()
end
function c65870020.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c65870020.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c65870020.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c65870020.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c65870020.spfilter(c,e,tp)
return c:IsSetCard(0x3a37) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(4) and aux.NecroValleyFilter() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65870020.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c65870020.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c65870020.activate1(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,c65870020.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--Protoss·母舰核心
function c65870025.initial_effect(c)
aux.AddCodeList(c,65870015)
--连接
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x3a37),2,2)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65870025,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,65870025)
e1:SetTarget(c65870025.target1)
e1:SetOperation(c65870025.activate1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65870025,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,65870025)
e2:SetCondition(c65870025.excondition)
--e2:SetCost(c65870025.thcost)
e2:SetTarget(c65870025.target4)
e2:SetOperation(c65870025.activate4)
c:RegisterEffect(e2)
end
function c65870025.spfilter(c,e,tp)
return c:IsSetCard(0x3a37) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER+TYPE_SPELL) and aux.NecroValleyFilter()
end
function c65870025.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65870025.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c65870025.activate1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c65870025.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c65870025.cfilter(c)
return c:IsCode(65870015) and c:IsFaceup()
end
function c65870025.excondition(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c65870025.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c65870025.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckOrExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function c65870025.target4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_ONFIELD)
end
function c65870025.activate4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
if tc:IsFaceup() 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
--Protoss·黑暗圣堂武士
function c65870030.initial_effect(c)
c:SetSPSummonOnce(65870030)
--link summon
aux.AddLinkProcedure(c,c65870030.mat,1,1)
c:EnableReviveLimit()
--untargetable
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetValue(1)
c:RegisterEffect(e5)
--direct attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e3)
--cannot target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65870030,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_LEAVE_GRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
--e1:SetCountLimit(1,65870030)
e1:SetCost(c65870030.cost)
e1:SetTarget(c65870030.target1)
e1:SetOperation(c65870030.activate1)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65870030,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
--e2:SetCountLimit(1,65870030)
e2:SetCost(c65870030.cost)
e2:SetTarget(c65870030.destg)
e2:SetOperation(c65870030.desop)
c:RegisterEffect(e2)
end
function c65870030.mat(c)
return c:IsLinkSetCard(0x3a37) and not c:IsLinkCode(65870030)
end
function c65870030.cost(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 c65870030.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 end
Duel.Release(c,REASON_COST)
end
function c65870030.spfilter(c,e,tp)
return c:IsSetCard(0x3a37) and c:IsType(TYPE_MONSTER) and aux.NecroValleyFilter() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65870030.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65870030.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c65870030.activate1(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,c65870030.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c65870030.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function c65870030.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--Protoss·星空加速
function c65870035.initial_effect(c)
aux.AddCodeList(c,65870015)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e3:SetCondition(c65870035.excondition)
e3:SetDescription(aux.Stringid(65870035,2))
c:RegisterEffect(e3)
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(65870035,0))
e0:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_SEARCH)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,65870035+EFFECT_COUNT_CODE_OATH)
e0:SetTarget(c65870035.target0)
e0:SetOperation(c65870035.operation)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65870035,1))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65870036+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c65870035.drtg)
e1:SetOperation(c65870035.drop)
c:RegisterEffect(e1)
end
function c65870035.cfilter(c)
return c:IsCode(65870015) and c:IsFaceup()
end
function c65870035.excondition(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c65870035.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c65870035.filter(c)
return c:IsSetCard(0x3a37) and c:IsAbleToHand() and aux.NecroValleyFilter()
end
function c65870035.target0(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c65870035.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c65870035.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c65870035.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c65870035.tdfilter(c,e,tp)
return c:IsSetCard(0x3a37) and c:IsAbleToDeck()
end
function c65870035.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingMatchingCard(c65870035.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,5,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,5,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c65870035.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,c65870035.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,5,5,e:GetHandler())
if #tg==0 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ct=g:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
end
\ No newline at end of file
--Protoss·高阶圣堂武士
function c65870040.initial_effect(c)
--连接
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x3a37),2,3)
--连接召唤效果
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,65870040)
e1:SetTarget(c65870040.target1)
e1:SetOperation(c65870040.activate1)
c:RegisterEffect(e1)
end
function c65870040.stfilter(c)
return c:IsType(TYPE_TRAP) and c:IsSetCard(0x3a37) and c:IsSSetable() and aux.NecroValleyFilter()
end
function c65870040.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65870040.stfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end
function c65870040.activate1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c65870040.stfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65870000,0))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
end
\ No newline at end of file
--Protoss·灵能风暴
function c65870045.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,65870045+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c65870045.condition)
e1:SetTarget(c65870045.target)
e1:SetOperation(c65870045.activate)
c:RegisterEffect(e1)
end
function c65870045.hcfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3a37) and c:IsLinkAbove(3)
end
function c65870045.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65870045.hcfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c65870045.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_MZONE,1,nil)>0
local b2=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_ONFIELD,c,TYPE_SPELL+TYPE_TRAP)>0
if chk==0 then return b1 or b2 end
local s=0
if b1 and not b2 then
s=Duel.SelectOption(tp,aux.Stringid(65870045,0))
end
if not b1 and b2 then
s=Duel.SelectOption(tp,aux.Stringid(65870045,1))+1
end
if b1 and b2 then
s=Duel.SelectOption(tp,aux.Stringid(65870045,0),aux.Stringid(65870045,1))
end
e:SetLabel(s)
local g=nil
if s==0 then
g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,1,nil)
end
if s==1 then
g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,c,TYPE_SPELL+TYPE_TRAP)
end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c65870045.activate(e,tp,eg,ep,ev,re,r,rp)
local g=nil
if e:GetLabel()==0 then
g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,1,nil)
end
if e:GetLabel()==1 then
g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,aux.ExceptThisCard(e),TYPE_SPELL+TYPE_TRAP)
end
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
--Protoss·灵能反馈
function c65870050.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,65870050+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c65870050.condition)
e1:SetTarget(c65870050.target)
e1:SetOperation(c65870050.activate)
c:RegisterEffect(e1)
end
function c65870050.hcfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3a37) and c:IsLinkAbove(3)
end
function c65870050.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c65870050.hcfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) and rp==1-tp
end
function c65870050.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():IsAbleToDeck() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
end
function c65870050.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoDeck(eg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
--Protoss·执政官
function c65870055.initial_effect(c)
c:SetSPSummonOnce(65870055)
aux.AddCodeList(c,65870030,65870040)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c65870055.ffilter,2,true)
aux.AddContactFusionProcedure(c,c65870055.cfilter,LOCATION_MZONE+LOCATION_GRAVE,0,aux.tdcfop(c))
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65870055,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c65870055.destg)
e1:SetOperation(c65870055.desop)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65870055,1))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c65870055.spcon)
e3:SetTarget(c65870055.sptg)
e3:SetOperation(c65870055.spop)
c:RegisterEffect(e3)
--atk/def
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(c65870055.adval)
c:RegisterEffect(e4)
local e2=e4:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
function c65870055.ffilter(c,fc,sub,mg,sg)
return c:IsCode(65870030,65870040) and c:IsType(TYPE_MONSTER)
end
function c65870055.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost() and c:IsCode(65870030,65870040)
end
function c65870055.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,g:GetCount(),1-tp,LOCATION_ONFIELD)
end
function c65870055.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetColumnGroup():Filter(Card.IsControler,nil,1-tp)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c65870055.spfilter(c,fc,sub,mg,sg)
return c:IsAbleToRemove()
end
function c65870055.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp)
end
function c65870055.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65870055.spfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c65870055.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c65870055.spfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil,tp)
if #g>0 then
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
end
function c65870055.filter(c)
return c:IsFaceupEx() and c:IsSetCard(0x3a37)
end
function c65870055.adval(e,c)
return Duel.GetMatchingGroupCount(c65870055.filter,c:GetControler(),LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)*500
end
\ No newline at end of file
--Protoss·使徒
function c65870060.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65870060,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,65870060)
e1:SetCondition(c65870060.tkcon)
e1:SetTarget(c65870060.tktg)
e1:SetOperation(c65870060.tkop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65870060,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,65870060)
e2:SetCost(c65870060.discost)
e2:SetTarget(c65870060.destg1)
e2:SetOperation(c65870060.desop1)
c:RegisterEffect(e2)
end
function c65870060.tkcon(e,tp,eg,ep,ev,re,r,rp)
return not aux.tkfcon(e,tp)
end
function c65870060.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,65870061,0x3a37,TYPES_TOKEN_MONSTER,0,0,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
function c65870060.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,65870061,0x3a37,TYPES_TOKEN_MONSTER,0,0,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,65870061)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
function c65870060.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0
end
function c65870060.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c65870060.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c65870060.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
e:SetLabelObject(g:GetFirst())
end
function c65870060.destg1(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 c65870060.desop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and e:GetLabelObject():IsType(TYPE_TOKEN) and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(65870060,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--Protoss·机械哨兵
function c65870065.initial_effect(c)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e3:SetCountLimit(1,65870065)
e3:SetTarget(c65870065.desreptg)
e3:SetValue(c65870065.desrepval)
e3:SetOperation(c65870065.desrepop)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_LEAVE_GRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,65870065+1)
e1:SetTarget(c65870065.target1)
e1:SetOperation(c65870065.activate1)
c:RegisterEffect(e1)
end
function c65870065.repfilter(c,tp)
return c:IsControler(tp) and c:IsOnField() and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c65870065.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c65870065.repfilter,1,c,tp) and c:IsAbleToRemove() and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c65870065.desrepval(e,c)
return c65870065.repfilter(c,e:GetHandlerPlayer())
end
function c65870065.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
function c65870065.spfilter(c,e,tp)
return c:IsSetCard(0x3a37) and c:IsType(TYPE_MONSTER) and aux.NecroValleyFilter() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65870065.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65870065.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c65870065.activate1(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,c65870065.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECK)
tc:RegisterEffect(e1,true)
end
end
end
\ No newline at end of file
--Protoss·侦测器
function c65870070.initial_effect(c)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65870070,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,65870070)
e1:SetTarget(c65870070.thtg)
e1:SetOperation(c65870070.thop)
c:RegisterEffect(e1)
end
function c65870070.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_HAND+LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c65870070.thfilter(c)
return c:IsSetCard(0x3a37) and c:IsAbleToHand()
end
function c65870070.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND+LOCATION_ONFIELD)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.ShuffleHand(1-tp)
Duel.BreakEffect()
Duel.ConfirmDecktop(tp,g:GetCount())
local cg=Duel.GetDecktopGroup(tp,g:GetCount())
local ct=cg:GetCount()
if ct>0 and cg:FilterCount(c65870070.thfilter,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(65870070,0)) then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=cg:FilterSelect(tp,c65870070.thfilter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
--ct=g:GetCount()-sg:GetCount()
Duel.SendtoDeck(c,nil,1,REASON_EFFECT)
Duel.ShuffleDeck(tp)
end
end
end
\ No newline at end of file
--Protoss·龙骑士
function c65870075.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:SetCountLimit(1,65870075+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c65870075.spcon)
e1:SetTarget(c65870075.sptg)
e1:SetOperation(c65870075.spop)
c:RegisterEffect(e1)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65870075,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c65870075.destg)
e3:SetOperation(c65870075.desop)
c:RegisterEffect(e3)
end
function c65870075.filter(c)
return c:IsRace(RACE_WARRIOR) and Duel.GetMZoneCount(tp,c,tp)>0 and c:IsAbleToDeckOrExtraAsCost() and c:IsFaceupEx()
end
function c65870075.spcon(e,c)
if c==nil then return true end
return Duel.IsExistingMatchingCard(c65870075.filter,c:GetControler(),LOCATION_REMOVED+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
end
function c65870075.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c65870075.filter,tp,LOCATION_REMOVED+LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=g:SelectUnselect(tc,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c65870075.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoDeck(g,nil,2,REASON_SPSUMMON)
end
function c65870075.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c65870075.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--Protoss·不朽者
function c65870080.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:SetCountLimit(1,65870080+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c65870080.spcon)
e1:SetTarget(c65870080.sptg)
e1:SetOperation(c65870080.spop)
c:RegisterEffect(e1)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65870080,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_START)
e1:SetCondition(c65870080.descon)
e1:SetTarget(c65870080.destg)
e1:SetOperation(c65870080.desop)
c:RegisterEffect(e1)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c65870080.filter(c)
return c:IsRace(RACE_MACHINE) and Duel.GetMZoneCount(tp,c,tp)>0 and c:IsAbleToDeckOrExtraAsCost() and c:IsFaceupEx()
end
function c65870080.spcon(e,c)
if c==nil then return true end
return Duel.IsExistingMatchingCard(c65870080.filter,c:GetControler(),LOCATION_REMOVED+LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
end
function c65870080.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c65870080.filter,tp,LOCATION_REMOVED+LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=g:SelectUnselect(tc,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c65870080.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoDeck(g,nil,2,REASON_SPSUMMON)
end
function c65870080.descon(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
return e:GetHandler()==Duel.GetAttacker() and d and d:IsFaceup() and d:GetAttack()>e:GetHandler():GetAttack()
end
function c65870080.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetAttackTarget(),1,0,0)
end
function c65870080.desop(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if d:IsRelateToBattle() and d:GetAttack()>e:GetHandler():GetAttack() then
Duel.Destroy(d,REASON_EFFECT)
end
end
\ No newline at end of file
--Protoss·光子炮台
function c65870085.initial_effect(c)
aux.AddCodeList(c,65870015)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e3:SetCondition(c65870085.excondition)
e3:SetDescription(aux.Stringid(65870085,0))
c:RegisterEffect(e3)
--set
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_DESTROY)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,65870085+EFFECT_COUNT_CODE_OATH)
--e0:SetCost(c65870085.cost)
e0:SetTarget(c65870085.destg1)
e0:SetOperation(c65870085.desop1)
c:RegisterEffect(e0)
end
function c65870085.cfilter(c)
return c:IsCode(65870015) and c:IsFaceup()
end
function c65870085.excondition(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c65870085.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c65870085.destg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function c65870085.desop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
if c:IsRelateToEffect(e) and c:IsCanTurnSet() and Duel.IsExistingMatchingCard(c65870085.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.SelectEffectYesNo(tp,c,aux.Stringid(65870085,1)) then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
--Protoss·护盾充能器
function c65870090.initial_effect(c)
aux.AddCodeList(c,65870015)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e3:SetCondition(c65870090.excondition)
e3:SetDescription(aux.Stringid(65870090,0))
c:RegisterEffect(e3)
--set
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_NEGATE)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_CHAINING)
e0:SetCountLimit(1,65870090+EFFECT_COUNT_CODE_OATH)
e0:SetCondition(c65870090.discon)
e0:SetTarget(c65870090.destg1)
e0:SetOperation(c65870090.desop1)
c:RegisterEffect(e0)
end
function c65870090.cfilter(c)
return c:IsCode(65870015) and c:IsFaceup()
end
function c65870090.excondition(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c65870090.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c65870090.discon(e,tp,eg,ep,ev,re,r,rp)
return (re:IsHasCategory(CATEGORY_DESTROY) or re:IsHasCategory(CATEGORY_TOGRAVE) or re:IsHasCategory(CATEGORY_REMOVE)) and Duel.IsChainDisablable(ev) and rp==1-tp
end
function c65870090.destg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c65870090.desop1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
if c:IsRelateToEffect(e) and c:IsCanTurnSet() and Duel.IsExistingMatchingCard(c65870090.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.SelectEffectYesNo(tp,c,aux.Stringid(65870090,1)) then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
--Protoss·折跃棱镜
function c65870095.initial_effect(c)
aux.AddCodeList(c,65870015)
aux.EnableChangeCode(c,65870015,LOCATION_ONFIELD)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65870095,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,65870095)
e1:SetCost(c65870095.discost)
e1:SetTarget(c65870095.destg)
e1:SetOperation(c65870095.desop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65870095,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,65870095+1)
e2:SetCondition(c65870095.chcon)
e2:SetCost(c65870095.discost)
e2:SetTarget(c65870095.target1)
e2:SetOperation(c65870095.activate1)
c:RegisterEffect(e2)
end
function c65870095.chcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c65870095.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and (c:IsAbleToHandAsCost() or c:IsAbleToExtraAsCost()) and aux.NecroValleyFilter() and c:IsType(TYPE_MONSTER) and (c:IsLocation(LOCATION_MZONE) or c:IsLocation(LOCATION_GRAVE) and c:IsSetCard(0x3a37))
end
function c65870095.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65870095.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c65870095.rfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SendtoHand(g,nil,REASON_COST)
end
function c65870095.destg(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 c65870095.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c65870095.spfilter(c,e,tp)
return c:IsSetCard(0x3a37) and c:IsType(TYPE_MONSTER) and aux.NecroValleyFilter() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c65870095.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65870095.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c65870095.activate1(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,c65870095.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--Protoss·掠夺者
function c65870100.initial_effect(c)
--特招
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,65870100+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c65870100.spcon)
e1:SetTarget(c65870100.sptg)
e1:SetOperation(c65870100.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65870100,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c65870100.discost)
e2:SetCondition(c65870100.chcon)
e2:SetTarget(c65870100.seqtg)
e2:SetOperation(c65870100.seqop)
c:RegisterEffect(e2)
end
function c65870100.chcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c65870100.filter(c)
return c:IsSetCard(0x3a37) and Duel.GetMZoneCount(tp,c,tp)>0 and c:IsAbleToDeckOrExtraAsCost() and c:IsFaceupEx() and c:IsType(TYPE_MONSTER)
end
function c65870100.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c65870100.filter,tp,LOCATION_REMOVED+LOCATION_MZONE+LOCATION_GRAVE,0,2,nil,tp)
end
function c65870100.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c65870100.filter,tp,LOCATION_REMOVED+LOCATION_MZONE+LOCATION_GRAVE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,aux.TRUE,true,2,2,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c65870100.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoDeck(g,nil,2,REASON_SPSUMMON)
g:DeleteGroup()
end
function c65870100.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,c) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,c)
end
function c65870100.desfilter(c)
return not c:IsLocation(LOCATION_SZONE) or c:GetSequence()<5
end
function c65870100.exmzfilter(c,seq)
return c:GetSequence()==seq
end
function c65870100.seqfilter(c,seq,tp)
local loc=LOCATION_MZONE
if seq>=8 then
loc=LOCATION_SZONE
seq=seq-8
end
if seq>=5 and loc==LOCATION_SZONE then return false end
if seq==7 and loc==LOCATION_MZONE then return false end
local cseq=c:GetSequence()
local cloc=c:GetLocation()
if cloc==LOCATION_SZONE and cseq>=5 then return false end
if cloc==LOCATION_MZONE and cseq>=5 and loc==LOCATION_MZONE
and (seq==1 and cseq==5 or seq==3 and cseq==6 or seq==cseq) then return true end
if cloc==LOCATION_MZONE and seq>=5 and loc==LOCATION_MZONE
and Duel.IsExistingMatchingCard(c65870100.exmzfilter,tp,0,LOCATION_MZONE,1,nil,seq) then
return seq==5 and cseq==1 or seq==6 and cseq==3
end
return cseq==seq or seq<5 and cseq<5 and cloc==loc and math.abs(cseq-seq)==1
end
function c65870100.seqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c65870100.desfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function c65870100.seqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local flag=Duel.SelectField(tp,1,0,LOCATION_ONFIELD,filter)
Duel.Hint(HINT_ZONE,tp,flag)
local seq=math.log(flag>>16,2)
local ct=Duel.GetMatchingGroup(c65870100.seqfilter,tp,0,LOCATION_ONFIELD,nil,seq,tp)
Duel.HintSelection(ct)
Duel.Destroy(ct,REASON_EFFECT)
end
\ No newline at end of file
--Protoss·凤凰战机
function c65870105.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65870105,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,65870105)
e1:SetLabelObject(e0)
e1:SetCondition(c65870105.spcon)
e1:SetTarget(c65870105.sptg)
e1:SetOperation(c65870105.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65870105,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_CHANGE_POS)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,65870105)
e2:SetCondition(c65870105.spcon)
e2:SetTarget(c65870105.sptg)
e2:SetOperation(c65870105.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,65870105+1)
e3:SetCondition(c65870105.chcon)
e3:SetTarget(c65870105.destg)
e3:SetOperation(c65870105.desop)
c:RegisterEffect(e3)
end
function c65870105.chcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c65870105.cfilter(c,tp,se)
return c:IsSetCard(0x3a37) and c:IsSummonPlayer(tp) and c:IsFaceup()
end
function c65870105.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c65870105.cfilter,1,nil,tp)
end
function c65870105.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 c65870105.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c65870105.kfilter(c)
return c:IsFaceup()
end
function c65870105.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65870105.kfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE,g,1,0,0)
end
function c65870105.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c65870105.kfilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
if tc:IsFaceup() 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
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_ATTACK_FINAL)
e4:SetValue(0)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
local e5=Effect.CreateEffect(e:GetHandler())
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SET_DEFENSE_FINAL)
e5:SetValue(0)
e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e5)
end
end
\ No newline at end of file
--Protoss·黑暗执政官
function c65870110.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcCodeRep(c,65870030,2,true,true)
aux.AddContactFusionProcedure(c,c65870110.filter,LOCATION_MZONE,0,Duel.SendtoDeck,nil,2,REASON_SPSUMMON)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(65870110,0))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,65870110+1)
e3:SetCondition(c65870110.chcon)
e3:SetTarget(c65870110.destg1)
e3:SetOperation(c65870110.desop1)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65870110,1))
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,65870110)
e2:SetCondition(c65870110.chcon)
e2:SetCost(c65870110.cost)
e2:SetTarget(c65870110.destg)
e2:SetOperation(c65870110.desop)
c:RegisterEffect(e2)
end
function c65870110.filter(c)
return c:IsCode(65870030)
end
function c65870110.chcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
--function c65870110.kfilter(c)
--return (aux.NegateAnyFilter() or c:IsFaceup() and not (c:IsAttack(0) and c:IsDefense(0))) and c:IsType(TYPE_MONSTER)
--end
function c65870110.destg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c65870110.desop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
if tc:IsFaceup() 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
function c65870110.ctfilter(c)
return c:IsAbleToChangeControler()
end
function c65870110.cost(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 c65870110.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65870110.ctfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
function c65870110.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,c65870110.ctfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
Duel.GetControl(g,tp)
end
\ No newline at end of file
--Protoss·海盗船
function c65870115.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,65870115)
e3:SetCondition(c65870115.chcon)
e3:SetTarget(c65870115.destg)
e3:SetOperation(c65870115.desop)
c:RegisterEffect(e3)
end
function c65870115.chcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c65870115.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
end
function c65870115.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e5=Effect.CreateEffect(e:GetHandler())
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_TRIGGER)
e5:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e5)
end
end
\ No newline at end of file
--Protoss·先知
function c65870120.initial_effect(c)
aux.AddLinkProcedure(c,nil,2,3,c65870120.lcheck)
c:EnableReviveLimit()
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,65870120)
e3:SetCondition(c65870120.chcon)
e3:SetTarget(c65870120.destg)
e3:SetOperation(c65870120.desop)
c:RegisterEffect(e3)
end
function c65870120.lfilter(c)
return c:IsLinkSetCard(0x3a37)
end
function c65870120.chcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function c65870120.filter(c)
return c:IsAbleToRemove()
end
function c65870120.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c65870120.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c65870120.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c65870120.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c65870120.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetOperation(c65870120.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c65870120.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
--Protoss·巨像
function c65870125.initial_effect(c)
--连接
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x3a37),2,4)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65870125,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,65870125)
e1:SetTarget(c65870125.thtg)
e1:SetOperation(c65870125.thop)
c:RegisterEffect(e1)
end
function c65870125.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c65870125.thop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
\ No newline at end of file
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