Commit 319927d8 authored by Nemo Ma's avatar Nemo Ma

upd 1116

parent 35381b6b
...@@ -2832,6 +2832,10 @@ ...@@ -2832,6 +2832,10 @@
60362066 0 60362066 0
74920585 0 74920585 0
77103950 1 77103950 1
#251116
40170018 0
40170042 0
40170072 0
#251019 #251019
7481457 0 7481457 0
11561002 0 11561002 0
......
No preview for this file type
expansions/pics/49811319.jpg

55.8 KB | W: | H:

expansions/pics/49811319.jpg

55.9 KB | W: | H:

expansions/pics/49811319.jpg
expansions/pics/49811319.jpg
expansions/pics/49811319.jpg
expansions/pics/49811319.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/49811420.jpg

57.6 KB | W: | H:

expansions/pics/49811420.jpg

61.4 KB | W: | H:

expansions/pics/49811420.jpg
expansions/pics/49811420.jpg
expansions/pics/49811420.jpg
expansions/pics/49811420.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/49811421.jpg

54.9 KB | W: | H:

expansions/pics/49811421.jpg

57.3 KB | W: | H:

expansions/pics/49811421.jpg
expansions/pics/49811421.jpg
expansions/pics/49811421.jpg
expansions/pics/49811421.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/49811422.jpg

47.9 KB | W: | H:

expansions/pics/49811422.jpg

48.2 KB | W: | H:

expansions/pics/49811422.jpg
expansions/pics/49811422.jpg
expansions/pics/49811422.jpg
expansions/pics/49811422.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/49811441.jpg

54.6 KB | W: | H:

expansions/pics/49811441.jpg

54.6 KB | W: | H:

expansions/pics/49811441.jpg
expansions/pics/49811441.jpg
expansions/pics/49811441.jpg
expansions/pics/49811441.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/49811442.jpg

53 KB | W: | H:

expansions/pics/49811442.jpg

54.9 KB | W: | H:

expansions/pics/49811442.jpg
expansions/pics/49811442.jpg
expansions/pics/49811442.jpg
expansions/pics/49811442.jpg
  • 2-up
  • Swipe
  • Onion skin
--原初星界灵
local s,id,o=GetID()
function s.initial_effect(c)
--effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(2,id) -- 改为最多使用2次
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--confirm
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+1)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
--effect gain
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BE_MATERIAL)
e4:SetProperty(EFFECT_FLAG_EVENT_PLAYER)
e4:SetCountLimit(1,id+2)
e4:SetCondition(s.effcon)
e4:SetOperation(s.effop)
c:RegisterEffect(e4)
end
function s.thfilter(c)
return c:IsSetCard(0xa225) 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.cfilter(c)
return c:IsType(TYPE_XYZ) and not c:IsPublic()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
e:SetLabel(tc:GetAttribute(),tc:GetRace(),tc:GetRank())
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local att,race,rk=e:GetLabel()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local c=e:GetHandler()
if #g>0 then
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(att)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(race)
tc:RegisterEffect(e2)
if tc:IsLevelAbove(1) then
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(rk)
tc:RegisterEffect(e3)
end
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
-- 修改③效果
function s.effcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_XYZ
end
function s.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(rc)
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.drtg)
e1:SetOperation(s.drop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
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)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.spcon)
c:RegisterEffect(e1)
--confirm
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+1)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
--special summon from grave
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(s.spcon2)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.spcfilter(c)
return not c:IsSetCard(0xa225) and not c:IsType(TYPE_XYZ) or c:IsFacedown()
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetMatchingGroupCount(s.spcfilter,tp,LOCATION_MZONE,0,nil)==0
end
function s.cfilter(c)
return c:IsType(TYPE_XYZ) and not c:IsPublic()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
e:SetLabel(tc:GetAttribute(),tc:GetRace(),tc:GetRank())
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local att,race,rk=e:GetLabel()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local c=e:GetHandler()
if #g>0 then
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(att)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(race)
tc:RegisterEffect(e2)
if tc:IsLevelAbove(1) then
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(rk)
tc:RegisterEffect(e3)
end
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
-- 新增③效果
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xa225) 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,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,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--星界灵探索者
local 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)
--confirm
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+1)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xa225) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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)>1
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,c,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,2,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,c,e,tp)
if #sg<=0 then return end
sg:AddCard(c)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
function s.cfilter(c)
return c:IsType(TYPE_XYZ) and not c:IsPublic()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
e:SetLabel(tc:GetAttribute(),tc:GetRace(),tc:GetRank())
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local att,race,rk=e:GetLabel()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local c=e:GetHandler()
if #g>0 then
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(att)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(race)
tc:RegisterEffect(e2)
if tc:IsLevelAbove(1) then
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(rk)
tc:RegisterEffect(e3)
end
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--星界灵统领者
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
c:SetSPSummonOnce(id)
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--get effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(s.efilter)
c:RegisterEffect(e2)
local e21=e2:Clone()
e21:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e21:SetValue(s.indval)
c:RegisterEffect(e21)
--confirm
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+1)
e3:SetTarget(s.target)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
end
function s.spcfilter(c)
return c:IsSetCard(0xa225) and c:IsFaceup()
end
function s.spcfilter2(c)
return c:IsSetCard(0x48) and not c:IsPublic()
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetMatchingGroupCount(s.spcfilter,tp,LOCATION_MZONE,0,nil)>0
and Duel.IsExistingMatchingCard(s.spcfilter2,tp,LOCATION_EXTRA,0,1,nil)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.spcfilter2,tp,LOCATION_EXTRA,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleExtra(tp)
end
function s.efilter(e,re)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsSetCard(0x48)
end
function s.indval(e,c)
return not c:IsSetCard(0x48)
end
function s.cfilter(c)
return c:IsType(TYPE_XYZ) and not c:IsPublic()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_EXTRA,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
local tc=g:GetFirst()
Duel.ConfirmCards(1-tp,tc)
e:SetLabel(tc:GetAttribute(),tc:GetRace(),tc:GetRank())
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local att,race,rk=e:GetLabel()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local c=e:GetHandler()
if #g>0 then
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(att)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(race)
tc:RegisterEffect(e2)
if tc:IsLevelAbove(1) then
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(rk)
tc:RegisterEffect(e3)
end
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--星界灵战场
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e0)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--atk up
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_XYZ))
e4:SetValue(700)
c:RegisterEffect(e4)
local e3=e4:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
local e5=e4:Clone()
e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e5:SetValue(s.indval)
c:RegisterEffect(e5)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0xa225) and c:IsType(TYPE_MONSTER) 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.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.sp_op(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_DECK,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.spop(e,tp,eg,ep,ev,re,r,rp)
s.sp_op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
function s.indval(e,c)
return not c:IsSetCard(0x48)
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_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.cfilter(c,tp)
local att=c:GetAttribute()
local race=c:GetRace()
return c:IsFaceup() and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil,att,race)
end
function s.cfilter2(c,att,race)
return c:IsFaceup() and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and c:GetAttribute()~=att and c:GetRace()~=race
end
function s.filter(c)
return ((c:IsSetCard(0xa225) and not c:IsCode(id)) or (c:IsSetCard(0x73) and c:IsType(TYPE_SPELL+TYPE_TRAP)) or c:IsSetCard(0x16a))
and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local max=1
if Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) then
max=2
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,max,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
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.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function s.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--星界灵的一击
local s,id,o=GetID()
function s.initial_effect(c)
--Activate(effect)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id+EFFECT_FLAG_COUNT_LIMIT)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--Activate(summon)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_SPSUMMON)
e2:SetCountLimit(1,id+EFFECT_FLAG_COUNT_LIMIT)
e2:SetCondition(s.condition1)
e2:SetTarget(s.target1)
e2:SetOperation(s.activate1)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsType(TYPE_SPELL))) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
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)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function s.cfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x48)
end
function s.condition1(e,tp,eg,ep,ev,re,r,rp)
return aux.NegateSummonCondition(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil)
end
function s.target1(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.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
local desg=eg:Clone()
if eg:IsExists(Card.IsType,1,nil,TYPE_XYZ) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
local g=eg:Filter(Card.IsType,nil,TYPE_XYZ)
local tmpg=Group.CreateGroup()
for tc in aux.Next(g) do
if tc:IsAbleToExtra() then
tc:CancelToGrave()
tmpg:AddCard(tc)
local code=tc:GetOriginalCodeRule()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE)
e1:SetTargetRange(0xff,0xff)
e1:SetLabel(code)
e1:SetTarget(s.code_tg)
e1:SetValue(0x48)
Duel.RegisterEffect(e1,tp)
end
end
if #tmpg>0 then
desg:Sub(tmpg)
Duel.SendtoDeck(tmpg,tp,2,REASON_EFFECT)
end
end
if #desg>0 then
Duel.Destroy(desg,REASON_EFFECT)
end
end
function s.code_tg(e,c)
return c:GetOriginalCodeRule()==e:GetLabel()
end
--星界灵转换
local s,id,o=GetID()
function s.initial_effect(c)
c:SetUniqueOnField(1,0,id)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e0:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE+TIMING_MAIN_END)
c:RegisterEffect(e0)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE+TIMING_MAIN_END)
e2:SetCountLimit(1)
e2:SetCost(s.spcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.cfilter(c,tp)
return c:IsType(TYPE_XYZ) and c:IsType(TYPE_MONSTER) and c:IsAbleToExtraAsCost() and Duel.GetLocationCountFromEx(tp,tp,c,TYPE_XYZ)>0
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x48) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp):GetFirst()
if tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end
Duel.SendtoDeck(tc,nil,2,REASON_COST)
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,e,tp) and (e:IsCostChecked() or Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_XYZ)>0) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_XYZ)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if sc then
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
if Duel.IsExistingMatchingCard(Card.IsCanOverlay,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local tg=Duel.SelectMatchingCard(tp,Card.IsCanOverlay,tp,LOCATION_GRAVE,0,1,2,nil)
Duel.HintSelection(tg)
Duel.Overlay(sc,tg)
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)
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:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
end
function s.filter(c)
return (c:IsSetCard(0xa225) or c:IsType(TYPE_XYZ)) and c:IsFaceupEx() and c:IsAbleToHand()
end
function s.target(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.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
--星界灵界
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(id,0))
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_TOEXTRA)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id)
e2:SetTarget(s.target)
e2:SetOperation(s.operation)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,id+1)
e3:SetCost(s.thcost)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
end
function s.filter(c,tp)
return c:IsAbleToRemove(tp) and c:IsType(TYPE_XYZ)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0 end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(tp,g)
if g:FilterCount(s.filter,nil,tp)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:FilterSelect(tp,s.filter,1,1,nil,tp)
local tc=sg:GetFirst()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if tc:IsAbleToExtra() then
Duel.BreakEffect()
Duel.SendtoDeck(tc,tp,2,REASON_EFFECT)
local code=tc:GetOriginalCodeRule()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE)
e1:SetTargetRange(0xff,0xff)
e1:SetLabel(code)
e1:SetTarget(s.code_tg)
e1:SetValue(0x48)
Duel.RegisterEffect(e1,tp)
end
end
end
Duel.ShuffleExtra(1-tp)
end
function s.code_tg(e,c)
return c:GetOriginalCodeRule()==e:GetLabel()
end
function s.thfilter(c)
return c:IsSetCard(0xa225) and c:IsAbleToHand() and not c:IsCode(id)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800)
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+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
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_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
...@@ -5,7 +5,7 @@ function s.initial_effect(c) ...@@ -5,7 +5,7 @@ function s.initial_effect(c)
--special summon effect --special summon effect
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
...@@ -35,61 +35,54 @@ function s.initial_effect(c) ...@@ -35,61 +35,54 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.mark_as_faceup(c) function s.filter(c,e,tp)
if c:GetLocation()==LOCATION_DECK then return c:IsSetCard(0x9225) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
c:ReverseInDeck()
c:RegisterFlagEffect(id+1000,RESET_EVENT+RESETS_STANDARD,0,1)
end
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetDecktopGroup(tp,3) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.ConfirmCards(tp,g) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local tc=g:GetFirst()
local sg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil) if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
if #sg>0 then local e1=Effect.CreateEffect(e:GetHandler())
if Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then e1:SetType(EFFECT_TYPE_SINGLE)
Duel.ConfirmCards(1-tp,sg) e1:SetCode(EFFECT_DISABLE)
g:Sub(sg) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
if #g>0 then tc:RegisterEffect(e1,true)
-- 确保卡片表面向上放回卡组 local e2=Effect.CreateEffect(e:GetHandler())
for tc in aux.Next(g) do e2:SetType(EFFECT_TYPE_SINGLE)
local e1=Effect.CreateEffect(e:GetHandler()) e2:SetCode(EFFECT_DISABLE_EFFECT)
e1:SetType(EFFECT_TYPE_SINGLE) e2:SetValue(RESET_TURN_SET)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) tc:RegisterEffect(e2,true)
e1:SetValue(LOCATION_DECKSHF)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e1)
end
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(tp)
for tc in aux.Next(g) do
s.mark_as_faceup(tc)
end
end
end
end end
local e1=Effect.CreateEffect(e:GetHandler()) Duel.SpecialSummonComplete()
e1:SetType(EFFECT_TYPE_FIELD) local e3=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTarget(s.splimit) e3:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END) e3:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end end
function s.splimit(e,c) function s.splimit(e,c)
return not (c:GetLevel()==7 or c:GetRank()==7) return not (c:GetLevel()==7 or c:GetRank()==7)
end end
function s.mark_as_faceup(c)
if c:GetLocation()==LOCATION_DECK then
c:ReverseInDeck()
c:RegisterFlagEffect(id+1000,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPosition(POS_FACEUP_ATTACK) or c:IsPosition(POS_FACEUP_DEFENSE) return c:IsPosition(POS_FACEUP_ATTACK) or c:IsPosition(POS_FACEUP_DEFENSE)
......
...@@ -74,9 +74,22 @@ function s.hop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,9 +74,22 @@ function s.hop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(tp,5) Duel.ConfirmDecktop(tp,5)
local revealed = Duel.GetDecktopGroup(tp, 5) local revealed = Duel.GetDecktopGroup(tp, 5)
revealed:AddCard(c) -- 修改:让玩家选择是否将手卡中的卡(包括这张卡)表面向上加入卡组
local hand_group = Group.CreateGroup()
local all_hand = Duel.GetFieldGroup(tp,LOCATION_HAND,0)
local return_count = revealed:GetCount() if #all_hand > 0 then
-- 询问玩家是否要将手卡中的卡表面向上加入卡组
if Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local selected = Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,0,1,all_hand)
if #selected > 0 then
hand_group:Merge(selected)
end
end
end
local return_count = revealed:GetCount() + hand_group:GetCount()
if return_count > 0 then if return_count > 0 then
-- 确保卡片表面向上放回卡组 -- 确保卡片表面向上放回卡组
for tc in aux.Next(revealed) do for tc in aux.Next(revealed) do
...@@ -88,11 +101,24 @@ function s.hop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,11 +101,24 @@ function s.hop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT) e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
for tc in aux.Next(hand_group) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(LOCATION_DECKSHF)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e1)
end
Duel.SendtoDeck(revealed,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(revealed,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.SendtoDeck(hand_group,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
for tc in aux.Next(revealed) do for tc in aux.Next(revealed) do
s.mark_as_faceup(tc) s.mark_as_faceup(tc)
end end
for tc in aux.Next(hand_group) do
s.mark_as_faceup(tc)
end
end end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -20,10 +20,10 @@ function s.initial_effect(c) ...@@ -20,10 +20,10 @@ function s.initial_effect(c)
e1:SetOperation(s.matop) e1:SetOperation(s.matop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw and attach --search or attach
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
...@@ -80,16 +80,7 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,16 +80,7 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(tp,5) Duel.ConfirmDecktop(tp,5)
local revealed = Duel.GetDecktopGroup(tp, 5) local revealed = Duel.GetDecktopGroup(tp, 5)
local attach_count = math.min(2, revealed:GetCount()) -- 修改:所有卡都表面向上加入卡组洗切,不再作为超量素材
if attach_count > 0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local attach_group = revealed:Select(tp,1,attach_count,nil)
if attach_group:GetCount() > 0 then
Duel.Overlay(c,attach_group)
revealed:Sub(attach_group)
end
end
local return_count = revealed:GetCount() local return_count = revealed:GetCount()
if return_count > 0 then if return_count > 0 then
-- 确保卡片表面向上放回卡组 -- 确保卡片表面向上放回卡组
...@@ -115,74 +106,97 @@ function s.drcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -115,74 +106,97 @@ function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x9225) and re:GetHandler():GetLocation()==LOCATION_DECK return re:GetHandler():IsSetCard(0x9225) and re:GetHandler():GetLocation()==LOCATION_DECK
end end
function s.thfilter(c)
return c:IsSetCard(0x9225) and (c:IsAbleToHand() or c:IsCanOverlay())
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
-- 同一连锁上不能发动 -- 同一连锁上不能发动
if Duel.GetFlagEffect(tp,id)~=0 then return false end if Duel.GetFlagEffect(tp,id)~=0 then return false end
return Duel.IsPlayerCanDraw(tp,2) return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
end end
-- 注册连锁标志 -- 注册连锁标志
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function s.drop(e,tp,eg,ep,ev,re,r,rp) function s.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.Draw(tp,2,REASON_EFFECT)==2 and c:IsRelateToEffect(e) and c:IsFaceup() then if not c:IsRelateToEffect(e) or not c:IsFaceup() then return end
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(Card.IsCanOverlay,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
if #g>0 then local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) if g:GetCount()>0 then
local sg=g:Select(tp,1,1,nil) local tc=g:GetFirst()
if #sg>0 then local b1=tc:IsAbleToHand()
local tc=sg:GetFirst() local b2=tc:IsCanOverlay() and c:IsType(TYPE_XYZ)
-- 如果是超量怪兽且有超量素材,先将其超量素材送去墓地
if tc:IsType(TYPE_XYZ) and tc:GetOverlayCount()>0 then if b1 and b2 then
local og=tc:GetOverlayGroup() local op=Duel.SelectOption(tp,aux.Stringid(id,3),aux.Stringid(id,4))
if og:GetCount()>0 then if op==0 then
Duel.SendtoGrave(og,REASON_RULE) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end Duel.ConfirmCards(1-tp,tc)
end else
Duel.Overlay(c,sg) Duel.Overlay(c,tc)
end end
elseif b1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
elseif b2 then
Duel.Overlay(c,tc)
end end
end end
end end
-- ③效果 - 完全重写以避免协程错误 -- ③效果 - 重写为新的效果
function s.rtcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.rtcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function s.rttg(e,tp,eg,ep,ev,re,r,rp,chk) function s.rttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then if chk==0 then
-- 同一连锁上不能发动 -- 同一连锁上不能发动
if Duel.GetFlagEffect(tp,id)~=0 then return false end if Duel.GetFlagEffect(tp,id)~=0 then return false end
-- 检查场上是否有可以返回卡组的卡 -- 检查场上有怪兽
return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
-- 注册连锁标志 -- 注册连锁标志
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,0,0,0)
end end
function s.rtop(e,tp,eg,ep,ev,re,r,rp) function s.rtop(e,tp,eg,ep,ev,re,r,rp)
-- 选择场上1张卡返回卡组 local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) -- 检查是否是乱流舞者怪兽
if g:GetCount()>0 then if tc:IsSetCard(0x9225) then
local tc=g:GetFirst() -- 让玩家选择处理方式
-- 确保卡片表面向上放回卡组 local op=Duel.SelectOption(tp,aux.Stringid(id,5),aux.Stringid(id,6))
local e1=Effect.CreateEffect(e:GetHandler()) if op==0 then
e1:SetType(EFFECT_TYPE_SINGLE) -- 变成里侧守备表示
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) else
e1:SetValue(LOCATION_DECKSHF) -- 表面向上加入卡组切洗
e1:SetReset(RESET_EVENT+RESETS_REDIRECT) local e1=Effect.CreateEffect(e:GetHandler())
tc:RegisterEffect(e1) e1:SetType(EFFECT_TYPE_SINGLE)
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
Duel.ShuffleDeck(tp) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
s.mark_as_faceup(tc) e1:SetValue(LOCATION_DECKSHF)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e1)
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(tp)
s.mark_as_faceup(tc)
end
else
-- 不是乱流舞者怪兽,只能变成里侧守备表示
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end end
end end
\ No newline at end of file
...@@ -42,11 +42,11 @@ function s.mark_as_faceup(c) ...@@ -42,11 +42,11 @@ function s.mark_as_faceup(c)
end end
function s.filter1(c) function s.filter1(c)
return c:IsFaceup() and c:IsSetCard(0x9225) and c:IsAbleToDeck() return c:IsFaceup() and c:IsSetCard(0x9225) and c:IsAbleToHand()
end end
function s.filter2(c) function s.filter2(c)
return c:IsAbleToDeck() return c:IsAbleToHand()
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -55,36 +55,19 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -55,36 +55,19 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return Duel.IsExistingTarget(s.filter1,tp,LOCATION_MZONE,0,1,nil) and return Duel.IsExistingTarget(s.filter1,tp,LOCATION_MZONE,0,1,nil) and
Duel.IsExistingTarget(s.filter2,tp,0,LOCATION_ONFIELD,1,nil) Duel.IsExistingTarget(s.filter2,tp,0,LOCATION_ONFIELD,1,nil)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil) local g1=Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectTarget(tp,s.filter2,tp,0,LOCATION_ONFIELD,1,2,nil) local g2=Duel.SelectTarget(tp,s.filter2,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,g1:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,g1:GetCount(),0,0)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e) local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then if sg:GetCount()>0 then
local tc=sg:GetFirst() Duel.SendtoHand(sg,nil,REASON_EFFECT)
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(LOCATION_DECKSHF)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e1)
tc=sg:GetNext()
end
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(tp)
local tc=sg:GetFirst()
while tc do
s.mark_as_faceup(tc)
tc=sg:GetNext()
end
end end
end end
......
...@@ -11,7 +11,7 @@ function s.initial_effect(c) ...@@ -11,7 +11,7 @@ function s.initial_effect(c)
--negate and draw --negate and draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DRAW) e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
...@@ -24,7 +24,7 @@ function s.initial_effect(c) ...@@ -24,7 +24,7 @@ function s.initial_effect(c)
--return to deck during end phase --return to deck during end phase
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TODECK) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
...@@ -67,13 +67,7 @@ function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -67,13 +67,7 @@ function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local og=tc:GetOverlayGroup() local og=tc:GetOverlayGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local sg=og:Select(tp,1,1,nil) local sg=og:Select(tp,1,1,nil)
local rc=sg:GetFirst() Duel.SendtoGrave(sg,REASON_COST)
Duel.SendtoGrave(rc,REASON_COST)
if rc:IsSetCard(0x9225) then
e:SetLabel(1)
else
e:SetLabel(0)
end
end end
end end
...@@ -83,9 +77,6 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -83,9 +77,6 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
if e:GetLabel()==1 then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
end end
function s.negop(e,tp,eg,ep,ev,re,r,rp) function s.negop(e,tp,eg,ep,ev,re,r,rp)
...@@ -110,13 +101,6 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp) ...@@ -110,13 +101,6 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
-- 添加选择是否抽卡的判断
if e:GetLabel()==1 and Duel.IsPlayerCanDraw(tp,1) then
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end end
end end
...@@ -129,6 +113,7 @@ function s.rtdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -129,6 +113,7 @@ function s.rtdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.rtdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(s.rtdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local ct=math.min(5,g:GetCount()) local ct=math.min(5,g:GetCount())
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,ct,tp,LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,ct,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function s.rtdop(e,tp,eg,ep,ev,re,r,rp) function s.rtdop(e,tp,eg,ep,ev,re,r,rp)
...@@ -137,12 +122,20 @@ function s.rtdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -137,12 +122,20 @@ function s.rtdop(e,tp,eg,ep,ev,re,r,rp)
local ct=math.min(5,g:GetCount()) local ct=math.min(5,g:GetCount())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,ct,nil) local sg=g:Select(tp,1,ct,nil)
if sg:GetCount()>0 then local return_count = sg:GetCount()
if return_count > 0 then
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
for tc in aux.Next(sg) do for tc in aux.Next(sg) do
s.mark_as_faceup(tc) s.mark_as_faceup(tc)
end end
-- 如果返回3张以上,可以抽1张卡
if return_count >= 3 and Duel.IsPlayerCanDraw(tp,1) then
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end end
end end
......
--混沌之笃信者
local s,id,o=GetID()
function c11771500.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11771500,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)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11771500,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+1)
e2:SetCost(s.spcost2)
e2:SetTarget(s.sptg1)
e2:SetOperation(s.spop1)
c:RegisterEffect(e2)
end
function s.costfilter(c)
return c:IsSetCard(0xcf) and c:IsType(TYPE_MONSTER) and not c:IsCode(11771500) 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
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK,0,1,1,nil)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
Duel.SendtoGrave(g,REASON_COST)
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()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.sptg1(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.spop1(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
if Duel.SelectYesNo(tp,aux.Stringid(11771500,1)) then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
end
function s.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
and not (c:IsType(TYPE_SYNCHRO) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK))
end
\ No newline at end of file
--混沌之仆从
local s,id,o=GetID()
function c11771505.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost1)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e4=e1:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--nontuner
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_NONTUNER)
e3:SetValue(s.tnval)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11771500,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+1)
e2:SetCost(s.spcost2)
e2:SetTarget(s.sptg1)
e2:SetOperation(s.spop1)
c:RegisterEffect(e2)
end
function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.filter(c)
return c:IsSetCard(0xcf) and (c:IsAbleToHand() or c:IsAbleToRemove()) and not c:IsSummonableCard() and c:IsType(TYPE_MONSTER)
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
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
if tc:IsAbleToHand() and (not tc:IsAbleToRemove() or Duel.SelectOption(tp,1190,1192)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
function s.tnval(e,c)
return e:GetHandler():IsControler(c:GetControler())
end
function s.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
and not (c:IsType(TYPE_SYNCHRO) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK))
end
function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.sptg1(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.spop1(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
if Duel.SelectYesNo(tp,aux.Stringid(11771500,1)) then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(4)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
end
\ No newline at end of file
--混沌之黑龙
local s,id,o=GetID()
function c11771510.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(72989439,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1)
e2:SetCost(s.spcost2)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--atk/lvup
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,3))
e3:SetRange(LOCATION_MZONE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1)
e3:SetOperation(s.operation)
c:RegisterEffect(e3)
end
function s.spcostfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetMZoneCount(tp)<=0 then return false end
local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil)
return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(tp,aux.gfcheck,true,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
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 sg=e:GetLabelObject()
Duel.Remove(sg,POS_FACEUP,REASON_SPSUMMON)
sg:DeleteGroup()
end
--
function s.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
and not (c:IsType(TYPE_SYNCHRO) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK))
end
function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
Duel.RegisterEffect(e1,tp)
end
function s.thfilter(c)
return c:IsSetCard(0xcf) and c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,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 Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_REMOVED)
and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD):Select(tp,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
end
--
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(-2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
--混沌之传道者
local s,id,o=GetID()
function c11771515.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xcf),aux.NonTuner(Card.IsSetCard,0xcf),1)
c:EnableReviveLimit()
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
e1:SetCondition(s.rmcon)
c:RegisterEffect(e1)
if not s.global_check then
s.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_REMOVE)
ge1:SetOperation(s.checkop)
Duel.RegisterEffect(ge1,0)
end
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69248256,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCountLimit(1,id)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11771500,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id)
e3:SetTarget(s.sptg1)
e3:SetOperation(s.spop1)
c:RegisterEffect(e3)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1)
end
function s.rmcon(e)
return Duel.GetFlagEffect(0,id)>0
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.filter(c)
return c:IsSetCard(0xcf) and c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
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
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()<=0 then return end
local tc=g:GetFirst()
if tc:IsAbleToRemove() then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--
function s.filter1(c,e,tp)
return c:IsSetCard(0xcf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.filter2(c)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil)
return c:IsSetCard(0xcf) and c:IsSynchroSummonable(nil,g)
end
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,nil,REASON_EFFECT)>0 then
if not (Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)) then return end
local g=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,2)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>1
and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
local g=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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