Commit b06da389 authored by Tachibana's avatar Tachibana

tnndx

parent 0c651aab
......@@ -5,7 +5,7 @@ stages:
variables:
GIT_DEPTH: "1"
LAST_UPDATE_DATE: "2021.4.26"
CURRENT_UPDATE_DATE: "2021.5.5"
CURRENT_UPDATE_DATE: "2021.5.6"
redtext:
stage: prepare
......
No preview for this file type
expansions/pics/33400702.jpg

308 KB | W: | H:

expansions/pics/33400702.jpg

108 KB | W: | H:

expansions/pics/33400702.jpg
expansions/pics/33400702.jpg
expansions/pics/33400702.jpg
expansions/pics/33400702.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33400705.jpg

298 KB | W: | H:

expansions/pics/33400705.jpg

101 KB | W: | H:

expansions/pics/33400705.jpg
expansions/pics/33400705.jpg
expansions/pics/33400705.jpg
expansions/pics/33400705.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33400707.jpg

264 KB | W: | H:

expansions/pics/33400707.jpg

94.8 KB | W: | H:

expansions/pics/33400707.jpg
expansions/pics/33400707.jpg
expansions/pics/33400707.jpg
expansions/pics/33400707.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33400708.jpg

268 KB | W: | H:

expansions/pics/33400708.jpg

97.7 KB | W: | H:

expansions/pics/33400708.jpg
expansions/pics/33400708.jpg
expansions/pics/33400708.jpg
expansions/pics/33400708.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33400709.jpg

256 KB | W: | H:

expansions/pics/33400709.jpg

93.8 KB | W: | H:

expansions/pics/33400709.jpg
expansions/pics/33400709.jpg
expansions/pics/33400709.jpg
expansions/pics/33400709.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33400710.jpg

235 KB | W: | H:

expansions/pics/33400710.jpg

91 KB | W: | H:

expansions/pics/33400710.jpg
expansions/pics/33400710.jpg
expansions/pics/33400710.jpg
expansions/pics/33400710.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33400751.jpg

213 KB | W: | H:

expansions/pics/33400751.jpg

71.7 KB | W: | H:

expansions/pics/33400751.jpg
expansions/pics/33400751.jpg
expansions/pics/33400751.jpg
expansions/pics/33400751.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/33400758.jpg

284 KB | W: | H:

expansions/pics/33400758.jpg

91.8 KB | W: | H:

expansions/pics/33400758.jpg
expansions/pics/33400758.jpg
expansions/pics/33400758.jpg
expansions/pics/33400758.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -39,7 +39,7 @@ function c12300004.accd(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c12300004.filac,c:GetControler(),LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if ct>4 then return true
else return ct>2 and Duel.GetTurnPlayer()==tp end
else return ct>2 and Duel.GetCurrentChain()==0 and Duel.GetTurnPlayer()==tp end
end
function c12300004.filfd(c)
return c:IsFacedown()
......@@ -108,7 +108,7 @@ function c12300004.thop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCountLimit(1,12300034+EFFECT_COUNT_CODE_OATH)
e1:SetOwnerPlayer(ep)
e1:SetDescription(aux.Stringid(12300004,4))
e1:SetTarget(c12300004.drtg)
......
......@@ -3,29 +3,12 @@ function c12300005.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(12300005,0))
e1:SetCondition(c12300005.usebyowner)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCondition(c12300005.accon)
e1:SetType(EFFECT_TYPE_ACTIVATE+EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetOperation(c12300005.acop)
c:RegisterEffect(e1)
--field1 chain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_FZONE)
e2:SetOperation(c12300005.chop)
c:RegisterEffect(e2)
--field1 disable
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12300005,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_FZONE)
e3:SetCondition(c12300005.disco)
e3:SetOperation(c12300005.disse)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--monster1
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(12300005,2))
......@@ -37,52 +20,39 @@ function c12300005.initial_effect(c)
e5:SetCost(c12300005.m1sc)
e5:SetTarget(c12300005.m1st)
e5:SetOperation(c12300005.m1so)
e5:SetCountLimit(1,12300005)
e5:SetCountLimit(1,12300015)
c:RegisterEffect(e5)
--monster2
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(12300005,0))
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e6:SetCategory(CATEGORY_LEAVE_GRAVE)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetHintTiming(0,EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_TO_GRAVE)
e6:SetRange(LOCATION_MZONE)
e6:SetCategory(CATEGORY_LEAVE_GRAVE)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e6:SetCondition(c12300005.m2sc)
e6:SetTarget(c12300005.m2st)
e6:SetOperation(c12300005.m2so)
e6:SetCountLimit(1,12300015)
e6:SetCountLimit(1,12300005)
c:RegisterEffect(e6)
Duel.AddCustomActivityCounter(12300015,ACTIVITY_SPSUMMON,c12300005.splimitc)
end
function c12300005.usebyowner(e,tp)
function c12300005.accon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetControler()==c:GetOwner()
end
function c12300005.chop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==1 then
e:SetLabel(0)
if re:IsActiveType(TYPE_MONSTER) then
e:SetLabel(1)
end
elseif Duel.GetCurrentChain()==2 and e:GetLabel()==1 then
e:SetLabel(2)
else return
if c:GetControler()~=c:GetOwner() then return false
elseif Duel.GetCurrentChain()==0 and Duel.GetTurnPlayer()==tp then return true
else
local p,te=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_EFFECT)
return p==tp and te:GetHandler():IsSetCard(0x2d3)
end
end
function c12300005.disco(e)
local a=e:GetLabelObject():GetLabel()
if a<2 then return false end
return Duel.GetCurrentChain()==2 and a==2
end
function c12300005.disse(e)
local a,b=Duel.GetChainInfo(1,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_DISABLE_REASON)
if b then return end
Duel.Hint(HINT_CARD,a,12300005)
if Duel.NegateEffect(1) then Duel.Draw(a,1,REASON_EFFECT) end
function c12300005.acop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()>1 and Duel.GetChainInfo(1,CHAININFO_TYPE)==TYPE_MONSTER and not Duel.GetChainInfo(1,CHAININFO_DISABLE_REASON) then
Duel.NegateEffect(1)
end
end
function c12300005.m1sc(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12300005.costfilt,tp,LOCATION_FZONE+LOCATION_ONFIELD,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c12300005.costfilt,tp,LOCATION_FZONE+LOCATION_ONFIELD,0,1,nil) and Duel.GetCustomActivityCount(12300015,tp,ACTIVITY_SPSUMMON)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c12300005.costfilt,tp,LOCATION_FZONE+LOCATION_ONFIELD,0,1,1,nil)
Duel.Release(g,REASON_COST)
......@@ -101,29 +71,36 @@ function c12300005.m1so(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,12300005,0x2d3,TYPE_EFFECT+TYPE_MONSTER,2000,2500,5,RACE_SPELLCASTER,ATTRIBUTE_WATER)
then
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_MONSTER)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
local sp=Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
if sp==0 then return end
end
--zisu
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c12300005.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c12300005.checkfield(c)
return c:IsFaceup() and c:IsSetCard(0x2d3)
end
function c12300005.filtr(c,tp)
return c:IsType(TYPE_TRAP) and c:GetOwner()==tp and c:IsLocation(LOCATION_GRAVE)
end
function c12300005.m2sc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsType(TYPE_EFFECT+TYPE_MONSTER) or Duel.GetCustomActivityCount(12300015,tp,ACTIVITY_SPSUMMON)~=0
then return false
else return Duel.GetTurnPlayer()==tp or Duel.IsExistingMatchingCard(c12300005.checkfield,tp,LOCATION_FZONE,0,1,0)
end
return eg:IsExists(c12300005.filtr,1,nil,tp) and c:IsType(TYPE_EFFECT+TYPE_MONSTER)
end
function c12300005.filter2(c)
return c:IsType(TYPE_TRAP) and c:IsSSetable() and c:IsSetCard(0x2d3)
end
function c12300005.m2st(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12300005.filter2,tp,LOCATION_GRAVE,0,1,nil) end
local ety=e:GetType()
ety=ety+EFFECT_TYPE_ACTIVATE
e:SetType(ety)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end
function c12300005.filter2(c)
return c:IsType(TYPE_TRAP) and c:IsSSetable() and c:IsSetCard(0x2d3)
end
function c12300005.m2so(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
......@@ -132,31 +109,13 @@ function c12300005.m2so(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
--set trap
if tc and Duel.SSet(tp,tc)~=0 then
local e2=Effect.CreateEffect(tc)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(LOCATION_REMOVED)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e2)
--act as field
local tc2=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if tc2 then Duel.SendtoGrave(tc2,REASON_RULE) end
local tc2=c
Duel.MoveToField(tc2,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc2:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
--zisu
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c12300005.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e1)
end
end
function c12300005.splimit(e,c)
......@@ -165,10 +124,3 @@ end
function c12300005.splimitc(c)
return c:IsSetCard(0x2d3)
end
function c12300005.m2sc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsType(TYPE_EFFECT+TYPE_MONSTER) or Duel.GetCustomActivityCount(12300015,tp,ACTIVITY_SPSUMMON)~=0
then return false
else return Duel.GetTurnPlayer()==tp or Duel.IsExistingMatchingCard(c12300005.checkfield,tp,LOCATION_FZONE,0,1,0)
end
end
\ No newline at end of file
......@@ -187,15 +187,15 @@ function c12300009.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c12300009.filntr,tp,0,LOCATION_GRAVE,nil)
if #g<=0 or not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_GRAVE+LOCATION_MZONE)
e1:SetValue(0x2d3)
e1:SetReset(RESET_PHASE+PHASE_END)
local scc=g:GetFirst()
while scc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_GRAVE+LOCATION_MZONE)
e1:SetValue(0x2d3)
e1:SetReset(RESET_PHASE+PHASE_END)
scc:RegisterEffect(e1)
scc=g:GetNext()
end
......
......@@ -70,7 +70,7 @@ function c12300014.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c12300014.fildis1,tp,0,LOCATION_ONFIELD,1,1,nil)
local g1=g:GetFirst()
Duel.Destroy(g1,REASON_EFFECT)
if g1 then Duel.Destroy(g1,REASON_EFFECT) end
end
function c12300014.efilter(e)
return Duel.GetCurrentChain()==e:GetLabel()
......
--黑圆桌·泥沼造影
function c12300025.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetDescription(aux.Stringid(12300025,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c12300025.con)
e1:SetTarget(c12300025.target)
e1:SetOperation(c12300025.activate)
e1:SetCountLimit(1,12300025)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12300025,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,12300025)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c12300025.rttg)
e3:SetOperation(c12300025.rtop)
c:RegisterEffect(e3)
end
function c12300025.fil1(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_WATER)
end
function c12300025.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c12300025.fil1,tp,LOCATION_ONFIELD,0,1,nil)
end
function c12300025.fil(c,tp)
if not c:IsLocation(LOCATION_MZONE) then return false end
local atk,def=0,0
local p=c:GetControler()
if c:IsFaceup() then atk=c:GetAttack()
if c:GetDefense() then def=c:GetDefense() end
end
return Duel.GetLocationCount(p,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,12300025,0x2d3,TYPE_EFFECT+TYPE_MONSTER,atk,def,5,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,c:GetControler()) and c:IsAbleToHand()
end
function c12300025.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c12300025.fil,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,LOCATION_SZONE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,LOCATION_MZONE)
end
function c12300025.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tg=eg:Filter(c12300025.fil,nil,tp)
local tc=tg:GetFirst()
if tg:GetCount()~=1 then tc=tg:Select(tp,1,1,nil) end
if not tc then return end
local atk,def=0,0
local p=tc:GetControler()
if tc:IsFaceup() then atk=tc:GetAttack()
if tc:GetDefense() then def=tc:GetDefense() end
end
c:AddMonsterAttribute(TYPE_EFFECT+TYPE_TRAP,nil,nil,nil,atk,def)
if Duel.SpecialSummon(c,0,tp,p,true,false,POS_FACEUP)==0 then return end
Duel.BreakEffect()
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
function c12300025.fil2(c)
return c:IsCode(12300005) or (c:IsType(TYPE_TRAP) and c:IsSetCard(0x2d3) and not c:IsCode(12300025)) and c:IsSSetable()
end
function c12300025.rttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c12300025.fil2,tp,LOCATION_GRAVE,0,1,nil) end
end
function c12300025.rtop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(c12300025.fil2,tp,LOCATION_GRAVE,0,nil)
local tc
if #tg==0 then return end
if #tg==1 then tc=tg:GetFirst()
else Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(12300025,2))
tc=tg:Select(tp,1,1,nil)
end
Duel.SSet(tp,tc)
end
......@@ -3,6 +3,7 @@ function c12300112.initial_effect(c)
c:SetUniqueOnField(1,0,12300112)
--activate
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(12300112,2))
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
......@@ -24,21 +25,21 @@ function c12300112.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetCountLimit(1,12300122)
e2:SetCost(c12300112.tgcs)
e2:SetOperation(c12300112.tgop)
c:RegisterEffect(e2)
end
--search
function c12300112.filter(c)
return c:IsSetCard(0x2d3) and c:IsAbleToHand() and c:GetOriginalLevel()>0
return c:IsSetCard(0x2d3) and c:IsAbleToHand() and c:GetOriginalLevel()>0 and (c:IsType(TYPE_MONSTER) or c:IsType(TYPE_FIELD))
end
function c12300112.accs(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_ONFIELD,0,e:GetHandler())
if chk==0 then
return g:GetCount()>0 and Duel.GetMatchingGroupCount(c12300112.filter,tp,LOCATION_DECK,0,nil)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
g=g:Select(tp,1,1,e:GetHandler())
if g:GetCount()>0 then Duel.Release(g,REASON_COST) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......
......@@ -35,14 +35,14 @@ function c12300115.initial_effect(c)
e4:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
c:RegisterEffect(e4)
--cant activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetValue(c12300115.aclimit)
c:RegisterEffect(e1)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetCode(EFFECT_CANNOT_ACTIVATE)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(1,0)
e5:SetValue(c12300115.aclimit)
c:RegisterEffect(e5)
end
function c12300115.filfus(c)
return c:GetType(TYPE_MONSTER) and c:GetLevel()>=5 and c:GetRace()==RACE_SPELLCASTER
......@@ -60,19 +60,13 @@ function c12300115.skop(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(Duel.GetTurnPlayer(),Duel.GetCurrentPhase(),RESET_PHASE+PHASE_END,1)
end
function c12300115.indes(e,c)
return c and c:IsSummonType(SUMMON_TYPE_SPECIAL) and c:GetMaterial():IsExists(Card.IsCode,1,nil,12300005)
local lc=e:GetHandler()
return aux.IsMaterialListCode(lc,12300005)
end
function c12300115.aclimit(e,re,tp)
local c=e:GetHandler()
local rc=re:GetHandler()
if rc:IsCode(12300205) or c:IsFacedown() then return false
else return c:GetMaterial():IsExists(Card.IsCode,1,nil,rc:GetFusionCode())
else return aux.IsMaterialListCode(c,rc:GetFusionCode())
end
end
end
\ No newline at end of file
--晓之未眠
local m=26802021
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)~=0
end
function cm.filter(c)
return c:GetCounter(0)~=0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local tc=sg:GetFirst()
local count=0
while tc do
count=count+tc:GetCounter(0x100e)
tc:RemoveCounter(tp,0,0,0)
tc=sg:GetNext()
end
if count>0 then
Duel.RaiseEvent(e:GetHandler(),EVENT_REMOVE_COUNTER+0x100e,e,REASON_EFFECT,tp,tp,count)
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_PLACE_COUNTER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetReset(RESET_SELF_TURN+RESET_PHASE+PHASE_END,3)
e1:SetTargetRange(1,1)
Duel.RegisterEffect(e1,tp)
end
--
local m=26803009
local cm=_G["c"..m]
function cm.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--actlimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_FZONE)
e1:SetOperation(cm.chainop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.drtg)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
function cm.chfilter(c)
return c:IsType(TYPE_CONTINUOUS)
end
function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and loc==LOCATION_SZONE and cm.chfilter(rc) then
Duel.SetChainLimit(cm.chainlm)
end
end
function cm.chainlm(e,rp,tp)
return tp==rp
end
function cm.tdfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsAbleToDeck()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<=0 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
--金色拼图·星尘
local m=26806024
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.filter(c)
return c:IsSetCard(0x605,0x604) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.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
--星海歌姬·星尘
local m=26806029
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,7,2,cm.ovfilter,aux.Stringid(m,0),2,cm.xyzop)
c:EnableReviveLimit()
--can not be xyz material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
e0:SetCondition(cm.xyzcon)
e0:SetValue(1)
c:RegisterEffect(e0)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.descost)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsRank(6) and c:IsAttack(2200) and c:IsDefense(600)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.xyzcon(e)
local c=e:GetHandler()
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ) and bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function cm.spfilter(c,e,tp)
return c:IsAttack(2200) and c:IsDefense(600) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,c)
end
function cm.thfilter(c)
return c:IsAttack(2200) and c:IsDefense(600) and c:IsAbleToHand()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.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 g1=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g1:GetCount()>0 and Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.ConfirmCards(1-tp,g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,tp,REASON_EFFECT)
end
end
end
--五维介质·星海之约
local m=26806036
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.setcon)
e1:SetTarget(cm.settg)
e1:SetOperation(cm.setop)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(cm.handcon)
c:RegisterEffect(e2)
end
function cm.sprfilter(c)
return c:IsFaceup() and c:GetBaseAttack()==2200 and c:GetBaseDefense()==600
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.sprfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.setfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsSSetable()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.setfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,cm.setfilter,tp,LOCATION_GRAVE,0,1,2,nil)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.SSet(tp,tg)
for tc in aux.Next(tg) do
if c:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
function cm.tgfilter(c)
return c:IsFaceup() and c:GetBaseAttack()==3200 and c:IsType(TYPE_LINK)
end
function cm.handcon(e)
return Duel.IsExistingMatchingCard(cm.tgfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
--锦鲤飞升·海伊
local m=26806052
local cm=_G["c"..m]
Duel.LoadScript("c26800000.lua")
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.sprcon)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.sprcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsAttack(2200) and c:IsDefense(600) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.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,cm.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
--女仆猫·玛娅
local m=26824007
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.ritlimit)
c:RegisterEffect(e0)
--inactivatable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DISEFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.effectfilter)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_INACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(cm.effectfilter)
c:RegisterEffect(e2)
--immume
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(cm.efilter)
c:RegisterEffect(e3)
--indes battle
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(cm.indes)
c:RegisterEffect(e4)
end
function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function cm.indes(e,c)
return not c:IsRace(RACE_PYRO)
end
function cm.effectfilter(e,ct)
local etype=Duel.GetChainInfo(ct,CHAININFO_EXTTYPE)
return etype&(TYPE_RITUAL+TYPE_PENDULUM)==TYPE_RITUAL+TYPE_PENDULUM
end
--水之浮游
local m=28303006
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_FLIPSUMMON)==0 and Duel.GetActivityCount(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:SetLabelObject(e)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.sumlimit)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e2:SetCode(EFFECT_CANNOT_SUMMON)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(1,0)
Duel.RegisterEffect(e2,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
Duel.RegisterEffect(e3,tp)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return e:GetLabelObject()~=se
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsReleasableByEffect()
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local loc=LOCATION_MZONE
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then loc=0 end
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,loc,1,nil)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local loc=LOCATION_MZONE
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then loc=0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE,loc,1,1,nil)
if g:GetCount()>0 and Duel.Release(g,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
local tc=sg:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.sactlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetRange(LOCATION_MZONE)
e4:SetAbsoluteRange(tp,1,0)
e4:SetTarget(cm.ssplimit)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4,true)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_SUMMON)
tc:RegisterEffect(e5,true)
end
end
end
function cm.ssplimit(e,c)
return c:IsType(TYPE_EFFECT)
end
function cm.sactlimit(e,re,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER)
end
--暗魔力的爆发
function c30000200.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,30000200+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c30000200.cost)
e1:SetTarget(c30000200.target)
e1:SetOperation(c30000200.activate)
c:RegisterEffect(e1)
end
function c30000200.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeckAsCost,tp,LOCATION_HAND,0,1,1,nil)
if g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
end
Duel.SendtoDeck(g,tp,2,REASON_COST)
end
function c30000200.filter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsDefenseAbove(2000)and c:IsLevelAbove(6) and c:IsAbleToHand()
end
function c30000200.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c30000200.filter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function c30000200.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c30000200.filter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--混沌的轮回 循环
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m,cm=rscf.DefineCard(30000220)
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,nil,"td,dr",nil,nil,nil,cm.tg,cm.act)
local e2=rsef.I(c,{m,0},nil,"td,dr","tg",LOCATION_GRAVE,aux.exccon,nil,rstg.target({cm.tdfilter,"td",LOCATION_GRAVE+LOCATION_REMOVED,0,2 },rsop.list(Card.IsAbleToDeck,"td"),rsop.list(1,"dr")),cm.drop)
if cm.actct then return end
cm.actct=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_NEGATED)
ge1:SetOperation(cm.regop)
Duel.RegisterEffect(ge1,tp)
end
function cm.checkfun(att)
return function(c)
return (c:IsType(TYPE_MONSTER) and c:IsAttribute(att)) or ((c:IsComplexType(TYPE_SPELL+TYPE_PENDULUM) and c:GetAttribute()&att>0))
end
end
cm.hnchecks={cm.checkfun(ATTRIBUTE_LIGHT),cm.checkfun(ATTRIBUTE_DARK)}
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsCode(m) then
cm.actct=math.max(cm.actct-1,0)
end
end
function cm.cfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToDeck()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroupEach(cm.hnchecks,aux.TRUE) and Duel.IsPlayerCanDraw(tp,cm.actct+3) end
cm.actct=cm.actct+1
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function cm.act(e,tp)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,nil)
if not g:CheckSubGroupEach(cm.hnchecks,aux.TRUE) then return end
local tg=g:SelectSubGroupEach(tp,cm.hnchecks,false,aux.TRUE)
local hg=tg:Filter(Card.IsLocation,nil,LOCATION_HAND)
if #hg>0 then
Duel.ConfirmCards(1-tp,hg)
end
Duel.HintSelection(tg-hg)
if Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup()
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel.ShuffleDeck(tp)
end
Duel.Draw(tp,cm.actct+2,REASON_EFFECT)
end
end
function cm.tdfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT) and c:IsAbleToDeck()
end
function cm.drop(e,tp)
local tg=rsgf.GetTargetGroup()
local c=aux.ExceptThisCard(e)
if not c or #tg<=0 then return end
tg:AddCard(c)
if Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup()
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel.ShuffleDeck(tp)
end
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--误召异神
function c30005000.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c30005000.target)
e1:SetOperation(c30005000.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,30005000)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c30005000.thtg)
e2:SetOperation(c30005000.thop)
c:RegisterEffect(e2)
end
function c30005000.filter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_DARK)
end
function c30005000.mfilter(c)
return c:GetLevel()>0 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemove()
end
function c30005000.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(c30005000.mfilter,tp,LOCATION_GRAVE,0,nil)
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c30005000.filter,e,tp,mg1,mg2,Card.GetLevel,"Greater")
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE)
end
function c30005000.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(c30005000.mfilter),tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,c30005000.filter,e,tp,mg1,mg2,Card.GetLevel,"Greater")
local tc=g:GetFirst()
if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:Merge(mg2)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat)
local mat2=mat:Filter(Card.IsLocation,nil,LOCATION_GRAVE):Filter(Card.IsAttribute,nil,ATTRIBUTE_DARK)
mat:Sub(mat2)
Duel.ReleaseRitualMaterial(mat)
Duel.Remove(mat2,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
local fid=c:GetFieldID()
tc:RegisterFlagEffect(30005000,RESET_EVENT+RESET_TODECK,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetCondition(c30005000.drcon)
e1:SetOperation(c30005000.drop)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
Duel.RegisterEffect(e1,tp)
end
end
function c30005000.drcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc and tc:GetFlagEffectLabel(30005000)==e:GetLabel() then
if not eg:IsContains(tc) then return false end
tc:ResetFlagEffect(30005000)
return true
else
e:Reset()
return false
end
end
function c30005000.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,30005000)
Duel.Draw(tp,1,REASON_EFFECT)
end
function c30005000.thfilter(c)
return c:IsCode(30005000) and c:IsAbleToHand()
end
function c30005000.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT)
and Duel.IsExistingMatchingCard(c30005000.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c30005000.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c30005000.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
......@@ -36,21 +36,48 @@ function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.thfilter(c,tp)
return c:IsSetCard(0x3342) and c:IsType(TYPE_SPELL+TYPE_TRAP)
and (c:IsSSetable() or (not c:IsForbidden() and c:CheckUniqueOnField(tp)))
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.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
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
local b1=tc:IsSSetable()
local b2=not tc:IsForbidden() and tc:CheckUniqueOnField(tp)
if b1 and (not b2 or Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))==0) then
Duel.SSet(tp,tc)
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
if tc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
else
if tc:IsType(TYPE_FIELD) then
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
else
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end
end
end
function cm.thfilter(c)
return c:IsSetCard(0x3342) and c:IsAbleToHand()
end
function cm.filter2(c)
return c:IsFacedown()
......
......@@ -17,13 +17,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
--
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+EFFECT_FLAG_DAMAGE_STEP)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,m+10000)
e3:SetTarget(cm.atktg)
e3:SetOperation(cm.atkop)
e3:SetTarget(cm.rectg)
e3:SetOperation(cm.recop)
c:RegisterEffect(e3)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -42,24 +41,25 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
function cm.rcfilter(c)
return c:IsFaceup()
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then
local sc=g:GetFirst()
while sc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
e1:SetValue(700)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
sc:RegisterEffect(e2)
sc=g:GetNext()
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.rcfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.rcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.rcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(m)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x3342),2,true)
aux.AddFusionProcFunRep(c,cm.matfilter1,2,true)
--search
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
......@@ -30,18 +30,18 @@ function cm.initial_effect(c)
c:RegisterEffect(e0)
--ex
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetDescription(aux.Stringid(m,3))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCondition(cm.excon)
e1:SetTarget(cm.target2)
e1:SetOperation(cm.activate2)
c:RegisterEffect(e1)
local e2=e1:Clone()
e1:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e1)
--
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
......@@ -53,6 +53,10 @@ function cm.initial_effect(c)
e3:SetOperation(cm.atkop)
c:RegisterEffect(e3)
end
function cm.matfilter1(c)
return c:IsSetCard(0x3342) or c:GetCode()~=c:GetOriginalCode()
end
function cm.tgfilter(c)
return c:IsSetCard(0x3342) and c:IsAbleToGrave()
end
......@@ -110,7 +114,7 @@ function cm.matval(c)
end
function cm.valcheck(e,c)
local val=c:GetMaterial():GetSum(cm.matval)
e:GetLabelObject():SetLabel(val)
e:SetLabel(val)
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -118,70 +122,52 @@ function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(33400707,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,4))
local ss=e:GetLabel()+e:GetHandler():GetFlagEffect(33400707)
c:RegisterFlagEffect(33400707,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,4))
if ss>1 then
for i=2,ss do
c:RegisterFlagEffect(33400707,RESET_EVENT+RESETS_STANDARD,0,0,0)
end
end
end
function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(33400707)>0
end
function cm.filter2(c)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup()
end
function cm.filter4(c,e)
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsRelateToEffect(e)
end
function cm.setfilter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) and c:IsSetCard(0x3342)
function cm.cfilter1(c)
return c:IsAbleToHand() and c:IsSetCard(0x3342)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local sg=eg:Filter(cm.filter2,nil)
if chk==0 then return sg:GetCount()>0 end
Duel.SetTargetCard(eg)
if chkc then return false end
if chk==0 then
return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingTarget(cm.cfilter1,tp,LOCATION_GRAVE,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local g1=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectTarget(tp,cm.cfilter1,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,1,0,0)
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=eg:Filter(cm.filter4,nil,e)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
while tc do
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EFFECT_CHANGE_CODE)
e0:SetValue(m)
e0:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,5))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
tc:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
tc:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc:RegisterEffect(e6)
tc=tg:GetNext()
local c=e:GetHandler()
local tc=e:GetLabelObject()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local lc=tg:GetFirst()
if lc==tc then lc=tg:GetNext() end
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(lc:GetCode())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if lc:IsRelateToEffect(e) and lc:IsControler(tp) then
Duel.SendtoHand(lc,nil,REASON_EFFECT)
end
end
if Duel.IsExistingMatchingCard(cm.setfilter2,tp,LOCATION_GRAVE,0,1,nil)and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,cm.setfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SSet(tp,tc)
end
end
function cm.setfilter(c)
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x3342),2,true)
aux.AddFusionProcFunRep(c,cm.matfilter1,3,true)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -31,15 +31,14 @@ function cm.initial_effect(c)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
--Destroy
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(cm.descon1)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,m+10000)
e3:SetTarget(cm.destg1)
e3:SetOperation(cm.desop1)
c:RegisterEffect(e3)
......@@ -54,13 +53,17 @@ function cm.initial_effect(c)
e4:SetOperation(cm.desop2)
c:RegisterEffect(e4)
end
function cm.matfilter1(c)
return c:IsSetCard(0x3342) or c:GetCode()~=c:GetOriginalCode()
end
function cm.matval(c)
if c:GetCode()~=c:GetOriginalCode() then return 1 end
return 0
end
function cm.valcheck(e,c)
local val=c:GetMaterial():GetSum(cm.matval)
e:GetLabelObject():SetLabel(val)
e:SetLabel(val)
end
function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -68,7 +71,13 @@ function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(33400707,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,4))
local ss=e:GetLabel()+e:GetHandler():GetFlagEffect(33400707)
c:RegisterFlagEffect(33400707,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,3))
if ss>1 then
for i=2,ss do
c:RegisterFlagEffect(33400707,RESET_EVENT+RESETS_STANDARD,0,0,0)
end
end
end
function cm.descon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsSetCard(0x3342) and Duel.GetAttacker():GetControler()==tp
......@@ -82,8 +91,19 @@ function cm.desop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
local atk=0
local def=0
if tc:GetCode()~=tc:GetOriginalCode() then
atk=tc:GetBaseAttack()
def=tc:GetBaseDefense()
end
if def and def>atk then atk=def end
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
if atk>0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
end
......@@ -105,10 +125,10 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local def
if tc:GetCode()~=tc:GetOriginalCode() then
atk=tc:GetBaseAttack()
def=tc:GetBaseDefense()
end
if Duel.Destroy(bc,REASON_EFFECT)~=0 then
if def>atk then atk=def end
def=tc:GetBaseDefense()
end
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
if def and def>atk then atk=def end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......@@ -121,6 +141,30 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.destg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=g:GetFirst()
local atk=tc:GetBaseAttack()
local def=tc:GetBaseDefense()
if def>atk then atk=def end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if tc:GetCode()~=tc:GetOriginalCode() then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,atk)
end
end
function cm.desop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and tc:GetCode()~=tc:GetOriginalCode() then
local atk=tc:GetBaseAttack()
local def=tc:GetBaseDefense()
if def>atk then atk=def end
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end
function cm.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
......@@ -129,21 +173,15 @@ function cm.destg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
local tc=g:GetFirst()
if tc:GetCode()~=tc:GetOriginalCode()then
e:SetLabel(1)
local g2=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g2,1,0,0)
else e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
end
end
function cm.desop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:GetCode()~=tc:GetOriginalCode() and tc:IsAbleToRemove() and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
else
Duel.Destroy(tc,REASON_EFFECT)
end
if e:GetLabel()==1 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(tg,REASON_EFFECT)
end
end
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x3342),2,true)
aux.AddFusionProcFunRep(c,cm.matfilter1,2,true)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -23,7 +23,7 @@ function cm.initial_effect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.rpcon)
......@@ -38,7 +38,7 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_BECOME_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.countcon1)
e3:SetTarget(cm.counttg)
e3:SetOperation(cm.countop)
......@@ -54,10 +54,15 @@ function cm.initial_effect(c)
e5:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCountLimit(1,m+10000)
e5:SetTarget(cm.rectg)
e5:SetOperation(cm.recop)
c:RegisterEffect(e5)
end
function cm.matfilter1(c)
return c:IsSetCard(0x3342) or c:GetCode()~=c:GetOriginalCode()
end
function cm.matval(c)
if c:GetCode()~=c:GetOriginalCode() then return 1 end
return 0
......@@ -71,8 +76,14 @@ function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabel()>0
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(33400707,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,5))
local c=e:GetHandler()
local ss=e:GetLabel()+e:GetHandler():GetFlagEffect(33400707)
c:RegisterFlagEffect(33400707,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,4))
if ss>1 then
for i=2,ss do
c:RegisterFlagEffect(33400707,RESET_EVENT+RESETS_STANDARD,0,0,0)
end
end
end
function cm.cfilter1(c)
......@@ -94,15 +105,15 @@ function cm.repfilter(c,tp)
end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local cd=e:GetLabel()
if tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......@@ -116,7 +127,7 @@ function cm.repop(e,tp,eg,ep,ev,re,r,rp)
e4:SetValue(cm.efilter)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+Duel.GetCurrentPhase())
e4:SetOwnerPlayer(tp)
tc:RegisterEffect(e4)
tc:RegisterEffect(e4)
end
end
function cm.efilter(e,re)
......@@ -184,11 +195,18 @@ function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(cm.rcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.rcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetAttack())
local tc=g:GetFirst()
local atk=tc:GetBaseAttack()
local def=tc:GetBaseDefense()
if def>atk then atk=def end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,atk)
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local atk=tc:GetBaseAttack()
local def=tc:GetBaseDefense()
if def>atk then atk=def end
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -197,8 +215,8 @@ local c=e:GetHandler()
e1:SetValue(m)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if tc:GetAttack()>0 then
Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT)
if atk>0 then
Duel.Recover(tp,atk,REASON_EFFECT)
end
end
end
\ No newline at end of file
This diff is collapsed.
......@@ -69,9 +69,45 @@ function cm.initial_effect(c)
e8:SetProperty(EFFECT_FLAG_DELAY)
e8:SetOperation(cm.Eqop1)
c:RegisterEffect(e8)
--to hand
local e10=Effect.CreateEffect(c)
e10:SetDescription(aux.Stringid(m,2))
e10:SetType(EFFECT_TYPE_QUICK_O)
e10:SetCode(EVENT_FREE_CHAIN)
e10:SetProperty(EFFECT_FLAG_CARD_TARGET)
e10:SetRange(LOCATION_MZONE)
e10:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e10:SetCondition(cm.con1)
e10:SetTarget(cm.netg)
e10:SetOperation(cm.neop)
c:RegisterEffect(e10)
--copy
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(m,0))
e9:SetType(EFFECT_TYPE_QUICK_O)
e9:SetCode(EVENT_FREE_CHAIN)
e9:SetRange(LOCATION_MZONE)
e9:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e9:SetCountLimit(1)
e9:SetCondition(cm.con2)
e9:SetOperation(cm.cpop)
c:RegisterEffect(e9)
--tograve
local e11=Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(m,3))
e11:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e11:SetCategory(CATEGORY_TOGRAVE)
e11:SetType(EFFECT_TYPE_QUICK_O)
e11:SetCode(EVENT_CHAINING)
e11:SetRange(LOCATION_MZONE)
e11:SetCountLimit(2)
e11:SetCondition(cm.con3)
e11:SetTarget(cm.target)
e11:SetOperation(cm.operation)
c:RegisterEffect(e11)
end
function cm.fusfilter1(c)
return c:IsSetCard(0x3342)
return c:IsSetCard(0x3342) or c:GetCode()~=c:GetOriginalCode()
end
function cm.fusfilter2(c)
return c:IsSetCard(0x341) and c:IsType(TYPE_RITUAL+TYPE_FUSION+TYPE_XYZ+TYPE_SYNCHRO)
......@@ -94,51 +130,47 @@ function cm.indcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local s=e:GetLabel()
if s>0 then
--copy
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(m,0))
e9:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e9:SetType(EFFECT_TYPE_QUICK_O)
e9:SetCode(EVENT_FREE_CHAIN)
e9:SetRange(LOCATION_MZONE)
e9:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e9:SetCountLimit(1)
e9:SetOperation(cm.cpop)
e9:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e9)
local ss=e:GetLabel()+e:GetHandler():GetFlagEffect(33400707)
c:RegisterFlagEffect(33400707,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,0,0,aux.Stringid(m,ss+6))
if ss>1 then
for i=2,ss do
c:RegisterFlagEffect(33400707,RESET_EVENT+RESETS_STANDARD,0,0,0)
end
end
end
if s>1 then
--set
local e10=Effect.CreateEffect(c)
e10:SetDescription(aux.Stringid(m,2))
e10:SetType(EFFECT_TYPE_QUICK_O)
e10:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e10:SetCode(EVENT_CHAINING)
e10:SetRange(LOCATION_MZONE)
e10:SetCountLimit(1)
e10:SetTarget(cm.thtg)
e10:SetOperation(cm.thop)
e10:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e10)
function cm.con1(e,tp,eg,ep,ev,re,r,rp)
local s1=e:GetHandler():GetFlagEffect(33400707)
return s1>0 and e:GetHandler():GetFlagEffect(m)<s1
end
if s>2 then
--tograve
local e11=Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(m,3))
e11:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e11:SetCategory(CATEGORY_TOGRAVE)
e11:SetType(EFFECT_TYPE_QUICK_O)
e11:SetCode(EVENT_CHAINING)
e11:SetRange(LOCATION_MZONE)
e11:SetCountLimit(2)
e11:SetCondition(cm.condition)
e11:SetTarget(cm.target)
e11:SetOperation(cm.operation)
e11:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e11)
function cm.netg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_MZONE) and chkc:IsControler(tp) and cm.ckfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
e:GetHandler():RegisterFlagEffect(m,RESET_PHASE+PHASE_END,0,1)
end
function cm.neop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and (tc:IsFaceup() or tc:IsLocation(LOCATION_GRAVE)) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
local tc2=g:GetFirst()
while tc2 do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(tc:GetOriginalCode())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+Duel.GetCurrentPhase())
tc2:RegisterEffect(e1)
tc2=g:GetNext()
end
end
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(33400707)>1
end
function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,4))
......@@ -159,31 +191,13 @@ function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.thfilter(c,mc)
return c:IsAbleToHand() and c:IsCode(mc:GetCode())
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil,re:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil,re:GetHandler()) then
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil,re:GetHandler())
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
function cm.con3(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
return tc:GetCode()~=tc:GetOriginalCode() and tc:IsRelateToEffect(re) and (re:IsActiveType(TYPE_MONSTER)
return e:GetHandler():GetFlagEffect(33400707)>2 and tc:GetCode()~=tc:GetOriginalCode() and tc:IsRelateToEffect(re) and (re:IsActiveType(TYPE_MONSTER)
or (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) ))
end
function cm.tgfilter(c)
return c:GetCode()~=c:GetOriginalCode() and c:IsAbleToGrave()
return (c:GetCode()~=c:GetOriginalCode() or c:IsFacedown()) and c:IsAbleToGrave()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
......
......@@ -14,7 +14,6 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_BATTLE_START)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.cptg)
......@@ -28,46 +27,50 @@ function cm.initial_effect(c)
e3:SetOperation(cm.chop)
c:RegisterEffect(e3)
end
function cm.cpfilter(c)
return c:IsFaceup() and not c:IsCode(m)
function cm.cpfilter(c,tp)
return c:IsFaceup() and Duel.IsExistingTarget(cm.cpfilter2,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,c,c)
end
function cm.cpfilter2(c,mc)
return c:IsFaceup() and not c:IsCode(mc:GetCode())
return c:IsFaceup() and not c:IsCode(mc:GetCode()) and c:IsSetCard(0x3342)
end
function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_ONFIELD) and cm.cpfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.cpfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil)
if chkc then return false end
if chk==0 then
return Duel.IsExistingTarget(cm.cpfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g1=Duel.SelectTarget(tp,cm.cpfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local g2=Duel.SelectTarget(tp,cm.cpfilter2,tp,LOCATION_ONFIELD+ LOCATION_GRAVE,0,1,1,g1:GetFirst(),g1:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,0,0)
end
function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local tg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local tc=tg:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local tg2=Duel.SelectMatchingCard(tp,cm.cpfilter2,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil,tc)
local tc2=tg2:GetFirst()
local e1=Effect.CreateEffect(c)
local c=e:GetHandler()
local tc=e:GetLabelObject()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local lc=tg:GetFirst()
if lc==tc then lc=tg:GetNext() end
local cd=lc:GetCode()
if lc:IsRelateToEffect(e) and lc:IsControler(tp) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(tc2:GetCode())
e1:SetValue(cd)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if tc:IsType(TYPE_MONSTER) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetValue(0)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_DEFENSE)
e4:SetValue(0)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
if tc:IsControler(1-tp) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
tc:RegisterEffect(e2,true)
end
end
end
......
......@@ -34,9 +34,6 @@ function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsSetCard(0x341)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function cm.filter3(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e)
end
function cm.ffilter(c,tp)
return c:IsOnField() and c:IsControler(1-tp)
end
......@@ -52,7 +49,7 @@ end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(cm.filter0,tp,0,LOCATION_MZONE,nil)
mg1:Merge(mg2)
Auxiliary.FCheckAdditional=cm.fcheck
......@@ -75,7 +72,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ss=0
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(cm.filter3,nil,e)
local mg1=Duel.GetFusionMaterial(tp)
local mg2=Duel.GetMatchingGroup(cm.filter1,tp,0,LOCATION_MZONE,nil,e)
mg1:Merge(mg2)
Auxiliary.FCheckAdditional=cm.fcheck
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment