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

upd 1116

parent 35381b6b
......@@ -2832,6 +2832,10 @@
60362066 0
74920585 0
77103950 1
#251116
40170018 0
40170042 0
40170072 0
#251019
7481457 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)
--special summon effect
local e1=Effect.CreateEffect(c)
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:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -35,61 +35,54 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
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
function s.filter(c,e,tp)
return c:IsSetCard(0x9225) 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.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
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
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end
local g=Duel.GetDecktopGroup(tp,3)
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
if #sg>0 then
if Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,sg)
g:Sub(sg)
if #g>0 then
-- 确保卡片表面向上放回卡组
for tc in aux.Next(g) 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(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(tp)
for tc in aux.Next(g) do
s.mark_as_faceup(tc)
end
end
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
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,true)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.SpecialSummonComplete()
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetTargetRange(1,0)
e3:SetTarget(s.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function s.splimit(e,c)
return not (c:GetLevel()==7 or c:GetRank()==7)
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)
local c=e:GetHandler()
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)
Duel.ConfirmDecktop(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
-- 确保卡片表面向上放回卡组
for tc in aux.Next(revealed) do
......@@ -88,11 +101,24 @@ function s.hop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e1)
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(hand_group,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(tp)
for tc in aux.Next(revealed) do
s.mark_as_faceup(tc)
end
for tc in aux.Next(hand_group) do
s.mark_as_faceup(tc)
end
end
local e1=Effect.CreateEffect(c)
......
......@@ -20,10 +20,10 @@ function s.initial_effect(c)
e1:SetOperation(s.matop)
c:RegisterEffect(e1)
--draw and attach
--search or attach
local e2=Effect.CreateEffect(c)
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:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_CHAINING)
......@@ -80,16 +80,7 @@ function s.matop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(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()
if return_count > 0 then
-- 确保卡片表面向上放回卡组
......@@ -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
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)
if chk==0 then
-- 同一连锁上不能发动
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
-- 注册连锁标志
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
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.Draw(tp,2,REASON_EFFECT)==2 and c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(Card.IsCanOverlay,tp,LOCATION_HAND+LOCATION_ONFIELD,0,c)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:Select(tp,1,1,nil)
if #sg>0 then
local tc=sg:GetFirst()
-- 如果是超量怪兽且有超量素材,先将其超量素材送去墓地
if tc:IsType(TYPE_XYZ) and tc:GetOverlayCount()>0 then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
end
Duel.Overlay(c,sg)
if not c:IsRelateToEffect(e) or not c:IsFaceup() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
local b1=tc:IsAbleToHand()
local b2=tc:IsCanOverlay() and c:IsType(TYPE_XYZ)
if b1 and b2 then
local op=Duel.SelectOption(tp,aux.Stringid(id,3),aux.Stringid(id,4))
if op==0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.Overlay(c,tc)
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
-- ③效果 - 完全重写以避免协程错误
-- ③效果 - 重写为新的效果
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
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
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 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
-- 注册连锁标志
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
function s.rtop(e,tp,eg,ep,ev,re,r,rp)
-- 选择场上1张卡返回卡组
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
-- 确保卡片表面向上放回卡组
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)
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.ShuffleDeck(tp)
s.mark_as_faceup(tc)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
-- 检查是否是乱流舞者怪兽
if tc:IsSetCard(0x9225) then
-- 让玩家选择处理方式
local op=Duel.SelectOption(tp,aux.Stringid(id,5),aux.Stringid(id,6))
if op==0 then
-- 变成里侧守备表示
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
else
-- 表面向上加入卡组切洗
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)
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
\ No newline at end of file
......@@ -42,11 +42,11 @@ function s.mark_as_faceup(c)
end
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
function s.filter2(c)
return c:IsAbleToDeck()
return c:IsAbleToHand()
end
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
Duel.IsExistingTarget(s.filter2,tp,0,LOCATION_ONFIELD,1,nil)
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)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,s.filter2,tp,0,LOCATION_ONFIELD,1,2,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectTarget(tp,s.filter2,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,g1:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,g1:GetCount(),0,0)
end
function s.activate(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
local tc=sg:GetFirst()
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
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
......
......@@ -11,7 +11,7 @@ function s.initial_effect(c)
--negate and draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DRAW)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
......@@ -24,7 +24,7 @@ function s.initial_effect(c)
--return to deck during end phase
local e2=Effect.CreateEffect(c)
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:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_SZONE)
......@@ -67,13 +67,7 @@ function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
local og=tc:GetOverlayGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local sg=og:Select(tp,1,1,nil)
local rc=sg:GetFirst()
Duel.SendtoGrave(rc,REASON_COST)
if rc:IsSetCard(0x9225) then
e:SetLabel(1)
else
e:SetLabel(0)
end
Duel.SendtoGrave(sg,REASON_COST)
end
end
......@@ -83,9 +77,6 @@ function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
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
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)
tc:RegisterEffect(e3)
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
......@@ -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 ct=math.min(5,g:GetCount())
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,ct,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
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())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
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.ShuffleDeck(tp)
for tc in aux.Next(sg) do
s.mark_as_faceup(tc)
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
......
--混沌之笃信者
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
--混沌之暗影追猎者
local s,id,o=GetID()
function c11771520.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,s.matfilter1,nil,nil,s.matfilter2,1,99)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetCondition(s.rmcon)
e1:SetValue(s.val)
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(id,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_NO_TURN_RESET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.discon)
e2:SetCountLimit(1,id)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(36795102,0))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(2,id+1)
e3:SetCondition(s.spcon1)
e3:SetTarget(s.sptg1)
e3:SetOperation(s.spop1)
c:RegisterEffect(e3)
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
end
function s.val(e,re,dam,r,rp,rc)
return math.floor(dam/2)
end
function s.matfilter1(c,syncard)
return c:IsTuner(syncard) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function s.matfilter2(c,syncard)
return c:IsNotTuner(syncard) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
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.disfilter(c,tp)
return c:IsSetCard(0xcf) and c:IsType(TYPE_SYNCHRO)
and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsControler(tp)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(s.disfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function s.distg(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.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function s.disop(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.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcf) and c:IsType(TYPE_SYNCHRO)
end
function s.spcon1(e,tp,eg,ep,ev,re,r,rp)
return s.cfilter(Duel.GetAttacker()) or s.cfilter(Duel.GetAttackTarget())
end
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,0)
end
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
--混沌之巨斧大将军
local s,id,o=GetID()
function c11771525.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroMixProcedure(c,s.matfilter1,nil,nil,s.matfilter2,1,99)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetCondition(s.rmcon)
e1:SetValue(s.atlimit)
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(9464441,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.discon)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(2396042,0))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EVENT_BATTLE_START)
e3:SetCondition(s.adcon)
e3:SetOperation(s.adop)
c:RegisterEffect(e3)
end
function s.matfilter1(c,syncard)
return c:IsTuner(syncard) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function s.matfilter2(c,syncard)
return c:IsNotTuner(syncard) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
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.atlimit(e,c)
return c~=e:GetHandler()
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local c=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function s.distg(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.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function s.adcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsFaceup() and bc:IsAttribute(ATTRIBUTE_LIGHT)
end
function s.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if tc:IsFaceup() and tc:IsCanBeDisabledByEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--混沌之神 卡欧斯
local s,id,o=GetID()
function c11771530.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0xcf),s.matfilter2,1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(s.rmcon)
e1:SetTarget(s.efilter1)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_REMOVE)
c:RegisterEffect(e2)
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 e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(s.valcheck)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetCondition(s.regcon)
e4:SetOperation(s.regop)
c:RegisterEffect(e4)
e4:SetLabelObject(e3)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,3))
e5:SetCategory(CATEGORY_DRAW)
e5:SetRange(LOCATION_MZONE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_REMOVE)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCountLimit(2,id)
e5:SetTarget(s.target)
e5:SetOperation(s.activate)
c:RegisterEffect(e5)
end
function s.efilter(e,c,rp,r,re)
local tp=e:GetHandlerPlayer()
return c:IsSetCard(0xcf) and c:IsType(TYPE_SYNCHRO)
and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsControler(tp)
and r&REASON_EFFECT>0 and r&REASON_REDIRECT==0 and rp==1-tp
end
function s.efilter1(e,c,rp,r,re)
return c:IsSetCard(0xcf) and c:IsType(TYPE_SYNCHRO)
and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsControler(tp)
end
function s.matfilter2(c,syncard)
return c:IsNotTuner(syncard) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsType(TYPE_SYNCHRO)
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.valcheck(e,c)
local g=c:GetMaterial()
local att=0
local tc=g:GetFirst()
while tc do
att=bit.bor(att,tc:GetOriginalAttribute())
tc=g:GetNext()
end
e:SetLabel(att)
end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
and e:GetLabelObject():GetLabel()~=0
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local att=e:GetLabelObject():GetLabel()
local c=e:GetHandler()
if bit.band(att,ATTRIBUTE_LIGHT)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(39552584,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(s.spcost1)
e1:SetCondition(s.chcon)
e1:SetTarget(s.chtg)
e1:SetOperation(s.chop)
c:RegisterEffect(e1)
Duel.AdjustInstantly(c)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(22850702,0))
end
if bit.band(att,ATTRIBUTE_DARK)~=0 then
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9464441,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(s.spcost2)
e2:SetCondition(s.discon)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
Duel.AdjustInstantly(c)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(22850702,1))
end
end
function s.ccfilter1(c)
return c:IsAbleToRemove()
end
function s.ccfilter2(c)
return c:IsAbleToDeckAsCost() and c:IsSetCard(0xcf) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_DARK)
end
function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ccfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.ccfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp)
Duel.SendtoDeck(g,nil,nil,REASON_COST)
end
function s.chcon(e,tp,eg,ep,ev,re,r,rp)
local c=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER)
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ccfilter1,rp,0,LOCATION_ONFIELD+LOCATION_HAND,1,nil,REASON_EFFECT) end
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,s.repop)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
local tp=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_CONTROLER)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.ccfilter1,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,1,nil,e,tp)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_DISCARD)
end
----
function s.ccfilter3(c)
return c:IsAbleToDeckAsCost() and c:IsSetCard(0xcf) and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function s.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ccfilter3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.ccfilter3,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp)
Duel.SendtoDeck(g,nil,nil,REASON_COST)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end
function s.distg(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_REMOVE,eg,1,0,0)
end
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
--
function s.target(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.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--混沌界
local s,id,o=GetID()
function c11771535.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,897409+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCost(s.spcost2)
e2:SetCondition(s.rmcon)
e2:SetCountLimit(1,id+1)
e2:SetTarget(s.filter1)
e2:SetValue(500)
c:RegisterEffect(e2)
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 e4=e2:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,3))
e3:SetRange(LOCATION_FZONE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetCost(s.spcost2)
e3:SetTarget(s.rtgtg)
e3:SetCountLimit(1,id)
e3:SetOperation(s.rtgop)
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.filter(c)
return c:IsSetCard(0xcf) and (c:IsAbleToHand() or c:IsAbleToGrave()) and c:IsLevelBelow(4)
end
function s.activate(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:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
--
function s.filter1(e,c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and (c:IsAttribute(ATTRIBUTE_DARK) or c:IsAttribute(ATTRIBUTE_LIGHT))
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.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
and not (c:IsType(TYPE_SYNCHRO) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK))
end
--
function s.rtgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcf) and c:IsType(TYPE_MONSTER)
end
function s.rtgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.rtgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.rtgfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0)
end
function s.rtgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.rtgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xcf))
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
end
--混沌教会
local s,id,o=GetID()
function c11771540.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.spcost2)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(91420202,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id+2)
e2:SetCost(s.spcost2)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+1)
e3:SetCondition(aux.exccon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.thtg1)
e3:SetOperation(s.thop1)
c:RegisterEffect(e3)
end
function s.setfilter(c)
return c:IsSetCard(0xcf) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
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.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA)
and not (c:IsType(TYPE_SYNCHRO) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK))
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,sg:GetCount(),0,0)
end
function s.thop(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.thfilter(c)
return c:IsAbleToRemove()
end
function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rtgfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE+CATEGORY_TOHAND,nil,1,tp,nil)
end
function s.rtgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcf) and c:IsType(TYPE_MONSTER)
end
function s.rtgfilter1(c)
return (c:IsAttribute(ATTRIBUTE_DARK) or c:IsAttribute(ATTRIBUTE_LIGHT)) and c:IsType(TYPE_MONSTER) and c:IsLevelBelow(8) and c:IsLevelAbove(4) and not c:IsSummonableCard()
end
function s.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.rtgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
local tc=g:GetFirst()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
if Duel.IsExistingMatchingCard(s.rtgfilter1,tp,LOCATION_DECK,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tg=Duel.SelectMatchingCard(tp,s.rtgfilter1,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
end
--混沌怒火
local s,id,o=GetID()
function c11771545.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id)
e1:SetCondition(s.condition)
e1:SetTarget(aux.nbtg)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id)
e2:SetCost(s.setcost)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xcf) and c:IsType(TYPE_SYNCHRO)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function s.setfilter1(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end
function s.setfilter2(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToRemoveAsCost()
end
function s.spcostfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(s.setfilter2,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_GRAVE,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)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
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 Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--旋风战士 飞翼兽
function c16317000.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16317000)
e1:SetCost(c16317000.cost)
e1:SetCondition(c16317000.spcon)
e1:SetTarget(c16317000.sptg)
e1:SetOperation(c16317000.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,16317000+1)
e2:SetCost(c16317000.cost)
e2:SetTarget(c16317000.thtg)
e2:SetOperation(c16317000.thop)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e22)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE+LOCATION_REMOVED)
e3:SetCountLimit(1,16317000+2)
e3:SetCost(c16317000.cost)
e3:SetCondition(c16317000.thscon)
e3:SetTarget(c16317000.thstg)
e3:SetOperation(c16317000.thsop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(16317000,ACTIVITY_SPSUMMON,c16317000.counterfilter)
end
function c16317000.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
function c16317000.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(16317000,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(c16317000.splimit)
Duel.RegisterEffect(e1,tp)
end
function c16317000.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c16317000.thscon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return tc:IsSummonPlayer(tp) and tc:IsSummonType(SUMMON_TYPE_ADVANCE)
and tc:IsLevelAbove(7) and tc:IsFaceup()
end
function c16317000.thstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c16317000.thsop(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
function c16317000.thfilter(c)
return c:IsSetCard(0x5dc7) and c:IsType(0x1) and c:IsAbleToHand()
end
function c16317000.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16317000.thfilter,tp,0x11,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x11)
end
function c16317000.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16317000.thfilter),tp,0x11,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c16317000.spfilter(c,tp)
return c:IsControler(tp) and c:IsFaceup() and c:IsAttribute(0xf)
end
function c16317000.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16317000.spfilter,1,nil,tp)
end
function c16317000.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 c16317000.spop(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.GetFlagEffect(tp,59463312)~=0 then return end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16317000,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetValue(0x1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_EXTRA_SET_COUNT)
Duel.RegisterEffect(e2,tp)
Duel.RegisterFlagEffect(tp,59463312,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
--旋风战士 强风兽
function c16317005.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,16317005)
e1:SetCost(c16317005.cost1)
e1:SetTarget(c16317005.tg)
e1:SetOperation(c16317005.op)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,16317005+1)
e2:SetCost(c16317005.cost)
e2:SetTarget(c16317005.thtg)
e2:SetOperation(c16317005.thop)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e22)
--atk/def up
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_RELEASE)
e3:SetCountLimit(1,16317005+2)
e3:SetCost(c16317005.cost)
e3:SetTarget(c16317005.adtg)
e3:SetOperation(c16317005.adop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(16317005,ACTIVITY_SPSUMMON,c16317005.counterfilter)
end
function c16317005.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
function c16317005.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(16317005,tp,ACTIVITY_SPSUMMON)==0
and not e:GetHandler():IsPublic() 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(c16317005.splimit)
Duel.RegisterEffect(e1,tp)
end
function c16317005.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(16317005,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(c16317005.splimit)
Duel.RegisterEffect(e1,tp)
end
function c16317005.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c16317005.adfilter(c)
return c:IsFaceup() and c:IsAttribute(0xf)
end
function c16317005.adtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16317005.adfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c16317005.adop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c16317005.adfilter,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)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function c16317005.thfilter(c)
return c:IsSetCard(0x5dc7) and c:IsAbleToHand()
end
function c16317005.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16317005.thfilter,tp,0x11,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x11)
end
function c16317005.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16317005.thfilter),tp,0x11,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c16317005.disfilter(c)
return c:IsAttribute(0xf) and c:IsDiscardable(0x40)
end
function c16317005.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16317005.disfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c16317005.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,c16317005.disfilter,1,1,REASON_EFFECT+REASON_DISCARD)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_RELEASE_SUM)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
\ No newline at end of file
--旋风战士 大强风兽
function c16317010.initial_effect(c)
--summon with 1 tribute
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(16317010,1))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(c16317010.otcon)
e0:SetOperation(c16317010.otop)
e0:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e0)
local e01=e0:Clone()
e01:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e01)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16317010)
e1:SetCost(c16317010.cost)
e1:SetTarget(c16317010.postg)
e1:SetOperation(c16317010.posop)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e11)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(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(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE)
e2:SetCountLimit(1,16317010+1)
e2:SetCost(c16317010.cost)
e2:SetTarget(c16317010.target)
e2:SetOperation(c16317010.activate)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(16317010,ACTIVITY_SPSUMMON,c16317010.counterfilter)
end
function c16317010.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
function c16317010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(16317010,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(c16317010.splimit)
Duel.RegisterEffect(e1,tp)
end
function c16317010.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c16317010.posfilter2(c)
return not c:IsPosition(POS_FACEUP_DEFENSE) and c:IsCanChangePosition()
end
function c16317010.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16317010.posfilter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16317010.posfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c16317010.posfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c16317010.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE)
and not c:IsPosition(POS_FACEUP_DEFENSE) then
if Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c16317010.efilter)
tc:RegisterEffect(e1)
end
end
end
function c16317010.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c16317010.posfilter(c)
return not c:IsPosition(POS_DEFENSE) and c:IsCanChangePosition()
end
function c16317010.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16317010.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c16317010.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c16317010.spfilter(c,e,tp)
return c:IsLevelBelow(4) and (c:IsRace(RACE_WINDBEAST) or c:IsAttribute(ATTRIBUTE_WIND))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16317010.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c16317010.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
if tc:IsPosition(POS_FACEUP_ATTACK) and Duel.ChangePosition(tc,0x4)>0 and tc:IsControler(tp) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c16317010.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(16317010,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=sg:Select(tp,1,1,nil)
Duel.SpecialSummon(sg2,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function c16317010.otfilter(c)
return c:IsLevelAbove(5) and (c:IsAttribute(ATTRIBUTE_WIND) or c:IsRace(RACE_WINDBEAST))
end
function c16317010.otcon(e,c,minc)
if c==nil then return true end
local mg=Duel.GetMatchingGroup(c16317010.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end
function c16317010.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c16317010.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
\ No newline at end of file
--旋风战士 泽费强风兽
function c16317015.initial_effect(c)
--summon with 1 tribute
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(16317015,1))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(c16317015.otcon)
e0:SetOperation(c16317015.otop)
e0:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e0)
local e01=e0:Clone()
e01:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e01)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SUMMON+CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,16317015)
e1:SetCost(c16317015.cost)
e1:SetCondition(c16317015.atkcon)
e1:SetTarget(c16317015.target)
e1:SetOperation(c16317015.operation)
c:RegisterEffect(e1)
local e11=Effect.CreateEffect(c)
e11:SetCategory(CATEGORY_SUMMON+CATEGORY_POSITION+CATEGORY_DISABLE)
e11:SetType(EFFECT_TYPE_QUICK_O)
e11:SetCode(EVENT_CHAINING)
e11:SetRange(LOCATION_HAND)
e11:SetCountLimit(1,16317015)
e11:SetCost(c16317015.cost)
e11:SetCondition(c16317015.tgcon)
e11:SetTarget(c16317015.target)
e11:SetOperation(c16317015.operation)
c:RegisterEffect(e11)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,16317015+1)
e2:SetCost(c16317015.cost)
e2:SetTarget(c16317015.postg)
e2:SetOperation(c16317015.posop)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e22)
--pos
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHANGE_POS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,16317015+2)
e3:SetCost(c16317015.cost)
e3:SetCondition(c16317015.poscon2)
e3:SetTarget(c16317015.postg2)
e3:SetOperation(c16317015.posop2)
c:RegisterEffect(e3)
--banish
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DAMAGE+CATEGORY_TODECK)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_START)
e4:SetCountLimit(1,16317015+3)
e4:SetCost(c16317015.cost)
e4:SetTarget(c16317015.tdtg)
e4:SetOperation(c16317015.tdop)
c:RegisterEffect(e4)
Duel.AddCustomActivityCounter(16317015,ACTIVITY_SPSUMMON,c16317015.counterfilter)
end
function c16317015.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
function c16317015.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(16317015,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(c16317015.splimit)
Duel.RegisterEffect(e1,tp)
end
function c16317015.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c16317015.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc and tc:IsControler(1-tp) and tc:IsAbleToDeck() and tc:IsDefensePos()
and math.max(tc:GetBaseAttack(),tc:GetBaseDefense()) end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,0,0)
end
function c16317015.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc and tc:IsRelateToBattle() then
local dam=math.max(tc:GetBaseAttack(),tc:GetBaseDefense())
if Duel.Damage(1-tp,dam,0x40)>0 then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
function c16317015.poscon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE)
end
function c16317015.postg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanChangePosition() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0)
end
function c16317015.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
function c16317015.posop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.ChangePosition(c,POS_FACEUP_ATTACK) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c16317015.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
if Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(16317015,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,0x40)
end
end
end
function c16317015.posfilter(c)
return not c:IsPosition(POS_FACEUP_DEFENSE) and c:IsCanChangePosition()
end
function c16317015.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16317015.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c16317015.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c16317015.posop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c16317015.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end
end
function c16317015.atkcon(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttackTarget()
return Duel.GetAttacker():IsControler(1-tp) and at:IsControler(tp) and at:IsFaceup()
and (at:IsAttribute(ATTRIBUTE_WIND) or at:IsRace(RACE_WINDBEAST))
end
function c16317015.cfilter(c,tp)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsControler(tp)
and (c:IsAttribute(ATTRIBUTE_WIND) or c:IsRace(RACE_WINDBEAST))
end
function c16317015.tgcon(e,tp,eg,ep,ev,re,r,rp)
if rp~=1-tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c16317015.cfilter,1,nil,tp)
end
function c16317015.pnfilter(c)
return c:IsCanChangePosition() or aux.NegateMonsterFilter(c)
end
function c16317015.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c16317015.pnfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and (c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,0,0)
end
function c16317015.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c16317015.pnfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if not tc then return end
Duel.HintSelection(g)
local b1=tc:IsCanChangePosition()
local b2=aux.NegateMonsterFilter(tc)
local op=-1
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(16317015,3),aux.Stringid(16317015,4))
elseif b1 then
op=0
elseif b2 then
op=1
end
local ck=0
if op==0 then
if Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)>0 then
ck=1
end
elseif op==1 then
if tc:IsCanBeDisabledByEffect(e) then
ck=1
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
end
end
if ck==1 then
if not c:IsRelateToEffect(e) then return end
local pos=0
if c:IsSummonable(true,nil,1) then pos=pos+POS_FACEUP_ATTACK end
if c:IsMSetable(true,nil,1) then pos=pos+POS_FACEDOWN_DEFENSE end
if pos==0 then return end
Duel.BreakEffect()
if Duel.SelectPosition(tp,c,pos)==POS_FACEUP_ATTACK then
Duel.Summon(tp,c,true,nil,1)
else
Duel.MSet(tp,c,true,nil,1)
end
end
end
function c16317015.otfilter(c)
return c:IsLevelAbove(7) and (c:IsAttribute(ATTRIBUTE_WIND) or c:IsRace(RACE_WINDBEAST))
end
function c16317015.otcon(e,c,minc)
if c==nil then return true end
local mg=Duel.GetMatchingGroup(c16317015.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end
function c16317015.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c16317015.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
\ No newline at end of file
--旋风战士 中世纪公爵兽
function c16317020.initial_effect(c)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.FALSE)
c:RegisterEffect(e0)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,16317020)
e1:SetCost(c16317020.cost1)
e1:SetTarget(c16317020.tg)
e1:SetOperation(c16317020.op)
c:RegisterEffect(e1)
--position
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMING_BATTLE_START)
e2:SetCountLimit(1,16317020+1)
e2:SetCost(c16317020.cost)
e2:SetCondition(c16317020.poscon)
e2:SetTarget(c16317020.postg)
e2:SetOperation(c16317020.posop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,16317020+2)
e3:SetCost(c16317020.cost)
e3:SetCondition(c16317020.descon)
e3:SetTarget(c16317020.destg)
e3:SetOperation(c16317020.desop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_POSITION+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,16317020+3)
e4:SetCost(c16317020.cost)
e4:SetTarget(c16317020.destg)
e4:SetOperation(c16317020.desop)
c:RegisterEffect(e4)
local e44=e4:Clone()
e44:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e44)
Duel.AddCustomActivityCounter(16317020,ACTIVITY_SPSUMMON,c16317020.counterfilter)
end
function c16317020.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
function c16317020.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(16317020,tp,ACTIVITY_SPSUMMON)==0
and not e:GetHandler():IsPublic() 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(c16317020.splimit)
Duel.RegisterEffect(e1,tp)
end
function c16317020.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(16317020,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(c16317020.splimit)
Duel.RegisterEffect(e1,tp)
end
function c16317020.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c16317020.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_ADVANCE)
end
function c16317020.desfilter(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk)
end
function c16317020.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local atk=2000+1000*ct
if chk==0 then return Duel.IsExistingMatchingCard(c16317020.posfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c16317020.desfilter,tp,0,LOCATION_MZONE,1,nil,atk) end
local g=Duel.GetMatchingGroup(c16317020.posfilter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE)
end
function c16317020.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local atk=2000+1000*ct
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c16317020.posfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
if tc:IsPosition(POS_FACEUP_ATTACK) and Duel.ChangePosition(tc,0x4)>0 then
local ct=Duel.GetMatchingGroupCount(Card.IsDefensePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local atk=2000+1000*ct
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,c16317020.desfilter,tp,0,LOCATION_MZONE,1,1,nil,atk)
if #dg>0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,0x40)
end
end
end
end
function c16317020.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsBattlePhase()
end
function c16317020.posfilter(c)
return c:IsAttackPos() and c:IsCanChangePosition()
end
function c16317020.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c16317020.posfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16317020.posfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c16317020.posfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c16317020.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsAttackPos() and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)
end
if c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
function c16317020.pnfilter(c)
return c:IsCanChangePosition() and not c:IsPosition(POS_FACEUP_DEFENSE)
end
function c16317020.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c16317020.pnfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and (c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,PLAYER_ALL,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,0,0)
end
function c16317020.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c16317020.pnfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil)
if #g<1 then return end
Duel.HintSelection(g)
if Duel.ChangePosition(g,POS_FACEUP_DEFENSE)>0 then
if not c:IsRelateToEffect(e) then return end
local pos=0
if c:IsSummonable(true,nil,1) then pos=pos+POS_FACEUP_ATTACK end
if c:IsMSetable(true,nil,1) then pos=pos+POS_FACEDOWN_DEFENSE end
if pos==0 then return end
Duel.BreakEffect()
if Duel.SelectPosition(tp,c,pos)==POS_FACEUP_ATTACK then
Duel.Summon(tp,c,true,nil,1)
else
Duel.MSet(tp,c,true,nil,1)
end
end
end
\ No newline at end of file
--魔法国度 威彻尔尼
function c16317025.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--summon proc
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16317025,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetRange(LOCATION_FZONE)
e1:SetCondition(c16317025.otcon)
e1:SetTarget(c16317025.ottg)
e1:SetOperation(c16317025.otop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e11)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1,16317025)
e2:SetCost(c16317025.cost)
e2:SetCondition(c16317025.drcon)
e2:SetTarget(c16317025.drtg)
e2:SetOperation(c16317025.drop)
c:RegisterEffect(e2)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,16317025+1)
e3:SetCost(c16317025.cost)
e3:SetTarget(c16317025.target)
e3:SetOperation(c16317025.activate)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(16317025,ACTIVITY_SPSUMMON,c16317025.counterfilter)
end
function c16317025.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
function c16317025.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(16317025,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(c16317025.splimit)
Duel.RegisterEffect(e1,tp)
end
function c16317025.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c16317025.disfilter(c,tp)
return c:IsAttribute(0xf) and c:IsDiscardable(0x40)
and Duel.IsExistingMatchingCard(c16317025.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttribute())
end
function c16317025.thfilter(c,attr)
return c:IsSetCard(0x5dc7) and not c:IsAttribute(attr) and c:IsAbleToHand()
end
function c16317025.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16317025.disfilter,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16317025.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,c16317025.disfilter,1,1,REASON_EFFECT+REASON_DISCARD)~=0 then
local tc=Duel.GetOperatedGroup():GetFirst()
local attr=tc:GetAttribute()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16317025.thfilter,tp,LOCATION_DECK,0,1,1,nil,tp,attr)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c16317025.drcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return tc:IsSummonPlayer(tp) and tc:IsSummonType(SUMMON_TYPE_ADVANCE)
and tc:IsFaceup() and tc:IsAttribute(0xf)
end
function c16317025.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 c16317025.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c16317025.rmfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:IsAttribute(0xf)
end
function c16317025.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return minc<=2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16317025.rmfilter,tp,LOCATION_GRAVE,0,2,nil)
end
function c16317025.ottg(e,c)
local mi,ma=c:GetTributeRequirement()
return mi<=2 and ma>=2 and c:IsAttribute(0xf)
end
function c16317025.otop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c16317025.rmfilter,tp,LOCATION_GRAVE,0,2,2,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
c:SetMaterial(nil)
end
\ No newline at end of file
--旋风战士 风翼抱拥
function c16317030.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,16317030)
e1:SetCost(c16317030.cost)
e1:SetTarget(c16317030.postg)
e1:SetOperation(c16317030.posop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,16317030)
e2:SetCondition(c16317030.con)
e2:SetCost(c16317030.cost1)
e2:SetTarget(c16317030.tg)
e2:SetOperation(c16317030.op)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(16317030,ACTIVITY_SPSUMMON,c16317030.counterfilter)
end
function c16317030.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
function c16317030.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(16317030,tp,ACTIVITY_SPSUMMON)==0
and e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
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(c16317030.splimit)
Duel.RegisterEffect(e1,tp)
end
function c16317030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(16317030,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(c16317030.splimit)
Duel.RegisterEffect(e1,tp)
end
function c16317030.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c16317030.con(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,LOCATION_MZONE,0,1,nil,LOCATION_EXTRA)
end
function c16317030.thfilter(c,e,tp)
return c:IsLevelAbove(1) and c:IsSetCard(0x5dc7) and c:IsAbleToHand()
and Duel.IsExistingMatchingCard(c16317030.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp,c:GetLevel())
end
function c16317030.spfilter(c,e,tp,lv)
return c:IsLevelBelow(lv) and c:IsSetCard(0x5dc7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16317030.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16317030.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c16317030.thfilter1(c,e,tp)
return c:IsLevelAbove(1) and c:IsSetCard(0x5dc7) and c:IsAbleToHand()
end
function c16317030.spfilter1(c,e,tp)
return c:IsLevelAbove(1) and c:IsSetCard(0x5dc7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16317030.fselect(g,lv)
return g:GetSum(Card.GetLevel)<=lv
end
function c16317030.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16317030.thfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if Duel.SendtoHand(tc,nil,0x40)>0 and tc:IsLocation(0x2) then
local lv=tc:GetLevel()
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),2)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local tg=Duel.GetMatchingGroup(c16317030.spfilter1,tp,LOCATION_GRAVE,0,nil,e,tp)
if ft<=0 or #tg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=tg:SelectSubGroup(tp,c16317030.fselect,true,1,ft,lv)
local sc=sg:GetFirst()
while sc do
Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc: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)
sc=sg:GetNext()
end
if Duel.SpecialSummonComplete()>0 then
local g=Duel.GetMatchingGroup(c16317030.sumfilter,tp,LOCATION_HAND,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(16317030,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sc=g:Select(tp,1,1,nil):GetFirst()
Duel.ShuffleHand(tp)
Duel.Summon(tp,sc,true,nil,1)
else
Duel.ShuffleHand(tp)
end
end
end
end
end
function c16317030.sumfilter(c)
return c:IsSetCard(0x5dc7) and c:IsSummonable(true,nil,1)
end
function c16317030.posfilter(c)
return not c:IsPosition(POS_FACEUP_DEFENSE) and c:IsCanChangePosition()
end
function c16317030.postg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16317030.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c16317030.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c16317030.cfilter(c)
return c:IsPosition(POS_FACEUP_DEFENSE) and c:IsSetCard(0x5dc7)
end
function c16317030.posop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c16317030.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
if Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)>0 then
local sg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,nil)
if Duel.IsExistingMatchingCard(c16317030.cfilter,tp,LOCATION_MZONE,0,1,nil)
and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(16317030,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg2=sg:Select(tp,1,1,nil)
Duel.SendtoDeck(sg2,nil,2,0x40)
end
end
end
end
\ No newline at end of file
--人理彼面 幼体/提亚马特
function c22024700.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c22024700.mfilter,3,true)
--sum limit
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetCondition(c22024700.sumcon)
c:RegisterEffect(e0)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
--des
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22024700,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1,22024700)
e3:SetCondition(c22024700.epcon)
e3:SetTarget(c22024700.destg)
e3:SetOperation(c22024700.desop)
c:RegisterEffect(e3)
--lv
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22024700,1))
e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCountLimit(1,22024700)
e4:SetCondition(c22024700.epcon)
e4:SetOperation(c22024700.atkop)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22024700,2))
e5:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,22024701)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetCondition(c22024700.tdcon)
e5:SetTarget(c22024700.sptg2)
e5:SetOperation(c22024700.spop2)
c:RegisterEffect(e5)
--des
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(22024700,0))
e6:SetCategory(CATEGORY_DESTROY)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetRange(LOCATION_GRAVE)
e6:SetCode(EVENT_PHASE+PHASE_END)
e6:SetCountLimit(1,22024700)
e6:SetCondition(c22024700.erecon)
e6:SetCost(c22024700.erecost)
e6:SetTarget(c22024700.destg)
e6:SetOperation(c22024700.desop)
c:RegisterEffect(e6)
--lv
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(22024700,1))
e7:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e7:SetRange(LOCATION_GRAVE)
e7:SetCode(EVENT_PHASE+PHASE_END)
e7:SetCountLimit(1,22024700)
e7:SetCondition(c22024700.erecon)
e7:SetCost(c22024700.erecost)
e7:SetOperation(c22024700.atkop)
c:RegisterEffect(e7)
if not c22024700.global_flag then
c22024700.global_flag=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c22024700.regop)
Duel.RegisterEffect(ge1,0)
c22024700.global_flag=true
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_SUMMON_SUCCESS)
ge2:SetOperation(c22024700.regop)
Duel.RegisterEffect(ge2,0)
end
end
function c22024700.regop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsCode(22020000) then
Duel.RegisterFlagEffect(tp,22024700,0,0,0)
end
end
end
function c22024700.mfilter(c,fc,sub,mg,sg)
return c:IsRace(RACE_ALL) and (not sg
or not sg:IsExists(Card.IsRace,1,c,c:GetRace()))
end
function c22024700.cfilter(c)
return c:IsFaceup() and c:IsCode(22020000)
end
function c22024700.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,22024700)<1
end
function c22024700.epcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c22024700.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 sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c22024700.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
function c22024700.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(c:GetBaseAttack()+500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(c:GetBaseDefense()+500)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_LEVEL)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e3)
end
end
function c22024700.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBaseAttack()>=4500 and e:GetHandler():GetBaseDefense()>=4500 and e:GetHandler():IsLevelAbove(12)
end
function c22024700.spfilter(c,e,tp)
return c:IsCode(22024800) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial()
and (not sg or Duel.GetLocationCountFromEx(tp,tp,sg,c)>0)
end
function c22024700.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22024700.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_GRAVE) then
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22024700.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
local tc=g:GetFirst()
if tc then
tc:SetMaterial(nil)
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
end
function c22024700.erecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,22020980) and Duel.GetTurnPlayer()~=tp
end
function c22024700.erecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_CARD,0,22020980)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
\ No newline at end of file
--人王 盖提亚
function c22024710.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c22024710.hspcon)
e1:SetTarget(c22024710.hsptg)
e1:SetOperation(c22024710.hspop)
c:RegisterEffect(e1)
--summon success
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetOperation(c22024710.sumsuc)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c22024710.atkcon)
e3:SetValue(0)
c:RegisterEffect(e3)
--def
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_DEFENSE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c22024710.atkcon)
e4:SetValue(0)
c:RegisterEffect(e4)
end
function c22024710.hspfilter(c,tp)
return c:IsCode(22024690) and c:IsAbleToRemoveAsCost()
end
function c22024710.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c22024710.hspfilter,tp,LOCATION_GRAVE,0,1,nil,tp)
end
function c22024710.hsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c22024710.hspfilter,tp,LOCATION_GRAVE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:SelectUnselect(nil,tp,false,true,1,1)
if tc then
e:SetLabelObject(tc)
return true
else return false end
end
function c22024710.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
end
function c22024710.sumsuc(e,tp,eg,ep,ev,re,r,rp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetOperation(c22024710.tgop)
Duel.RegisterEffect(e3,tp)
end
function c22024710.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(tp,0)
end
function c22024710.atkfilter(c)
return c:IsFaceup() and c:IsCode(22020000)
end
function c22024710.atkcon(e)
local c=e:GetHandler()
return Duel.IsExistingMatchingCard(c22024710.atkfilter,c:GetControler(),0,LOCATION_ONFIELD,1,nil)
end
--人理之基 狮心王理查一世
function c22024720.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0xff1),1)
c:EnableReviveLimit()
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22024720,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,22024720)
e1:SetTarget(c22024720.sptg)
e1:SetOperation(c22024720.spop)
c:RegisterEffect(e1)
--code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_SZONE)
e2:SetValue(22020050)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_SZONE,0)
e3:SetTarget(c22024720.eftg)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--atk up
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_UPDATE_ATTACK)
e4:SetValue(900)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_SZONE,0)
e5:SetTarget(c22024720.eftg)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
--destroy
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(22024720,2))
e6:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e6:SetCategory(CATEGORY_DESTROY)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_SZONE)
e6:SetCountLimit(1)
e6:SetTarget(c22024720.destg)
e6:SetOperation(c22024720.desop)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e7:SetRange(LOCATION_MZONE)
e7:SetTargetRange(LOCATION_SZONE,0)
e7:SetTarget(c22024720.eftg)
e7:SetLabelObject(e6)
c:RegisterEffect(e7)
--spsummon
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(22024720,3))
e8:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_EQUIP)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetRange(LOCATION_GRAVE)
e8:SetCountLimit(1,22024720)
e8:SetCondition(c22024720.erecon)
e8:SetCost(c22024720.erecost)
e8:SetTarget(c22024720.sptg)
e8:SetOperation(c22024720.spop)
c:RegisterEffect(e8)
end
function c22024720.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,22024721,0,TYPES_TOKEN_MONSTER,1800,1800,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c22024720.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,22024721,0,TYPES_TOKEN_MONSTER,1800,1800,4,RACE_WARRIOR,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,22024721)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(22024720,1)) then
Duel.BreakEffect()
if not Duel.Equip(tp,token,c) then return end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(c22024720.eqlimit)
e3:SetLabelObject(tc)
e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e3)
end
end
end
function c22024720.eqlimit(e,c)
return e:GetOwner()==c
end
function c22024720.eftg(e,c)
return e:GetHandler():GetEquipGroup():IsContains(c)
end
function c22024720.filter1(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk)
end
function c22024720.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local atk=c:GetEquipTarget():GetAttack()
if chk==0 then return Duel.IsExistingMatchingCard(c22024720.filter1,tp,0,LOCATION_MZONE,1,c,atk) end
local g=Duel.GetMatchingGroup(c22024720.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,c,atk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c22024720.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=c:GetEquipTarget():GetAttack()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(c22024720.filter1,tp,0,LOCATION_MZONE,aux.ExceptThisCard(e),atk)
local ct=Duel.Destroy(g,REASON_EFFECT)
if ct>0 then
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
function c22024720.erecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,22020980)
end
function c22024720.erecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_CARD,0,22020980)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
\ No newline at end of file
--人理彼面 拉斯普京
function c22024730.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeFun(c,22021570,c22024730.matfilter,1,true,true)
--confirm
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22024730,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,22024730)
e1:SetCost(c22024730.cost)
e1:SetTarget(c22024730.cftg)
e1:SetOperation(c22024730.cfop)
c:RegisterEffect(e1)
--REMOVE
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22024730,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_HAND)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,22024731)
e2:SetCondition(c22024730.hdcon)
e2:SetTarget(c22024730.rmtg)
e2:SetOperation(c22024730.rmop)
c:RegisterEffect(e2)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetCondition(c22024730.indcon)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
--confirm
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22024730,0))
e5:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,22024730)
e5:SetCondition(c22024730.erecon)
e5:SetCost(c22024730.erecost)
e5:SetTarget(c22024730.cftg)
e5:SetOperation(c22024730.cfop)
c:RegisterEffect(e5)
--REMOVE
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(22024730,1))
e6:SetCategory(CATEGORY_REMOVE)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_TO_HAND)
e6:SetRange(LOCATION_GRAVE)
e6:SetCountLimit(1,22024731)
e6:SetCondition(c22024730.hdcon1)
e6:SetCost(c22024730.erecost1)
e6:SetTarget(c22024730.rmtg)
e6:SetOperation(c22024730.rmop)
c:RegisterEffect(e6)
end
function c22024730.matfilter(c)
return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsFusionSetCard(0xff1)
end
function c22024730.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,3,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,3,3,REASON_COST)
end
function c22024730.cftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,1-tp,LOCATION_EXTRA,0,1,nil) end
end
function c22024730.spfilter(c,e,tp)
return c:IsSetCard(0xff1) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22024730.cfop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(tp,g)
local g1=g:Filter(Card.IsAbleToRemove,nil,tp,POS_FACEUP)
local g2=g:Filter(c22024730.spfilter,nil,e,tp)
local b1=g1:GetCount()>0
local b2=g2:GetCount()>0
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(22024730,1)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(22024730,2)
opval[off-1]=2
off=off+1
end
ops[off]=aux.Stringid(22024730,3)
opval[off-1]=3
off=off+1
local op=Duel.SelectOption(tp,table.unpack(ops))
if opval[op]==1 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g1:Select(tp,1,3,nil)
if #sg>0 then
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
Duel.ShuffleExtra(1-tp)
elseif opval[op]==2 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g2:Select(tp,1,1,nil)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
Duel.ShuffleExtra(1-tp)
end
end
function c22024730.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function c22024730.hdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DRAW and eg:IsExists(c22024730.cfilter,1,nil,tp)
end
function c22024730.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function c22024730.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
function c22024730.indcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)~=0
end
function c22024730.erecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,22020980)
end
function c22024730.erecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,3,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,3,3,REASON_COST)
Duel.Hint(HINT_CARD,0,22020980)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c22024730.hdcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DRAW and eg:IsExists(c22024730.cfilter,1,nil,tp) and Duel.IsPlayerAffectedByEffect(tp,22020980)
end
function c22024730.erecost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_CARD,0,22020980)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
\ No newline at end of file
--人理之诗 零落泛滥的暗黑心脏
function c22024740.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22024740,1))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22024740)
e1:SetCost(c22024740.cost)
e1:SetTarget(c22024740.target)
e1:SetOperation(c22024740.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(1490690,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,22024741)
e2:SetCondition(c22024740.stcon)
e2:SetTarget(c22024740.sttg)
e2:SetOperation(c22024740.stop)
c:RegisterEffect(e2)
end
function c22024740.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,3,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,3,3,REASON_COST)
end
function c22024740.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c22024740.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,nil)
local g3=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
local sg=Group.CreateGroup()
if g1:GetCount()>0 and ((g2:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(22024740,1))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1)
end
if g2:GetCount()>0 and ((sg:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(22024740,2))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg2=g2:Select(tp,1,1,nil)
Duel.HintSelection(sg2)
sg:Merge(sg2)
end
if g3:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(22024740,3))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg3=g3:RandomSelect(tp,1)
sg:Merge(sg3)
end
if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(c22024740.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.Draw(tp,3,REASON_EFFECT)
end
end
function c22024740.cfilter(c)
return c:IsFaceup() and c:IsCode(22024730)
end
function c22024740.stcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER)
and re:GetHandler():IsSetCard(0xff1)
end
function c22024740.sttg(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 c22024740.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SSet(tp,c)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
end
--人理之基 托勒密
function c22024750.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--scale
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_LSCALE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(c22024750.slcon)
e2:SetValue(0)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22024750,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_PZONE)
e4:SetCountLimit(1,22024750)
e4:SetCost(c22024750.cost)
e4:SetTarget(c22024750.target)
e4:SetOperation(c22024750.operation)
c:RegisterEffect(e4)
--search
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22024750,1))
e5:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetCountLimit(1,22024751)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetTarget(c22024750.thtg)
e5:SetOperation(c22024750.thop)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
e6:SetCondition(c22024750.thcon)
c:RegisterEffect(e6)
--to grave
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(22024750,2))
e7:SetCategory(CATEGORY_TOGRAVE)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1,22024752)
e7:SetTarget(c22024750.gytg)
e7:SetOperation(c22024750.gyop)
c:RegisterEffect(e7)
--to grave ere
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(22024750,2))
e8:SetCategory(CATEGORY_TOGRAVE)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetRange(LOCATION_GRAVE)
e8:SetCountLimit(1,22024752)
e8:SetCondition(c22024750.erecon)
e8:SetCost(c22024750.erecost)
e8:SetTarget(c22024750.gytg)
e8:SetOperation(c22024750.gyop)
c:RegisterEffect(e8)
end
function c22024750.slcon(e)
return Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),22024750)
end
function c22024750.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c22024750.filter0(c)
return c:IsSetCard(0xff1) and c:IsAbleToHand() and c:IsType(TYPE_PENDULUM)
end
function c22024750.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22024750.filter0,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22024750.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22024750.filter0,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 c22024750.filter(c)
return c:IsSetCard(0xff1) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c22024750.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22024750.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22024750.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22024750.filter,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 c22024750.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c22024750.tgfilter(c,tp)
return Duel.IsExistingMatchingCard(c22024750.gyfilter,tp,0,LOCATION_ONFIELD,1,nil,c:GetColumnGroup())
end
function c22024750.gyfilter(c,g)
return g:IsContains(c)
end
function c22024750.gytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22024750.tgfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_ONFIELD)
end
function c22024750.gyop(e,tp,eg,ep,ev,re,r,rp)
local pg=Duel.SelectMatchingCard(tp,c22024750.tgfilter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
if pg:GetCount()==0 then return end
local g=Duel.GetMatchingGroup(c22024750.gyfilter,tp,0,LOCATION_ONFIELD,nil,pg:GetFirst():GetColumnGroup())
Duel.SendtoGrave(g,REASON_EFFECT)
end
function c22024750.erecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,22020980)
end
function c22024750.erecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_CARD,0,22020980)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
\ No newline at end of file
--睿智的接触
function c22024760.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22024760+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22024760.target)
e1:SetOperation(c22024760.activate)
c:RegisterEffect(e1)
end
function c22024760.filter(c,e,tp)
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,false,false)
end
function c22024760.penfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c22024760.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and c22024760.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c22024760.filter,tp,LOCATION_PZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c22024760.filter,tp,LOCATION_PZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c22024760.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP)>0 and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and Duel.IsExistingMatchingCard(c22024760.penfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(22024760,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c22024760.penfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc1=g:GetFirst()
if tc1 then
Duel.MoveToField(tc1,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
end
--人理之基 阿尔托莉雅·异灵·圣诞
function c22024770.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,4,2,nil,nil,99)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22024770,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c22024770.cost)
e1:SetTarget(c22024770.drtg)
e1:SetOperation(c22024770.drop)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22024770,1))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c22024770.cost)
e2:SetTarget(c22024770.tg)
e2:SetOperation(c22024770.op)
c:RegisterEffect(e2)
end
function c22024770.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 c22024770.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end
function c22024770.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
function c22024770.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,PLAYER_ALL,1800)
end
function c22024770.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,1800,REASON_EFFECT)
Duel.Recover(1-tp,1800,REASON_EFFECT)
end
\ No newline at end of file
--人理之基 贞德·异灵·圣诞·莉莉
function c22024780.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0xff1),1)
c:EnableReviveLimit()
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22024780,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,22024780)
e1:SetCondition(c22024780.thcon)
e1:SetTarget(c22024780.thtg)
e1:SetOperation(c22024780.thop)
c:RegisterEffect(e1)
--Ritual Summon
local e2=aux.AddRitualProcGreater2(c,c22024780.rfilter,LOCATION_HAND+LOCATION_DECK,nil,c22024780.mfilter,true)
e2:SetDescription(aux.Stringid(22024780,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,22024781)
c:RegisterEffect(e2)
--xyz summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22024780,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,22024781)
e3:SetTarget(c22024780.sptg)
e3:SetOperation(c22024780.spop)
c:RegisterEffect(e3)
--Ritual Summon ere
local e4=aux.AddRitualProcGreater2(c,c22024780.rfilter,LOCATION_HAND+LOCATION_DECK,nil,c22024780.mfilter,true)
e4:SetDescription(aux.Stringid(22024780,1))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCondition(c22024780.erecon)
e4:SetCost(c22024780.erecost)
e4:SetCountLimit(1,22024781)
c:RegisterEffect(e4)
end
function c22024780.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c22024780.thtg(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)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,2500)
end
function c22024780.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 then
Duel.Recover(1-tp,2500,REASON_EFFECT)
end
end
function c22024780.rfilter(c,e,tp,chk)
return c:IsCode(22020410,22020430) and c:IsType(TYPE_RITUAL)
end
function c22024780.mfilter(c)
return not c:IsLocation(LOCATION_HAND)
end
function c22024780.filter(c,e,tp,rk,mc)
return c:IsCode(22020770) and e:GetHandler():IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
function c22024780.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c22024780.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRank(),c) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22024780.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22024780.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetRank(),c)
local sc=g:GetFirst()
if sc then
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
end
sc:SetMaterial(Group.FromCards(c))
Duel.Overlay(sc,Group.FromCards(c))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end
end
function c22024780.erecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,22020980)
end
function c22024780.erecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_CARD,0,22020980)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
\ No newline at end of file
--人理之诗 军神之剑
function c22024790.initial_effect(c)
aux.AddCodeList(c,22023910)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22024790,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1)
e2:SetCondition(c22024790.drcon)
e2:SetTarget(c22024790.drtg)
e2:SetOperation(c22024790.drop)
c:RegisterEffect(e2)
--tohand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22024790,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,22024790)
e3:SetCost(c22024790.cost)
e3:SetTarget(c22024790.target)
e3:SetOperation(c22024790.operation)
c:RegisterEffect(e3)
--token
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22024790,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,22024791)
e4:SetCost(c22024790.cost)
e4:SetTarget(c22024790.sptg)
e4:SetOperation(c22024790.spop)
c:RegisterEffect(e4)
end
function c22024790.cfilter(c,tp)
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c22024790.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c22024790.cfilter,1,nil,tp)
end
function c22024790.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 c22024790.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c22024790.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c22024790.filter(c)
return c:IsCode(22023910) and c:IsAbleToHand()
end
function c22024790.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22024790.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22024790.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22024790.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
end
function c22024790.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22024791,0,TYPES_TOKEN_MONSTER+TYPE_TUNER,3000,3000,10,RACE_FAIRY,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c22024790.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22024791,0,TYPES_TOKEN_MONSTER+TYPE_TUNER,3000,3000,10,RACE_FAIRY,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,22024791)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--人理恶·回归 创世母神提亚马特
function c22024800.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c22024800.mfilter,2,true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.fuslimit)
c:RegisterEffect(e1)
--token
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22024800,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c22024800.tktg)
e2:SetOperation(c22024800.tkop)
c:RegisterEffect(e2)
--battle indestructable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
--code
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22024800,1))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(c22024800.thcost)
e4:SetTarget(c22024800.target)
e4:SetOperation(c22024800.operation)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22024800,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(c22024800.spcon)
e5:SetTarget(c22024800.sptg)
e5:SetOperation(c22024800.spop)
c:RegisterEffect(e5)
--win
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCode(EVENT_ADJUST)
e6:SetRange(LOCATION_MZONE)
e6:SetOperation(c22024800.winop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e7)
end
function c22024800.mfilter(c,fc,sub,mg,sg)
return c:IsRace(RACE_ALL) and (not sg
or not sg:IsExists(Card.IsRace,1,c,c:GetRace()))
end
function c22024800.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local ct=math.min(ft1,ft2)
if chk==0 then return ct>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22024801,0,TYPES_TOKEN_MONSTER,2500,2500,8,RACE_BEAST,ATTRIBUTE_DARK,POS_FACEUP)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22024801,0,TYPES_TOKEN_MONSTER,2500,2500,8,RACE_BEAST,ATTRIBUTE_DARK,POS_FACEUP,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,ct*2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,ct*2,0,0)
end
function c22024800.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local ct=math.min(ft1,ft2)
if ct>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22024801,0,TYPES_TOKEN_MONSTER,2500,2500,8,RACE_BEAST,ATTRIBUTE_DARK,POS_FACEUP)
and Duel.IsPlayerCanSpecialSummonMonster(tp,22024801,0,TYPES_TOKEN_MONSTER,2500,2500,8,RACE_BEAST,ATTRIBUTE_DARK,POS_FACEUP,1-tp) then
for i=1,ct do
local token=Duel.CreateToken(tp,22024801)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
token=Duel.CreateToken(tp,22024801)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end
end
function c22024800.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 c22024800.setfilter(c)
return c:IsFaceup() and not c:IsCode(22024800,22024801)
end
function c22024800.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22024800.setfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22024800.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c22024800.setfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
e:GetHandler():RegisterFlagEffect(22024800,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function c22024800.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() 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_CHANGE_CODE)
e1:SetValue(22024801)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c22024800.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
and c:IsPreviousControler(tp) and rp==1-tp
end
function c22024800.filter(c,e,tp)
return c:IsCode(22024800) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
and c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22024800.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22024800.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c22024800.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c22024800.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end
function c22024800.cfilter(c)
return c:IsFaceup() and c:IsCode(22024801)
end
function c22024800.winop(e,tp,eg,ep,ev,re,r,rp)
local WIN_REASON_GHOSTRICK_SPOILEDANGEL=0x11
if Duel.GetMatchingGroupCount(c22024800.cfilter,e:GetHandler():GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,nil)>10 then
Duel.Win(tp,WIN_REASON_GHOSTRICK_SPOILEDANGEL)
end
end
--魔法使之箱
function c22024810.initial_effect(c)
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22024810,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22024810+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c22024810.cost)
e1:SetTarget(c22024810.sptg)
e1:SetOperation(c22024810.spop)
c:RegisterEffect(e1)
end
function c22024810.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,2,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,2,2,REASON_COST+REASON_DISCARD)
end
function c22024810.filter0(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c22024810.filter1(c,e)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c22024810.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0xff1) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c22024810.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,22024811,0,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_SEASERPENT,ATTRIBUTE_LIGHT) and Duel.IsPlayerCanSpecialSummonMonster(tp,22024812,0,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_SEASERPENT,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c22024810.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,22024811,0,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_SEASERPENT,ATTRIBUTE_LIGHT)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,22024812,0,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_SEASERPENT,ATTRIBUTE_EARTH) then return end
local token=Duel.CreateToken(tp,22024811)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local token2=Duel.CreateToken(tp,22024812)
Duel.SpecialSummonStep(token2,0,tp,tp,false,false,POS_FACEUP)
if Duel.SpecialSummonComplete() then
--if (Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)>0 or Duel.SpecialSummon(token2,0,tp,tp,false,false,POS_FACEUP)>0) then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c22024810.filter0,nil,e)
local mg2=Duel.GetMatchingGroup(c22024810.filter1,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c22024810.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c22024810.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if (sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0)) and Duel.SelectYesNo(tp,aux.Stringid(22024810,0)) then
Duel.BreakEffect()
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,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,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
end
--人理彼面 阿昙矶良
function c22024820.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2FunRep(c,22024811,22024812,aux.FilterBoolFunction(Card.IsFusionType,TYPE_EFFECT),1,1,false,false)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22024820,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22024820)
e1:SetCondition(c22024820.rmcon)
e1:SetTarget(c22024820.rmtg)
e1:SetOperation(c22024820.rmop)
c:RegisterEffect(e1)
--destroy1
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(22024820,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetTarget(c22024820.target1)
e2:SetOperation(c22024820.operation1)
c:RegisterEffect(e2)
--token
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22024820,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,22024820)
e3:SetCost(c22024820.cost)
e3:SetTarget(c22024820.sptg)
e3:SetOperation(c22024820.spop)
c:RegisterEffect(e3)
--remove ere
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(22024820,0))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_GRAVE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,22024820)
e3:SetCondition(c22024820.rmcon1)
e3:SetCost(c22024820.erecost)
e3:SetTarget(c22024820.rmtg)
e3:SetOperation(c22024820.rmop)
c:RegisterEffect(e3)
--destroy ere
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22024820,0))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCondition(c22024820.erecon)
e4:SetCost(c22024820.erecost)
e4:SetTarget(c22024820.target1)
e4:SetOperation(c22024820.operation1)
c:RegisterEffect(e4)
end
function c22024820.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c22024820.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22024820.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,3,nil)
end
function c22024820.rmfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove()
end
function c22024820.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22024820.rmfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c22024820.rmfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c22024820.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22024820.rmfilter,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c22024820.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22024820.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(c22024820.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c22024820.operation1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22024820.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT)
end
function c22024820.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c22024820.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,22024811,0,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_SEASERPENT,ATTRIBUTE_LIGHT) and Duel.IsPlayerCanSpecialSummonMonster(tp,22024812,0,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_SEASERPENT,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c22024820.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,22024811,0,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_SEASERPENT,ATTRIBUTE_LIGHT)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,22024812,0,TYPES_TOKEN_MONSTER,1500,1500,4,RACE_SEASERPENT,ATTRIBUTE_EARTH) then return end
local token=Duel.CreateToken(tp,22024811)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local token2=Duel.CreateToken(tp,22024812)
Duel.SpecialSummonStep(token2,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
end
function c22024820.rmcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c22024820.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,3,nil) and Duel.IsPlayerAffectedByEffect(tp,22020980)
end
function c22024820.erecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_CARD,0,22020980)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c22024820.erecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,22020980)
end
\ No newline at end of file
--开辟海境的满干珠
function c22024830.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--race
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCode(EFFECT_ADD_ATTRIBUTE)
e2:SetValue(ATTRIBUTE_WATER)
c:RegisterEffect(e2)
--indestructable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c22024830.indtg)
e3:SetValue(c22024830.indct)
c:RegisterEffect(e3)
end
function c22024830.indtg(e,c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c22024830.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then
return 1
else return 0 end
end
\ No newline at end of file
--人理之星 天狼星
function c22024840.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,nil,c22024840.lcheck)
c:EnableReviveLimit()
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22024840,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,22024840)
e1:SetCondition(c22024840.thcon)
e1:SetTarget(c22024840.thtg)
e1:SetOperation(c22024840.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c22024840.valcheck)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_SET_ATTACK)
e3:SetCondition(c22024840.atkcon)
e3:SetValue(5000)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c22024840.valcheck1)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCondition(c22024840.regcon)
e5:SetOperation(c22024840.regop)
c:RegisterEffect(e5)
e4:SetLabelObject(e5)
--direct attack
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_DIRECT_ATTACK)
e6:SetCondition(c22024840.atkcon)
c:RegisterEffect(e6)
end
function c22024840.lcheck(g,lc)
return g:GetClassCount(Card.GetLinkCode)==g:GetCount()
end
function c22024840.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==1
end
function c22024840.thfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand() and not c:GetType()==TYPE_SPELL
end
function c22024840.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22024840.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22024840.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22024840.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 c22024840.valcheck(e,c)
local g=c:GetMaterial()
if (g:IsExists(Card.IsLinkCode,1,nil,22024811) or g:IsExists(Card.IsLinkCode,1,nil,22024820)) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
function c22024840.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(22024840)~=0
end
function c22024840.valcheck1(e,c)
local g=c:GetMaterial()
if (g:IsExists(Card.IsLinkCode,1,nil,22024812) or g:IsExists(Card.IsLinkCode,1,nil,22024820)) then
e:GetLabelObject():SetLabel(2)
else
e:GetLabelObject():SetLabel(0)
end
end
function c22024840.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and e:GetLabel()==2
end
function c22024840.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(22024840,RESET_EVENT+RESETS_STANDARD,0,1)
end
--照耀长夜的引导之星
function c22024850.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c22024850.cost)
c:RegisterEffect(e1)
--Effect Draw
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DRAW_COUNT)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0)
e2:SetValue(2)
c:RegisterEffect(e2)
--inactivatable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_INACTIVATE)
e3:SetRange(LOCATION_SZONE)
e3:SetValue(c22024850.effectfilter)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_DISEFFECT)
e4:SetRange(LOCATION_SZONE)
e4:SetValue(c22024850.effectfilter)
c:RegisterEffect(e4)
--set
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22024850,0))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_TO_HAND)
e5:SetCondition(c22024850.setcon)
e5:SetTarget(c22024850.settg)
e5:SetOperation(c22024850.setop)
c:RegisterEffect(e5)
end
function c22024850.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,3,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,3,3,REASON_COST+REASON_DISCARD)
end
function c22024850.effectfilter(e,ct)
local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return p==tp and te:GetHandler():IsSetCard(0xff1) and bit.band(loc,LOCATION_ONFIELD)~=0
end
function c22024850.setcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)>0 and re:GetHandler():IsType(TYPE_MONSTER)
and e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():IsPreviousControler(tp)
end
function c22024850.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c22024850.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--人理之基 托勒密
function c22024860.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--scale
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_LSCALE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(c22024860.slcon)
e2:SetValue(13)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CHANGE_RSCALE)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(22024860,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_PZONE)
e4:SetCountLimit(1,22024750)
e4:SetCost(c22024860.cost)
e4:SetTarget(c22024860.target)
e4:SetOperation(c22024860.operation)
c:RegisterEffect(e4)
--search
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(22024860,1))
e5:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SUMMON_SUCCESS)
e5:SetCountLimit(1,22024751)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetTarget(c22024860.thtg)
e5:SetOperation(c22024860.thop)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
e6:SetCondition(c22024860.thcon)
c:RegisterEffect(e6)
--Destroy
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(22024860,2))
e7:SetCategory(CATEGORY_DESTROY)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1,22024752)
e7:SetTarget(c22024860.destg)
e7:SetOperation(c22024860.desop)
c:RegisterEffect(e7)
--to grave ere
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(22024860,2))
e8:SetCategory(CATEGORY_DESTROY)
e8:SetType(EFFECT_TYPE_IGNITION)
e8:SetRange(LOCATION_GRAVE)
e8:SetCountLimit(1,22024752)
e8:SetCondition(c22024860.erecon)
e8:SetCost(c22024860.erecost)
e8:SetTarget(c22024860.destg)
e8:SetOperation(c22024860.desop)
c:RegisterEffect(e8)
end
function c22024860.slcon(e)
return Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_PZONE,0,1,e:GetHandler(),22024750)
end
function c22024860.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c22024860.filter0(c)
return c:IsSetCard(0xff1) and c:IsAbleToHand() and c:IsType(TYPE_PENDULUM)
end
function c22024860.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22024860.filter0,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22024860.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22024860.filter0,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 c22024860.filter(c)
return c:IsSetCard(0xff1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c22024860.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22024860.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c22024860.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22024860.filter,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 c22024860.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end
function c22024860.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c22024860.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22024860.filter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c22024860.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetChainLimit(c22024860.climit)
end
function c22024860.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22024860.filter,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
function c22024860.climit(e,lp,tp)
return lp==tp or not e:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c22024860.erecon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,22020980)
end
function c22024860.erecost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_CARD,0,22020980)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
\ No newline at end of file
--人理之星 达·芬奇
function c22024870.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0xff1),2)
c:EnableReviveLimit()
--ng
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c22024870.ngcon)
e1:SetOperation(c22024870.ngop)
c:RegisterEffect(e1)
--th
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c22024870.tgcon)
e2:SetOperation(c22024870.tgop)
c:RegisterEffect(e2)
end
function c22024870.ngcon(e,tp,eg,ep,ev,re,r,rp)
local te=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT)
return rp==tp and te:GetHandlerPlayer()==1-tp and eg:GetFirst():IsSetCard(0xa991) and Duel.GetFlagEffect(tp,22024870)==0
end
function c22024870.ngop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(22024870,0)) then
Duel.Hint(HINT_CARD,0,22024870)
local te=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT)
Duel.NegateEffect(ev-1)
Duel.RegisterFlagEffect(tp,22024870,RESET_PHASE+PHASE_END,0,1)
end
end
function c22024870.tgfil(c,type)
return c:IsSetCard(0xff1) and c:IsType(type) and c:IsAbleToHand()
end
function c22024870.tgcon(e,tp,eg,ep,ev,re,r,rp)
local te=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT)
local tc=eg:GetFirst()
local type=tc:GetType()
return rp==1-tp and te:GetHandlerPlayer()==tp and te:GetHandler():IsSetCard(0xff1) and Duel.GetFlagEffect(tp,22024871)==0
and Duel.IsExistingMatchingCard(c22024870.tgfil,tp,LOCATION_DECK,0,1,nil,type)
end
function c22024870.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
local type=tc:GetType()
if Duel.SelectYesNo(tp,aux.Stringid(22024870,1)) then
Duel.Hint(HINT_CARD,0,22024870)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c22024870.tgfil,tp,LOCATION_DECK,0,1,1,nil,type)
Duel.SendtoHand(g,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.RegisterFlagEffect(tp,22024871,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
--星之开拓者-莱昂纳多·达·芬奇
function c22024880.initial_effect(c)
--disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON)
e1:SetCondition(c22024880.condition)
e1:SetTarget(c22024880.target)
e1:SetOperation(c22024880.activate)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCost(c22024880.cost)
e2:SetDescription(aux.Stringid(22024880,1))
c:RegisterEffect(e2)
end
function c22024880.filter(c)
return c:IsType(TYPE_LINK) and c:IsSetCard(0xaff1)
end
function c22024880.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==ep and Duel.GetCurrentChain()==0 and eg:IsExists(c22024880.filter,1,nil)
end
function c22024880.target(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_TOEXTRA,eg,eg:GetCount(),0,0)
end
function c22024880.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
if Duel.SendtoDeck(eg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) then
local sc=Duel.GetFirstMatchingCard(c22024880.sfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if sc and Duel.SelectYesNo(tp,aux.Stringid(22024880,0)) then
Duel.BreakEffect()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c22024880.sfilter(c,e,tp)
return c:IsCode(22024870) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c22024880.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
\ No newline at end of file
--莱茵的黄金
function c22024890.initial_effect(c)
-- 主效果
local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22024890+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c22024890.condition)
e1:SetTarget(c22024890.target)
e1:SetOperation(c22024890.activate)
c:RegisterEffect(e1)
end
function c22024890.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c22024890.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingTarget(Card.IsAbleToGrave, tp, LOCATION_ONFIELD, 0, 1, e:GetHandler())
end
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave, tp, LOCATION_ONFIELD, 0, e:GetHandler())
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
local sg=Duel.SelectTarget(tp, Card.IsAbleToGrave, tp, LOCATION_ONFIELD, 0, 1, #g, e:GetHandler())
Duel.SetOperationInfo(0, CATEGORY_TOGRAVE, sg, #sg, 0, 0)
Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, #sg)
end
function c22024890.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS)
local g=tg:Filter(Card.IsRelateToEffect, nil, e)
if #g>0 then
-- 送墓处理(不直接使用返回值)
Duel.SendtoGrave(g, REASON_EFFECT)
-- 获取实际送入墓地的有效卡(排除Token)
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(c22024890.gravefilter,nil)
-- 执行抽卡
if ct>0 and Duel.IsPlayerCanDraw(tp, ct) then
Duel.BreakEffect()
Duel.Draw(tp, ct, REASON_EFFECT)
end
end
end
-- 自定义过滤器:判断是否为有效送入墓地的卡
function c22024890.gravefilter(c)
return c:IsLocation(LOCATION_GRAVE)
end
\ No newline at end of file
--幻想魔杖·华丽融合
function c22024900.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,22024900+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c22024900.target)
e1:SetOperation(c22024900.activate)
c:RegisterEffect(e1)
end
function c22024900.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and not c:IsImmuneToEffect(e)
end
function c22024900.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:CheckFusionMaterial(m,nil,chkf)
end
function c22024900.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(c22024900.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(c22024900.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
return res
end
end
function c22024900.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_EXTRA,0)
local chkf=tp
local mg=Duel.GetFusionMaterial(tp):Filter(c22024900.filter1,nil,e)
local sg=Duel.GetMatchingGroup(c22024900.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
Duel.ConfirmCards(1-tp,tc)
local code=tc:GetCode()
local mat=Duel.SelectFusionMaterial(tp,tc,mg)
mat:KeepAlive()
if Duel.SendtoGrave(mat,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.ShuffleExtra(tp)
local tg=g:RandomSelect(1-tp,1)
Duel.ConfirmCards(1-tp,tg)
if tg:IsExists(c22024900.filter,1,nil,e,tp,c) then
local tc=tg:GetFirst()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,true,false,POS_FACEUP)
end
end
end
end
function c22024900.filter(c,e,tp,mc)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end
\ No newline at end of file
......@@ -2,7 +2,7 @@
function c49811422.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
......@@ -14,7 +14,7 @@ function c49811422.initial_effect(c)
c:RegisterEffect(e2)
end
function c49811422.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.IsPlayerCanSpecialSummon(tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return Duel.GetTurnPlayer()~=tp
end
function c49811422.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -22,59 +22,54 @@ function c49811422.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c49811422.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c49811422.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
end
function c49811422.spfilter(c,e,tp)
return c:IsCode(27094595) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
if chk==0 then return true end
end
function c49811422.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c49811422.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c49811422.sgcon1)
e1:SetOperation(c49811422.sgop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCondition(c49811422.regcon)
e3:SetOperation(c49811422.regop)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e4,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetCondition(c49811422.sgcon2)
e3:SetOperation(c49811422.sgop2)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
if not tc:IsType(TYPE_NORMAL) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c49811422.limit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c49811422.sgcon1)
e1:SetOperation(c49811422.sgop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCondition(c49811422.regcon)
e3:SetOperation(c49811422.regop)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e4,tp)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e5:SetCode(EVENT_CHAIN_SOLVED)
e5:SetCondition(c49811422.sgcon2)
e5:SetOperation(c49811422.sgop2)
e5:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e5,tp)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetCode(EFFECT_CANNOT_ACTIVATE)
e0:SetTargetRange(1,0)
e0:SetCondition(c49811422.lmcon)
e0:SetValue(c49811422.limit)
e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,tp)
end
function c49811422.lmcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return (not Duel.IsExistingMatchingCard(c49811422.spfilter,tp,LOCATION_GRAVE,0,1,nil))
end
function c49811422.spfilter(c)
return c:IsCode(27094595) and c:IsType(TYPE_NORMAL)
end
function c49811422.limit(e,re,tp)
return not re:GetHandler():IsLocation(LOCATION_GRAVE)
......
......@@ -2,10 +2,11 @@
function c49811441.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,49811441)
e2:SetCondition(c49811441.spcon)
e2:SetCost(c49811441.spcost)
e2:SetTarget(c49811441.sptg)
......@@ -13,7 +14,7 @@ function c49811441.initial_effect(c)
c:RegisterEffect(e2)
end
function c49811441.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.IsPlayerCanSpecialSummon(tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return Duel.GetTurnPlayer()~=tp
end
function c49811441.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......@@ -21,53 +22,48 @@ function c49811441.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c49811441.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c49811441.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
end
function c49811441.spfilter(c,e,tp)
return c:IsCode(40374923) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
if chk==0 then return true end
end
function c49811441.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c49811441.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c49811441.sgcon1)
e1:SetOperation(c49811441.sgop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c49811441.regcon)
e3:SetOperation(c49811441.regop)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetCondition(c49811441.sgcon2)
e3:SetOperation(c49811441.sgop2)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
if not tc:IsType(TYPE_NORMAL) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c49811441.limit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c49811441.sgcon1)
e1:SetOperation(c49811441.sgop1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c49811441.regcon)
e2:SetOperation(c49811441.regop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetCondition(c49811441.sgcon2)
e3:SetOperation(c49811441.sgop2)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetCode(EFFECT_CANNOT_ACTIVATE)
e0:SetTargetRange(1,0)
e0:SetCondition(c49811441.lmcon)
e0:SetValue(c49811441.limit)
e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,tp)
end
function c49811441.lmcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return (not Duel.IsExistingMatchingCard(c49811441.spfilter,tp,LOCATION_GRAVE,0,1,nil))
end
function c49811441.spfilter(c)
return c:IsCode(40374923) and c:IsType(TYPE_NORMAL)
end
function c49811441.limit(e,re,tp)
return not re:GetHandler():IsLocation(LOCATION_GRAVE)
......
......@@ -2,11 +2,12 @@
function c49811442.initial_effect(c)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_HAND)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,49811442)
e3:SetCondition(c49811442.spcon)
e3:SetCost(c49811442.spcost)
e3:SetTarget(c49811442.sptg)
......@@ -14,7 +15,7 @@ function c49811442.initial_effect(c)
c:RegisterEffect(e3)
end
function c49811442.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c49811442.spconfilter,1,nil,1-tp) and not Duel.IsChainSolving() and Duel.IsPlayerCanSpecialSummon(tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=13
return eg:IsExists(c49811442.spconfilter,1,nil,1-tp) and not Duel.IsChainSolving() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=13
end
function c49811442.spconfilter(c,sp)
return c:IsSummonPlayer(sp) and c:IsSummonLocation(LOCATION_EXTRA)
......@@ -25,68 +26,28 @@ function c49811442.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c49811442.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c49811442.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK)
if chk==0 then return true end
end
function c49811442.spfilter(c,e,tp)
return c:IsCode(32864) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsCode(32864) and c:IsType(TYPE_NORMAL)
end
function c49811442.sgfilter(c)
return c:IsAbleToGrave() and c:IsType(TYPE_MONSTER)
end
function c49811442.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c49811442.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=13 then
local cg=Duel.GetDecktopGroup(tp,13)
local tg=Group.FilterSelect(cg,tp,c49811442.sgfilter,1,1,nil)
Duel.ConfirmDecktop(tp,13)
Duel.SendtoGrave(tg,REASON_EFFECT)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=13 then
Duel.ConfirmDecktop(tp,13)
local cg=Duel.GetDecktopGroup(tp,13)
if cg:IsExists(c49811442.spfilter,1,nil) then
local gg=cg:Filter(c49811442.sgfilter,nil)
if #gg>0 then
Duel.SendtoGrave(gg,REASON_EFFECT)
end
if not tc:IsType(TYPE_NORMAL) then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c49811442.limit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
else
local tg=Group.FilterSelect(cg,tp,c49811442.sgfilter,1,1,nil)
if #tg>0 then
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
end
end
function c49811442.sgfilter(c)
return c:IsAbleToGrave()
end
function c49811442.limit(e,re,tp)
return not re:GetHandler():IsLocation(LOCATION_GRAVE)
end
function c49811442.sgcon1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
return eg:IsExists(c49811442.filter,1,nil,1-tp) and not Duel.IsChainSolving() and tc:IsAbleToGrave()
end
function c49811442.filter(c,sp)
return c:IsSummonPlayer(sp) and not c:IsSummonLocation(LOCATION_GRAVE)
end
function c49811442.sgop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,49811442)
Duel.DiscardDeck(tp,1,REASON_EFFECT)
end
function c49811442.regcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetDecktopGroup(tp,1):GetFirst()
return eg:IsExists(c49811442.filter,1,nil,1-tp) and Duel.IsChainSolving() and tc:IsAbleToGrave()
end
function c49811442.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,49811442,RESET_CHAIN,0,1)
end
function c49811442.sgcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,49811442)>0
end
function c49811442.sgop2(e,tp,eg,ep,ev,re,r,rp)
local count=Duel.GetFlagEffect(tp,49811442)
Duel.Hint(HINT_CARD,0,49811442)
Duel.ResetFlagEffect(tp,49811442)
Duel.DiscardDeck(tp,count,REASON_EFFECT)
end
\ No newline at end of file
--袭击队集结防护
local s,id=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
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:SetCategory(CATEGORY_TOHAND)
e2:SetDescription(aux.Stringid(id,0))
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+id)
e2:SetCondition(s.con)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE) end
end
function s.cfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_XYZ)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(s.val)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.tg)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(1)
Duel.RegisterEffect(e2,tp)
end
function s.val(e,re,val,r,rp,rc)
if 1-e:GetHandlerPlayer()==rp then
return 0
else return val end
end
function s.tg(e,c)
return c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK)
end
function s.descfilter(c,tp)
return c:IsSummonType(SUMMON_TYPE_XYZ) and c:IsSummonPlayer(tp)
and c:GetMaterial():IsExists(s.descfilter2,1,nil)
end
function s.descfilter2(c)
return c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK)
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.descfilter,1,nil,tp)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
\ No newline at end of file
--数理地狱·选择题炼狱
function c74610430.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Activate(summon)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DRAW+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_SUMMON)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(aux.NegateSummonCondition)
e2:SetOperation(c74610430.dsop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e4)
end
function c74610430.dsop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetTurnPlayer()
Duel.Hint(HINT_CARD,p,74610430)
local num
repeat
local d1,d2 = Duel.TossDice(tp,2)
local x = (d1-1)*6+(d2-1)
if x < 32 then
num=x+1
break
end
until false
local qa=num
if qa==1 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610430,2))
local op = Duel.SelectOption(p,aux.Stringid(74610431,0),aux.Stringid(74610431,1),aux.Stringid(74610431,2))
if op==0 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==2 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610430,3))
local op = Duel.SelectOption(p,aux.Stringid(74610431,3),aux.Stringid(74610431,4),aux.Stringid(74610431,5))
if op==0 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==3 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610430,4))
local op = Duel.SelectOption(p,aux.Stringid(74610431,6),aux.Stringid(74610431,7),aux.Stringid(74610431,8))
if op==1 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==4 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610430,5))
local op = Duel.SelectOption(p,aux.Stringid(74610431,9),aux.Stringid(74610431,10),aux.Stringid(74610431,11))
if op==1 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==5 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610430,6))
local op = Duel.SelectOption(p,aux.Stringid(74610431,12),aux.Stringid(74610431,13),aux.Stringid(74610431,14))
if op==2 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==6 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610430,7))
local op = Duel.SelectOption(p,aux.Stringid(74610432,0),aux.Stringid(74610432,1),aux.Stringid(74610432,2))
if op==2 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==7 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610430,8))
local op = Duel.SelectOption(p,aux.Stringid(74610432,3),aux.Stringid(74610432,4),aux.Stringid(74610432,5))
if op==0 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==8 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610430,9))
local op = Duel.SelectOption(p,aux.Stringid(74610432,6),aux.Stringid(74610432,7),aux.Stringid(74610432,8))
if op==0 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==9 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610430,10))
local op = Duel.SelectOption(p,aux.Stringid(74610432,9),aux.Stringid(74610432,10),aux.Stringid(74610432,11))
if op==1 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==10 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610430,11))
local op = Duel.SelectOption(p,aux.Stringid(74610432,12),aux.Stringid(74610432,13),aux.Stringid(74610432,14))
if op==1 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==11 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610430,12))
local op = Duel.SelectOption(p,aux.Stringid(74610433,0),aux.Stringid(74610433,1),aux.Stringid(74610433,2))
if op==2 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==12 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610430,13))
local op = Duel.SelectOption(p,aux.Stringid(74610433,3),aux.Stringid(74610433,4),aux.Stringid(74610433,5))
if op==2 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==13 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610430,14))
local op = Duel.SelectOption(p,aux.Stringid(74610433,6),aux.Stringid(74610433,7),aux.Stringid(74610433,8))
if op==0 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==14 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610430,15))
local op = Duel.SelectOption(p,aux.Stringid(74610433,9),aux.Stringid(74610433,10),aux.Stringid(74610433,11))
if op==0 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==15 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610431,15))
local op = Duel.SelectOption(p,aux.Stringid(74610433,12),aux.Stringid(74610433,13),aux.Stringid(74610433,14))
if op==1 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==16 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610432,15))
local op = Duel.SelectOption(p,aux.Stringid(74610434,0),aux.Stringid(74610434,1),aux.Stringid(74610434,2))
if op==1 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==17 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610433,15))
local op = Duel.SelectOption(p,aux.Stringid(74610434,3),aux.Stringid(74610434,4),aux.Stringid(74610434,5))
if op==2 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==18 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610434,15))
local op = Duel.SelectOption(p,aux.Stringid(74610434,6),aux.Stringid(74610434,7),aux.Stringid(74610434,8))
if op==2 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==19 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610435,15))
local op = Duel.SelectOption(p,aux.Stringid(74610434,9),aux.Stringid(74610434,10),aux.Stringid(74610434,11))
if op==0 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==20 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610436,15))
local op = Duel.SelectOption(p,aux.Stringid(74610434,12),aux.Stringid(74610434,13),aux.Stringid(74610434,14))
if op==0 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==21 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610437,15))
local op = Duel.SelectOption(p,aux.Stringid(74610435,0),aux.Stringid(74610435,1),aux.Stringid(74610435,2))
if op==1 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==22 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610438,15))
local op = Duel.SelectOption(p,aux.Stringid(74610435,3),aux.Stringid(74610435,4),aux.Stringid(74610435,5))
if op==1 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==23 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610438,0))
local op = Duel.SelectOption(p,aux.Stringid(74610435,6),aux.Stringid(74610435,7),aux.Stringid(74610435,8))
if op==2 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==24 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610438,1))
local op = Duel.SelectOption(p,aux.Stringid(74610435,9),aux.Stringid(74610435,10),aux.Stringid(74610435,11))
if op==2 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==25 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610438,2))
local op = Duel.SelectOption(p,aux.Stringid(74610435,12),aux.Stringid(74610435,13),aux.Stringid(74610435,14))
if op==0 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==26 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610438,3))
local op = Duel.SelectOption(p,aux.Stringid(74610436,0),aux.Stringid(74610436,1),aux.Stringid(74610436,2))
if op==0 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==27 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610438,4))
local op = Duel.SelectOption(p,aux.Stringid(74610436,3),aux.Stringid(74610436,4),aux.Stringid(74610436,5))
if op==1 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==28 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610438,5))
local op = Duel.SelectOption(p,aux.Stringid(74610436,6),aux.Stringid(74610436,7),aux.Stringid(74610436,8))
if op==1 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==29 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610438,6))
local op = Duel.SelectOption(p,aux.Stringid(74610436,9),aux.Stringid(74610436,10),aux.Stringid(74610436,11))
if op==2 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==30 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610438,7))
local op = Duel.SelectOption(p,aux.Stringid(74610436,12),aux.Stringid(74610436,13),aux.Stringid(74610436,14))
if op==2 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==31 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610438,8))
local op = Duel.SelectOption(p,aux.Stringid(74610437,0),aux.Stringid(74610437,1),aux.Stringid(74610437,2))
if op==1 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
elseif qa==32 then
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(74610438,9))
local op = Duel.SelectOption(p,aux.Stringid(74610437,3),aux.Stringid(74610437,4),aux.Stringid(74610437,5))
if op==0 then
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,0))
Duel.Draw(p,1,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,p,aux.Stringid(74610430,1))
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
--告别之黑鹫 艾黛尔贾特
function c75081101.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,75081101)
e1:SetCondition(c75081101.thcon)
e1:SetTarget(c75081101.thtg)
e1:SetOperation(c75081101.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e2)
--ritual level
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_RITUAL_LEVEL)
e3:SetValue(c75081101.rlevel)
c:RegisterEffect(e3)
end
function c75081101.rlevel(e,c)
local lv=aux.GetCappedLevel(e:GetHandler())
if c:IsSetCard(0xc754) then
local clv=c:GetLevel()
return (lv<<16)+clv
else return lv end
end
--
function c75081101.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c75081101.filter(c)
return c:IsSetCard(0xc754) and c:IsAbleToHand()
end
function c75081101.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75081101.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c75081101.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c75081101.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 not g:GetFirst():IsLocation(LOCATION_HAND) then return end
Duel.BreakEffect()
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
\ No newline at end of file
--授冠之时
function c75081102.initial_effect(c)
--activate
local e0=aux.AddRitualProcGreater2(c,c75081102.spfilter,LOCATION_HAND+LOCATION_DECK,nil,c75081102.mfilter)
e0:SetCountLimit(1,75081102+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75081102,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_HAND)
--e1:SetCountLimit(1,id)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c75081102.spcon)
e1:SetTarget(c75081102.sptg)
e1:SetOperation(c75081102.spop)
c:RegisterEffect(e1)
end
function c75081102.spfilter(c)
return c:IsSetCard(0xc754)
end
function c75081102.mfilter(c)
return c:IsSetCard(0xc754)
end
--
function c75081102.spcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_DRAW)
end
function c75081102.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then
local te=e:GetLabelObject()
local tg=te:GetTarget()
return tg(e,tp,eg,ep,ev,re,r,rp,0,chkc)
end
if chk==0 then return true end
e:SetLabel(0)
local te=c:CheckActivateEffect(true,true,false)
e:SetLabelObject(te)
e:SetProperty(te:GetProperty())
local tg=te:GetTarget()
if tg then tg(e,tp,eg,ep,ev,re,r,rp,1) end
Duel.ClearOperationInfo(0)
end
function c75081102.spop(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
if not te then return end
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
--灼铠皇帝 艾黛尔贾特
function c75081103.initial_effect(c)
--summon and release
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75081103,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,75081103)
e1:SetCost(c75081103.spcost)
e1:SetTarget(c75081103.sptg)
e1:SetOperation(c75081103.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75081103,1))
--e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,75081104+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c75081103.thcon)
e2:SetTarget(c75081103.thtg)
e2:SetOperation(c75081103.thop)
c:RegisterEffect(e2)
if not c75081103.global_check then
c75081103.global_check=true
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ge2:SetCode(EVENT_CHAIN_SOLVED)
ge2:SetCondition(c75081103.ndcon)
ge2:SetOperation(c75081103.ndop)
Duel.RegisterEffect(ge2,0)
local ge3=ge2:Clone()
Duel.RegisterEffect(ge3,1)
end
end
function c75081103.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c75081103.spfilter(c,e,tp)
return c:IsSetCard(0xc754) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c75081103.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c75081103.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c75081103.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,c75081103.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end
end
function c75081103.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL) and Duel.GetTurnPlayer()==tp
end
function c75081103.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c75081103.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_END,RESET_PHASE+PHASE_END,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_SKIP_TURN)
e2:SetTargetRange(0,1)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e2,tp)
Duel.SkipPhase(tp,PHASE_DRAW,RESET_PHASE+PHASE_END,2)
Duel.SkipPhase(tp,PHASE_STANDBY,RESET_PHASE+PHASE_END,2)
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetTargetRange(1,1)
e3:SetValue(aux.TRUE)
e3:SetReset(RESET_PHASE+PHASE_BATTLE)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_EP)
e4:SetTargetRange(1,0)
e4:SetReset(RESET_PHASE+PHASE_MAIN2+RESET_SELF_TURN)
Duel.RegisterEffect(e4,tp)
Duel.RegisterFlagEffect(tp,75081103,RESET_PHASE+PHASE_BATTLE,0,1)
end
function c75081103.ndcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,75081103)~=0
end
function c75081103.ndop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(c75081103.thop1)
e1:SetReset(RESET_PHASE+PHASE_MAIN1+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
function c75081103.thop1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
if ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE then
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
end
--黑鹫之歌姬 多洛缇雅
function c75081105.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75081105,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,75081105)
e1:SetCondition(c75081105.spcon)
e1:SetTarget(c75081105.sptg)
e1:SetOperation(c75081105.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75081105,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,75081106+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c75081105.thcon)
e2:SetTarget(c75081105.thtg)
e2:SetOperation(c75081105.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
if not c75081105.global_check then
c75081105.global_check=true
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ge2:SetCode(EVENT_CHAIN_SOLVED)
ge2:SetCondition(c75081105.ndcon)
ge2:SetOperation(c75081105.ndop)
Duel.RegisterEffect(ge2,0)
local ge3=ge2:Clone()
Duel.RegisterEffect(ge3,1)
end
end
function c75081105.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c75081105.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 c75081105.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--
function c75081105.filter(c)
return c:IsSetCard(0xc754) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c75081105.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()==tp
end
function c75081105.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75081105.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c75081105.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,c75081105.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
if not g:GetFirst():IsLocation(LOCATION_HAND) then return end
Duel.BreakEffect()
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_END,RESET_PHASE+PHASE_END,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_SKIP_TURN)
e2:SetTargetRange(0,1)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e2,tp)
Duel.SkipPhase(tp,PHASE_DRAW,RESET_PHASE+PHASE_END,2)
Duel.SkipPhase(tp,PHASE_STANDBY,RESET_PHASE+PHASE_END,2)
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetTargetRange(1,1)
e3:SetValue(aux.TRUE)
e3:SetReset(RESET_PHASE+PHASE_BATTLE)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_EP)
e4:SetTargetRange(1,0)
e4:SetReset(RESET_PHASE+PHASE_MAIN2+RESET_SELF_TURN)
Duel.RegisterEffect(e4,tp)
Duel.RegisterFlagEffect(tp,75081105,RESET_PHASE+PHASE_BATTLE,0,1)
end
function c75081105.ndcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,75081105)~=0
end
function c75081105.ndop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(c75081105.thop1)
e1:SetReset(RESET_PHASE+PHASE_MAIN1+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
function c75081105.thop1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
if ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE then
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
end
--黑鹭的贵族 费尔迪南特
function c75081107.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75081107,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PREDRAW)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,75081107)
e1:SetCondition(c75081107.spcon)
e1:SetCost(c75081107.cost)
e1:SetTarget(c75081107.sptg)
e1:SetOperation(c75081107.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75081107,1))
--e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,75081108+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c75081107.thcon)
e2:SetTarget(c75081107.thtg)
e2:SetOperation(c75081107.thop)
c:RegisterEffect(e2)
--local e3=e2:Clone()
--e3:SetCode(EVENT_SPSUMMON_SUCCESS)
--c:RegisterEffect(e3)
if not c75081107.global_check then
c75081107.global_check=true
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ge2:SetCode(EVENT_CHAIN_SOLVED)
ge2:SetCondition(c75081107.ndcon)
ge2:SetOperation(c75081107.ndop)
Duel.RegisterEffect(ge2,0)
local ge3=ge2:Clone()
Duel.RegisterEffect(ge3,1)
end
end
function c75081107.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c75081107.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return aux.IsPlayerCanNormalDraw(tp) and c:IsDiscardable() end
aux.GiveUpNormalDraw(e,tp)
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c75081107.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetTurnCount()
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
--Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c75081107.spop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetTurnCount()
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local dc=Duel.Draw(p,ct,REASON_EFFECT)
end
--
function c75081107.filter(c)
return c:IsSetCard(0xc754) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c75081107.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_DRAW and Duel.GetTurnPlayer()==tp
end
function c75081107.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c75081107.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(tp,PHASE_END,RESET_PHASE+PHASE_END,1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_SKIP_TURN)
e2:SetTargetRange(0,1)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e2,tp)
Duel.SkipPhase(tp,PHASE_DRAW,RESET_PHASE+PHASE_END,2)
Duel.SkipPhase(tp,PHASE_STANDBY,RESET_PHASE+PHASE_END,2)
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetTargetRange(1,1)
e3:SetValue(aux.TRUE)
e3:SetReset(RESET_PHASE+PHASE_BATTLE)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_EP)
e4:SetTargetRange(1,0)
e4:SetReset(RESET_PHASE+PHASE_MAIN2+RESET_SELF_TURN)
Duel.RegisterEffect(e4,tp)
Duel.RegisterFlagEffect(tp,75081107,RESET_PHASE+PHASE_BATTLE,0,1)
end
function c75081107.ndcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,75081107)~=0
end
function c75081107.ndop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(c75081107.thop1)
e1:SetReset(RESET_PHASE+PHASE_MAIN1+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
function c75081107.thop1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
if ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE then
Duel.SkipPhase(tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
end
--闪珖圣龙 星尘·极
function c87498899.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSynchroType,TYPE_SYNCHRO),aux.NonTuner(Card.IsSynchroType,TYPE_SYNCHRO),2)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.synlimit)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
c:RegisterEffect(e2)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87498899,2))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1)
e1:SetTarget(c87498899.negtg)
e1:SetOperation(c87498899.negop)
c:RegisterEffect(e1)
--rmdes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(87498899,3))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c87498899.rmdscon)
e2:SetTarget(c87498899.rmdstg)
e2:SetOperation(c87498899.rmdsop)
c:RegisterEffect(e2)
end
function c87498899.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
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_DESTROY,nil,1,PLAYER_ALL,LOCATION_ONFIELD)
end
function c87498899.negop(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)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=e1:Clone()
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
tc:RegisterEffect(e3)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if dg:GetCount()>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
function c87498899.acfilter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
end
function c87498899.rmdscon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return rp==1-tp and tg and tg:IsExists(c87498899.acfilter,1,nil,tp)
end
function c87498899.rmdstg(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if chk==0 then return tg:FilterCount(Card.IsAbleToRemove,nil)==tg:GetCount() and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,tg) end
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,tg,tg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_ALL,LOCATION_ONFIELD)
end
function c87498899.rmdsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local tc=g:GetFirst()
while tc do
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(tc)
e1:SetCountLimit(1)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject()) end)
Duel.RegisterEffect(e1,tp)
tc=g:GetNext()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if dg:GetCount()>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
--电子龙·未来
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,70095154)
--special summon
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)
--spsummon
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_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+o)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function s.costfilter(c)
return c:IsSetCard(0x93) and c:IsType(TYPE_FUSION) 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_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_EXTRA,0,1,1,nil)
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:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
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:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsRace(RACE_MACHINE)) and c:IsLocation(LOCATION_EXTRA)
end
function s.spfilter2(c,e,tp)
return c:IsCode(70095154) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function s.spop2(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.spfilter2),tp,LOCATION_HAND+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 c9911628.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,9911628)
e1:SetCost(c9911628.spcost)
e1:SetTarget(c9911628.sptg)
e1:SetOperation(c9911628.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,9911629)
e2:SetCost(c9911628.thcost)
e2:SetTarget(c9911628.thtg)
e2:SetOperation(c9911628.thop)
c:RegisterEffect(e2)
end
function c9911628.cfilter1(c,tp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_EXTRA,0,nil,TYPE_SYNCHRO)
if #g==0 then return false end
local tg1=g:GetMaxGroup(Card.GetLevel)
local tg2=g:GetMinGroup(Card.GetLevel)
return not c:IsPublic() and tg1:IsContains(c) and tg2:IsExists(c9911628.cfilter2,1,c)
end
function c9911628.cfilter2(c)
return not c:IsPublic()
end
function c9911628.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9911628.cfilter1,tp,LOCATION_EXTRA,0,1,nil,tp) end
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_EXTRA,0,nil,TYPE_SYNCHRO)
local tg1=g:GetMaxGroup(Card.GetLevel)
local tg2=g:GetMinGroup(Card.GetLevel)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg1=tg1:FilterSelect(tp,c9911628.cfilter2,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg2=tg2:FilterSelect(tp,c9911628.cfilter2,1,1,sg1)
sg1:Merge(sg2)
sg1:KeepAlive()
e:SetLabelObject(sg1)
Duel.ConfirmCards(1-tp,sg1)
end
function c9911628.spfilter(c,e,tp)
return c:IsSetCard(0x54) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c9911628.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 c9911628.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) end
local g=e:GetLabelObject()
if #g~=2 then return end
local tc1=g:GetFirst()
local tc2=g:GetNext()
g:DeleteGroup()
if tc1:IsOriginalCodeRule(tc2:GetOriginalCodeRule()) then return end
local lv1=tc1:GetLevel()
local lv2=tc2:GetLevel()
if lv1==lv2 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetTargetRange(0xff,0xff)
e1:SetTarget(aux.TargetBoolFunction(Card.IsOriginalCodeRule,tc1:GetOriginalCodeRule()))
e1:SetValue(lv2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_LEVEL)
e2:SetTargetRange(0xff,0xff)
e2:SetTarget(aux.TargetBoolFunction(Card.IsOriginalCodeRule,tc2:GetOriginalCodeRule()))
e2:SetValue(lv1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c9911628.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.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c9911628.thfilter(c)
return c:IsCode(9911601,9911614) and c:IsAbleToHand()
end
function c9911628.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9911628.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c9911628.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c9911628.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g==0 or Duel.SendtoHand(g,nil,REASON_EFFECT)==0 or not g:GetFirst():IsLocation(LOCATION_HAND) then return end
Duel.ConfirmCards(1-tp,g)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) and not c:IsType(TYPE_TUNER) and Duel.SelectYesNo(tp,aux.Stringid(9911628,0)) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
......@@ -1394,6 +1394,7 @@
!counter 0x1751 大器指示物
!counter 0x754 埃吉尔指示物
!counter 0x757 梦指示物
!setname 0xc754 黑鹫
#Tierra 117
......
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