Commit 8945d085 authored by Nemo Ma's avatar Nemo Ma

upd 1130

parent b1dcf091
No preview for this file type
--闪光幻兔
--光角幻兔卡号
local key=25795273
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,25795273)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.sfspcon)
e1:SetTarget(s.sfsptg)
e1:SetOperation(s.sfspop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.dksptg)
e2:SetOperation(s.dkspop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function s.sfspconfilter(c)
return c:IsFaceup()
and c:GetAttack()>c:GetBaseAttack()
end
function s.sfspcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.sfspconfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.sfsptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
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,c,1,0,0)
end
function s.sfspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function s.dkspfilter(c,e,tp)
return c:IsCode(25795273)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.dksptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.dkspfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPSUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.dkspop(e,tp,eg,ep,ev,re,r,rp)
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(s.spelimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.dkspfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.spelimit(e,c)
return not (c:IsCode(25795273) or aux.IsCodeListed(c,25795273)) and c:IsLocation(LOCATION_GRAVE+LOCATION_DECK)
end
--光枪幻兔
--光角幻兔卡号
local key=25795273
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,25795273)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.sfspcost)
e1:SetTarget(s.sfsptg)
e1:SetOperation(s.sfspop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.dktohtg)
e2:SetOperation(s.dktohop)
c:RegisterEffect(e2)
end
function s.sfspcostfilter(c)
return c:IsCode(25795273) and c:IsAbleToGraveAsCost()
end
function s.sfspcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.sfspcostfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.sfspcostfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function s.sfsptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
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,c,1,0,0)
end
function s.sfspop(e,tp,eg,ep,ev,re,r,rp)
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(s.spelimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local c=e:GetHandler()
if not (c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function s.spelimit(e,c)
return not (c:IsCode(25795273) or aux.IsCodeListed(c,25795273)) and c:IsLocation(LOCATION_GRAVE+LOCATION_DECK)
end
function s.dktohfilter(c)
return aux.IsCodeListed(c,25795273) and c:IsType(TYPE_SPELL+TYPE_TRAP)
and c:IsAbleToHand()
end
function s.dktohtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.dktohfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.dktohop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.dktohfilter,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
--银角幻兔
--光角幻兔卡号
local key=25795273
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,25795273)
--change name
aux.EnableChangeCode(c,25795273,LOCATION_HAND+LOCATION_MZONE)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,id)
e1:SetCondition(s.syncon)
e1:SetTarget(s.syntg)
e1:SetOperation(s.synop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1)
e2:SetCost(s.grtohcost)
e2:SetTarget(s.grtohtg)
e2:SetOperation(s.grtohop)
c:RegisterEffect(e2)
end
function s.syncon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function s.synfilter(c,tp,mc)
local mg=Group.FromCards(c,mc)
return c:IsFaceup() and aux.IsCodeListed(c,25795273) and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg)
end
function s.syntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.synfilter(chkc,tp,c) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(s.synfilter,tp,LOCATION_MZONE,0,1,nil,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.synfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,2,tp,LOCATION_EXTRA)
end
function s.synop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() or not tc:IsControler(tp) then return end
Duel.AdjustAll()
local mg=Group.FromCards(c,tc)
if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg)
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,mg)
end
end
function s.grtohcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,2,REASON_COST)
end
function s.grtohfilter(c)
return aux.IsCodeListed(c,25795273)
and c:IsAbleToHand() and c:IsFaceup()
end
function s.grtohtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.grtohfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.grtohop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.grtohfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--光龙角幻兔
--光角幻兔卡号
local key=25795273
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,25795273)
aux.AddSynchroMixProcedure(c,aux.FilterBoolFunction(Card.IsCode,25795273),nil,nil,aux.NonTuner(nil),1,99)
--change name
aux.EnableChangeCode(c,25795273)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.dgtohtg)
e1:SetOperation(s.dgtohop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetValue(s.val)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
function s.dgtohfilter(c)
return aux.IsCodeListed(c,25795273)
and c:IsAbleToHand()
and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.dgtohtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.dgtohfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK+LOCATION_GRAVE)
end
function s.dgtohop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.dgtohfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.val(e,c)
if c:GetLevel()>0 then
return c:GetLevel()*-300
elseif c:GetRank()>0 then
return c:GetRank()*-300
elseif c:GetLink()>0 then
return c:GetLink()*-300
else
return 0
end
end
--闪角幻兔
--光角幻兔卡号
local key=25795273
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,25795273)
aux.AddSynchroMixProcedure(c,aux.FilterBoolFunction(Card.IsCode,25795273),nil,nil,aux.NonTuner(nil),1,99)
--change name
aux.EnableChangeCode(c,25795273)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.dgtohtg)
e1:SetOperation(s.dgtohop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetValue(s.val)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
end
function s.dgtohfilter(c)
return (c:IsCode(25795273) or aux.IsCodeListed(c,25795273)) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function s.dgtohtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.dgtohfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK+LOCATION_GRAVE)
end
function s.dgtohop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.dgtohfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.val(e,c)
if c:GetLevel()>0 then
return c:GetLevel()*-300
elseif c:GetRank()>0 then
return c:GetRank()*-300
elseif c:GetLink()>0 then
return c:GetLink()*-300
else
return 0
end
end
--光角有翼幻兔
--光角幻兔卡号
local key=25795273
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,25795273)
aux.AddSynchroMixProcedure(c,aux.FilterBoolFunction(Card.IsCode,25795273),nil,nil,aux.NonTuner(nil),1,99)
--change name
aux.EnableChangeCode(c,25795273)
--immune
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCode(EFFECT_IMMUNE_EFFECT)
e0:SetValue(s.efilter)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.atkuptg)
e1:SetOperation(s.atkupop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
end
function s.econfilter(c,tc)
return c:IsFaceup() and c:GetAttack()<tc:GetAttack()
end
function s.efilter(e,te)
local tc=te:GetHandler()
if (te:GetOwner()~=e:GetOwner() and tc:IsCode(25795273)) then return true end
local c=e:GetHandler()
return tc:IsLocation(LOCATION_MZONE) and not Duel.IsExistingMatchingCard(s.econfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tc)
end
function s.atkupfilter(c)
return c:IsFaceup() and c:GetAttack()<c:GetBaseAttack()
end
function s.atkuptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.atkupfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,1,0,0)
end
function s.atkupop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsRelateToEffect(e)) then return end
local atk=0
local g=Duel.GetMatchingGroup(s.atkupfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c)
local tc=g:GetFirst()
while tc do
atk=tc:GetBaseAttack()-tc:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(atk/2)
c:RegisterEffect(e1)
tc=g:GetNext()
end
end
function s.desatkfilter(c,atk)
return c:GetAttack()<atk
end
function s.desfilter(c,atk)
return c:IsFaceup()
and c:GetBaseAttack()~=0
and c:GetBaseAttack()<=atk
and not Duel.IsExistingMatchingCard(s.desatkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetAttack())
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetAttack()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,c:GetAttack())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,LOCATION_MZONE)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and c:GetAttack()>=tc:GetBaseAttack()) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-1*tc:GetBaseAttack())
c:RegisterEffect(e1)
Duel.Destroy(tc,REASON_EFFECT)
end
\ No newline at end of file
--光角月兔
--光角幻兔卡号
local key=25795273
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,25795273)
aux.AddSynchroMixProcedure(c,aux.FilterBoolFunction(Card.IsCode,25795273),nil,nil,aux.NonTuner(nil),1,99)
--change name
aux.EnableChangeCode(c,25795273)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_WYRM))
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e2)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCondition(s.rmcon)
e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop)
c:RegisterEffect(e2)
end
function s.efilter(e,te)
local tc=te:GetHandler()
if tc:IsCode(25795273) and te:GetOwner()~=e:GetOwner() then return true end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local tg=g:GetMinGroup(Card.GetAttack)
if tg:GetCount()>0 and tg:IsContains(tc) then
return true
else
return false
end
end
function s.atkupfilter(c)
return c:IsFaceup() and c:GetAttack()~=c:GetBaseAttack()
end
function s.atkuptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.atkupfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,0,0)
end
function s.atkupop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(s.atkupfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)) then return end
local atk=0
local g=Duel.GetMatchingGroup(s.atkupfilter,tp,LOCATION_NZONE,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
atk=tc:GetAttack()-tc:GetBaseAttack()
if atk<0 then
atk=atk*-1
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(atk)
c:RegisterEffect(e1)
tc=g:GetNext()
end
end
function s.rmfilter(c,atk)
return c:IsFaceup() and c:GetBaseAttack()<=atk and c:GetBaseAttack()~=0
end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:GetBaseAttack()~=rc:GetAttack()
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e)) then return end
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--光之修长角幻兔
--光角幻兔卡号
local key=25795273
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,25795273)
aux.AddSynchroMixProcedure(c,aux.FilterBoolFunction(Card.IsCode,25795273),nil,nil,aux.NonTuner(nil),1,99)
--change name
aux.EnableChangeCode(c,25795273)
--immune
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e0:SetRange(LOCATION_MZONE)
e0:SetCode(EFFECT_IMMUNE_EFFECT)
e0:SetValue(s.efilter)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.atkdefcon)
e1:SetTarget(s.atkdeftg)
e1:SetOperation(s.atkdefop)
c:RegisterEffect(e1)
end
function s.efilter(e,te)
local tc=te:GetHandler()
if (te:GetOwner()~=e:GetOwner() and tc:IsCode(25795273)) then return true end
return tc:IsType(TYPE_MONSTER) and tc:GetAttack()==0
end
function s.atkdeffilter(c)
return c:IsFaceup() and c:GetAttack()==0
end
function s.atkdefcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.atkdeffilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and ep~=tp
end
function s.atkdeftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,nil,0,0,LOCATION_MZONE)
end
function s.atkdefop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,s.repop)
end
function s.downvalue(e,c)
local atk=0
if c:GetLink()>0
then atk=c:GetLink()
elseif c:GetRank()>0
then ark=c:GetRank()
elseif c:GetLevel()>0
then atk=c:GetLevel()
end
return atk*-300
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(s.downvalue)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
--光角幻兔 GO!
--光角幻兔卡号
local key=25795273
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,25795273)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.sptohtg)
e1:SetOperation(s.sptohop)
c:RegisterEffect(e1)
end
function s.spfilter(c,e,tp)
return c:IsCode(25795273) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.tohfilter(c)
return aux.IsCodeListed(c,25795273) and not c:IsCode(id)
end
function s.sptohtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.tohfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK+LOCATION_GRAVE)
end
function s.sptohop(e,tp,eg,ep,ev,re,r,rp)
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(s.spelimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if not (spg:GetCount()>0 and Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP)~=0) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tohg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tohfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if not (tohg:GetCount()>0) then return end
Duel.SendtoHand(tohg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tohg)
end
function s.spelimit(e,c)
return not (c:IsCode(25795273) or aux.IsCodeListed(c,25795273)) and c:IsLocation(LOCATION_GRAVE+LOCATION_DECK)
end
--闪耀的奇迹之草场
--光角幻兔卡号
local key=25795273
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,25795273)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetTarget(s.dktohtg)
e1:SetOperation(s.dktohop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetTarget(s.hgsptg)
e2:SetOperation(s.hgspop)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_FZONE)
e3:SetCondition(s.discon)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
end
function s.tohfilter(c)
return aux.IsCodeListed(c,25795273) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.dktohtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tohfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function s.dktohop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tohg=Duel.SelectMatchingCard(tp,s.tohfilter,tp,LOCATION_DECK,0,1,1,nil)
if not (tohg:GetCount()>0) then return end
Duel.SendtoHand(tohg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tohg)
end
function s.hgspfilter(c,e,tp)
return c:IsCode(25795273) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function s.hgsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.hgspfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND+LOCATION_GRAVE)
end
function s.hgspop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.hgspfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if not (spg:GetCount()>0) then return end
Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_MONSTER)
and re:GetHandler():GetAttack()==0
and re:GetHandler():IsLocation(LOCATION_MZONE)
and e:GetHandler():GetFlagEffect(id)<=0
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectEffectYesNo(tp,e:GetHandler(),aux.Stringid(id,2)) then
Duel.Hint(HINT_CARD,0,id)
Duel.NegateEffect(ev)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
end
--角兔同笼
--光角幻兔卡号
local key=25795273
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,25795273)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1)
e2:SetTarget(s.hgsptg)
e2:SetOperation(s.hgspop)
c:RegisterEffect(e2)
--effect gain
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(s.valtg)
e3:SetValue(s.val)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetTarget(s.eftg)
e5:SetLabelObject(e3)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetLabelObject(e4)
c:RegisterEffect(e6)
if not s.global_check then
s.global_check=true
--material check
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_SINGLE)
ge2:SetCode(EFFECT_MATERIAL_CHECK)
ge2:SetValue(s.valcheck)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
ge1:SetTargetRange(0xff,0xff)
ge1:SetLabelObject(ge2)
Duel.RegisterEffect(ge1,0)
end
end
function s.valcheck(e,c)
local mg=c:GetMaterial()
if mg:IsExists(Card.IsCode,1,nil,25795273) and c:GetFlagEffect(id)==0 then
c:RegisterFlagEffect(id,RESET_EVENT+0x4fe0000,0,1)
end
end
function s.hgspfilter(c,e,tp)
return (c:IsCode(25795273) or aux.IsCodeListed(c,25795273)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function s.hgsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.hgspfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND+LOCATION_GRAVE)
end
function s.hgspop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local spg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.hgspfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if not (spg:GetCount()>0) then return end
Duel.SpecialSummon(spg,0,tp,tp,false,false,POS_FACEUP)
end
function s.valtg(e,c)
return c:IsFaceup() and e:GetOwner()~=c
end
function s.val(e,c)
if c:GetLevel()>0 then
return c:GetLevel()*-300
elseif c:GetRank()>0 then
return c:GetRank()*-300
elseif c:GetLink()>0 then
return c:GetLink()*-300
else
return 0
end
end
function s.cfilter(c)
end
function s.eftg(e,c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_SYNCHRO)
and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:GetFlagEffect(id)~=0
end
--混沌之圣女
function c11771550.initial_effect(c)
--
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(c11771550.splimit)
c:RegisterEffect(e1)
-- 特殊召唤
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11771550,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,11771550)
e2:SetCondition(c11771550.con1)
e2:SetTarget(c11771550.tg1)
e2:SetOperation(c11771550.op1)
c:RegisterEffect(e2)
-- 盖放
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11771550,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,11771551)
e3:SetTarget(c11771550.tg2)
e3:SetOperation(c11771550.op2)
c:RegisterEffect(e3)
-- 回手特召
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(11771550,2))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_REMOVE)
e4:SetCountLimit(1,11771552)
e4:SetTarget(c11771550.tg3)
e4:SetOperation(c11771550.op3)
c:RegisterEffect(e4)
--
Duel.AddCustomActivityCounter(11771550,ACTIVITY_SPSUMMON,c11771550.counterfilter)
end
-- 效果外文本
function c11771550.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c11771550.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
or (c:IsType(TYPE_SYNCHRO) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK))
end
-- 1
function c11771550.filter1(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function c11771550.con1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return #g>0 and #g==Duel.GetMatchingGroupCount(c11771550.filter1,tp,LOCATION_MZONE,0,nil)
end
function c11771550.tg1(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 c11771550.op1(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
-- 2
function c11771550.filter2(c,tp)
return c:IsCode(99266988) and (c:IsLocation(LOCATION_DECK) or c:IsLocation(LOCATION_REMOVED) or (c:IsLocation(LOCATION_GRAVE) and not c:IsHasEffect(EFFECT_REVERSE_CHECKER)))
end
function c11771550.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c11771550.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c11771550.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c11771550.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)>0 then
if c:IsRelateToEffect(e) and c:IsFaceup() then
if Duel.SelectYesNo(tp,aux.Stringid(11771550,4)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_DARK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
end
end
-- 3
function c11771550.filter3(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and (c:IsLocation(LOCATION_MZONE) or c:IsLocation(LOCATION_GRAVE))
end
function c11771550.filter4(c)
return c:IsAttribute(ATTRIBUTE_DARK) and (c:IsLocation(LOCATION_MZONE) or c:IsLocation(LOCATION_GRAVE))
end
function c11771550.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
if c:IsLocation(LOCATION_REMOVED) and c:IsAbleToHand() then
local g1=Duel.GetMatchingGroup(c11771550.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local g2=Duel.GetMatchingGroup(c11771550.filter4,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
if #g1>0 and #g2>0 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND)
end
end
end
function c11771550.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_HAND) then
local g1=Duel.GetMatchingGroup(c11771550.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local g2=Duel.GetMatchingGroup(c11771550.filter4,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
if #g1>0 and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(11771550,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
if Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT)==2 then
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)
end
end
end
end
end
--混沌之司教
function c11771565.initial_effect(c)
--
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(c11771565.splimit)
c:RegisterEffect(e1)
-- 特殊召唤
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11771565,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,11771565)
e2:SetCost(c11771565.cost1)
e2:SetTarget(c11771565.tg1)
e2:SetOperation(c11771565.op1)
c:RegisterEffect(e2)
-- 遗言特召
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11771565,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,11771566)
e3:SetCondition(c11771565.con2)
e3:SetTarget(c11771565.tg2)
e3:SetOperation(c11771565.op2)
c:RegisterEffect(e3)
-- 回手特召
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(11771565,2))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_REMOVE)
e4:SetCountLimit(1,11771567)
e4:SetTarget(c11771565.tg3)
e4:SetOperation(c11771565.op3)
c:RegisterEffect(e4)
--
Duel.AddCustomActivityCounter(11771565,ACTIVITY_SPSUMMON,c11771565.counterfilter)
end
-- 效果外文本
function c11771565.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c11771565.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
or (c:IsType(TYPE_SYNCHRO) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK))
end
-- 1
function c11771565.cfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost()
and (c:IsLocation(LOCATION_MZONE) or c:IsLocation(LOCATION_GRAVE))
end
function c11771565.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11771565.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c11771565.cfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c11771565.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c11771565.op1(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
-- 2
function c11771565.con2(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO
end
function c11771565.spfilter(c,e,tp)
return c:IsSetCard(0xcf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not c:IsSummonableCard()
end
function c11771565.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c11771565.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c11771565.op2(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,c11771565.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
-- 3
function c11771565.filter3(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and (c:IsLocation(LOCATION_MZONE) or c:IsLocation(LOCATION_GRAVE))
end
function c11771565.filter4(c)
return c:IsAttribute(ATTRIBUTE_DARK) and (c:IsLocation(LOCATION_MZONE) or c:IsLocation(LOCATION_GRAVE))
end
function c11771565.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
if c:IsLocation(LOCATION_REMOVED) and c:IsAbleToHand() then
local g1=Duel.GetMatchingGroup(c11771565.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local g2=Duel.GetMatchingGroup(c11771565.filter4,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
if #g1>0 and #g2>0 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,LOCATION_HAND)
end
end
end
function c11771565.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_HAND) then
local g1=Duel.GetMatchingGroup(c11771565.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local g2=Duel.GetMatchingGroup(c11771565.filter4,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
if #g1>0 and #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(11771550,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
if Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT)==2 then
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)
end
end
end
end
end
--飓风海劫“回声”海豚号
local s,id,o=GetID()
function s.initial_effect(c)
--RetCard
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--CheckCard
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id+1)
e3:SetCondition(s.scon)
e3:SetTarget(s.stg)
e3:SetOperation(s.sop)
c:RegisterEffect(e3)
end
function s.thfilter(c,tid)
return c:IsRace(RACE_AQUA) and c:IsType(TYPE_MONSTER)
and c:IsAbleToHand() and c:GetTurnID()==tid
end
function s.spfi1ter(c,e,tp)
return c:IsSetCard(0x540b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,0x04)>0
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,0x10,0,1,nil,Duel.GetTurnCount()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x10)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,0x10,0,1,1,nil,Duel.GetTurnCount())
if #g>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if Duel.SendtoHand(tc,nil,0x40)>0 and s.spfi1ter(tc,e,tp) then
if c:IsRelateToEffect(e) and c:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.SendtoHand(c,nil,0x40)
end
end
end
end
end
function s.scon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousPosition(POS_FACEUP)
end
function s.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,0x0e)>0 end
end
function s.sop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,0x0e,nil)
if #dg>0 then Duel.ConfirmCards(tp,dg) end
local g=Duel.GetFieldGroup(tp,0,0x0e)
if g:IsExists(Card.IsType,1,nil,TYPE_MONSTER) and g:IsExists(Card.IsType,1,nil,TYPE_SPELL) and g:IsExists(Card.IsType,1,nil,TYPE_TRAP) then
if Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Draw(tp,1,0x40)
end
end
Duel.ShuffleHand(1-tp)
end
\ No newline at end of file
--飓风海劫“饵钓”和睦号
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--ToHand(0x0c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--Tohand(0x01)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id+1)
e3:SetCondition(s.scon)
e3:SetTarget(s.stg)
e3:SetOperation(s.sop)
c:RegisterEffect(e3)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function s.spcost(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,e:GetHandler())
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,0x04)>0 and Duel.GetFlagEffect(tp,id)==0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,EFFECT_FLAG_OATH,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.tckfil(c,tp)
return c:IsControler(1-tp)
and not c:IsReason(REASON_DRAW)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.tckfil,1,nil,tp)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0x0c,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,0x0c,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(3,tp,505)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0x0c,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,0x40)
end
end
function s.thfi2ter(c,e,tp,check)
return c:IsSetCard(0x540b) and c:IsType(TYPE_MONSTER) and not c:IsAttribute(ATTRIBUTE_FIRE)
and (c:IsAbleToHand() or (check and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
function s.scon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousPosition(POS_FACEUP)
end
function s.stg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c,check=e:GetHandler(),Duel.GetFieldGroupCount(tp,0x04,0)==0
if c:IsLocation(0x02) and c:GetFlagEffect(id)==0 then
c:RegisterFlagEffect(id,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,4))
end
return Duel.IsExistingMatchingCard(s.thfi2ter,tp,0x01,0,1,nil,e,tp,check)
and Duel.GetFlagEffect(tp,id)==0
end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,EFFECT_FLAG_OATH,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x01)
end
function s.sop(e,tp,eg,ep,ev,re,r,rp)
local check=Duel.GetFieldGroupCount(tp,0x04,0)==0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfi2ter,tp,0x01,0,1,1,nil,e,tp,check)
if g:GetCount()>0 then
local tc=g:GetFirst()
if check and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not tc:IsAbleToHand() or Duel.SelectYesNo(tp,aux.Stringid(id,3))) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
if tc:IsLocation(0x02) then
Duel.ConfirmCards(1-tp,g)
end
end
end
end
\ No newline at end of file
--颶風海劫“溶藥”樸茨茅斯冒險號
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--ToHand(0x0c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.con1)
e2:SetTarget(s.rhtg)
e2:SetOperation(s.rhop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetHintTiming(TIMING_END_PHASE,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(s.con2)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_AQUA)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,0x04,0,1,nil)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x540b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,0x04)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,0x04)>0 and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,0x04)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(3,tp,509)
local gh=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(gh,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function s.cfi2ter(c)
return c:IsFaceup() and c:IsSetCard(0x540b)
end
function s.con1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.cfi2ter,tp,0x04,0,1,e:GetHandler())
end
function s.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfi2ter,tp,0x04,0,1,e:GetHandler())
end
function s.rhtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0x04,0x04,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0x04,0x04,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.rhop(e,tp,eg,ep,ev,re,r,rp)
local tc,Check=Duel.GetFirstTarget(),false
if tc:IsRelateToEffect(e) then
if tc:IsControler(tp) then Check=true end
if Duel.SendtoHand(tc,nil,0x40)>0 and Check then
local g=Duel.GetFieldGroup(tp,0,0x0c)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(3,tp,502)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Destroy(sg,0x40)
end
end
end
end
\ No newline at end of file
--飓风海劫“幻魔”幻想号
local s,id,o=GetID()
function s.initial_effect(c)
--SetOrRemove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(s.cost)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
c:RegisterEffect(e1)
--SpSum(0x10)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.con1)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(s.con2)
c:RegisterEffect(e3)
if not s.SetCheck then
local ek=Effect.CreateEffect(c)
ek:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ek:SetCode(EVENT_CHAINING)
ek:SetOperation(s.ciop)
Duel.RegisterEffect(ek,tp)
end
end
function s.rcCheck(c)
return c:IsLocation(0x08)
and not (c:IsHasEffect(EFFECT_REMAIN_FIELD)
or c:IsType(TYPE_CONTINUOUS) or c:IsType(TYPE_EQUIP))
end
function s.ciop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc and s.rcCheck(rc) then
rc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,nil,1,0)
end
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.filter(c,cid)
return (c:IsCanTurnSet() or c:IsAbleToRemove(tp,POS_FACEDOWN))
and c:GetFlagEffect(cid)==0
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(0x0c) and s.filter(chkc,id) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,0x0c,1,nil,id) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,s.filter,tp,0,0x0c,1,1,nil,id)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.SetChecking(c)
return c:IsFaceup() and c:IsCanTurnSet()
and (c:IsLocation(0x04) or c:GetOriginalType()&TYPE_MONSTER==0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:GetFlagEffect(id)==0 then
if s.SetChecking(tc) then
if tc:IsLocation(0x04) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
else
Duel.ChangePosition(tc,POS_FACEDOWN)
end
else
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end
end
function s.cfi2ter(c)
return c:IsFaceup() and c:IsSetCard(0x540b)
end
function s.con1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.cfi2ter,tp,0x04,0,1,nil)
end
function s.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfi2ter,tp,0x04,0,1,nil)
end
function s.desfilter(c,e)
return c:IsRace(RACE_AQUA) and c:IsFaceup() and c:IsDestructable(e)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.desfilter,tp,0x04,0,1,nil,e)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
local g=Duel.GetFieldGroup(tp,0x04,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(3,tp,502)
local g=Duel.GetMatchingGroup(s.desfilter,tp,0x04,0,nil,e)
if g:GetCount()>0 then
local tg=g:Select(tp,1,1,nil)
local tc=tg:GetFirst()
Duel.HintSelection(tg)
if Duel.Destroy(tc,0x40)>0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--飓风海劫“金帛”冈依沙瓦号
local s,id,o=GetID()
function s.initial_effect(c)
--SearchCard
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND)
e0:SetCountLimit(1,id)
e0:SetCost(s.thcost)
e0:SetTarget(s.thtg)
e0:SetOperation(s.thop)
c:RegisterEffect(e0)
--RetCard
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id+1)
e1:SetTarget(s.ptg)
e1:SetOperation(s.pop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Desed
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCountLimit(1,id+2)
e3:SetCondition(s.tecon)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
end
function s.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 s.thfilter(c)
return c:IsSetCard(0x540b) and c:IsLevelBelow(4) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,0x01,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x01)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter,tp,0x01,0,nil)
if #g>0 then
Duel.Hint(3,tp,506)
local tc=g:Select(tp,1,1,nil)
Duel.SendtoHand(tc,nil,0x40)
Duel.ConfirmCards(1-tp,tc)
end
end
function s.pfilter(c,tp)
return c:IsCode(11902370) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function s.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.pfilter,tp,0x11,0,1,nil,tp) end
end
function s.pop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(3,tp,527)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.pfilter),tp,0x11,0,1,1,nil,tp):GetFirst()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
end
function s.tecon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:IsPreviousLocation(0x0c)
end
function s.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 s.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
\ No newline at end of file
--颶風與沈眠之海
local s,id,o=GetID()
function s.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,id+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--AtkDefUp
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(0x04,0x04)
e2:SetTarget(s.tg)
e2:SetValue(500)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--SpSum(0x10)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_FZONE)
e4:SetCountLimit(1,id)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x540b) and c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter,tp,0x01,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,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 s.tg(e,c)
return c:IsRace(RACE_AQUA)
end
function s.filter(c,e,tp,tid)
return c:IsSetCard(0x540b) and c:IsLevelBelow(6)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(0x02) or c:GetTurnID()~=tid)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(s.filter,tp,0x12,0,1,nil,e,tp,Duel.GetTurnCount()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x12)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(3,tp,509)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,0x12,0,1,1,nil,e,tp,Duel.GetTurnCount())
local tc=g:GetFirst()
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end
\ No newline at end of file
--颶風海劫“隱世”維達號
local s,id,o=GetID()
function s.initial_effect(c)
--SpSum(0x01)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(0x06)
e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--TdOrSum(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_TO_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id)
e2:SetCondition(s.toscon)
e2:SetTarget(s.tostg)
e2:SetOperation(s.tosop)
c:RegisterEffect(e2)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x540b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not c:IsAttribute(ATTRIBUTE_DARK)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(s.spfilter,tp,0x01,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,0x04)>0
or (c:IsLocation(0x04) and Duel.GetMZoneCount(tp,c)>0)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x01)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,0x04)>0 then
Duel.Hint(3,tp,509)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,0x01,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local fg=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0x04,0,nil)
if #fg>0 then
Duel.Hint(3,tp,506)
local sg=fg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoHand(sg,nil,0x40)
end
end
end
end
function s.thfi2ter(c,tp)
return c:IsPreviousLocation(0x04) and c:IsPreviousControler(tp)
end
function s.toscon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.thfi2ter,1,nil,tp)
end
function s.tostg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() or c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
if c:IsAbleToDeck() then
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
if c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
end
function s.spfi2ter(c,e,tp)
return c:IsSetCard(0x540b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.tosop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local b1=c:IsAbleToDeck()
local b2=c:IsCanBeSpecialSummoned(e,0,tp,false,false)
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))
elseif b1 then op=0
elseif b2 then op=1
else return end
if op==0 then
local g=Duel.GetMatchingGroup(s.spfi2ter,tp,0x02,0,nil,e,tp)
if Duel.SendtoDeck(c,nil,1,0x40)>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
Duel.Hint(3,tp,509)
local tc=g:Select(tp,1,1,nil)
if tc then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end
else Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
end
end
\ No newline at end of file
--颶風海劫“偉大的”王富貴
local s,id,o=GetID()
function s.initial_effect(c)
--SearchCard
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e4=e1:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--Indes
local e2=Effect.CreateEffect(c)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0x0c,0)
e2:SetTarget(s.target)
e2:SetValue(1)
c:RegisterEffect(e2)
--ToHand(0x0c)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,id+1)
e3:SetCondition(s.thcon)
e3:SetTarget(s.thtg2)
e3:SetOperation(s.thop2)
c:RegisterEffect(e3)
end
--SearchCard
function s.thfilter(c)
return c:IsSetCard(0x540b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,0x01,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x01)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(3,tp,506)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,0x01,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
local hg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0x02,0,nil)
if #hg>0 then
Duel.Hint(3,tp,507)
local sg=hg:Select(tp,1,1,nil)
Duel.SendtoDeck(sg,nil,2,0x40)
end
end
end
--Indes
function s.target(e,c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
--ToHand
function s.thfi2ter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousPosition(POS_FACEUP)
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(s.thfi2ter,tp,0x0c,0x0c,1,nil) end
Duel.Hint(3,tp,505)
local g=Duel.SelectTarget(tp,s.thfi2ter,tp,0x0c,0x0c,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,0x40) end
end
\ No newline at end of file
--颶風海劫“庇佑”金鹿號
local s,id,o=GetID()
function s.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.discon)
e1:SetTarget(s.distg)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
--Cannot Be Target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0x0c,0)
e2:SetTarget(s.etlimit)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--Destroy(0x04)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,id+1)
e3:SetCondition(s.descon)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
end
--Negate
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainNegatable(ev)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(s.thfi1ter,tp,0x0c,0,e:GetHandler())>0 end
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
function s.thfi1ter(c)
return c:IsSetCard(0x540b) and c:IsFaceup()
end
function s.Check(c,tp)
return c:IsLocation(0x02) and c:IsSetCard(0x540b)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfi1ter,tp,0x0c,0,aux.ExceptThisCard(e))
if #g>0 then
Duel.Hint(3,tp,505)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local tc=sg:GetFirst()
if Duel.SendtoHand(tc,nil,0x40)>0 and s.Check(tc,tp) then
Duel.NegateActivation(ev)
end
end
end
--Cannot Be Target
function s.etlimit(e,c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
--Destroy
function s.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousPosition(POS_FACEUP)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0x04,0x04,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0x04,0x04,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end
end
\ No newline at end of file
--深淵魔影
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Remove()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetRange(LOCATION_SZONE)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
end
function s.thfi1ter(c)
return c:IsSetCard(0x540b) and c:IsFaceup()
and c:IsAbleToHand()
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,0x1c,1,nil,tp,POS_FACEDOWN)
and Duel.IsExistingMatchingCard(s.thfi1ter,tp,0x04,0,1,nil) end
Duel.Hint(3,tp,503)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,0x1c,1,1,nil,tp,POS_FACEDOWN)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,1))
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(s.thfi1ter,tp,0x04,0,nil)
if #g>0 and tc:IsRelateToEffect(e) then
Duel.Hint(3,tp,505)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local sc=sg:GetFirst()
if Duel.SendtoHand(sc,nil,0x40)>0 and sc:IsLocation(0x02) then
Duel.Remove(tc,POS_FACEDOWN,0x40)
end
end
end
\ No newline at end of file
--天墜星隕
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,id)
e1:SetCondition(s.discon)
e1:SetTarget(s.distg)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.IsChainNegatable(ev)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(Card.IsAbleToHand,tp,0x04,0x04,nil)>0 end
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
function s.Check(c,tp)
return c:IsLocation(0x02) and c:IsSetCard(0x540b)
and c:IsPreviousControler(tp)
end
function s.desfi1ter(c,pl,seq)
local sseq=c:GetSequence()
if c:IsControler(pl) then
return sseq==5 and seq==3 or sseq==6 and seq==1
end
if c:IsLocation(LOCATION_SZONE) then
return sseq<5 and sseq==seq
end
if sseq<5 then
return (seq==6 and sseq==3) or (seq==5 and sseq==1)
or sseq==seq+1 or sseq==seq-1
end
if sseq>=5 then
return sseq==5 and seq==1 or sseq==6 and seq==3
end
end
function s.desfi2ter(c,seq)
local sseq=c:GetSequence()
if c:IsLocation(LOCATION_MZONE) then
return sseq<5 and sseq==seq
end
if sseq<5 then
return sseq==seq+1 or sseq==seq-1
end
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0x04,0x04,nil)
if #g>0 then
Duel.Hint(3,tp,505)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
local sc=sg:GetFirst()
if Duel.SendtoHand(sc,nil,0x40)>0 and s.Check(sc,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
local tc=re:GetHandler()
local dg=Group.CreateGroup()
if tc:IsRelateToEffect(re) then
dg:AddCard(tc)
if tc:IsLocation(0x0c) and not tc:IsLocation(LOCATION_FZONE) then
local pl=tp
if tc:GetControler()==tp then pl=1-pl end
if tc:IsLocation(0x04) and tc:GetSequence()<5 then
local cg=Duel.GetMatchingGroup(s.desfi1ter,pl,0x04,0x0c,tc,pl,tc:GetSequence())
dg:Merge(cg)
elseif tc:IsLocation(0x08) and tc:GetSequence()<5 then
local cg=Duel.GetMatchingGroup(s.desfi2ter,pl,0,0x0c,tc,tc:GetSequence())
dg:Merge(cg)
elseif tc:IsLocation(0x04) and tc:GetSequence()>4 then
local cg=tc:GetColumnGroup():Filter(Card.IsLocation,nil,0x04)
dg:Merge(cg)
end
end
end
if Duel.NegateActivation(ev) and #dg>0 then
Duel.Destroy(dg,0x40)
end
end
end
end
\ No newline at end of file
--颶風海劫與岡依沙瓦的相遇
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--SpSum(0x12)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetCondition(s.con)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x540b) and c:IsAbleToGrave()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,0x01,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(3,tp,504)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_FZONE,0)==0
end
function s.filter(c,e,tp,tid)
return c:IsCode(11902360) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(s.filter,tp,0x12,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x12)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(3,tp,509)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,0x12,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
\ No newline at end of file
--颶風海劫“幽靈”瑪麗·西萊特斯號
local s,id,o=GetID()
function s.initial_effect(c)
--SpSum(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND)
c:RegisterEffect(e3)
--SpSum(0x02)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.scon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.thfilter(c)
return c:IsSetCard(0x540b) and c:IsFaceup()
and c:IsAbleToHand() and not c:IsLevel(6)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(0x04) and s.filter(chkc) end
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.thfilter,tp,0x04,0,1,nil)
and Duel.GetFlagEffect(tp,id)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,0x04,0,1,1,nil)
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,EFFECT_FLAG_OATH,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,0x40)>0 then
--Atk/Def Up
local val=tc:GetBaseAttack()
if val>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
end
end
end
function s.scon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousPosition(POS_FACEUP)
end
function s.spfi1ter(c,e,tp)
return c:IsSetCard(0x540b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c=e:GetHandler()
if c:IsLocation(0x02) and c:GetFlagEffect(id)==0 then
c:RegisterFlagEffect(id,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
return Duel.GetLocationCount(tp,0x04)>0 and Duel.GetFlagEffect(tp,id)==0
and Duel.IsExistingMatchingCard(s.spfi1ter,tp,0x02,0,1,e:GetHandler(),e,tp)
end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,EFFECT_FLAG_OATH,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x02)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,0x04)>0 then
Duel.Hint(3,tp,509)
local g=Duel.SelectMatchingCard(tp,s.spfi1ter,tp,0x02,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--颶風海劫與“復仇”的會面
local s,id,o=GetID()
function s.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,id+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--SpSum(0x02)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.thfi0ter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x540b) and c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfi0ter,tp,0x31,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
Duel.SendtoHand(sg,nil,REASON_EFFECT)
if tc:IsLocation(0x02) then
Duel.ConfirmCards(1-tp,sg)
local hg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0x02,0,nil)
if #hg>0 then
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Hint(3,tp,507)
local dc=hg:Select(tp,1,1,nil)
Duel.SendtoDeck(dc,nil,1,0x40)
end
end
end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x540b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsExistingMatchingCard(Card.IsAttribute,tp,0x04,0,1,nil,c:GetAttribute())
end
function s.fi6ter(c)
return c:IsSetCard(0x540b) and c:IsFaceup()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,0x02,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.fi6ter,tp,0x04,0,1,nil)
and Duel.GetLocationCount(tp,0x04)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x02)
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,0x04)>0 then
Duel.Hint(3,tp,509)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,0x02,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
--颶風海劫“狂暴”加里冒險號
local s,id,o=GetID()
function s.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetRange(0x06)
e1:SetCountLimit(1,id)
e1:SetCondition(s.discon)
e1:SetCost(s.discost)
e1:SetOperation(s.disop)
c:RegisterEffect(e1)
--SpSum(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(0x12)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainDisablable(ev) then return false end
local te,p=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return te and te:GetHandler():IsSetCard(0x540b) and te:IsActiveType(TYPE_MONSTER) and p==tp and rp==1-tp
and Duel.IsChainNegatable(ev) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() end
if c:IsLocation(0x0c) then e:SetLabel(1)
else e:SetLabel(0) end
Duel.Release(c,REASON_COST)
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if e:GetLabel()>0 and re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,EFFECT_FLAG_OATH,1)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and e:GetLabel()>0
and re:GetHandler():IsRelateToEffect(re)
then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function s.thfilter(c,fz)
return c:IsSetCard(0x540b) and c:IsFaceup()
and c:IsAbleToHand() and (fz>0 or c:GetSequence()<5)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c,fz=e:GetHandler(),Duel.GetLocationCount(tp,0x04)
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(s.thfilter,tp,0x04,0,1,nil,fz)
and Duel.GetFlagEffect(tp,id)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,0x04,0,1,1,nil,fz)
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,EFFECT_FLAG_OATH,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c,tc=e:GetHandler(),Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
if tc:IsLocation(0x02) and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,0x04)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
local m=15006118
local cm=_G["c"..m]
cm.name="无弦的咏者-但他林"
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,8,2)
c:EnableReviveLimit()
--disable
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,0))
e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetCost(cm.cost)
e4:SetTarget(cm.distg)
e4:SetOperation(cm.disop)
c:RegisterEffect(e4)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsDisabled() and c:IsType(TYPE_EFFECT)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
if Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) then
e:SetCategory(CATEGORY_DISABLE+CATEGORY_TOHAND)
e:SetLabel(1)
end
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsCanBeDisabledByEffect(e,false) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
end
Duel.AdjustInstantly()
if e:GetLabel() and e:GetLabel()==1 and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--朦雨的雨影·希
local s,id,o=GetID()
function s.initial_effect(c)
--①:特召额外怪兽
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--②:自我苏生
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.rescon)
e2:SetTarget(s.restg)
e2:SetOperation(s.resop)
c:RegisterEffect(e2)
end
--字段:朦雨
function s.costfilter(c)
return c:IsSetCard(0x613) and c:IsAbleToGraveAsCost()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
return c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,c)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,c)
g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST)
end
function s.spfilter(c)
return c:IsSetCard(0x613) and (c:IsLinkBelow(2) or c:IsLevel(5))
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc then
-- 当作连接召唤特殊召唤
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
function s.rescon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return ep==tp and re:IsActiveType(TYPE_MONSTER) and not rc:IsType(TYPE_LINK)
and re:GetActivateLocation()==LOCATION_MZONE
end
function s.restg(e,tp,eg,ep,ev,re,r,rp,chk)
-- 检查是否有连接怪兽指向的格子
local zone=Duel.GetLinkedZone(tp)
if chk==0 then return zone~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.resop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local zone=Duel.GetLinkedZone(tp)
if c:IsRelateToEffect(e) and zone~=0 and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP,zone)~=0 then
-- 离场回持有者卡组
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(LOCATION_DECK)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
end
end
\ No newline at end of file
--朦雨的祭仪·紫苑
local s,id,o=GetID()
function s.initial_effect(c)
--①:特召自身 + 可选特召手卡
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--②:检索通常魔法 + 回卡组最下
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1)
e2:SetCost(s.thcost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
-- === 效果① ===
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
-- 获取连接怪兽所连接的区
local zone=Duel.GetLinkedZone(tp)
if chk==0 then return zone~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
-- 检查表侧表示的「朦雨」魔法·陷阱卡
function s.filter_st(c)
return c:IsSetCard(0x613) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
end
-- 检查手卡可特召的「朦雨」怪兽
function s.filter_sp(c,e,tp)
return c:IsSetCard(0x613) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local zone=Duel.GetLinkedZone(tp)
-- 再次确认能否特召到连接区
if not c:IsRelateToEffect(e) or zone==0 or Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)<=0 then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP,zone)>0 then
-- 如果有「朦雨」魔法·陷阱卡,处理追加效果
if Duel.IsExistingMatchingCard(s.filter_st,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.filter_sp,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter_sp,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
end
end
-- === 效果② ===
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function s.filter_nm(c)
-- 「朦雨」通常魔法卡 (GetType()==TYPE_SPELL 且没有其他子类别即为通常魔法)
return c:IsSetCard(0x613) and c:GetType()==TYPE_SPELL and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter_nm,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
and e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter_nm),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if #g>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsLocation(LOCATION_GRAVE) then
Duel.BreakEffect()
-- 回到卡组最下面 (SEQ_DECKBOTTOM = 1)
Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
end
end
--朦雨的过客·晓
local s,id,o=GetID()
function s.initial_effect(c)
--①:检索 + 变星
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--②:赋予抗性
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+1)
e3:SetTarget(s.indtg)
e3:SetOperation(s.indop)
c:RegisterEffect(e3)
end
-- === 效果① ===
function s.thfilter(c)
return c:IsSetCard(0x613) and c:IsAbleToHand()
end
function s.lvfilter(c)
return c:IsType(TYPE_MONSTER) and c:GetLevel()>0 and not c:IsPublic()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
local c=e:GetHandler()
-- 检索成功后,处理变星逻辑
if c:IsRelateToEffect(e) and c:IsFaceup()
and Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,s.lvfilter,tp,LOCATION_HAND,0,1,1,nil)
if #cg>0 then
Duel.ConfirmCards(1-tp,cg)
local lv=cg:GetFirst():GetLevel()
-- 改变等级
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_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
end
end
end
-- === 效果② ===
function s.indfilter(c)
return c:IsSetCard(0x613) and c:IsFaceup()
end
function s.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.indfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.indfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.indfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.indop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
-- 不会成为对方的效果的对象
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) -- 让玩家能看到抗性提示
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) -- 持续到下个回合结束
tc:RegisterEffect(e1)
-- 不会被对方的效果破坏
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(aux.indoval)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
--朦雨的红镰·拉比安
local s,id,o=GetID()
function s.initial_effect(c)
--①:特召 + 选卡送墓 (二速)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--②:离场苏生 + 加攻
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.rescon)
e2:SetCost(s.rescost)
e2:SetTarget(s.restg)
e2:SetOperation(s.resop)
c:RegisterEffect(e2)
end
-- === 效果① ===
function s.costfilter(c)
return c:IsSetCard(0x613) and not c:IsPublic()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,c)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=Duel.GetLinkedZone(tp)
if chk==0 then return zone~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,LOCATION_ONFIELD)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local zone=Duel.GetLinkedZone(tp)
if not c:IsRelateToEffect(e) or zone==0 or Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)<=0 then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP,zone)>0 then
-- 选场上1张卡送去墓地
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
end
-- === 效果② ===
function s.rescon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD+LOCATION_DECK)
end
function s.tdfilter(c)
return c:IsSetCard(0x613) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.rescost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function s.restg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.resop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
\ No newline at end of file
--朦雨的织者·薇尔薇特
local s,id,o=GetID()
function s.initial_effect(c)
--①:特召自身
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetCondition(aux.NOT(s.spcon))
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(s.spcon)
c:RegisterEffect(e3)
--②:二选一效果
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,id+1)
e2:SetCost(s.effcost)
e2:SetTarget(s.efftg)
e2:SetOperation(s.effop)
c:RegisterEffect(e2)
end
-- === 效果① ===
function s.exfilter(c)
return c:IsSetCard(0x613) and c:IsSummonLocation(LOCATION_EXTRA)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.exfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.thfilter(c)
return c:IsSetCard(0x613) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHandAsCost() or c:IsAbleToExtraAsCost()) and c:IsFaceup()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
-- === 效果② ===
function s.costfilter(c)
return c:IsSetCard(0x613) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
-- 选项1:卡组检索/特召
function s.op1filter(c,e,tp)
return c:IsSetCard(0x613) and c:IsType(TYPE_MONSTER)
and (c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
end
-- 选项2:送墓特召额外
function s.op2costfilter(c)
return c:IsSetCard(0x613) and c:IsAbleToGrave()
end
function s.op2spfilter(c,e,tp)
return c:IsSetCard(0x613) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
-- 检查选项1可行性
local b1=Duel.IsExistingMatchingCard(s.op1filter,tp,LOCATION_DECK,0,1,nil,e,tp)
-- 检查选项2可行性
-- 需送墓包含自己在内的2只怪兽。因此需要场上有另一只可送墓的「朦雨」怪兽。
local b2=Duel.IsExistingMatchingCard(s.op2costfilter,tp,LOCATION_MZONE,0,1,c)
and Duel.IsExistingMatchingCard(s.op2spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(id,2))
else
op=Duel.SelectOption(tp,aux.Stringid(id,3))+1
end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
else
e:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
end
function s.effop(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
local c=e:GetHandler()
if op==0 then
-- 执行选项1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.op1filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
local b_th=tc:IsAbleToHand()
local b_sp=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
local opt=0
if b_th and b_sp then
opt=Duel.SelectOption(tp,1190,1152) -- 1190:加手, 1152:特召
elseif b_th then
opt=0
else
opt=1
end
if opt==0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
else
-- 执行选项2
-- 必须包含这张卡
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(s.op2costfilter,tp,LOCATION_MZONE,0,c)
if #g<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
sg:AddCard(c)
if Duel.SendtoGrave(sg,REASON_EFFECT)==2 then -- 确认2张都送去墓地了
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local exg=Duel.SelectMatchingCard(tp,s.op2spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #exg>0 then
Duel.SpecialSummon(exg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
\ No newline at end of file
--单色的舞台
local s,id,o=GetID()
function s.initial_effect(c)
--①:检索 + 衍生物
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--②:墓地盖放
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.setcon)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
end
-- === 效果① ===
function s.thfilter(c)
return c:IsSetCard(0x613) and c:IsType(TYPE_TUNER) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
-- 处理衍生物逻辑:自己场上没有怪兽
if Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,6100239,0x613,TYPE_TOKEN+TYPE_TUNER,0,0,1,RACE_AQUA,ATTRIBUTE_WATER)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
local token=Duel.CreateToken(tp,6100239)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
-- === 效果② ===
function s.cfilter(c,tp)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsType(TYPE_SYNCHRO) and c:IsControler(tp)
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
end
end
\ No newline at end of file
--无回响之祈
local s,id,o=GetID()
function s.initial_effect(c)
--①:抽卡并置顶
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--②:破坏代替
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.reptg)
e2:SetValue(s.repval)
e2:SetOperation(s.repop)
c:RegisterEffect(e2)
end
-- === 效果① ===
function s.topfilter(c)
return c:IsSetCard(0x613)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsPlayerCanDraw(tp,1)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=2
and Duel.IsExistingMatchingCard(s.topfilter,tp,LOCATION_DECK,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
-- 先抽卡
if Duel.Draw(tp,1,REASON_EFFECT)==0 then return end
-- 检查卡组是否有“朦雨”卡
local g=Duel.GetMatchingGroup(s.topfilter,tp,LOCATION_DECK,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) -- 提示文本:选择置顶的卡
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
if tc then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,SEQ_DECKTOP)
Duel.ConfirmDecktop(tp,1)
end
end
end
-- === 效果② ===
function s.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x613) and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and eg:IsExists(s.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function s.repval(e,c)
return s.repfilter(c,e:GetHandlerPlayer())
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_REPLACE)
end
\ No newline at end of file
--长廊的伞护
local s,id,o=GetID()
function s.initial_effect(c)
--①:发动处理(可选堆墓)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--②:攻守上升
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x613))
e2:SetValue(700)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--③:增加通召
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x613))
c:RegisterEffect(e4)
end
function s.tgfilter(c)
return c:IsSetCard(0x613) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
-- 作为发动时的效果处理
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
\ No newline at end of file
--天际的呼唤
local s,id,o=GetID()
function s.initial_effect(c)
--①:检索+特召
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--②:回收
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.rtg)
e2:SetOperation(s.rop)
c:RegisterEffect(e2)
end
-- === 效果① ===
function s.thfilter(c)
return c:IsSetCard(0x613) and c:IsLevel(4) and c:IsAbleToHand()
end
function s.lkfilter(c)
return c:IsSetCard(0x613) and c:IsType(TYPE_LINK) and c:IsFaceup()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND)
end
function s.cfilter(c)
return c:GetSequence()<5
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
local zone=Duel.GetLinkedZone(tp)
if zone~=0
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
and not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
end
end
-- === 效果② ===
function s.tdfilter(c)
return c:IsSetCard(0x613) and c:IsType(TYPE_LINK) and c:IsAbleToExtra()
end
function s.rtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToHand()
and Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.rop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
-- 怪兽回额外
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
-- 且回额外成功,自身回手卡
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
--织梦的裁断
local s,id,o=GetID()
function s.initial_effect(c)
--①:连锁封锁 + 降攻
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--②:改星 + 回卡组
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.lvtg)
e2:SetOperation(s.lvop)
c:RegisterEffect(e2)
end
-- === 效果① ===
function s.filter(c)
return c:IsFaceup() and c:IsSetCard(0x613) and c:IsType(TYPE_MONSTER)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
-- 这一回合,对方不能对应那只怪兽的效果的发动把卡的效果发动
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetLabelObject(tc)
e1:SetOperation(s.chainop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
-- 提示给玩家看
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
-- 6星以上的场合,选对方场上1只怪兽攻守变0
if tc:IsLevelAbove(6) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
local oc=g:GetFirst()
if oc then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK_FINAL)
e2:SetValue(0)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
oc:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_SET_DEFENSE_FINAL)
oc:RegisterEffect(e3)
end
end
end
end
function s.chainop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if re:GetHandler()==tc and ep==tp then
Duel.SetChainLimit(s.chainlm)
end
end
function s.chainlm(e,rp,tp)
return tp==e:GetHandlerPlayer()
end
-- === 效果② ===
function s.lvfilter(c)
return c:IsFaceup() and c:IsSetCard(0x613) and c:IsType(TYPE_MONSTER) and c:GetLevel()>0
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.lvfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsAbleToDeck() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_LVRANK)
local lv=Duel.AnnounceLevel(tp,1,7)
e:SetLabel(lv)
Duel.SetOperationInfo(0,CATEGORY_LVCHANGE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
local lv=e:GetLabel()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
-- 改星成功后,这张卡回到卡组
if c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
\ No newline at end of file
--赤晶的清扫
local s,id,o=GetID()
function s.initial_effect(c)
--①:回卡组 + 盖怪
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,id)
e1:SetTarget(s.tdtg)
e1:SetOperation(s.tdop)
c:RegisterEffect(e1)
--②:自我回收
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.setcon)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
end
-- === 效果① ===
function s.tdfilter1(c)
return c:IsSetCard(0x613) and c:IsAbleToDeck()
end
function s.tdfilter2(c)
return c:IsAbleToDeck()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(s.tdfilter1,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingTarget(s.tdfilter2,tp,0,LOCATION_GRAVE,1,nil) end
-- 选自己墓地1张
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectTarget(tp,s.tdfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
-- 选对方墓地1~2张
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,s.tdfilter2,tp,0,LOCATION_GRAVE,1,2,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,#g1,0,0)
-- 设置可能的位置变更提示
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE)
end
function s.lv4filter(c)
return c:IsSetCard(0x613) and c:IsLevel(4) and c:IsFaceup()
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup()
-- 只要有卡回到了卡组或额外卡组
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then
-- 检查自己场上是否有4星「朦雨」怪兽
if Duel.IsExistingMatchingCard(s.lv4filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local sg=Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,0,LOCATION_MZONE,1,1,nil)
if #sg>0 then
Duel.ChangePosition(sg,POS_FACEDOWN_DEFENSE)
end
end
end
end
end
-- === 效果② ===
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
return at:IsControler(tp) and at:IsSetCard(0x613)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
end
end
\ No newline at end of file
--琉璃梦醒之夜
local s,id,o=GetID()
function s.initial_effect(c)
--发动无效+回卡组+炸表侧魔陷
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_TODECK+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x613)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
-- 自己场上有「朦雨」怪兽存在
if not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
-- 魔法·陷阱·怪兽的效果发动时 (且可以被无效)
return Duel.IsChainNegatable(ev)
end
function s.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if #g>0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) then
rc:CancelToGrave() -- 阻止卡片进入墓地,以便洗回卡组
if Duel.SendtoDeck(rc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and rc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
-- 场上有表侧表示的魔法·陷阱卡存在的场合,再把那些卡全部破坏
local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if #g>0 then
Duel.BreakEffect()
Duel.Destroy(g,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--朦雨的调率·未都
local s,id,o=GetID()
function s.initial_effect(c)
--连接召唤
aux.AddLinkProcedure(c,s.matfilter,1,1)
c:EnableReviveLimit()
--①:特召触发加攻
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.atkcon)
e1:SetTarget(s.atktg)
e1:SetOperation(s.atkop)
c:RegisterEffect(e1)
--②:检索魔陷
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
-- 连接素材:连接怪兽以外的「朦雨」怪兽1只
function s.matfilter(c)
return c:IsSetCard(0x613) and not c:IsType(TYPE_LINK)
end
-- === 效果① ===
function s.cfilter(c,tp)
return c:IsSetCard(0x613) and c:IsControler(tp) and c:IsFaceup()
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,e:GetHandler(),tp)
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
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(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
-- === 效果② ===
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLinkedGroupCount()>0
end
function s.thfilter(c)
return c:IsSetCard(0x613) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--朦雨的伞宿·尤里卡
local s,id,o=GetID()
function s.initial_effect(c)
--连接召唤
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x613),2,2)
c:EnableReviveLimit()
--①:堆墓 + 加攻
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.atktg)
e1:SetOperation(s.atkop)
c:RegisterEffect(e1)
--②:翻卡检索
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+1)
e2:SetCost(s.thcost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
-- === 效果① ===
function s.tgfilter(c)
return c:IsSetCard(0x613) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,e:GetHandler(),1,0,0)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then
local c=e:GetHandler()
local lv=tc:GetLevel()
if c:IsRelateToEffect(e) and c:IsFaceup() and lv>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(lv*200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
end
-- === 效果② ===
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
if #g>0 then
Duel.DisableShuffleCheck()
-- 检查其中是否有「朦雨」卡
local tg=g:Filter(Card.IsSetCard,nil,0x613)
if #tg>0 and tg:IsExists(Card.IsAbleToHand,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=tg:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
g:Sub(sg)
end
-- 剩下的卡回到卡组(通常处理为洗回卡组)
if #g>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
\ No newline at end of file
--朦雨的卫护·诺瓦
local s,id,o=GetID()
function s.initial_effect(c)
--连接召唤:包含「朦雨」怪兽的怪兽2只以上
aux.AddLinkProcedure(c,nil,2,99,s.lcheck)
c:EnableReviveLimit()
--①:攻击对象限制 (嘲讽)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(s.atlimit)
c:RegisterEffect(e1)
--②:苏生至连接区 + 抗性
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--③:离场触发自我苏生 + 弹卡
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id+1)
e3:SetCondition(s.rescon)
e3:SetTarget(s.restg)
e3:SetOperation(s.resop)
c:RegisterEffect(e3)
end
-- 连接素材检查:包含「朦雨」怪兽
function s.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x613)
end
-- 效果①:对方不能选择这张卡以外的自己场上的怪兽作为攻击对象
function s.atlimit(e,c)
return c~=e:GetHandler()
end
-- 效果②
function s.spfilter(c,e,tp,zone)
return c:IsSetCard(0x613) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,tp,zone)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=e:GetHandler():GetLinkedZone(tp)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp,zone) end
if chk==0 then return zone~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local zone=c:GetLinkedZone(tp)
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and zone~=0 then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE,zone)>0 then
-- 赋予抗性:不会成为对方的效果的对象
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
-- 效果③
function s.resfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsSetCard(0x613)
and c:GetReasonPlayer()==1-tp
end
function s.rescon(e,tp,eg,ep,ev,re,r,rp)
-- 触发条件:自己场上的卡因对方(rp==1-tp)的效果离开场上
return rp==1-tp and eg:IsExists(s.resfilter,1,nil,tp)
end
function s.restg(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_TODECK,nil,1,1-tp,LOCATION_ONFIELD)
end
function s.resop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
-- 选对方场上1张卡回到持有者卡组
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
if #g>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
end
\ No newline at end of file
--朦雨的远目·艾科
local s,id,o=GetID()
function s.initial_effect(c)
--连接召唤:包含「朦雨」怪兽的怪兽3只以上
aux.AddLinkProcedure(c,nil,2,99,s.lcheck)
c:EnableReviveLimit()
--①:连接区有怪兽则加攻+抗性
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.cond1)
e1:SetValue(500)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--②:三选一 (二速)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(2,id)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetTarget(s.tgtg)
e3:SetOperation(s.tgop)
c:RegisterEffect(e3)
--③:暂时除外+回复
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_RECOVER)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id+1)
e4:SetCondition(s.rmcon)
e4:SetCost(s.rmcost)
e4:SetTarget(s.rmtg)
e4:SetOperation(s.rmop)
c:RegisterEffect(e4)
end
-- 连接素材检查
function s.lfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_SYNCHRO)
end
function s.lcheck(g)
return g:IsExists(s.lfilter,1,nil)
end
-- === 效果① ===
function s.cond1(e)
return e:GetHandler():GetLinkedGroupCount()>0
end
-- === 效果② ===
function s.tgfilter(c,atk)
return c:IsFaceup() and c:GetAttack()<atk
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local atk=c:GetAttack()
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc,atk) end
if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,0,LOCATION_MZONE,1,nil,atk) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.tgfilter,tp,0,LOCATION_MZONE,1,1,nil,atk)
local tc=g:GetFirst()
-- 构建选项
-- 选项0: 破坏 (默认总是显示,除非有极特殊情况,但作为效果选项通常列出)
-- 选项1: 无效 (需要表侧且非无效状态)
-- 选项2: 变成里侧 (需要可翻转)
local b_des=true
local b_neg=aux.NegateMonsterFilter(tc)
local b_set=tc:IsCanTurnSet()
local ops={}
local opval={}
local off=1
-- 选项:破坏
ops[off]=aux.Stringid(id,2)
opval[off]=0
off=off+1
-- 选项:效果无效
if b_neg then
ops[off]=aux.Stringid(id,3)
opval[off]=1
off=off+1
end
-- 选项:变成里侧
if b_set then
ops[off]=aux.Stringid(id,4)
opval[off]=2
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))
local sel=opval[op+1]
e:SetLabel(sel)
if sel==0 then
e:SetCategory(CATEGORY_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
elseif sel==1 then
e:SetCategory(CATEGORY_DISABLE)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
elseif sel==2 then
e:SetCategory(CATEGORY_POSITION)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local sel=e:GetLabel()
if tc:IsRelateToEffect(e) then
if sel==0 then
Duel.Destroy(tc,REASON_EFFECT)
elseif sel==1 then
if tc:IsFaceup() and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
elseif sel==2 then
if tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
end
end
-- === 效果③ ===
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(s.retop)
Duel.RegisterEffect(e1,tp)
end
end
function s.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,1000,REASON_EFFECT)
end
\ No newline at end of file
--朦雨的闪断·黎
local s,id,o=GetID()
function s.initial_effect(c)
--连接召唤:包含「朦雨」怪兽的怪兽3只以上
aux.AddLinkProcedure(c,nil,3,99,s.lcheck)
c:EnableReviveLimit()
--①:特召回合全抗(发动的效果)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.immcon)
e1:SetValue(s.efilter)
c:RegisterEffect(e1)
--②:回收墓地+盖怪 (战斗阶段)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetCountLimit(1,id)
e2:SetCondition(s.tdcon)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
--③:多次攻击
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EXTRA_ATTACK)
e3:SetValue(s.atkval)
c:RegisterEffect(e3)
--③:贯穿
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e4)
end
-- 连接素材检查
function s.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x613)
end
-- === 效果① ===
function s.immcon(e)
return e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN)
end
function s.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
-- === 效果② ===
function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function s.tdfilter(c)
return c:IsSetCard(0x613) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.posfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
-- 任意数量:从1到墓地总数
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,99,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0)
-- 盖怪是后续可选,不一定必选,且数量不确定,这里只做info提示
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,0,1-tp,LOCATION_MZONE)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if #tg==0 then return end
if Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
if ct>0 then
local pg=Duel.GetMatchingGroup(s.posfilter,tp,0,LOCATION_MZONE,nil)
if #pg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
-- 选最多有那个数量
local sg=pg:Select(tp,1,ct,nil)
Duel.HintSelection(sg)
Duel.ChangePosition(sg,POS_FACEDOWN_DEFENSE)
end
end
end
end
-- === 效果③ ===
function s.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x613)
end
function s.atkval(e,c)
-- 返回自己场上「朦雨」怪兽的数量
return Duel.GetMatchingGroupCount(s.atkfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
end
\ No newline at end of file
--朦雨的检者·瑠花
local s,id,o=GetID()
function s.initial_effect(c)
--同调召唤
-- 调整+调整以外的「朦雨」怪兽1只以上
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x613),1)
c:EnableReviveLimit()
--①:有连接怪兽则炸卡
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetCondition(s.descon)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
--②:连接状态回收怪兽 + 盖放魔陷
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.setcon)
e2:SetCost(s.setcost)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
end
-- === 效果① ===
function s.lkfilter(c)
return c:IsType(TYPE_LINK) and c:IsFaceup()
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
-- 自己场上有连接怪兽存在
return Duel.IsExistingMatchingCard(s.lkfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
-- === 效果② ===
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
-- 连接状态
return e:GetHandler():IsLinkState()
end
function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function s.tdfilter(c)
return c:IsSetCard(0x613) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function s.setfilter(c)
return c:IsSetCard(0x613) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
-- 选1只回到卡组
if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
-- 墓地选魔陷盖放
local sg=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_GRAVE,0,nil)
if #sg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tg=sg:Select(tp,1,1,nil)
Duel.SSet(tp,tg)
end
end
end
end
\ No newline at end of file
--朦雨的验官·薇斯帕
local s,id,o=GetID()
function s.initial_effect(c)
--同调召唤
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x613),1)
c:EnableReviveLimit()
--①:弹回魔陷
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--②:选2张魔陷,1盖1堆
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.stcon)
e2:SetTarget(s.sttg)
e2:SetOperation(s.stop)
c:RegisterEffect(e2)
end
-- === 效果① ===
function s.lkfilter(c)
return c:IsType(TYPE_LINK) and c:IsFaceup()
end
function s.stfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.stfilter(chkc) end
-- 获取自己场上连接怪兽数量
local ct=Duel.GetMatchingGroupCount(s.lkfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return ct>0
and Duel.IsExistingTarget(s.stfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
-- 最多有那个数量
local g=Duel.SelectTarget(tp,s.stfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
-- === 效果② ===
function s.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_HAND+LOCATION_DECK)
end
function s.stcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.basefilter(c)
return c:IsSetCard(0x613) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.setfilter_main(c,tp)
return s.basefilter(c) and c:IsSSetable()
and Duel.IsExistingMatchingCard(s.gyfilter_sub,tp,LOCATION_DECK,0,1,c,c:GetCode())
end
function s.gyfilter_sub(c,code)
return s.basefilter(c) and c:IsAbleToGrave() and not c:IsCode(code)
end
function s.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return false end
return Duel.IsExistingMatchingCard(s.setfilter_main,tp,LOCATION_DECK,0,1,nil,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.stop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g1=Duel.SelectMatchingCard(tp,s.setfilter_main,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc1=g1:GetFirst()
if tc1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,s.gyfilter_sub,tp,LOCATION_DECK,0,1,1,tc1,tc1:GetCode())
local tc2=g2:GetFirst()
if tc2 then
Duel.SSet(tp,tc1)
Duel.SendtoGrave(tc2,REASON_EFFECT)
end
end
end
\ No newline at end of file
--朦雨的巡长·阿斯特拉
local s,id,o=GetID()
function s.initial_effect(c)
--同调召唤
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x613),1)
c:EnableReviveLimit()
--①:自己回合双方不能除外
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_REMOVE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetCondition(s.limcon)
e1:SetValue(1)
c:RegisterEffect(e1)
--②:对方发动效果时送墓
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.gycon)
e2:SetTarget(s.gytg)
e2:SetOperation(s.gyop)
c:RegisterEffect(e2)
--③:结束阶段回收抽卡(不取对象)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+1)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
end
-- === 效果① ===
function s.limcon(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end
-- === 效果② ===
function s.lkfilter(c)
return c:IsType(TYPE_LINK) and c:IsLinkAbove(3) and c:IsFaceup()
end
function s.gycon(e,tp,eg,ep,ev,re,r,rp)
local loc=re:GetActivateLocation()
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
and (loc==LOCATION_HAND or loc==LOCATION_MZONE)
and Duel.IsExistingMatchingCard(s.lkfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.gytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsRelateToEffect(re) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,re:GetHandler(),1,0,0)
end
function s.gyop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsRelateToEffect(re) then
Duel.SendtoDeck(rc,nil,REASON_EFFECT)
end
end
-- === 效果③ ===
function s.tdfilter(c)
return c:IsSetCard(0x613) and c:IsAbleToDeck() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
-- 在效果处理时选卡(不取对象)
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if tc then
-- 提示选择的卡
Duel.HintSelection(g)
-- 回到卡组最下面 (SEQ_DECKBOTTOM = 1)
if Duel.SendtoDeck(tc,nil,SEQ_DECKBOTTOM,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
\ No newline at end of file
--幻叙救赎 光辉与荒诞之女
local s,id,o=GetID()
function s.initial_effect(c)
-- Max 3 triggers
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(3,id)
e1:SetCondition(s.tkcon)
e1:SetTarget(s.tktg)
e1:SetOperation(s.tkop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_REMOVE)
c:RegisterEffect(e2)
-- Token stat buff
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(s.bufftg)
e3:SetValue(s.buffval)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
end
function s.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and not (c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER)) and (c:IsLocation(LOCATION_GRAVE) or c:IsLocation(LOCATION_REMOVED))
end
function s.tkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(s.cfilter,nil,tp)
if chkc then return g:IsContains(chkc) end
if chk==0 then return #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x838,TYPE_TOKEN+TYPE_MONSTER,0,0,8,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,1,nil)
Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,sg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end
function s.tkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0x838,TYPE_TOKEN+TYPE_MONSTER,0,0,8,RACE_SPELLCASTER,ATTRIBUTE_LIGHT) then return end
local lv=tc:GetOriginalLevel()
if lv==0 then lv=8 end
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
local def=tc:GetTextDefense()
if def<0 then def=0 end
local race=tc:GetOriginalRace()
local att=tc:GetOriginalAttribute()
local token=Duel.CreateToken(tp,id+1)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
-- Apply Stats
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(def)
token:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(lv)
token:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_ADD_RACE)
e4:SetValue(race)
token:RegisterEffect(e4)
local e5=e1:Clone()
e5:SetCode(EFFECT_ADD_ATTRIBUTE)
e5:SetValue(att)
token:RegisterEffect(e5)
Duel.SpecialSummonComplete()
end
end
function s.bufftg(e,c)
return c:IsCode(id+1)
end
function s.buffval(e,c)
return e:GetHandler():GetDefense()/2
end
\ No newline at end of file
--幻叙幻现幻想奇谭
local s,id,o=GetID()
function s.initial_effect(c)
-- Activate card
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
-- Select one option
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(2,id)
e1:SetTarget(s.efftg)
e1:SetOperation(s.effop)
c:RegisterEffect(e1)
-- Change effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,4))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.chcon)
e2:SetTarget(s.chtg)
e2:SetOperation(s.chop)
c:RegisterEffect(e2)
end
function s.thfilter(c)
return c:IsSetCard(0x838) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToHand()
end
function s.tdfilter(c)
return c:IsSetCard(0x838) and c:IsAbleToDeck()
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x838) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.tgfilter(c)
return c:IsSetCard(0x838) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGrave()
end
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.CheckLPCost(tp,1000) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local b3=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return b1 or b2 or b3 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1)},
{b2,aux.Stringid(id,2)},
{b3,aux.Stringid(id,3)})
e:SetLabel(op)
if op==1 then
Duel.PayLPCost(tp,1000)
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
elseif op==2 then
e:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
elseif op==3 then
e:SetCategory(CATEGORY_TOGRAVE)
end
end
function s.effop(e,tp,eg,ep,ev,re,r,rp)
local op=e:GetLabel()
if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g1>0 and Duel.SendtoDeck(g1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g2>0 then
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end
end
elseif op==3 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(ATTRIBUTE_WATER)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function s.chcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsAttribute(ATTRIBUTE_WATER) and re:IsActiveType(TYPE_MONSTER)
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.FromCards(re:GetHandler())
Duel.ChangeChainOperation(ev,function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.Recover(tp,1000,REASON_EFFECT)
end
end)
end
--幻叙从者 希原夏森
--Talespace Servant Kiyohara Kasumi
local s,id,o=GetID()
function s.initial_effect(c)
--Send to GY
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Gain DEF
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(s.defop)
c:RegisterEffect(e3)
--Copy spell effect
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id+1)
e4:SetCondition(s.cpcon)
e4:SetCost(s.cpcost)
e4:SetTarget(s.cptg)
e4:SetOperation(s.cpop)
c:RegisterEffect(e4)
end
function s.tgfilter(c,check)
return c:IsSetCard(0x838) and c:IsAbleToGrave() and (check or c:IsAttribute(ATTRIBUTE_WATER))
end
function s.nonwater_filter(c)
return c:IsFaceup() and not c:IsAttribute(ATTRIBUTE_WATER)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local check=not Duel.IsExistingMatchingCard(s.nonwater_filter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil,check) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local check=not Duel.IsExistingMatchingCard(s.nonwater_filter,tp,LOCATION_MZONE,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil,check)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function s.defop(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_DEFENSE)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function s.cfilter(c)
return c:IsSummonLocation(LOCATION_EXTRA)
end
function s.cpcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil) and e:GetHandler():GetDefense()>=3000
end
function s.costfilter(c)
return c:IsCode(65133128) and c:IsAbleToGraveAsCost() and c:CheckActivateEffect(false,true,false)~=nil
end
function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
end
function s.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(true,true,true)
Duel.SendtoGrave(g,REASON_COST)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
te:SetLabelObject(e:GetLabelObject())
e:SetLabelObject(te)
Duel.ClearOperationInfo(0)
end
function s.cpop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if te then
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
end
\ No newline at end of file
--幻叙幻现幻想传说
local s,id,o=GetID()
function s.initial_effect(c)
--Ritual Summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetTarget(s.rstg)
e1:SetOperation(s.rsop)
c:RegisterEffect(e1)
--Search Continuous Spell
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+1)
e2:SetCost(s.thcost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.rfilter(c,e,tp)
return c:IsSetCard(0x838) and c:IsType(TYPE_RITUAL)
end
function s.matfilter(c)
return c:IsCode(65133126) and c:IsReleasable()
end
function s.RitualCheck(g,tp,c,lv,greater_or_equal)
if g:GetCount()==1 and g:GetFirst():IsLocation(LOCATION_MZONE) and g:GetFirst():IsCode(65133126) then return true end
return Auxiliary["RitualCheck"..greater_or_equal](g,c,lv) and Duel.GetMZoneCount(tp,g,tp)>0 and (not c.mat_group_check or c.mat_group_check(g,tp))
and (not Auxiliary.RCheckAdditional or Auxiliary.RCheckAdditional(tp,g,c))
end
function s.RitualUltimateFilter(c,filter,e,tp,m1,m2,level_function,greater_or_equal,chk)
if bit.band(c:GetType(),0x81)~=0x81 or (filter and not filter(c,e,tp,chk)) or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
if m2 then
mg:Merge(m2)
end
if c.mat_filter then
mg=mg:Filter(c.mat_filter,c,tp)
else
mg:RemoveCard(c)
end
local lv=level_function(c)
Auxiliary.GCheckAdditional=Auxiliary.RitualCheckAdditional(c,lv,greater_or_equal)
local res=mg:CheckSubGroup(s.RitualCheck,1,lv,tp,c,lv,greater_or_equal)
Auxiliary.GCheckAdditional=nil
return res
end
function s.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
local sg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(s.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,s.rfilter,e,tp,mg,sg,Card.GetLevel,"Equal")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.rsop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp)
local sg=Duel.GetMatchingGroup(s.matfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,s.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,s.rfilter,e,tp,mg,sg,Card.GetLevel,"Equal")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local lv=tc:GetLevel()
Auxiliary.GCheckAdditional=aux.RitualCheckAdditional(tc,lv,"Equal")
local mat=mg:SelectSubGroup(tp,s.RitualCheck,false,1,lv,tp,tc,lv,"Equal",sg)
Auxiliary.GCheckAdditional=nil
if not mat or #mat==0 then return end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
if Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)~=0 then
tc:CompleteProcedure()
--Immune effect
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(s.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1)
end
end
end
function s.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
function s.costfilter(c)
return c:IsSetCard(0x838) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.thfilter(c)
return c:IsSetCard(0x838) and c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--幻叙从者 埃吉尔
--Talespace Servant Aegir
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--Change Effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+1)
e2:SetCondition(s.chcon)
e2:SetCost(s.chcost)
e2:SetTarget(s.chtg)
e2:SetOperation(s.chop)
c:RegisterEffect(e2)
--Apply effects
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+2)
e3:SetCost(s.effcost)
e3:SetOperation(s.effop)
c:RegisterEffect(e3)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x838) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.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,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function s.chcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and rp~=tp
end
function s.chcostfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsReleasable()
end
function s.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.chcostfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,s.chcostfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.FromCards(re:GetHandler())
Duel.ChangeChainOperation(ev,s.repop)
--Cannot be target
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetValue(aux.imval1)
e:GetHandler():RegisterEffect(e2)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.Recover(tp,1000,REASON_EFFECT)
end
end
function s.effcostfilter(c)
return c:IsCode(65133124) and c:IsAbleToGraveAsCost()
end
function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.effcostfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.effcostfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function s.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--Water attribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(ATTRIBUTE_WATER)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
--Pierce damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PIERCE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER))
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
--幻叙之白银 瑞芙蕾希雅
local s,id,o=GetID()
function s.initial_effect(c)
--Treat as Normal
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_NORMAL)
c:RegisterEffect(e1)
--Remove Type Effect
local e2=e1:Clone()
e2:SetCode(EFFECT_REMOVE_TYPE)
e2:SetValue(TYPE_EFFECT)
c:RegisterEffect(e2)
--Apply one effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCountLimit(1,id)
e3:SetCondition(s.efcon)
e3:SetTarget(s.eftg)
e3:SetOperation(s.efop)
c:RegisterEffect(e3)
--Special Summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,5))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id)
e4:SetCost(s.spcost)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
s.talespace_reflexia=true --Identifier
function s.efcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and e:GetHandler():GetFlagEffect(id)==0
end
function s.eftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local b1=Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_MZONE,1,nil)
local b2=true
local b3=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND+LOCATION_MZONE+LOCATION_EXTRA)>0
local b4=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil,tp,POS_FACEDOWN)
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1)},
{b2,aux.Stringid(id,2)},
{b3,aux.Stringid(id,3)},
{b4,aux.Stringid(id,4)})
e:SetLabel(op)
if b4 then Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE)end
end
function s.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0)
local op=e:GetLabel()
if op==1 then
--Negate monster
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil)
if #g>0 then
local tc=g: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=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
end
elseif op==2 then
--ATK up
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
--Direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetCondition(s.dircon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e2)
c:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
end
elseif op==3 then
--Send to GY
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_RULE)
end
elseif op==4 then
--Banish face-down
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil,tp,POS_FACEDOWN)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end
end
end
function s.dircon(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer() and e:GetHandler():GetFlagEffect(id+1)~=0
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.spfilter(c,e,tp)
return (c:IsCode(id) or c.talespace_reflexia) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_DEFENSE) and c:IsType(TYPE_MONSTER)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP_DEFENSE)>0 then
--Negate effects
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
--幻叙的大总理 将军
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,65133150)
c:EnableReviveLimit()
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.FALSE)
c:RegisterEffect(e0)
--Special Summon procedure
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--Cannot be targeted
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:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--Cannot be attacked
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e3:SetValue(aux.imval1)
c:RegisterEffect(e3)
--Boosts other monsters
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(s.atktg)
e4:SetValue(600)
c:RegisterEffect(e4)
--Update DEF
local e5=e4:Clone()
e5:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e5)
--Battle destruction immunity
local e6=e4:Clone()
e6:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e6:SetValue(1)
c:RegisterEffect(e6)
--Set S/T cards
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_LEAVE_GRAVE)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
e7:SetTarget(s.settg)
e7:SetOperation(s.setop)
c:RegisterEffect(e7)
end
function s.spfilter(c)
return c:IsFaceup() and c:IsAbleToGraveAsCost()
end
function s.gcheck(g)
return g:FilterCount(Card.IsSetCard,nil,0x838)>0
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil)
return g:CheckSubGroup(s.gcheck,3,3)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil)
local sg=g:SelectSubGroup(tp,s.gcheck,false,3,3)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
end
return false
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=e:GetLabelObject()
if not sg then return end
Duel.SendtoGrave(sg,REASON_COST)
sg:DeleteGroup()
end
function s.atktg(e,c)
return c~=e:GetHandler()
end
function s.setfilter(c,id)
return aux.IsCodeListed(c,65133150) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,id) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local ct=3
if Duel.GetLocationCount(tp,LOCATION_SZONE)<3 then ct=Duel.GetLocationCount(tp,LOCATION_SZONE) end
if ct<=0 then return end
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,id)
if #g==0 then return end
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,3)
if sg then
Duel.SSet(tp,sg)
end
end
--将军的指令 募兵
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,65133150)
--Search or Special
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cfilter(c)
return c:IsSetCard(0x838) and c:IsFaceup()
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.filter(c)
return c:IsSetCard(0x838) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x838) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.shogunfilter(c)
return c:IsCode(65133150) and c:IsFaceup()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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 g2=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if g2:GetCount()>0 and Duel.IsExistingMatchingCard(s.shogunfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
local tc=g2:Select(tp,1,1,nil)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--幻叙的赤月要塞
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,65133150)
--Activate: Add Shogun
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--Summon Tokens
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(s.tkcon)
e2:SetCost(s.tkcost)
e2:SetTarget(s.tktg)
e2:SetOperation(s.tkop)
c:RegisterEffect(e2)
end
function s.filter(c)
return c:IsCode(65133150) and c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) 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 s.shogunfilter(c)
return c:IsCode(65133150) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function s.tkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.shogunfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
end
function s.tkcost(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 s.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,2500,500,6,RACE_WARRIOR,ATTRIBUTE_LIGHT) end --Assuming Token ID is id+1
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,0)
end
function s.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1
or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,2500,500,6,RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end
for i=1,2 do
local token=Duel.CreateToken(tp,id+1)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
\ No newline at end of file
--将军的怒火
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,65133150)
--Negate and wipe
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cfilter(c)
return c:IsSetCard(0x838) and c:IsFaceup()
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function s.shogunfilter(c)
return c:IsCode(65133150) and c:IsFaceup()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
if Duel.IsExistingMatchingCard(s.shogunfilter,tp,LOCATION_MZONE,0,1,nil) then
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
if #g>0 then
Duel.BreakEffect()
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
\ No newline at end of file
--将军的无敌铁幕
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,65133150)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--Unaffected by effects
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(s.immcon)
e2:SetTarget(s.immtg)
e2:SetValue(s.efilter)
c:RegisterEffect(e2)
--Self destruct
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(s.descon)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
--Turn counter
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e4:SetRange(LOCATION_SZONE)
e4:SetOperation(s.countop)
c:RegisterEffect(e4)
end
function s.shogunfilter(c)
return c:IsCode(65133150) and c:IsFaceup()
end
function s.immcon(e)
return Duel.IsExistingMatchingCard(s.shogunfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function s.immtg(e,c)
return c~=e:GetHandler()
end
function s.efilter(e,re)
return re:GetOwnerPlayer()~=e:GetHandlerPlayer() and re:IsActivated() and not e:GetHandler():IsCode(65133150)
end
function s.countop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then
local c=e:GetHandler()
local ct=c:GetTurnCounter()
c:SetTurnCounter(ct+1)
end
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetTurnCounter()>=3
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
--钢铁之心 鲍里斯
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,65133150)
--Fusion materials
c:EnableReviveLimit()
aux.AddFusionProcMixRep(c,true,true,s.matfilter,3,3)
--Special Summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetCountLimit(1,id)
e1:SetCondition(s.sprcon)
e1:SetTarget(s.sprtg)
e1:SetOperation(s.sprop)
c:RegisterEffect(e1)
--Cannot be Tributed
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_RELEASE)
c:RegisterEffect(e2)
--Cannot be Banished
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_REMOVE)
c:RegisterEffect(e3)
--Cannot be Material
local e4=e2:Clone()
e4:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e5)
local e6=e4:Clone()
e6:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e6)
local e7=e4:Clone()
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e7)
--Attack all
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE)
e8:SetCode(EFFECT_ATTACK_ALL)
e8:SetValue(1)
c:RegisterEffect(e8)
--Piercing damage
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e9)
--Negate effect
local e10=Effect.CreateEffect(c)
e10:SetCategory(CATEGORY_DISABLE+CATEGORY_REMOVE)
e10:SetType(EFFECT_TYPE_QUICK_O)
e10:SetCode(EVENT_CHAINING)
e10:SetRange(LOCATION_MZONE)
e10:SetCountLimit(1)
e10:SetCondition(s.negcon)
e10:SetCost(s.negcost)
e10:SetTarget(s.negtg)
e10:SetOperation(s.negop)
c:RegisterEffect(e10)
end
function s.matfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsLevelAbove(5)
end
function s.shogunfilter(c)
return c:IsCode(65133150) and c:IsFaceup()
end
function s.cmatfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsReleasable()
end
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.shogunfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and Duel.IsExistingMatchingCard(s.cmatfilter,tp,LOCATION_MZONE,0,2,nil)
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.cmatfilter,tp,LOCATION_MZONE,0,nil)
local sg=g:Select(tp,2,2,nil)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
end
return false
end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=e:GetLabelObject()
if not sg then return end
Duel.Release(sg,REASON_COST)
sg:DeleteGroup()
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and Duel.IsChainDisablable(ev)
end
function s.costfilter(c)
return aux.IsCodeListed(c,65133150) and c:IsAbleToRemoveAsCost()
end
function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,SHOGUN_ID) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
--幻叙之终末 天启骑士
--Talespace Apocalypse Knight
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--Pendulum Attribute
aux.EnablePendulumAttribute(c)
--Fusion Material
c:EnableReviveLimit()
aux.AddFusionProcFunFun(c,aux.FilterBoolFunction(Card.IsType,TYPE_NORMAL),s.matfilter,2,true)
--Deck Fusion
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_EXTRA)
e2:SetCountLimit(1,id)
e2:SetCondition(s.fuscon)
e2:SetTarget(s.fustg)
e2:SetOperation(s.fusop)
c:RegisterEffect(e2)
--Multi Effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id+1)
e3:SetCondition(s.effcon)
e3:SetTarget(s.efftg)
e3:SetOperation(s.effop)
c:RegisterEffect(e3)
end
function s.matfilter(c,fc,sumtype,tp)
return c:IsSetCard(0x838) and c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
function s.fuscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup()
end
function s.filter0(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end
function s.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function s.fusfilter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x838) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
and c:CheckFusionMaterial(m,nil,chkf)
end
function s.fcheck(tp,sg,fc)
return sg:IsExists(Card.IsFusionCode,1,nil,65133132)
end
function s.fustg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp,LOCATION_MZONE+LOCATION_GRAVE)
aux.FCheckAdditional=s.fcheck
local res=Duel.IsExistingMatchingCard(s.fusfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
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(s.fusfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
Debug.Message(res)
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.fusop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp,LOCATION_MZONE+LOCATION_GRAVE):Filter(s.filter1,nil,e)
aux.FCheckAdditional=s.fcheck
local sg1=Duel.GetMatchingGroup(s.fusfilter,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
aux.FCheckAdditional=nil
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(s.fusfilter,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
aux.FCheckAdditional=s.fcheck
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
aux.FCheckAdditional=nil
tc:SetMaterial(mat1)
Duel.SendtoDeck(mat1,nil,SEQ_DECKBOTTOM,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 s.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mat=c:GetMaterial()
local ct=0
if mat:IsExists(Card.IsType,1,nil,TYPE_FUSION) then ct=ct+1 end
if mat:IsExists(Card.IsType,1,nil,TYPE_SYNCHRO) then ct=ct+1 end
if mat:IsExists(Card.IsType,1,nil,TYPE_XYZ) then ct=ct+1 end
if mat:IsExists(Card.IsType,1,nil,TYPE_LINK) then ct=ct+1 end
if ct>4 then ct=4 end
if chk==0 then return ct>0 end
e:SetLabel(ct)
end
function s.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
for i=1,ct do
--Select effect
local op=Duel.SelectOption(tp,aux.Stringid(65133132,1),aux.Stringid(65133132,2),aux.Stringid(65133132,3),aux.Stringid(65133132,4))
if op==0 then
--Negate monster
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil)
if #g>0 then
local tc=g: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=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
end
elseif op==1 then
--ATK up
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
--Direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetCondition(s.dircon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e2)
c:RegisterFlagEffect(id+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
end
elseif op==2 then
--Send to GY
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_EXTRA)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_RULE)
end
elseif op==3 then
--Banish face-down
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil,tp,POS_FACEDOWN)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
end
end
end
end
function s.dircon(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer() and e:GetHandler():GetFlagEffect(id+1)~=0
end
\ No newline at end of file
--码丽丝褪色镜像
local s,id=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsCode(68059897) and c:IsAbleToRemoveAsCost(POS_FACEDOWN)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA+LOCATION_ONFIELD,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_EXTRA+LOCATION_ONFIELD,0,1,1,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
if sg:GetCount()>0 then
Duel.HintSelection(sg)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
--急袭猛禽-叛逆猎鹰
local s,id=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WINDBEAST),9,2,s.mfilter,aux.Stringid(id,0),2,s.xyzop)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(s.ovcon)
e1:SetCost(s.dfcost)
e1:SetTarget(s.dftg)
e1:SetOperation(s.dfop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
end
function s.mfilter(c,e,tp)
return c:IsType(TYPE_XYZ) and c:IsRankBelow(8) and c:IsAttribute(ATTRIBUTE_DARK)
end
function s.xyzop(e,tp,chk)
if chk==0 then return true end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(s.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function s.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_DARK)
end
function s.ovcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function s.dfcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.dftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetDefense()>=500 end
end
function s.dfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and c:GetDefense()>=500 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(-500)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(s.tgval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
function s.tgval(e,re,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsAttackAbove(e:GetHandler():GetDefense())
end
\ No newline at end of file
--惊乐园的向导 <α丑角>
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_DECK)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
e1:SetValue(SUMMON_VALUE_SELF)
c:RegisterEffect(e1)
--activate card
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id)
e3:SetTarget(s.acttg)
e3:SetOperation(s.actop)
c:RegisterEffect(e3)
local e2=e3:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e2)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id+o)
e4:SetCost(s.thcost)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
end
function s.spfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1) and c:IsAbleToGraveAsCost()
end
function s.mnfilter(c,g)
return g:IsExists(s.mnfilter2,1,c,c)
end
function s.mnfilter2(c,mc)
return c:GetLevel()-mc:GetLevel()==1
end
function s.fselect(g,tp)
return aux.mzctcheck(g,tp) and g:GetCount()==2
and g:IsExists(Card.IsSetCard,1,nil,0x15b)
and g:IsExists(s.mnfilter,1,nil,g)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil)
return g:CheckSubGroup(s.fselect,2,2,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:SelectSubGroup(tp,s.fselect,true,2,2,tp)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end
function s.actfilter(c,tp)
return c:IsCode(33773528) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.actfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp) end
end
function s.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.actfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
local te=tc:GetActivateEffect()
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
function s.thcfilter(c,tp)
return --c:IsSetCard(0x15b) and
c:IsAbleToGraveAsCost()
--and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil)
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil)
end
function s.thfilter(c)
return c:IsSetCard(0x15b,0x15c) and c:IsAbleToHand()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
--if chk==0 then return Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_SZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
--local g=Duel.SelectMatchingCard(tp,s.thcfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
local g=Duel.SelectMatchingCard(tp,s.thcfilter,tp,LOCATION_SZONE,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
--Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
--Duel.ConfirmCards(1-tp,g)
end
end
--暮光道猎人 费莉丝
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCondition(s.condition)
e2:SetTarget(s.target)
e2:SetOperation(s.operation)
c:RegisterEffect(e2)
end
function s.filter(c)
return c:IsSetCard(0x38) and c:IsLevelBelow(4) and c:IsAbleToHand()
end
function s.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x38) and c:IsAbleToRemoveAsCost()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.GetFlagEffect(tp,id)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsPreviousLocation(LOCATION_HAND) or c:IsPreviousLocation(LOCATION_GRAVE))
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,0,0,tp,3)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.DiscardDeck(tp,3,REASON_EFFECT)
end
end
--金枪鱼军贯
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.sptg1)
e2:SetOperation(s.spop1)
c:RegisterEffect(e2)
end
function s.costfilter(c)
return c:IsSetCard(0x166) and c:IsType(TYPE_MONSTER) and not c:IsCode(id) and c:IsAbleToGraveAsCost()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK,0,1,1,nil)
if Duel.SendtoGrave(g,REASON_COST)~=0 then
local tc=g:GetFirst()
local code=tc:GetCode()
e:SetLabel(code)
end
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local code=e:GetLabel()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and code and ((code==24639891 and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x166)) or (code~=24639891 and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,24639891))) and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,5))
--local g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x166)
local g=Group.CreateGroup()
if code==24639891 then
g=Duel.SelectMatchingCard(tp,Card.IsSetCard,tp,LOCATION_DECK,0,1,1,nil,0x166)
else
g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK,0,1,1,nil,24639891)
end
local tc=g:GetFirst()
if tc then
Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,SEQ_DECKTOP)
Duel.ConfirmDecktop(tp,1)
end
end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x166) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local g2=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0)
end
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and not tc:IsLevel(5) and Duel.SelectYesNo(tp,aux.Stringid(id,2))then
Duel.BreakEffect()
Duel.HintSelection(Group.FromCards(tc))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(5)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
--无敌军贯-金枪鱼级一号舰
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,24639891,7474643)
--xyz summon
aux.AddXyzProcedure(c,nil,5,2)
c:EnableReviveLimit()
--apply the effect
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(s.valcheck)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.effcon)
e1:SetTarget(s.efftg)
e1:SetOperation(s.effop)
c:RegisterEffect(e1)
e0:SetLabelObject(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_BATTLE_START+TIMING_BATTLE_END,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1)
e2:SetCondition(s.tgcon)
e2:SetTarget(s.tgtg)
e2:SetOperation(s.tgop)
c:RegisterEffect(e2)
end
function s.valcheck(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local flag=0
if c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0 then flag=flag|1 end
if c:GetMaterial():FilterCount(Card.IsCode,nil,7474643)>0 then flag=flag|2 end
e:GetLabelObject():SetLabel(flag)
end
function s.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.thfilter(c)
return c:IsSetCard(0x166) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local chk1=e:GetLabel()&1>0
local chk2=e:GetLabel()&2>0
if chk==0 then return chk1 and Duel.IsPlayerCanDraw(tp,1)
or chk2 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
e:SetCategory(0)
if chk1 then
e:SetCategory(CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
if chk2 then
e:SetCategory(e:GetCategory()|(CATEGORY_TOHAND+CATEGORY_SEARCH))
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function s.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chk1=e:GetLabel()&1>0
local chk2=e:GetLabel()&2>0
if chk1 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if chk2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local turn=Duel.GetTurnPlayer()
return (turn==1-tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) or turn==tp and (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
end
function s.ctfilter(c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsSetCard(0x166)
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=Duel.GetMatchingGroupCount(s.ctfilter,tp,LOCATION_ONFIELD,0,nil)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToGrave() end
if chk==0 then return ct>0 and Duel.IsExistingTarget(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #tg>0 then
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
--魔契的使徒
local s,id,o=GetID()
function s.initial_effect(c)
--recover
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.poscost)
e1:SetTarget(s.postg)
e1:SetOperation(s.posop)
c:RegisterEffect(e1)
--set s/t
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,id+1000)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function s.poscost(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 s.cfilter(c)
return c:IsFacedown() and c:IsSetCard(0x3cf0) and c:IsCanChangePosition()
end
function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN)
Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=Duel.GetFirstTarget()
Duel.SetOperationInfo(0,CATEGORY_POSITION,tc,1,0,0)
end
function s.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFacedown() then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
end
end
function s.filter(c)
return c:IsSetCard(0x3cf0) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc then Duel.SSet(tp,tc) end
end
--魔契的尘封典籍
local s,id,o=GetID()
function s.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,id)
e1:SetCost(s.cost)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.filter1(c,tp)
return c:IsType(TYPE_FUSION) and (c:IsSetCard(0x3cf0) or Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE,0,1,nil))
and Duel.IsExistingMatchingCard(s.filter3,tp,LOCATION_DECK,0,1,nil,c)
end
function s.filter2(c)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3cf0) and c:IsFaceup()
end
function s.filter3(c,fc)
return aux.IsMaterialListCode(fc,c:GetCode()) and c:IsAbleToHand()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_EXTRA,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_EXTRA,0,1,1,nil,tp)
Duel.ConfirmCards(1-tp,g)
e:SetLabelObject(g:GetFirst())
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local fc=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter3,tp,LOCATION_DECK,0,1,1,nil,fc)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x3cf0) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE) and c:IsFaceupEx()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
end
end
end
\ No newline at end of file
--魔契的契约卷轴
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and (c:CheckFusionMaterial(m,nil,chkf) or c.card_code_list~=nil and m:IsExists(s.sfilter,1,nil,c))
end
function s.sfilter(c,tc)
return aux.IsMaterialListCode(tc,c:GetCode())
end
function s.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(s.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(s.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 s.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
local sg1=Duel.GetMatchingGroup(s.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(s.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
local mgx=mg1:Filter(s.sfilter,nil,tc)
--
if #mgx>0 and (not tc:CheckFusionMaterial(mg1,nil,chkf) or Duel.SelectYesNo(tp,aux.Stringid(id,2))) then
mat1=mgx:Select(tp,1,1,nil)
else
mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
end
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
s.op(e,tp)
end
function s.op(e,tp)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetCondition(s.damcon)
e1:SetTarget(s.damtg)
e1:SetOperation(s.damop)
if Duel.GetCurrentPhase()<=PHASE_STANDBY then
e1:SetLabel(Duel.GetTurnCount())
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e1,tp)
end
end
function s.damcon(e,tp)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()==tp
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,2000)
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function s.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3cf0) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) end
if chk==0 then return e:GetHandler():IsAbleToDeck()
and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0
and c:IsLocation(LOCATION_DECK) and tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--魔契的禁忌封缄
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,4))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(aux.bfgcost)
e2:SetCountLimit(1,id)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3cf0) and c:IsCanChangePosition()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN)
local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,0,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function s.filter(c,e)
return c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup()
end
function s.filter1(c)
return c:IsFaceup() and c:IsCanChangePosition()
end
function s.filter2(c)
return c:IsFacedown() and c:IsCanChangePosition()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(s.filter,nil,e)
local ct=sg:GetCount()
if ct>0 and Duel.ChangePosition(sg,POS_FACEDOWN_DEFENSE)~=0 then
local b1=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
if (b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(id,2))
else
op=Duel.SelectOption(tp,aux.Stringid(id,3))+1
end
if op==0 then
local tg=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,ct,nil)
if tg:GetCount()>0 then
Duel.ChangePosition(tg,POS_FACEDOWN_DEFENSE)
end
else
local tg=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,ct,nil)
if tg:GetCount()>0 then
Duel.ChangePosition(tg,POS_FACEUP_ATTACK)
end
end
end
end
end
function s.setfilter(c)
return not c:IsCode(id) and c:IsSetCard(0x3cf0) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup() and c:IsSSetable()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.setfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.setfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,s.setfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SSet(tp,tc)
end
end
--魔契之兽 圣森珀伽索
local s,id,o=GetID()
function s.initial_effect(c)
c:SetUniqueOnField(1,0,id)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,93050000,s.matfilter,1,true,true)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.con)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,id+1000)
e3:SetCondition(s.drcon)
e3:SetCost(s.drcost)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function s.matfilter(c)
return c:IsRace(RACE_ILLUSION) and c:IsFusionAttribute(ATTRIBUTE_LIGHT)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.thfilter(c)
return c:IsSetCard(0x3cf0) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return ep~=tp and (LOCATION_HAND+LOCATION_ONFIELD)&loc~=0 and re:IsActiveType(TYPE_MONSTER)
end
function s.cfilter(c)
return c:IsFacedown() and c:IsSetCard(0x3cf0)
end
function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEUP_ATTACK)
end
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.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
--魔契之兽 大地贝希摩
local s,id,o=GetID()
function s.initial_effect(c)
c:SetUniqueOnField(1,0,id)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,93050000,s.matfilter,1,true,true)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.con)
c:RegisterEffect(e2)
--pierce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e3)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function s.matfilter(c)
return c:IsRace(RACE_BEAST) and c:IsFusionAttribute(ATTRIBUTE_EARTH)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x3cf0) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
end
end
--魔契之兽 雾沼许德拉
local s,id,o=GetID()
function s.initial_effect(c)
c:SetUniqueOnField(1,0,id)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,93050000,s.matfilter,1,true,true)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.con)
c:RegisterEffect(e2)
--cannot be target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetCondition(s.effcon)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function s.matfilter(c)
return c:IsRace(RACE_REPTILE) and c:IsFusionAttribute(ATTRIBUTE_WATER)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.spfilter(c,e,tp)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsSetCard(0x3cf0) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)~=0 and tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
end
end
end
function s.effcon(e)
return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,LOCATION_MZONE,0,1,nil)
end
--魔契之兽 深渊利维坦
local s,id,o=GetID()
function s.initial_effect(c)
c:SetUniqueOnField(1,0,id)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,93050000,s.matfilter,1,true,true)
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.con)
c:RegisterEffect(e2)
--disable special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_SUMMON)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+1000)
e3:SetCondition(s.discon)
e3:SetCost(s.discost)
e3:SetTarget(s.distg)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e4)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function s.matfilter(c)
return c:IsRace(RACE_SEASERPENT) and c:IsFusionAttribute(ATTRIBUTE_DARK)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3cf0)
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
function s.distg(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 s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
--魔契之兽 天空迦楼罗
local s,id,o=GetID()
function s.initial_effect(c)
c:SetUniqueOnField(1,0,id)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,93050000,s.matfilter,1,true,true)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.rmtg)
e1:SetOperation(s.rmop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.con)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+1000)
e3:SetCondition(s.negcon)
e3:SetCost(s.negcost)
e3:SetTarget(s.negtg)
e3:SetOperation(s.negop)
c:RegisterEffect(e3)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function s.matfilter(c)
return c:IsRace(RACE_WINDBEAST) and c:IsFusionAttribute(ATTRIBUTE_WIND)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.rmfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.rmfilter(chkc) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and ep~=tp and Duel.IsChainNegatable(ev)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3cf0)
end
function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
function s.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)
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--魔契之兽 熔岩萨拉曼
local s,id,o=GetID()
function s.initial_effect(c)
c:SetUniqueOnField(1,0,id)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,93050000,s.matfilter,1,true,true)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.con)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e3:SetCountLimit(1,id+1000)
e3:SetCost(s.discost)
e3:SetTarget(s.distg)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function s.matfilter(c)
return c:IsRace(RACE_PYRO) and c:IsFusionAttribute(ATTRIBUTE_FIRE)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function s.filter(c)
return c:IsFaceup()
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3cf0)
end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0)
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
if tc and tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e,false) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
end
--荒野君王解脱
function c9911752.initial_effect(c)
aux.AddCodeList(c,9911614)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9911752,0))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,9911752)
e2:SetTarget(c9911752.sctg)
e2:SetOperation(c9911752.scop)
c:RegisterEffect(e2)
--token
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(9911752,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,9911752)
e3:SetCost(c9911752.tkcost)
e3:SetTarget(c9911752.tktg)
e3:SetOperation(c9911752.tkop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(9911752,3))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_MOVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,9911753+EFFECT_COUNT_CODE_DUEL)
e4:SetCondition(c9911752.thcon)
e4:SetTarget(c9911752.thtg)
e4:SetOperation(c9911752.thop)
c:RegisterEffect(e4)
end
function c9911752.thfilter(c)
return aux.IsCodeOrListed(c,9911614) and c:IsAbleToHand()
end
function c9911752.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9911752.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c9911752.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9911752.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c9911752.costfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and c:IsLevelAbove(2) and Duel.GetMZoneCount(tp,c)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,9911753,0,TYPES_TOKEN_MONSTER,2500,2500,c:GetLevel()//2,RACE_ZOMBIE,ATTRIBUTE_FIRE)
end
function c9911752.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9911752.costfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,c9911752.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp):GetFirst()
e:SetLabel(tc:GetLevel()//2)
if Duel.Remove(tc,0,REASON_COST+REASON_TEMPORARY)~=0 then
if tc:IsType(TYPE_TOKEN) or tc:IsReason(REASON_REDIRECT) then return end
tc:RegisterFlagEffect(9911752,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(9911752,2))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetLabelObject(tc)
e1:SetCountLimit(1)
e1:SetCondition(c9911752.retcon)
e1:SetOperation(c9911752.retop)
e1:SetLabel(Duel.GetTurnCount())
Duel.RegisterEffect(e1,tp)
end
end
function c9911752.retcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return Duel.GetTurnCount()~=e:GetLabel() and tc:GetFlagEffect(9911752)~=0
end
function c9911752.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
function c9911752.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c9911752.tkop(e,tp,eg,ep,ev,re,r,rp)
local lv=e:GetLabel()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsPlayerCanSpecialSummonMonster(tp,9911753,0,TYPES_TOKEN_MONSTER,2500,2500,lv,RACE_ZOMBIE,ATTRIBUTE_FIRE) then
for i=1,2 do
local token=Duel.CreateToken(tp,9911753)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
e1:SetValue(lv)
token:RegisterEffect(e1,true)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
end
function c9911752.cfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_REMOVED)
and not c:IsReason(REASON_SPSUMMON)
end
function c9911752.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9911752.cfilter,1,nil,tp)
end
function c9911752.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c9911752.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
--消弥火灵
function c9911754.initial_effect(c)
--twist spsummon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC_G)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c9911754.spcon)
e1:SetOperation(c9911754.spop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9911754,0))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_CUSTOM+9911754)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,9911754)
e2:SetCondition(c9911754.drcon)
e2:SetCost(c9911754.drcost)
e2:SetTarget(c9911754.drtg)
e2:SetOperation(c9911754.drop)
c:RegisterEffect(e2)
--synchro effect
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,9911755)
e3:SetCondition(c9911754.sccon)
e3:SetCost(c9911754.sccost)
e3:SetTarget(c9911754.sctg)
e3:SetOperation(c9911754.scop)
c:RegisterEffect(e3)
if not c9911754.global_check then
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_MOVE)
ge1:SetCondition(c9911754.regcon)
ge1:SetOperation(c9911754.regop)
Duel.RegisterEffect(ge1,0)
end
end
function c9911754.rtfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsPreviousLocation(LOCATION_REMOVED)
and not c:IsReason(REASON_SPSUMMON)
end
function c9911754.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(c9911754.rtfilter,1,nil,0) then v=v+1 end
if eg:IsExists(c9911754.rtfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function c9911754.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+9911754,re,r,rp,ep,e:GetLabel())
end
function c9911754.spfilter(c,e,tp)
return c:IsSetCard(0xc958) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9911754.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return false end
local bg=Duel.GetMatchingGroup(c9911754.spfilter,tp,LOCATION_HAND,0,c,e,tp)
if #bg==0 then return false end
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
end
function c9911754.spop(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
local c=e:GetHandler()
local tp=c:GetControler()
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return false end
local bg=Duel.GetMatchingGroup(c9911754.spfilter,tp,LOCATION_HAND,0,c,e,tp)
if #bg==0 then return false end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local bc=bg:Select(tp,1,1,nil):GetFirst()
sg:AddCard(bc)
sg:AddCard(c)
end
function c9911754.drcon(e,tp,eg,ep,ev,re,r,rp)
return ev==tp or ev==PLAYER_ALL
end
function c9911754.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsPublic() end
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,66)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function c9911754.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,2)
end
function c9911754.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.Draw(p,3,REASON_EFFECT)==3 then
Duel.ShuffleHand(p)
Duel.BreakEffect()
Duel.DiscardHand(p,nil,2,2,REASON_EFFECT+REASON_DISCARD)
end
end
function c9911754.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c9911754.costfilter(c,mg,tp)
local g=mg:Filter(aux.TRUE,c)
return c:IsFaceup() and c:IsReleasable() and Duel.IsExistingMatchingCard(c9911754.scfilter,tp,LOCATION_EXTRA,0,1,nil,g,c:GetLevel(),c:GetLevel()*2,c:GetRank(),c:GetRank()*2,c:GetLink(),c:GetLink()*2)
end
function c9911754.scfilter(c,mg,lv1,lv2,lv3,lv4,lv5,lv6)
return c:IsLevel(lv1,lv2,lv3,lv4,lv5,lv6) and c:IsSynchroSummonable(nil,mg)
end
function c9911754.sccost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetSynchroMaterial(tp)
if chk==0 then return Duel.IsExistingMatchingCard(c9911754.costfilter,tp,0,LOCATION_MZONE,1,nil,g,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local tc=Duel.SelectMatchingCard(tp,c9911754.costfilter,tp,0,LOCATION_MZONE,1,1,nil,g,tp):GetFirst()
e:SetLabel(tc:GetLevel(),tc:GetLevel()*2,tc:GetRank(),tc:GetRank()*2,tc:GetLink(),tc:GetLink()*2)
Duel.Release(tc,REASON_COST)
end
function c9911754.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c9911754.scop(e,tp,eg,ep,ev,re,r,rp)
local lv1,lv2,lv3,lv4,lv5,lv6=e:GetLabel()
local g=Duel.GetMatchingGroup(c9911754.scfilter,tp,LOCATION_EXTRA,0,nil,g,lv1,lv2,lv3,lv4,lv5,lv6)
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
......@@ -851,6 +851,7 @@
!setname 0x409 罗星
!setname 0x40a 幻龙兽
!setname 0x340b 十七驱
!setname 0x540b 쫷纣��
#VHisc 916214730 332
!setname 0x321 锻溶
......
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