Commit 5a3558dc authored by Nemo Ma's avatar Nemo Ma

rem

parent 7b2757eb
No preview for this file type
--方舟骑士-傀影
function c188861.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(188861,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(c188861.thcost)
e1:SetTarget(c188861.thtg)
e1:SetOperation(c188861.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(c188861.regop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c188861.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c188861.thfilter(c)
return c:IsSetCard(0x17af) and c:IsType(TYPE_MONSTER) and not c:IsCode(188861) and c:IsAbleToHand()
end
function c188861.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c188861.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c188861.thop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c188861.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c188861.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetValue(800)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetValue(c188861.indct)
c:RegisterEffect(e3)
end
function c188861.indct(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
\ No newline at end of file
--三个猎人走上海岸
function c29010008.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_STANDBY_PHASE+TIMING_END_PHASE)
e1:SetTarget(c29010008.target)
e1:SetOperation(c29010008.activate)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c29010008.gravecost)
c:RegisterEffect(e3)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c29010008.handcon)
c:RegisterEffect(e2)
end
function c29010008.handcon(e)
return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_MZONE,0,1,nil,ATTRIBUTE_WATER) and Duel.IsExistingMatchingCard(Card.IsAttribute,tp,0,LOCATION_MZONE,1,nil,ATTRIBUTE_WATER)
end
function c29010008.filter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29010008.ctfil(c)
return c:IsAbleToDeck() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c29010008.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29010008.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)) or (Duel.GetMatchingGroup(Card.IsAttribute,tp,LOCATION_MZONE,0,nil,ATTRIBUTE_WATER):GetClassCount(Card.GetOriginalCode)>=3 and Duel.GetMatchingGroup(c29010008.ctfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil):GetClassCount(Card.GetCode)>=3 and Duel.IsPlayerCanDraw(tp,2)) end
if (Duel.GetMatchingGroup(Card.IsAttribute,tp,LOCATION_MZONE,0,nil,ATTRIBUTE_WATER):GetClassCount(Card.GetOriginalCode)>=3 and Duel.GetMatchingGroup(c29010008.ctfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil):GetClassCount(Card.GetCode)>=3 and Duel.IsPlayerCanDraw(tp,2)) and Duel.SelectYesNo(tp,aux.Stringid(29010008,0)) then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
else
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
end
function c29010008.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()==1 then
g=Duel.GetMatchingGroup(c29010008.ctfil,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if g:GetClassCount(Card.GetCode)<3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
g1=g:SelectSubGroup(tp,aux.dncheck,false,3,3)
Duel.SendtoDeck(g1,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.Draw(tp,2,REASON_EFFECT)
if Duel.GetFlagEffect(tp,29010008)==1 then
c:CancelToGrave()
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ResetFlagEffect(tp,29010008)
end
else
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c29010008.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if Duel.GetFlagEffect(tp,29010008)==1 then
c:CancelToGrave()
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ResetFlagEffect(tp,29010008)
end
end
end
function c29010008.gravecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerAffectedByEffect(tp,29010026) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFlagEffect(tp,29010026)==0 end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.RegisterFlagEffect(tp,29010026,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,29010008,RESET_PHASE+PHASE_END,0,1)
end
--深海的引导
function c29010009.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,29010009+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(TIMING_STANDBY_PHASE+TIMING_END_PHASE)
e1:SetCost(c29010009.cost)
e1:SetTarget(c29010009.target)
e1:SetOperation(c29010009.activate)
c:RegisterEffect(e1)
end
function c29010009.costfilter(c,e,tp)
return c:IsDiscardable() and Duel.IsExistingMatchingCard(c29010009.filter,tp,LOCATION_DECK,0,1,c,e,tp)
end
function c29010009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_COST) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST,nil)
end
function c29010009.filter(c,e,tp)
return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsRace(RACE_FISH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29010009.cfilter(c)
return c:IsSetCard(0x77af) and c:IsType(TYPE_TRAP) and c:IsAbleToHand()
end
function c29010009.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c29010009.filter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c29010009.cfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29010009.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(c29010009.filter,tp,LOCATION_DECK,0,nil,e,tp)
local g2=Duel.GetMatchingGroup(c29010009.cfilter,tp,LOCATION_DECK,0,nil)
if g1:GetCount()<=0 or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local sg=g1:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
if g2:GetCount()<=0 then return end
local dg=g2:Select(tp,1,1,nil)
Duel.SendtoHand(dg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,dg)
end
--方舟之骑士·斯卡蒂
c29010010.named_with_Arknight=1
function c29010010.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010010,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29010010)
e1:SetCondition(c29010010.spcon)
e1:SetTarget(c29010010.sptg)
e1:SetOperation(c29010010.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29010010,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c29010010.thtg)
e2:SetOperation(c29010010.thop)
c:RegisterEffect(e2)
--sp
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,19010010)
e3:SetCondition(c29010010.spcon2)
e3:SetTarget(c29010010.sptg2)
e3:SetOperation(c29010010.spop2)
c:RegisterEffect(e3)
end
function c29010010.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c29010010.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c29010010.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c29010010.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 c29010010.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 c29010010.thfilter(c)
return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsRace(RACE_FISH) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and not c:IsCode(29010010)
end
function c29010010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010010.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c29010010.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29010010.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
end
function c29010010.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY)
end
function c29010010.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c29010010.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
--绝海一战
function c29010012.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c29010012.target)
e1:SetOperation(c29010012.activate)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c29010012.gravecost)
c:RegisterEffect(e3)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c29010012.handcon)
c:RegisterEffect(e2)
end
function c29010012.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c29010012.handcon(e)
return Duel.IsExistingMatchingCard(c29010012.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c29010012.filter,tp,0,LOCATION_MZONE,1,nil)
end
function c29010012.target(e,tp,eg,ep,ev,re,r,rp,chk)
local res=Duel.GetMatchingGroup(c29010012.filter,tp,LOCATION_MZONE,0,nil):GetClassCount(Card.GetOriginalCode)>=3
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_MZONE,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE)
end
function c29010012.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local res=Duel.GetMatchingGroup(c29010012.filter,tp,LOCATION_MZONE,0,nil):GetClassCount(Card.GetOriginalCode)>=3
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end
if res and Duel.SelectYesNo(tp,aux.Stringid(29010012,0)) then
local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(0,LOCATION_ONFIELD)
e1:SetTarget(c29010012.distg)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c29010012.discon)
e2:SetOperation(c29010012.disop)
e2:SetLabelObject(tc)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
tc=g:GetNext()
if Duel.GetFlagEffect(tp,29010012)==1 then
c:CancelToGrave()
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ResetFlagEffect(tp,29010012)
end
end
else
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if Duel.GetFlagEffect(tp,29010012)==1 then
c:CancelToGrave()
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ResetFlagEffect(tp,29010012)
end
end
end
function c29010012.distg(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c29010012.discon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
local rc=re:GetHandler()
return rc:IsControler(1-tp) and rc:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function c29010012.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c29010012.gravecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerAffectedByEffect(tp,29010026) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFlagEffect(tp,29010026)==0 end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.RegisterFlagEffect(tp,29010026,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,29010012,RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
--方舟骑士-斯卡蒂·浊心
c29010013.named_with_Arknight=1
function c29010013.initial_effect(c)
aux.AddCodeList(c,29010010,29010023)
c:SetSPSummonOnce(29010013)
--spsummon proc
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c29010013.hspcon)
e0:SetOperation(c29010013.hspop)
c:RegisterEffect(e0)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c29010013.splimit)
c:RegisterEffect(e1)
--change card name
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c29010013.cgcon)
e2:SetOperation(c29010013.cgop)
c:RegisterEffect(e2)
--Atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER))
e3:SetValue(1000)
c:RegisterEffect(e3)
--Destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c29010013.desreptg)
e4:SetValue(c29010013.desrepval)
e4:SetOperation(c29010013.desrepop)
c:RegisterEffect(e4)
end
--spsummon proc
function c29010013.sprmfil(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER)
end
function c29010013.sprmgck(g)
return g:IsExists(Card.IsCode,1,nil,29010010)
end
function c29010013.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c29010013.sprmfil,tp,LOCATION_GRAVE,0,nil)
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and g:CheckSubGroup(c29010013.sprmgck,2)
end
function c29010013.hspop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.GetMatchingGroup(c29010013.sprmfil,tp,LOCATION_GRAVE,0,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
--spsummon condition
function c29010013.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
--change card name
function c29010013.ckfil(c)
return c:IsOnField() and c:IsType(TYPE_MONSTER)
and not (c:IsAttribute(ATTRIBUTE_WATER) and c:IsCode(29010023))
end
function c29010013.cgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c29010013.ckfil,1,nil)
end
function c29010013.cgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,29010013)
local g=eg:Filter(c29010013.ckfil,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_WATER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29010013,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT)
e2:SetValue(29010023)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
--Destroy replace
function c29010013.repfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
and not c:IsReason(REASON_RULE) and Duel.CheckLPCost(c:GetControler(),800)
end
function c29010013.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c29010013.repfilter,nil)
if chk==0 then return g:GetCount()>0 end
g:KeepAlive()
e:SetLabelObject(g)
return true
end
function c29010013.desrepval(e,c)
return c29010013.repfilter(c)
end
function c29010013.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,29010013)
local g=e:GetLabelObject()
if g:IsExists(Card.IsControler,1,nil,tp) then Duel.PayLPCost(tp,800) end
if g:IsExists(Card.IsControler,1,nil,1-tp) then Duel.PayLPCost(1-tp,800) end
g:DeleteGroup()
end
\ No newline at end of file
--方舟之骑士·幽灵鲨
c29010014.named_with_Arknight=1
function c29010014.initial_effect(c)
--sp summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010014,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,29010014)
e1:SetCondition(c29010014.tgcon)
e1:SetTarget(c29010014.tgtg)
e1:SetOperation(c29010014.tgop)
c:RegisterEffect(e1)
--battle
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29010014,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,19010014)
e2:SetCondition(c29010014.defcon)
e2:SetOperation(c29010014.defop)
c:RegisterEffect(e2)
end
function c29010014.tgcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttribute(ATTRIBUTE_WATER)
end
function c29010014.tgtg(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)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,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 c29010014.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
function c29010014.defcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsControler(1-tp) and bc:IsFaceup() and bc:GetAttack()>0 and Duel.GetFlagEffect(tp,29010014)==0
end
function c29010014.defop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c:IsRelateToBattle() and c:IsFaceup() and bc:IsRelateToBattle() and bc:IsFaceup() and bc:IsControler(1-tp) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e3)
--atklimit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CANNOT_ATTACK)
e4:SetCondition(c29010014.atkcon)
e4:SetLabel(Duel.GetTurnCount())
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e4)
Duel.RegisterFlagEffect(tp,29010014,RESET_PHASE+PHASE_END,0,2)
end
end
function c29010014.atkcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
end
--宛如流星
function c29010016.initial_effect(c)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(c29010016.acon)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010016,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c29010016.dstg)
e1:SetOperation(c29010016.dsop)
c:RegisterEffect(e1)
local e4=e1:Clone()
e4:SetRange(LOCATION_GRAVE)
e4:SetCost(c29010016.gravecost)
c:RegisterEffect(e4)
--Activate(effect)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29010016,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c29010016.negcon)
e2:SetTarget(c29010016.negtg)
e2:SetOperation(c29010016.negop)
c:RegisterEffect(e2)
local e5=e2:Clone()
e5:SetRange(LOCATION_GRAVE)
e5:SetCost(c29010016.gravecost)
c:RegisterEffect(e5)
--Activate(summon)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29010016,2))
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_SUMMON)
e3:SetCondition(c29010016.disscon)
e3:SetTarget(c29010016.disstg)
e3:SetOperation(c29010016.dissop)
c:RegisterEffect(e3)
local e6=e3:Clone()
e6:SetRange(LOCATION_GRAVE)
e6:SetCost(c29010016.gravecost)
c:RegisterEffect(e6)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e4)
local e7=e4:Clone()
e7:SetRange(LOCATION_GRAVE)
e7:SetCost(c29010016.gravecost)
c:RegisterEffect(e7)
end
function c29010016.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c29010016.acon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c29010016.cfilter,0,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c29010016.cfilter,1,LOCATION_MZONE,0,1,nil)
end
function c29010016.dstg(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 c29010016.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,1,nil)
if g:GetCount()>0 then
local dg=g:Select(tp,1,1,nil)
Duel.Destroy(dg,REASON_EFFECT)
if Duel.GetFlagEffect(tp,29010016)==1 then
c:CancelToGrave()
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ResetFlagEffect(tp,29010016)
end
end
end
function c29010016.excon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29010016.cfilter,tp,LOCATION_MZONE,0,nil)
return g:GetClassCount(Card.GetOriginalCodeRule)>=3
end
function c29010016.negcon(e,tp,eg,ep,ev,re,r,rp)
return c29010016.excon(e,tp) and (re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)) and Duel.IsChainNegatable(ev) and rp==1-tp
end
function c29010016.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c29010016.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
if Duel.GetFlagEffect(tp,29010016)==1 then
c:CancelToGrave()
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ResetFlagEffect(tp,29010016)
end
end
end
function c29010016.disscon(e,tp,eg,ep,ev,re,r,rp)
return c29010016.excon(e,tp) and Duel.GetCurrentChain()==0 and eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp)
end
function c29010016.disstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c29010016.dissop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
if Duel.GetFlagEffect(tp,29010016)==1 then
c:CancelToGrave()
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ResetFlagEffect(tp,29010016)
end
end
function c29010016.gravecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerAffectedByEffect(tp,29010026) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFlagEffect(tp,29010026)==0 end
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.RegisterFlagEffect(tp,29010026,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,29010016,RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
--方舟骑士-歌蕾蒂娅 29010017 29010016
c29010017.named_with_Arknight=1
function c29010017.initial_effect(c)
aux.AddCodeList(c,29010009)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010017,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,29010017)
e1:SetTarget(c29010017.thtg)
e1:SetOperation(c29010017.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--control
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_CONTROL)
e3:SetDescription(aux.Stringid(29010017,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c29010017.target)
e3:SetOperation(c29010017.operation)
c:RegisterEffect(e3)
--recover
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29010017,0))
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c29010017.rctg)
e4:SetOperation(c29010017.rcop)
c:RegisterEffect(e4)
end
function c29010017.thfilter(c)
return c:IsSetCard(0x77af) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c29010017.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010017.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29010017.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29010017.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c29010017.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()~=tp and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c29010017.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
function c29010017.ckfil(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c29010017.rctg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=Duel.GetMatchingGroupCount(c29010017.ckfil,tp,LOCATION_MZONE,0,nil)
if chk==0 then return rc>0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(rc*500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rc*500)
end
function c29010017.rcop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--方舟之骑士·巫恋
function c29010019.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2)
c:EnableReviveLimit()
--token
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,29010019)
e1:SetTarget(c29010019.sptg)
e1:SetOperation(c29010019.spop)
c:RegisterEffect(e1)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(c29010019.adtg)
e2:SetValue(-1500)
c:RegisterEffect(e2)
--double
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetCondition(c29010019.damcon)
e3:SetOperation(c29010019.damop)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(c29010019.eftg)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function c29010019.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,29010020,0,0x4011,0,0,5,RACE_SPELLCASTER,ATTRIBUTE_DARK) and e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c29010019.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,29010020,0,0x4011,0,0,5,RACE_SPELLCASTER,ATTRIBUTE_DARK) then return end
local token=Duel.CreateToken(tp,29010020)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP)
--cannot be battle target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetValue(aux.imval1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetLabelObject(c)
e3:SetCondition(c29010019.decon)
e3:SetOperation(c29010019.deop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e3)
--
local e4=e3:Clone()
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1)
e4:SetCondition(c29010019.decon1)
token:RegisterEffect(e4)
Duel.SpecialSummonComplete()
end
function c29010019.decon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetLabelObject())
end
function c29010019.decon1(e,tp,eg,ep,ev,re,r,rp)
return true
end
function c29010019.deop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Destroy(c,REASON_EFFECT)
end
function c29010019.ckfil(c,seq)
return math.abs(seq-c:GetSequence())==1 or ((c:GetSequence()==5 and seq==3) or (c:GetSequence()==6 and seq==1))
end
function c29010019.adtg(e,c)
local tp=e:GetHandlerPlayer()
local g1=Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,LOCATION_MZONE,nil,29010020)
local g2=Group.CreateGroup()
local tc=g1:GetFirst()
while tc do
local seq=tc:GetSequence()
local g3=Duel.GetMatchingGroup(c29010019.ckfil,tp,0,LOCATION_MZONE,nil,seq)
g2:Merge(g3)
tc=g1:GetNext()
end
return g2:IsContains(c)
end
function c29010019.eftg(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c29010019.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ep==c:GetOwner() and c:IsRelateToBattle() and (c:IsAttackBelow(c:GetBaseAttack()) or c:IsDefenseBelow(c:GetBaseDefense()))
end
function c29010019.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2)
end
--诅咒娃娃衍生物
function c29010020.initial_effect(c)
end
--荒败之城 盐风
function c29010022.initial_effect(c)
aux.AddCodeList(c,29010023)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,29010022+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c29010022.activate)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetTarget(c29010022.totg)
e1:SetOperation(c29010022.toop)
c:RegisterEffect(e1)
end
function c29010022.filter(c)
return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsRace(RACE_FISH) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c29010022.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29010022.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(29010022,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 c29010022.totg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,29010025,nil,TYPES_TOKEN_MONSTER,1500,1500,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c29010022.toop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,29010025,nil,TYPES_TOKEN_MONSTER,1500,1500,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,1-tp) then return end
local token=Duel.CreateToken(tp,29010025)
Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
token:RegisterEffect(e2,true)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
token:RegisterEffect(e3,true)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
token:RegisterEffect(e4,true)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e5,true)
Duel.SpecialSummonComplete()
end
function c29010022.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c29010022.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29010022.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29010022.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 c29010022.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c29010022.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
--深海歌者 斯卡蒂
local m=29010024
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddCodeList(c,22702055)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--change name
aux.EnableChangeCode(c,29010010,LOCATION_HAND+LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE)
end
function cm.spcheck(c,e)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spcheck,tp,LOCATION_HAND,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.cfilter(c)
return c:IsCode(22702055) and c:IsAbleToHand()
end
function cm.operation(e,tp)
local tc=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spcheck,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsSetCard(0x87af) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
local g2=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
\ No newline at end of file
--海嗣衍生物
function c29010025.initial_effect(c)
end
--方舟骑士-幽灵鲨·归溟
c29010026.named_with_Arknight=1
function c29010026.initial_effect(c)
aux.AddCodeList(c,29010028)
c:EnableReviveLimit()
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c29010026.damcon)
e2:SetOperation(c29010026.damop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--flag
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(29010026)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(1,0)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCondition(c29010026.regcon1)
e5:SetOperation(c29010026.regop1)
c:RegisterEffect(e5)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29010026,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,29010026)
e3:SetCondition(c29010026.spcon2)
e3:SetTarget(c29010026.sptg2)
e3:SetOperation(c29010026.spop2)
c:RegisterEffect(e3)
end
function c29010026.cfilter(c,tp)
return c:IsSummonPlayer(tp)
end
function c29010026.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(c29010026.cfilter,1,nil,1-tp)
end
function c29010026.damop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
Duel.Hint(HINT_CARD,0,29010026)
Duel.Damage(1-tp,200*ct,REASON_EFFECT)
end
function c29010026.regcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and rp==1-tp and c:IsPreviousControler(tp)
end
function c29010026.regop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(29010027,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c29010026.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(29010027)>0
end
function c29010026.sptg2(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,tp,LOCATION_GRAVE)
end
function c29010026.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--起舞的深海猎人
function c29010028.initial_effect(c)
aux.AddCodeList(c,29010026,29010014,22702055)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,29010028+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c29010028.con)
e1:SetTarget(c29010028.tg)
e1:SetOperation(c29010028.act)
c:RegisterEffect(e1)
end
function c29010028.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(22702055)
end
function c29010028.mfilter(c)
return c:IsReleasable() and c:IsCode(29010014)
end
function c29010028.rfilter(c)
return c:IsCode(29010026)
end
function c29010028.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(e:GetLabel()) and chkc:IsControler(tp) and c29010028.mfilter(chkc) end
if chk==0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
local loc=LOCATION_HAND+LOCATION_MZONE
if ft==0 then loc=LOCATION_MZONE end
return Duel.IsExistingMatchingCard(c29010028.mfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c29010028.rfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c29010028.act(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
local loc=LOCATION_HAND+LOCATION_MZONE
if ft==0 then loc=LOCATION_MZONE end
local g1=Duel.SelectMatchingCard(tp,c29010028.mfilter,tp,loc,0,1,1,nil)
if g1 then
Duel.Release(g1,REASON_EFFECT)
end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c29010028.rfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
c29010038.named_with_Arknight=1
function c29010038.initial_effect(c)
aux.AddCodeList(c,29010010,29010023)
c:SetSPSummonOnce(29010013)
--spsummon proc
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c29010038.hspcon)
e0:SetOperation(c29010038.hspop)
c:RegisterEffect(e0)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c29010038.splimit)
c:RegisterEffect(e1)
--change card name
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c29010038.cgcon)
e2:SetOperation(c29010038.cgop)
c:RegisterEffect(e2)
--Atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER))
e3:SetValue(1000)
c:RegisterEffect(e3)
--Destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(c29010038.desreptg)
e4:SetValue(c29010038.desrepval)
e4:SetOperation(c29010038.desrepop)
c:RegisterEffect(e4)
end
--spsummon proc
function c29010038.sprmfil(c)
return c:IsAbleToRemove() and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER)
end
function c29010038.sprmgck(g)
return g:IsExists(Card.IsCode,1,nil,29010010)
end
function c29010038.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c29010038.sprmfil,tp,LOCATION_GRAVE,0,nil)
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and g:CheckSubGroup(c29010038.sprmgck,2)
end
function c29010038.hspop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.GetMatchingGroup(c29010038.sprmfil,tp,LOCATION_GRAVE,0,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
--spsummon condition
function c29010038.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
--change card name
function c29010038.ckfil(c)
return c:IsOnField() and c:IsType(TYPE_MONSTER)
and not (c:IsAttribute(ATTRIBUTE_WATER) and c:IsCode(29010023))
end
function c29010038.cgcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c29010038.ckfil,1,nil)
end
function c29010038.cgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,29010038)
local g=eg:Filter(c29010038.ckfil,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_WATER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29010038,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CLIENT_HINT)
e2:SetValue(29010023)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
--Destroy replace
function c29010038.repfilter(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
and not c:IsReason(REASON_RULE) and Duel.CheckLPCost(c:GetControler(),800)
end
function c29010038.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(c29010038.repfilter,nil)
if chk==0 then return g:GetCount()>0 end
g:KeepAlive()
e:SetLabelObject(g)
return true
end
function c29010038.desrepval(e,c)
return c29010038.repfilter(c)
end
function c29010038.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,29010038)
local g=e:GetLabelObject()
if g:IsExists(Card.IsControler,1,nil,tp) then Duel.PayLPCost(tp,800) end
if g:IsExists(Card.IsControler,1,nil,1-tp) then Duel.PayLPCost(1-tp,800) end
g:DeleteGroup()
end
\ No newline at end of file
--猩红剧团「猩红血钻」
function c29010200.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(c29010200.spcon)
e0:SetOperation(c29010200.spop)
c:RegisterEffect(e0)
--damage up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetCondition(c29010200.rdcon)
e2:SetOperation(c29010200.damop)
c:RegisterEffect(e2)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
--dis
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c29010200.distg)
e3:SetOperation(c29010200.disop)
c:RegisterEffect(e3)
end
function c29010200.spfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER)
end
function c29010200.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29010200.spfilter,tp,LOCATION_GRAVE,0,5,nil)
end
function c29010200.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g23=Duel.SelectMatchingCard(tp,c29010200.spfilter,tp,LOCATION_GRAVE,0,5,5,nil)
Duel.Remove(g23,POS_FACEUP,REASON_COST)
end
function c29010200.rdcon(e)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
return Duel.GetAttackTarget()==nil
end
function c29010200.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev+3000)
end
function c29010200.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,1-tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,1-tp,LOCATION_MZONE)
end
function c29010200.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
local tc=g:Select(tp,1,1,nil):GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
Duel.BreakEffect()
local dg=Duel.GetMatchingGroup(Card.IsDisabled,tp,0,LOCATION_MZONE,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
--猩红剧团「绯红歌伶」
function c29010201.initial_effect(c)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29010201,2))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTarget(c29010201.tg)
e4:SetOperation(c29010201.op)
c:RegisterEffect(e4)
if not c29010201.global_check then
c29010201.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c29010201.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c29010201.filter(c)
return c:IsSetCard(0x17af) and c:IsType(TYPE_MONSTER)
end
function c29010201.thfilter1(c)
return c:IsSetCard(0x17af) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c29010201.thfilter2(c)
return c:IsCode(29010200)
end
function c29010201.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c29010201.filter,tp,LOCATION_GRAVE,0,nil)
local con1,con3,con5=nil
if ct>=1 then
con1=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
end
if ct>=3 then
con3=Duel.IsExistingMatchingCard(c29010201.thfilter1,tp,LOCATION_DECK,0,1,nil)
end
if ct>=5 then
con5=Duel.IsExistingMatchingCard(c29010201.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
end
if chk==0 then return con1 or con3 or con5 end
local cat=0
if ct>=1 then cat=cat+CATEGORY_ATKCHANGE end
if ct>=3 then cat=cat+CATEGORY_SEARCH end
if ct>=5 then cat=cat+CATEGORY_SEARCH+CATEGORY_TOHAND end
e:SetCategory(cat)
end
function c29010201.op(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c29010201.filter,tp,LOCATION_GRAVE,0,nil)
if ct>=1 then
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
if ct>=3 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c29010201.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
if ct>=5 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c29010201.thfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g3:GetCount()<=0 then return end
if g3:GetCount()>0 then
Duel.SendtoHand(g3,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g3)
end
Duel.ResetFlagEffect(tp,29010201)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetCondition(c29010201.discon)
e1:SetValue(c29010201.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c29010201.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function c29010201.discon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFlagEffect(tp,29010201)==0
end
function c29010201.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(Card.IsCode,1,nil,29010200) then
Duel.RegisterFlagEffect(rp,29010201,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
--猩红剧团「骇笑看客」
function c29010202.initial_effect(c)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29010202,2))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTarget(c29010202.tg)
e4:SetOperation(c29010202.op)
c:RegisterEffect(e4)
if not c29010202.global_check then
c29010202.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c29010202.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c29010202.filter(c)
return c:IsSetCard(0x17af) and c:IsType(TYPE_MONSTER)
end
function c29010202.thfilter1(c)
return c:IsSetCard(0x17af) and c:IsType(TYPE_MONSTER) and not c:IsCode(29010202) and c:IsLevelBelow(7) and c:IsAbleToGrave()
end
function c29010202.thfilter2(c)
return c:IsCode(29010200)
end
function c29010202.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c29010202.filter,tp,LOCATION_GRAVE,0,nil)
local con1,con3,con5=nil
if ct>=1 then
con1=Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
end
if ct>=3 then
con3=Duel.IsExistingMatchingCard(c29010202.thfilter1,tp,LOCATION_DECK,0,1,nil)
end
if ct>=5 then
con5=Duel.IsExistingMatchingCard(c29010202.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
end
if chk==0 then return con1 or con3 or con5 end
local cat=0
if ct>=1 then cat=cat+CATEGORY_DISABLE end
if ct>=3 then cat=cat+CATEGORY_TOGRAVE end
if ct>=5 then cat=cat+CATEGORY_SEARCH+CATEGORY_TOHAND end
e:SetCategory(cat)
end
function c29010202.op(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c29010202.filter,tp,LOCATION_GRAVE,0,nil)
if ct>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
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(e:GetHandler())
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)
end
end
if ct>=3 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c29010202.thfilter1,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoGrave(g2,REASON_EFFECT)
end
end
if ct>=5 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c29010202.thfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g3:GetCount()<=0 then return end
if g3:GetCount()>0 then
Duel.SendtoHand(g3,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g3)
end
Duel.ResetFlagEffect(tp,29010202)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetCondition(c29010202.discon)
e1:SetValue(c29010202.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c29010202.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function c29010202.discon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFlagEffect(tp,29010202)==0
end
function c29010202.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(Card.IsCode,1,nil,29010200) then
Duel.RegisterFlagEffect(rp,29010202,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
--猩红剧团「伤心的大锁」
function c29010204.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_HAND)
e0:SetCondition(c29010204.spcon)
e0:SetOperation(c29010204.spop)
c:RegisterEffect(e0)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c29010204.sptg1)
e1:SetOperation(c29010204.spop1)
c:RegisterEffect(e1)
--Damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(c29010204.regop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(90673288,0))
e3:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c29010204.dacon)
e3:SetTarget(c29010204.datg)
e3:SetOperation(c29010204.daop)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c29010204.spfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER)
end
function c29010204.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29010204.spfilter,tp,LOCATION_GRAVE,0,5,nil)
end
function c29010204.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g23=Duel.SelectMatchingCard(tp,c29010204.spfilter,tp,LOCATION_GRAVE,0,5,5,nil)
Duel.Remove(g23,POS_FACEUP,REASON_COST)
end
function c29010204.spfil(c,e,tp)
return c:IsSetCard(0x17af) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29010204.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010204.spfil,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c29010204.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c29010204.spfil,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x17af))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c29010204.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(29010204,RESET_EVENT+RESETS_STANDARD,0,1,Duel.GetTurnCount())
end
function c29010204.dacon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffectLabel(29010204)~=nil and e:GetHandler():GetFlagEffectLabel(29010204)~=Duel.GetTurnCount() and Duel.GetTurnPlayer()==tp
end
function c29010204.datg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGrave() end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(3000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,3000)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
function c29010204.daop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
end
--剧团舞台 布莱克拉松古堡
function c29010206.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--xx
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetTarget(c29010206.xxtg)
e2:SetOperation(c29010206.xxop)
c:RegisterEffect(e2)
end
function c29010206.thfil(c)
return c:IsSetCard(0x17af) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c29010206.gck(g)
return g:GetClassCount(Card.GetCode)==2
end
function c29010206.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c29010206.thfil,tp,LOCATION_DECK,0,nil)
if chk==0 then return g:CheckSubGroup(c29010206.gck,2,2) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c29010206.xxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c29010206.thfil,tp,LOCATION_DECK,0,nil)
if g:CheckSubGroup(c29010206.gck,2,2) then
local sg=g:SelectSubGroup(tp,c29010206.gck,false,2,2)
local tc1=sg:RandomSelect(1-tp,1):GetFirst()
local tc2=sg:Filter(aux.TRUE,tc1):GetFirst()
Duel.SendtoHand(tc1,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc1)
Duel.SendtoGrave(tc2,REASON_EFFECT)
end
end
--解脱?
function c29010207.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,29010207+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c29010207.cost)
e1:SetOperation(c29010207.operation)
c:RegisterEffect(e1)
--xx
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_SEND_REPLACE)
e2:SetTarget(c29010207.reptg)
e2:SetValue(c29010207.repval)
c:RegisterEffect(e2)
end
function c29010207.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c29010207.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c29010207.drcon)
e1:SetOperation(c29010207.drop)
if Duel.GetCurrentPhase()<=PHASE_STANDBY then
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
end
Duel.RegisterEffect(e1,tp)
end
function c29010207.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.IsPlayerCanDraw(tp,2) and Duel.GetTurnPlayer()==tp
end
function c29010207.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,29010207)
if Duel.SelectYesNo(tp,aux.Stringid(29010207,0)) then
Duel.Draw(tp,2,REASON_EFFECT)
end
end
function c29010207.repfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_DECK) and c:GetDestination()==LOCATION_HAND and c:IsCode(29010200)
end
function c29010207.thfil(c)
return c:IsAbleToHand() and c:IsCode(29010204)
end
function c29010207.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return bit.band(r,REASON_EFFECT)~=0 and re and eg:IsExists(c29010207.repfilter,1,nil,tp) and Duel.IsExistingMatchingCard(c29010207.thfil,tp,LOCATION_DECK,0,1,nil) and e:GetHandler():GetFlagEffect(29010207)==0 end
if Duel.SelectYesNo(tp,aux.Stringid(29010207,1)) then
e:GetHandler():RegisterFlagEffect(29010207,RESET_EVENT+RESETS_STANDARD,0,1)
local g=eg:Filter(c29010207.repfilter,nil,tp)
local ct=g:GetCount()
if ct>1 then
g=g:Select(tp,1,ct,nil)
end
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TO_HAND_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(LOCATION_GRAVE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
local g1=Duel.GetMatchingGroup(c29010207.thfil,tp,LOCATION_DECK,0,nil)
local sg=g1:Select(tp,1,ct,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
return true
else return false end
end
function c29010207.repval(e,c)
return false
end
--解脱
function c29010208.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c29010208.cost)
c:RegisterEffect(e1)
end
function c29010208.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0
end
function c29010208.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c29010208.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c29010208.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
\ No newline at end of file
--猩红剧团「剧场组装体」
function c29010209.initial_effect(c)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29010209,2))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTarget(c29010209.tg)
e4:SetOperation(c29010209.op)
c:RegisterEffect(e4)
if not c29010209.global_check then
c29010209.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c29010209.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c29010209.filter(c)
return c:IsSetCard(0x17af) and c:IsType(TYPE_MONSTER)
end
function c29010209.thfilter1(c,e,tp)
return (c:IsSetCard(0x17af) and c:IsType(TYPE_MONSTER) and not c:IsCode(29010209) and c:IsLevelBelow(7))
end
function c29010209.thfilter2(c)
return c:IsCode(29010200)
end
function c29010209.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(c29010209.filter,tp,LOCATION_GRAVE,0,nil)
local con1,con3,con5=nil
if ct>=1 then
con1=Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil)
end
if ct>=3 then
con3=Duel.IsExistingMatchingCard(c29010209.thfilter1,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end
if ct>=5 then
con5=Duel.IsExistingMatchingCard(c29010209.thfilter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
end
if chk==0 then return con1 or con3 or con5 end
local cat=0
if ct>=1 then cat=cat+CATEGORY_DESTROY end
if ct>=3 then cat=cat+CATEGORY_SPECIAL_SUMMON end
if ct>=5 then cat=cat+CATEGORY_SEARCH+CATEGORY_TOHAND end
e:SetCategory(cat)
end
function c29010209.op(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c29010209.filter,tp,LOCATION_GRAVE,0,nil)
if ct>=1 then
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
if ct>=3 then
Duel.BreakEffect()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c29010209.thfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g1:GetCount()>0 then
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
end
if ct>=5 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c29010209.thfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g3:GetCount()<=0 then return end
if g3:GetCount()>0 then
Duel.SendtoHand(g3,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g3)
end
Duel.ResetFlagEffect(tp,29010209)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetCondition(c29010209.discon)
e1:SetValue(c29010209.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c29010209.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
function c29010209.discon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFlagEffect(tp,29010209)==0
end
function c29010209.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(Card.IsCode,1,nil,29010200) then
Duel.RegisterFlagEffect(rp,29010209,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
--方舟骑士-暮落
function c29010211.initial_effect(c)
--defense attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DEFENSE_ATTACK)
e1:SetValue(1)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29010211,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,29010211)
e2:SetCost(c29010211.thcost)
e2:SetTarget(c29010211.thtg)
e2:SetOperation(c29010211.thop)
c:RegisterEffect(e2)
end
function c29010211.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c29010211.thfilter1(c)
return c:IsCode(29010206) and c:IsAbleToHand()
end
function c29010211.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c29010211.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29010211.thop(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetFirstMatchingCard(c29010211.thfilter1,tp,LOCATION_DECK,0,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
\ No newline at end of file
--猩红剧团舞会终场
function c29010212.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,29010212+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c29010212.cost)
e1:SetCondition(c29010212.condition)
e1:SetTarget(c29010212.target)
e1:SetOperation(c29010212.activate)
c:RegisterEffect(e1)
end
function c29010212.costfilter(c)
return c:IsSetCard(0x17af)
end
function c29010212.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c29010212.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c29010212.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c29010212.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c29010212.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function c29010212.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c29010212.activate(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
ec:CancelToGrave()
Duel.SendtoDeck(ec,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
--
function c29010213.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,29010213+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c29010213.actg)
e1:SetOperation(c29010213.acop)
c:RegisterEffect(e1)
end
function c29010213.ctfil(c)
return c:IsAbleToDeckAsCost() and c:IsSetCard(0x17af)
end
function c29010213.gck(g,e,tp)
return Duel.IsExistingTarget(c29010213.spfil,tp,LOCATION_GRAVE,0,1,g,e,tp)
end
function c29010213.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29010213.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(c29010213.ctfil,tp,LOCATION_REMOVED,0,nil)
if chk==0 then return g:CheckSubGroup(c29010213.gck,5,5,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
local dg=g:SelectSubGroup(tp,c29010213.gck,false,5,5,e,tp)
Duel.SendtoDeck(dg,nil,2,REASON_COST)
local sg=Duel.SelectTarget(tp,c29010213.spfil,tp,LOCATION_GRAVE,0,1,1,dg,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,1,0,0)
end
function c29010213.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
if Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(29010213,0)) then
local sg=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.GetControl(sg,tp)
end
end
end
\ No newline at end of file
--唤醒石像
function c29010218.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,29010218+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c29010218.condition)
e1:SetTarget(c29010218.target)
e1:SetOperation(c29010218.activate)
c:RegisterEffect(e1)
end
function c29010218.checkfilter(c)
return c:IsType(TYPE_MONSTER)
end
function c29010218.condition(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(c29010218.checkfilter,tp,0,LOCATION_MZONE,1,nil) then return true end
return Duel.GetTurnPlayer()~=tp
end
function c29010218.filter(c,e,tp)
return c:IsSetCard(0x17af) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29010218.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c29010218.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c29010218.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c29010218.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c29010218.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(1000)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_UPDATE_DEFENSE)
e4:SetValue(1000)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
end
end
\ No newline at end of file
--虚妄之心罪·格雷特
function c29010401.initial_effect(c)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010401,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c29010401.spcon)
e1:SetTarget(c29010401.sptg)
e1:SetOperation(c29010401.spop)
c:RegisterEffect(e1)
--sp 2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,29010401)
e2:SetCondition(c29010401.xspcon)
e2:SetTarget(c29010401.xsptg)
e2:SetOperation(c29010401.xspop)
c:RegisterEffect(e2)
end
function c29010401.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c29010401.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x7a1) and not c:IsCode(29010401)
end
function c29010401.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010401.spfil,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c29010401.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c29010401.spfil,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
function c29010401.cfilter(c,tp,rp)
return c:IsPreviousControler(tp) and bit.band(c:GetPreviousTypeOnField(),TYPE_MONSTER)~=0
and c:IsPreviousSetCard(0x7a1) and not c:IsPreviousSetCard(0x17a1) and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT)))
end
function c29010401.xspcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c29010401.cfilter,1,nil,tp,rp) and not eg:IsContains(e:GetHandler())
end
function c29010401.xsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c29010401.xspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
--心罪解放·生灵凝集
function c29010403.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010403,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c29010403.target)
e1:SetOperation(c29010403.activate)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010403,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c29010403.sctg)
e1:SetOperation(c29010403.scop)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010403,2))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetTarget(c29010403.xyztg)
e1:SetOperation(c29010403.xyzop)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010403,3))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c29010403.lktg)
e1:SetOperation(c29010403.lkop)
c:RegisterEffect(e1)
end
function c29010403.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function c29010403.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x7a1) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c29010403.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(c29010403.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c29010403.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c29010403.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c29010403.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(c29010403.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c29010403.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c29010403.scfil(c)
return c:IsSetCard(0x7a1) and c:IsSynchroSummonable(nil)
end
function c29010403.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010403.scfil,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c29010403.scop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29010403.scfil,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
function c29010403.xyzfilter(c)
return c:IsXyzSummonable(nil) and c:IsSetCard(0x7a1)
end
function c29010403.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010403.xyzfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c29010403.xyzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c29010403.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
Duel.XyzSummon(tp,tg:GetFirst(),nil)
end
end
function c29010403.lkfil(c)
return c:IsLinkSummonable(nil) and c:IsSetCard(0x7a1)
end
function c29010403.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010403.lkfil,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c29010403.lkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c29010403.lkfil,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.LinkSummon(tp,tc,nil)
end
end
--虚妄之心罪·刚神之利刃
function c29010404.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,c29010404.matfilter1,c29010404.matfilter2,1,1,true)
--ds
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010404,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c29010404.dscon)
e1:SetTarget(c29010404.dstg)
e1:SetOperation(c29010404.dsop)
c:RegisterEffect(e1)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29010404,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,29010404)
e3:SetCondition(c29010404.spcon)
e3:SetTarget(c29010404.sptg)
e3:SetOperation(c29010404.spop)
c:RegisterEffect(e3)
end
function c29010404.matfilter1(c)
return c:IsSetCard(0x7a1)
end
function c29010404.matfilter2(c)
return c:GetAttackAnnouncedCount()>0
end
function c29010404.dscon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c29010404.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c29010404.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
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(e:GetHandler())
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)
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.Destroy(tc,REASON_EFFECT)
tc=g:GetNext()
end
end
function c29010404.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c29010404.spfilter(c,e,tp)
return c:IsSetCard(0x7a1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29010404.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29010404.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c29010404.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c29010404.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--虚妄之心罪·纯神之奏者
function c29010405.initial_effect(c)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010405,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,29010405)
e1:SetCondition(c29010405.atkcon)
e1:SetCost(c29010405.atkcost)
e1:SetTarget(c29010405.atktg)
e1:SetOperation(c29010405.atkop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29010405,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,19010405)
e2:SetCondition(c29010405.discon)
e2:SetTarget(c29010405.distg)
e2:SetOperation(c29010405.disop)
c:RegisterEffect(e2)
end
function c29010405.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end
function c29010405.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c29010405.atkfil(c)
return c:IsSetCard(0x7a1) and c:IsFaceup()
end
function c29010405.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c29010405.atkfil,tp,LOCATION_MZONE,0,1,nil) end
end
function c29010405.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c29010405.atkfil,tp,LOCATION_MZONE,0,nil)
if g:GetCount()<=0 then return end
local tc=g:Select(tp,1,1,nil):GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLED)
e1:SetCondition(c29010405.catkcon)
e1:SetOperation(c29010405.catkop)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
function c29010405.catkcon(e,tp,eg,ep,ev,re,r,rp)
return aux.bdocon(e,tp,eg,ep,ev,re,r,rp) and e:GetHandler():IsChainAttackable()
end
function c29010405.catkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,29010405)
Duel.ChainAttack()
end
function c29010405.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainNegatable(ev)
end
function c29010405.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.ndcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
end
function c29010405.disop(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler()
if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then
ec:CancelToGrave()
Duel.SendtoDeck(ec,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
--虚妄之心罪·虑神之箭矢
function c29010406.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--rm
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010401,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c29010406.rmcon)
e1:SetTarget(c29010406.rmtg)
e1:SetOperation(c29010406.rmop)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(c29010406.efilter)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29010406,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,29010406)
e3:SetCondition(c29010406.spcon)
e3:SetTarget(c29010406.sptg)
e3:SetOperation(c29010406.spop)
c:RegisterEffect(e3)
end
function c29010406.rmcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c29010406.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD+LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD+LOCATION_HAND)
end
function c29010406.rmop(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(29010406,3),aux.Stringid(29010406,4))==0) then
g=hg:RandomSelect(tp,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
end
if g:GetCount()~=0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
end
function c29010406.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c29010406.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c29010406.spfilter(c,e,tp)
return c:IsSetCard(0x7a1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29010406.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29010406.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c29010406.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c29010406.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--囚笼的图书馆
function c29010407.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,29010407+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--must attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_MUST_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x7a1))
c:RegisterEffect(e2)
--excavate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29010407,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetTarget(c29010407.thtg)
e3:SetOperation(c29010407.thop)
c:RegisterEffect(e3)
end
function c29010407.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=10 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c29010407.thfilter(c)
return c:IsSetCard(0x7a1) and c:IsAbleToHand()
end
function c29010407.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.ConfirmDecktop(tp,10)
local g=Duel.GetDecktopGroup(tp,10)
if g:GetCount()>0 then
if g:IsExists(c29010407.thfilter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(29010407,2)) then
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,c29010407.thfilter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end
Duel.ShuffleDeck(tp)
end
end
--“作者”
function c29010408.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,29010408+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c29010408.target)
e1:SetOperation(c29010408.activate)
c:RegisterEffect(e1)
end
function c29010408.filter(c)
return c:IsSetCard(0x7a1) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c29010408.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010408.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29010408.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29010408.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(29010408,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x7a1))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--束缚之心罪·爱丽丝
function c29010409.initial_effect(c)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010409,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c29010409.spcon)
e1:SetTarget(c29010409.sptg)
e1:SetOperation(c29010409.spop)
c:RegisterEffect(e1)
--sp 2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,29010409)
e2:SetCondition(c29010409.xspcon)
e2:SetTarget(c29010409.xsptg)
e2:SetOperation(c29010409.xspop)
c:RegisterEffect(e2)
end
function c29010409.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c29010409.spfil(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0x7a1)
end
function c29010409.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010409.spfil,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c29010409.tgfil(c)
return c:IsSetCard(0x7a1) and c:IsAbleToGrave()
end
function c29010409.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c29010409.spfil,tp,LOCATION_HAND,0,nil,e,tp)
if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
if Duel.IsExistingMatchingCard(c29010409.tgfil,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(29010409,0)) then
local dg=Duel.SelectMatchingCard(tp,c29010409.tgfil,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(dg,REASON_EFFECT)
end
end
end
function c29010409.cfilter(c,tp,rp)
return c:IsPreviousControler(tp) and bit.band(c:GetPreviousTypeOnField(),TYPE_MONSTER)~=0
and c:IsPreviousSetCard(0x7a1) and not c:IsPreviousSetCard(0x27a1) and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT)))
end
function c29010409.xspcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c29010409.cfilter,1,nil,tp,rp) and not eg:IsContains(e:GetHandler())
end
function c29010409.xsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c29010409.xspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
--正义之心罪·白雪公主
function c29010410.initial_effect(c)
--th
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010410,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c29010410.thcon)
e1:SetTarget(c29010410.thtg)
e1:SetOperation(c29010410.thop)
c:RegisterEffect(e1)
--sp 2
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,29010410)
e2:SetCondition(c29010410.xspcon)
e2:SetTarget(c29010410.xsptg)
e2:SetOperation(c29010410.xspop)
c:RegisterEffect(e2)
end
function c29010410.thcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c29010410.thfil(c)
return c:IsSetCard(0x7a1) and c:IsAbleToGrave()
end
function c29010410.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29010410.thfil,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_GRAVE)
end
function c29010410.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c29010410.thfil,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()<=0 then return end
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
if Duel.IsExistingMatchingCard(Card.IsSummonable,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,true,nil)
and Duel.SelectYesNo(tp,aux.Stringid(29010410,2)) then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,Card.IsSummonable,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,true,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
function c29010410.cfilter(c,tp,rp)
return c:IsPreviousControler(tp) and bit.band(c:GetPreviousTypeOnField(),TYPE_MONSTER)~=0
and c:IsPreviousSetCard(0x7a1) and not c:IsPreviousSetCard(0x37a1) and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT)))
end
function c29010410.xspcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c29010410.cfilter,1,nil,tp,rp) and not eg:IsContains(e:GetHandler())
end
function c29010410.xsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c29010410.xspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
--束缚之心罪·傲狮之半梦魇
function c29010411.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--xyz
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_CHAINING)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c29010411.xyzcon)
e0:SetOperation(c29010411.xyzop)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29010411,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c29010411.drcon)
e1:SetCost(c29010411.drcost)
e1:SetTarget(c29010411.drtg)
e1:SetOperation(c29010411.drop)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c29010411.imcon)
e2:SetValue(c29010411.efilter)
c:RegisterEffect(e2)
end
function c29010411.xyzcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetOwner()
local ph=Duel.GetCurrentPhase()
local g=Duel.GetMatchingGroup(Card.IsCanBeXyzMaterial,tp,LOCATION_MZONE,0,nil,c):Filter(Card.IsXyzLevel,nil,c,4)
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) and Duel.GetFlagEffect(tp,29010411)==0 and rc:IsSetCard(0x7a1) and rp==tp and g:GetCount()>=2 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c29010411.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetFlagEffect(tp,29010411)~=0 then return end
if Duel.SelectYesNo(tp,aux.Stringid(29010411,0)) then
Duel.RegisterFlagEffect(tp,29010411,RESET_PHASE+PHASE_END,0,1)
local g=Duel.GetMatchingGroup(Card.IsCanBeXyzMaterial,tp,LOCATION_MZONE,0,nil,c):Filter(Card.IsXyzLevel,nil,c,4)
local mg=g:Select(tp,2,2,nil)
Duel.Overlay(c,mg)
Duel.SpecialSummon(c,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
end
end
function c29010411.drcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c29010411.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c29010411.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
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 c29010411.drop(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 c29010411.imcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==1
end
function c29010411.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
--天使之机影 芙洛伦
local m=29065829
local cm=_G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
c:RegisterEffect(e1)
--Card Set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.stg1)
e2:SetOperation(cm.sop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetCountLimit(1,m+100)
e3:SetTarget(cm.target)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
end
function cm.check(c)
local tpe=c:GetOriginalType()&0x7
return tpe&TYPE_MONSTER~=0 and c:IsFaceup()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetMatchingGroupCount(cm.check,tp,LOCATION_SZONE,0,nil)>0 and Duel.GetMZoneCount(tp)>0
end
function cm.spfilter1(c)
return c:IsSetCard(0x87ab) and not c:IsForbidden() and c:IsType(TYPE_MONSTER)
end
function cm.stg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>1
and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.sop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if not tc then return end
if Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,false) then
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,false) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
c:SetStatus(STATUS_EFFECT_ENABLED,true)
end
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
tc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
end
function cm.atkcheck(c)
return c:IsFaceup() and c:IsSetCard(0x87ab)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.atkcheck,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local tg=Duel.SelectMatchingCard(tp,cm.atkcheck,tp,LOCATION_MZONE,0,1,1,nil)
if tg:GetCount()==0 then
return
end
Duel.HintSelection(tg)
local tc=tg:GetFirst()
if tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e1:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(1200)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--微语之机影 薇洛儿
local m=29065831
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
end
function cm.thfilter(c,tc)
return c:IsSetCard(0x87ab) and c:IsType((tc:GetType() & 0x7)) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_HAND,1,nil) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local hg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_HAND,nil)
if #hg==0 then return end
local sg=hg:RandomSelect(tp,1)
Duel.ConfirmCards(tp,sg)
if not Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,sg:GetFirst()) or not Duel.SelectYesNo(tp,m*16+1) then
Duel.ShuffleHand(1-tp)
return
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,sg:GetFirst())
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
Duel.ShuffleHand(1-tp)
end
function cm.spcheck(c,e,tp)
local tpe=c:GetOriginalType()&0x7
return tpe&TYPE_MONSTER~=0 and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spcheck,tp,LOCATION_SZONE,0,1,e:GetHandler(),e,tp) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),2,tp,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not e:GetHandler():IsRelateToEffect(e) or Duel.IsPlayerAffectedByEffect(tp,59822133) or Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local tg=Duel.SelectMatchingCard(tp,cm.spcheck,tp,LOCATION_SZONE,0,1,1,c,e,tp)
if tg:GetCount()==0 then
return
end
Duel.HintSelection(tg)
tg:AddCard(c)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
\ No newline at end of file
--尘星之机影 赫波
local m=29065833
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m+100)
e3:SetTarget(cm.rettg)
e3:SetOperation(cm.retop)
c:RegisterEffect(e3)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.spcheck(c,e,tp)
return c:IsSetCard(0x87ab) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.operation(e,tp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)==0 then return end
if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsLocation(LOCATION_MZONE) then
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
if Duel.IsExistingMatchingCard(cm.spcheck,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spcheck,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function cm.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
end
function cm.tgfil1(c,seq,tc)
local loc=tc:GetLocation()
if seq>=5 and seq<=7 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) then return true end
return cseq==seq or (cloc==loc and math.abs(cseq-seq)==1)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()<=0 then return end
local tg=g:Select(tp,1,1,nil)
Duel.HintSelection(tg)
local tc=tg:GetFirst()
local seq=tc:GetSequence()
local g1=Duel.GetMatchingGroup(cm.tgfil1,tp,0,LOCATION_ONFIELD,nil,seq,tc)
g1:AddCard(tc)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--守序之机影 伊芙琳
local m=29065835
local cm=_G["c"..m]
function cm.initial_effect(c)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_ONFIELD)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,m+100)
e3:SetTarget(cm.target)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
end
function cm.tgfilter(c,e,tp)
return c:IsSetCard(0x87ab) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tgfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
if c:IsLocation(LOCATION_MZONE) then
return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
else
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not e:GetHandler():IsRelateToEffect(e) then return end
if c:IsLocation(LOCATION_MZONE) then
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
--indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(cm.indtg)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
else
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.indtg)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.indtg(e,c)
return c:IsSetCard(0x87ab) and c:IsFaceup()
end
\ No newline at end of file
--雕琢之机影 薇
local m=29065837
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DEFCHANGE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,m+100)
e3:SetTarget(cm.rettg)
e3:SetOperation(cm.retop)
c:RegisterEffect(e3)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function cm.operation(e,tp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)==0 then return end
if c:IsRelateToEffect(e) and c:IsFaceup() and c:IsLocation(LOCATION_MZONE) then
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
if Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local sg=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
local tc=sg:GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(-1000)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e4)
end
end
end
end
end
function cm.check(c)
return c:IsSetCard(0x87ab) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.check,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,cm.check,tp,LOCATION_DECK,0,1,1,nil)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
--战械之机影 帕斯卡
function c29065839.initial_effect(c)
c:SetSPSummonOnce(29065839)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(c29065839.sprcon)
e2:SetOperation(c29065839.sprop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(29065839,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetTarget(c29065839.thtg)
e3:SetOperation(c29065839.tgop)
c:RegisterEffect(e3)
end
function c29065839.sprfilter(c)
return c:IsFaceup() and c:IsSetCard(0x87ab) and c:GetOriginalType()&TYPE_MONSTER==TYPE_MONSTER and c:IsAbleToGraveAsCost()
end
function c29065839.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c29065839.sprfilter,tp,LOCATION_ONFIELD,0,nil)
return #g>0
end
function c29065839.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c29065839.sprfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=g:FilterSelect(tp,c29065839.sprfilter,1,1,nil,tp,g,c)
Duel.SendtoGrave(g1,REASON_COST)
end
---
function c29065839.thfilter(c)
return c:IsAbleToHand() and c:IsCode(29065840)
end
function c29065839.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065839.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29065839.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29065839.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--机影的云图
local m=29065840
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Summon/SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DISABLE_SUMMON)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x87ab))
e1:SetTargetRange(LOCATION_MZONE,0)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.condition1)
e3:SetTarget(cm.target1)
e3:SetOperation(cm.operation1)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_ALSO_BATTLE_DAMAGE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetRange(LOCATION_FZONE)
e4:SetCondition(cm.condition2)
e4:SetTarget(cm.target)
c:RegisterEffect(e4)
--negate
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetRange(LOCATION_FZONE)
e5:SetCondition(cm.negcon)
e5:SetOperation(cm.negop)
c:RegisterEffect(e5)
end
function cm.filter1(c)
local tpe=c:GetOriginalType()&0x7
return c:IsFaceup() and c:IsSetCard(0x87ab) and tpe&TYPE_MONSTER~=0
end
function cm.addcheck(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsSetCard(0x87ab) and not Duel.IsExistingMatchingCard(cm.check2,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,c)
end
function cm.check2(c,mc)
return c:IsCode(mc:GetCode()) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function cm.condition1(e)
local tp=e:GetHandler():GetControler()
return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_SZONE,0,1,nil)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.addcheck,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.operation1(e,tp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,cm.addcheck,tp,LOCATION_DECK,0,1,1,nil,tp)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function cm.condition2(e)
local tp=e:GetHandler():GetControler()
return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_SZONE,0,3,nil)
end
function cm.target(e,c)
return c:IsFaceup() and c:IsSetCard(0x87ab)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainDisablable(ev) and Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_SZONE,0,5,nil)
end
function cm.check(c)
local tpe=c:GetOriginalType()&0x7
return tpe&TYPE_MONSTER~=0 and c:IsAbleToDeck()
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,2)) and Duel.NegateEffect(ev) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,cm.check,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
end
--穹顶的星辉
local m=29065900
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsLevel(12) and not c:IsPublic()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==1 then
return Duel.IsPlayerCanDraw(tp,2) and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil)
else
return Duel.IsPlayerCanDraw(tp,2)
end
end
if e:GetLabel()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,g)
Duel.SetTargetCard(tc)
end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.activate(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)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--逆转的机壳
local m=29065901
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--change effect type
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(m)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
if not cm.clfcheck then
cm.clfcheck=true
local ef2=Effect.CreateEffect(c)
ef2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ef2:SetCode(EVENT_ADJUST)
ef2:SetCondition(cm.con)
ef2:SetOperation(cm.op)
Duel.RegisterEffect(ef2,tp)
end
end
function cm.setcheck(c,tp)
return c:IsCode(51194046) and not c:IsForbidden() and c:CheckUniqueOnField(tp) and c:IsType(TYPE_PENDULUM) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
end
function cm.activate(e,tp)
if e:GetHandler():IsRelateToEffect(e) and Duel.IsExistingMatchingCard(cm.setcheck,tp,LOCATION_DECK,0,1,nil,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local sg=Duel.SelectMatchingCard(tp,cm.setcheck,tp,LOCATION_DECK,0,1,1,nil,tp)
Duel.MoveToField(sg:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function cm.replace(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xaa) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function cm.check(c)
return c:GetFlagEffect(m)==0 and c:IsSetCard(0xaa) and c:IsType(TYPE_PENDULUM)
end
function cm.con(e,tp)
return Duel.IsExistingMatchingCard(cm.check,tp,0x7f,0x7f,1,nil)
end
function cm.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xaa)
end
function cm.op(e,tp)
local rg=Duel.GetMatchingGroup(cm.check,tp,0x7f,0,nil)
for tc in aux.Next(rg) do
table_effect={}
clffunc=Card.RegisterEffect
Card.RegisterEffect=function(card,effect,flag)
if effect and (effect:GetCode()~=EFFECT_CANNOT_SPECIAL_SUMMON or effect:GetRange()&LOCATION_PZONE==0) then
local eff=effect:Clone()
table.insert(table_effect,eff)
end
return clffunc(card,effect,flag)
end
tc:RegisterFlagEffect(m,0,0,0,0)
Duel.CreateToken(tp,tc:GetOriginalCode())
Card.RegisterEffect=clffunc
local cid2=tc:ReplaceEffect(m+1,0,1)
for key,eff in ipairs(table_effect) do
Card.RegisterEffect(tc,eff,true)
end
end
end
\ No newline at end of file
--「逆转的机壳」依赖
local m=29065902
local cm=_G["c"..m]
function cm.initial_effect(c)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(1,0)
e1:SetCondition(cm.con)
e1:SetTarget(cm.splimit)
c:RegisterEffect(e1)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetRange(LOCATION_PZONE)
e2:SetTargetRange(1,0)
e2:SetCondition(cm.con2)
e2:SetTarget(cm.splimit2)
c:RegisterEffect(e2)
end
function cm.con(e,tp)
return Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),m-1)
end
function cm.con2(e,tp)
return not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),m-1)
end
function cm.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xaa) and bit.band(sumtp,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
end
function cm.splimit2(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xaa)
end
\ No newline at end of file
--超级量子战士 影光层
function c29065903.initial_effect(c)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,19065903)
e3:SetTarget(c29065903.sptg2)
e3:SetOperation(c29065903.spop2)
c:RegisterEffect(e3)
local e1=e3:Clone()
e1:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(29065903,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,29065903)
e2:SetTarget(c29065903.tgtg)
e2:SetOperation(c29065903.tgop)
c:RegisterEffect(e2)
end
function c29065903.tgfilter(c)
return c:IsSetCard(0xdc) and c:IsAbleToGrave()
end
function c29065903.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065903.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c29065903.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c29065903.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c29065903.filter(c,e,tp)
return c:IsSetCard(0x10dc) and not c:IsCode(29065903) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c29065903.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c29065903.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c29065903.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c29065903.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local lv=tc:GetLevel()
local att=tc:GetAttribute()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetValue(att)
c:RegisterEffect(e2)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c29065903.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c29065903.splimit(e,c)
return not c:IsRace(RACE_MACHINE) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--超级量子机兽 深渊铁蹄
function c29065904.initial_effect(c)
aux.AddCodeList(c,29065903)
--xyz summon
aux.AddXyzProcedure(c,nil,6,2)
c:EnableReviveLimit()
--cannot attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetCondition(c29065904.atcon)
c:RegisterEffect(e1)
--banish
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(93568288,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCondition(c29065904.rmscon1)
e2:SetCost(c29065904.rmcost)
e2:SetTarget(c29065904.rmtg)
e2:SetOperation(c29065904.rmop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(c29065904.rmscon2)
c:RegisterEffect(e3)
--material
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(29065904,1))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetTarget(c29065904.mttg)
e4:SetOperation(c29065904.mtop)
c:RegisterEffect(e4)
end
function c29065904.atcon(e)
return e:GetHandler():GetOverlayCount()==0
end
function c29065904.mtfilter(c,e)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsSetCard(0x10dc) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
end
function c29065904.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c29065904.mtfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
end
function c29065904.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c29065904.mtfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,e)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
function c29065904.rmscon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,29065903)
end
function c29065904.rmscon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,29065903)
end
function c29065904.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c29065904.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)
end
function c29065904.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if c:IsHasEffect(89387017) and c:IsRelateToEffect(e) and cm.ofilter(tc,e) and Duel.SelectYesNo(tp,aux.Stringid(89387017,0)) then
Duel.Overlay(c,tc)
else
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
end
\ No newline at end of file
--逆转的机壳·火剑之路
local m=29065909
local cm=_G["c"..m]
function c29065909.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,3,3,c29065909.lcheck)
--extra material
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c29065909.linkcon)
e1:SetOperation(c29065909.linkop)
e1:SetValue(SUMMON_TYPE_LINK)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetCondition(c29065909.immcon)
e2:SetValue(c29065909.efilter)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SUMMON+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,29065909)
e3:SetCondition(c29065909.con)
e3:SetTarget(c29065909.tg)
e3:SetOperation(c29065909.op)
c:RegisterEffect(e3)
end
function c29065909.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0xaa)
end
function c29065909.lmfilter(c,lc,tp,og,lmat)
return c:IsFaceup() and c:IsCanBeLinkMaterial(lc) and (c:IsLinkCode(20447641) or c:IsSummonType(SUMMON_TYPE_ADVANCE)) and c:IsLinkSetCard(0xaa)
and Duel.GetLocationCountFromEx(tp,tp,c,lc)>0 and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_LMATERIAL)
and (not og or og:IsContains(c)) and (not lmat or lmat==c)
end
function c29065909.linkcon(e,c,og,lmat,min,max)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c29065909.lmfilter,tp,LOCATION_MZONE,0,1,nil,c,tp,og,lmat)
end
function c29065909.linkop(e,tp,eg,ep,ev,re,r,rp,c,og,lmat,min,max)
local mg=Duel.SelectMatchingCard(tp,c29065909.lmfilter,tp,LOCATION_MZONE,0,1,1,nil,c,tp,og,lmat)
c:SetMaterial(mg)
Duel.SendtoGrave(mg,REASON_MATERIAL+REASON_LINK)
end
function c29065909.immcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c29065909.efilter(e,te)
if te:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return true
else return te:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) and te:IsActiveType(TYPE_EFFECT) and te:IsActivated() and te:GetOwner()~=e:GetOwner() end
end
function c29065909.con(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c29065909.pfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xaa) and c:IsAbleToHand()
end
function c29065909.sumfilter(c)
return c:IsSetCard(0xaa) and c:IsSummonable(true,nil)
end
function c29065909.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065909.pfilter,tp,LOCATION_EXTRA,0,1,nil) or Duel.IsExistingMatchingCard(c29065909.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
end
function c29065909.op(e,tp,eg,ep,ev,re,r,rp)
local off=1
local ops={}
local opval={}
if Duel.IsExistingMatchingCard(c29065909.pfilter,tp,LOCATION_EXTRA,0,1,1,nil) then
ops[off]=aux.Stringid(29065909,0)
opval[off-1]=1
off=off+1
end
if Duel.IsExistingMatchingCard(c29065909.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) then
ops[off]=aux.Stringid(29065909,1)
opval[off-1]=2
off=off+1
end
if off==1 then return end
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
local g=Duel.SelectMatchingCard(tp,c29065909.pfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
elseif opval[op]==2 then
local g=Duel.SelectMatchingCard(tp,c29065909.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment