Commit 8c3423b3 authored by POLYMER's avatar POLYMER

fix

parent a63d9c00
No preview for this file type
......@@ -166,7 +166,7 @@ function cm.disable(e,c)
if loc==LOCATION_SZONE then x=0x1000000 end
local seq=c:GetSequence()
if seq<=4 then seq=4-seq end
if seq=5 then seq=6 elseif seq=6 then seq=5 end
if seq==5 then seq=6 elseif seq==6 then seq=5 end
return c:IsFaceup() and c:IsLocation(loc) and (bit.band(zone,(1<<seq)*x)~=0 or (loc==LOCATION_FZONE and c:IsLocation(LOCATION_FZONE)))
end
function cm.dis2op(e,tp,eg,ep,ev,re,r,rp)
......
--虚饰之星渡使
function c67200810.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--maintain
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_PZONE)
e0:SetCode(EVENT_PHASE+PHASE_STANDBY)
e0:SetCountLimit(1)
e0:SetOperation(c67200810.desop)
c:RegisterEffect(e0)
--remove
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c67200810.rmcon)
e1:SetTarget(c67200810.rmtarget)
e1:SetTargetRange(0xff,0xff)
e1:SetValue(LOCATION_DECK)
c:RegisterEffect(e1)
--change effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200810,4))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c67200810.stcon)
e2:SetTarget(c67200810.sttg)
e2:SetOperation(c67200810.stop)
c:RegisterEffect(e2)
end
function c67200810.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.HintSelection(Group.FromCards(c))
local g1=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local g3=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_HAND,LOCATION_HAND,nil)
local sg=Group.CreateGroup()
if g1:GetCount()>0 and g3:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200810,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg3=g3:RandomSelect(tp,1)
sg:Merge(sg3)
Duel.SendtoGrave(sg,REASON_COST)
else Duel.Destroy(c,REASON_COST) end
end
--
function c67200810.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x367b)
end
function c67200810.rmcon(e)
return Duel.IsExistingMatchingCard(c67200810.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c67200810.rmtarget(e,c)
return not c:IsSetCard(0x367b)
end
--
function c67200810.stcon(e)
return e:GetHandler():GetFlagEffect(67200810)==0
end
function c67200810.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local b2=Duel.GetLocationCount(tp,LOCATION_PZONE,0)
local b3=Duel.GetLocationCount(tp,LOCATION_PZONE,1)
if chk==0 then return b1>0 or (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
c:RegisterFlagEffect(67200810,RESET_CHAIN,0,1)
local off=1
local ops,opval={},{}
if b1>0 then
ops[off]=aux.Stringid(67200810,1)
opval[off]=0
off=off+1
end
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
ops[off]=aux.Stringid(67200810,2)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
e:SetLabel(sel)
end
function c67200810.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if c:IsRelateToEffect(e) then
if sel==0 then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_MZONE,POS_FACEUP,true)
else
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200810,5))
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetOperation(c67200810.disop)
e1:SetTargetRange(1,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c67200810.pcfilter(c)
return c:IsSetCard(0x367b) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c67200810.disop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or not Duel.IsExistingMatchingCard(c67200810.pcfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) then return end
if Duel.GetFlagEffect(tp,67200810)==0 and Duel.SelectYesNo(tp,aux.Stringid(67200810,3)) then
Duel.RegisterFlagEffect(tp,67200810,RESET_PHASE+PHASE_END,0,1)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c67200810.repop)
end
end
function c67200810.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(1-tp,c67200810.pcfilter,tp,0,LOCATION_DECK+LOCATION_EXTRA,1,1,nil)
local g1=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local g2=Duel.GetLocationCount(1-tp,LOCATION_PZONE,0)
local g3=Duel.GetLocationCount(1-tp,LOCATION_PZONE,1)
local opt=0
if g1>0 and ((Duel.CheckLocation(1-tp,LOCATION_PZONE,0) or Duel.CheckLocation(1-tp,LOCATION_PZONE,1))) then
opt=Duel.SelectOption(1-tp,aux.Stringid(67200810,1),aux.Stringid(67200810,2))
elseif g1>0 then
opt=Duel.SelectOption(1-tp,aux.Stringid(67200810,1))
elseif (Duel.CheckLocation(1-tp,LOCATION_PZONE,0) or Duel.CheckLocation(1-tp,LOCATION_PZONE,1)) then
opt=Duel.SelectOption(1-tp,aux.Stringid(67200810,2))+1
else return end
if opt==0 then
Duel.MoveToField(g:GetFirst(),1-tp,1-tp,LOCATION_MZONE,POS_FACEUP,true)
else
Duel.MoveToField(g:GetFirst(),1-tp,1-tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
--暴食之星渡使
function c67200812.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--maintain
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_PZONE)
e0:SetCode(EVENT_PHASE+PHASE_STANDBY)
e0:SetCountLimit(1)
e0:SetOperation(c67200812.desop)
c:RegisterEffect(e0)
--act limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(1,1)
e1:SetCondition(c67200812.limcon)
e1:SetValue(c67200812.limval)
c:RegisterEffect(e1)
--change effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200812,4))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c67200812.stcon)
e2:SetTarget(c67200812.sttg)
e2:SetOperation(c67200812.stop)
c:RegisterEffect(e2)
end
function c67200812.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.HintSelection(Group.FromCards(c))
local g1=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local g3=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_HAND,LOCATION_HAND,nil)
local sg=Group.CreateGroup()
if g1:GetCount()>0 and g3:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200812,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg3=g3:RandomSelect(tp,1)
sg:Merge(sg3)
Duel.SendtoGrave(sg,REASON_COST)
else Duel.Destroy(c,REASON_COST) end
end
--
function c67200812.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x367b)
end
function c67200812.limcon(e)
return Duel.IsExistingMatchingCard(c67200812.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c67200812.limval(e,re,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and not rc:IsSetCard(0x367b)
end
--
function c67200812.stcon(e)
return e:GetHandler():GetFlagEffect(67200812)==0
end
function c67200812.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local b2=Duel.GetLocationCount(tp,LOCATION_PZONE,0)
local b3=Duel.GetLocationCount(tp,LOCATION_PZONE,1)
if chk==0 then return b1>0 or (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
c:RegisterFlagEffect(67200812,RESET_CHAIN,0,1)
local off=1
local ops,opval={},{}
if b1>0 then
ops[off]=aux.Stringid(67200812,1)
opval[off]=0
off=off+1
end
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
ops[off]=aux.Stringid(67200812,2)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
e:SetLabel(sel)
end
function c67200812.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if c:IsRelateToEffect(e) then
if sel==0 then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_MZONE,POS_FACEUP,true)
else
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200812,5))
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetOperation(c67200812.disop)
e1:SetTargetRange(1,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON)
Duel.RegisterEffect(e2,tp)
end
end
function c67200812.pcfilter(c)
return c:IsSetCard(0x367b) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c67200812.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(c67200812.pcfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) then return end
if Duel.GetFlagEffect(tp,67200812)==0 and Duel.SelectYesNo(tp,aux.Stringid(67200812,3)) then
Duel.RegisterFlagEffect(tp,67200812,RESET_PHASE+PHASE_END,0,1)
Duel.NegateSummon(eg)
if Duel.Destroy(eg,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67200812.pcfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
local g1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local opt=0
if g1>0 and ((Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))) then
opt=Duel.SelectOption(tp,aux.Stringid(67200812,1),aux.Stringid(67200812,2))
elseif g1>0 then
opt=Duel.SelectOption(tp,aux.Stringid(67200812,1))
elseif (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
opt=Duel.SelectOption(tp,aux.Stringid(67200812,2))+1
else return end
if opt==0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_MZONE,POS_FACEUP,true)
else
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
end
--怠惰之星渡使
function c67200814.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--maintain
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_PZONE)
e0:SetCode(EVENT_PHASE+PHASE_STANDBY)
e0:SetCountLimit(1)
e0:SetOperation(c67200814.desop)
c:RegisterEffect(e0)
--act limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetTargetRange(1,1)
e1:SetCondition(c67200814.limcon)
e1:SetTarget(c67200814.sumlimit)
c:RegisterEffect(e1)
--change effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200814,4))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c67200814.stcon)
e2:SetTarget(c67200814.sttg)
e2:SetOperation(c67200814.stop)
c:RegisterEffect(e2)
end
function c67200814.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.HintSelection(Group.FromCards(c))
local g1=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local g3=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_HAND,LOCATION_HAND,nil)
local sg=Group.CreateGroup()
if g1:GetCount()>0 and g3:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200814,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg3=g3:RandomSelect(tp,1)
sg:Merge(sg3)
Duel.SendtoGrave(sg,REASON_COST)
else Duel.Destroy(c,REASON_COST) end
end
--
function c67200814.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x367b)
end
function c67200814.limcon(e)
return Duel.IsExistingMatchingCard(c67200814.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c67200814.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x367b)
end
--
function c67200814.stcon(e)
return e:GetHandler():GetFlagEffect(67200814)==0
end
function c67200814.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local b2=Duel.GetLocationCount(tp,LOCATION_PZONE,0)
local b3=Duel.GetLocationCount(tp,LOCATION_PZONE,1)
if chk==0 then return b1>0 or (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
c:RegisterFlagEffect(67200814,RESET_CHAIN,0,1)
local off=1
local ops,opval={},{}
if b1>0 then
ops[off]=aux.Stringid(67200814,1)
opval[off]=0
off=off+1
end
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
ops[off]=aux.Stringid(67200814,2)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
e:SetLabel(sel)
end
function c67200814.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if c:IsRelateToEffect(e) then
if sel==0 then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_MZONE,POS_FACEUP,true)
else
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200814,5))
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetCondition(c67200814.discon)
e1:SetOperation(c67200814.disop)
e1:SetTargetRange(1,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c67200814.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200814.spcfilter,1,nil,tp)
end
function c67200814.spcfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsSetCard(0x367b)
end
function c67200814.pcfilter(c)
return c:IsSetCard(0x367b) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c67200814.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(c67200814.pcfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) then return end
if Duel.GetFlagEffect(tp,67200814)==0 and Duel.SelectYesNo(tp,aux.Stringid(67200814,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c67200814.pcfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
local g1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local opt=0
if g1>0 and ((Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))) then
opt=Duel.SelectOption(tp,aux.Stringid(67200814,1),aux.Stringid(67200814,2))
elseif g1>0 then
opt=Duel.SelectOption(tp,aux.Stringid(67200814,1))
elseif (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
opt=Duel.SelectOption(tp,aux.Stringid(67200814,2))+1
else return end
if opt==0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_MZONE,POS_FACEUP,true)
else
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
--色欲之星渡使
function c67200816.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--maintain
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_PZONE)
e0:SetCode(EVENT_PHASE+PHASE_STANDBY)
e0:SetCountLimit(1)
e0:SetOperation(c67200816.desop)
c:RegisterEffect(e0)
--act limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_PZONE)
e4:SetTargetRange(1,1)
e4:SetCondition(c67200816.limcon)
e4:SetValue(c67200816.limval)
c:RegisterEffect(e4)
--change effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200816,4))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c67200816.stcon)
e2:SetTarget(c67200816.sttg)
e2:SetOperation(c67200816.stop)
c:RegisterEffect(e2)
end
function c67200816.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.HintSelection(Group.FromCards(c))
local g1=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local g3=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_HAND,LOCATION_HAND,nil)
local sg=Group.CreateGroup()
if g1:GetCount()>0 and g3:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200816,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg3=g3:RandomSelect(tp,1)
sg:Merge(sg3)
Duel.SendtoGrave(sg,REASON_COST)
else Duel.Destroy(c,REASON_COST) end
end
--
function c67200816.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x367b)
end
function c67200816.limcon(e)
return Duel.IsExistingMatchingCard(c67200816.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c67200816.limval(e,re,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_SPELL) and not rc:IsSetCard(0x367b)
end
--
function c67200816.stcon(e)
return e:GetHandler():GetFlagEffect(67200816)==0
end
function c67200816.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local b2=Duel.GetLocationCount(tp,LOCATION_PZONE,0)
local b3=Duel.GetLocationCount(tp,LOCATION_PZONE,1)
if chk==0 then return b1>0 or (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
c:RegisterFlagEffect(67200816,RESET_CHAIN,0,1)
local off=1
local ops,opval={},{}
if b1>0 then
ops[off]=aux.Stringid(67200816,1)
opval[off]=0
off=off+1
end
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
ops[off]=aux.Stringid(67200816,2)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
e:SetLabel(sel)
end
function c67200816.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if c:IsRelateToEffect(e) then
if sel==0 then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_MZONE,POS_FACEUP,true)
else
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200816,5))
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetOperation(c67200816.disop)
e1:SetTargetRange(1,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c67200816.pcfilter(c)
return c:IsSetCard(0x367b) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c67200816.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c67200816.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp)
if ep==tp then return end
if Duel.GetFlagEffect(tp,67200816)==0 and Duel.IsPlayerCanSpecialSummonCount(tp,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=1
and Duel.GetUsableMZoneCount(tp)>=2
and g:CheckSubGroup(c67200816.fselect,2,2,tp) and Duel.SelectYesNo(tp,aux.Stringid(67200816,3)) then
Duel.RegisterFlagEffect(tp,67200816,RESET_PHASE+PHASE_END,0,1)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,c67200816.repop)
end
end
--
function c67200816.spfilter(c,e,tp)
return c:IsLevelAbove(1) and c:IsSetCard(0x367b) and c:IsType(TYPE_PENDULUM) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c67200816.fselect(g,tp)
return g:GetClassCount(Card.GetLocation)==g:GetCount() and g:GetClassCount(Card.GetLevel)==1
and Duel.IsExistingMatchingCard(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,1,nil,g,2,2)
end
function c67200816.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c67200816.spfilter),1-tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) or Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 or g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(1-tp,c67200816.fselect,false,2,2,tp)
if sg and sg:GetCount()==2 then
local tc1=sg:GetFirst()
local tc2=sg:GetNext()
Duel.SpecialSummonStep(tc1,0,1-tp,1-tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(tc2,0,1-tp,1-tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete()
Duel.AdjustAll()
--if sg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local xyzg=Duel.GetMatchingGroup(Card.IsXyzSummonable,1-tp,LOCATION_EXTRA,0,nil,sg,2,2)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(1-tp,1,1,nil):GetFirst()
Duel.XyzSummon(1-tp,xyz,sg)
end
end
end
--强欲之星渡使
function c67200818.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--maintain
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_PZONE)
e0:SetCode(EVENT_PHASE+PHASE_STANDBY)
e0:SetCountLimit(1)
e0:SetOperation(c67200818.desop)
c:RegisterEffect(e0)
--act limit
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_PZONE)
e4:SetTargetRange(1,1)
e4:SetCondition(c67200818.limcon)
e4:SetValue(c67200818.limval)
c:RegisterEffect(e4)
--change effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(67200818,4))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c67200818.stcon)
e2:SetTarget(c67200818.sttg)
e2:SetOperation(c67200818.stop)
c:RegisterEffect(e2)
end
function c67200818.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.HintSelection(Group.FromCards(c))
local g1=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local g3=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_HAND,LOCATION_HAND,nil)
local sg=Group.CreateGroup()
if g1:GetCount()>0 and g3:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(67200818,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.HintSelection(sg1)
sg:Merge(sg1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg3=g3:RandomSelect(tp,1)
sg:Merge(sg3)
Duel.SendtoGrave(sg,REASON_COST)
else Duel.Destroy(c,REASON_COST) end
end
--
function c67200818.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x367b)
end
function c67200818.limcon(e)
return Duel.IsExistingMatchingCard(c67200818.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c67200818.limval(e,re,rp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_SPELL) and not rc:IsSetCard(0x367b)
end
--
function c67200818.stcon(e)
return e:GetHandler():GetFlagEffect(67200818)==0
end
function c67200818.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local b2=Duel.GetLocationCount(tp,LOCATION_PZONE,0)
local b3=Duel.GetLocationCount(tp,LOCATION_PZONE,1)
if chk==0 then return b1>0 or (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
c:RegisterFlagEffect(67200818,RESET_CHAIN,0,1)
local off=1
local ops,opval={},{}
if b1>0 then
ops[off]=aux.Stringid(67200818,1)
opval[off]=0
off=off+1
end
if (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
ops[off]=aux.Stringid(67200818,2)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
e:SetLabel(sel)
end
function c67200818.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if c:IsRelateToEffect(e) then
if sel==0 then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_MZONE,POS_FACEUP,true)
else
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200818,5))
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetOperation(c67200818.disop)
e1:SetTargetRange(1,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
Duel.RegisterEffect(e2,tp)
end
end
function c67200818.tgfilter(c,tp,ec)
local mg=Group.FromCards(ec,c)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c67200818.lfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
end
function c67200818.lfilter(c,mg)
return c:IsLinkSummonable(mg,nil,2,2)
end
function c67200818.disop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or Duel.IsExistingMatchingCard(c67200818.repfilter,tp,LOCATION_MZONE,0,1,nil) then return end
if Duel.GetFlagEffect(tp,67200818)==0 and Duel.SelectYesNo(tp,aux.Stringid(67200818,3)) then
Duel.RegisterFlagEffect(tp,67200818,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc2=Duel.SelectMatchingCard(tp,c67200818.repfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc1=Duel.SelectMatchingCard(tp,c67200818.tgfilter,tp,0,LOCATION_MZONE,1,1,nil,tp,tc2:GetFirst())
local mg=Group.FromCards(tc1,tc2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c67200818.lfilter,tp,LOCATION_EXTRA,0,1,1,nil,mg)
local lc=g:GetFirst()
if lc then
Duel.LinkSummon(tp,lc,mg,nil,2,2)
end
end
end
function c67200818.repfilter(c)
return c:IsFaceup() and c:IsSetCard(0x367b)
end
--星渡之先导者
function c67200820.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c67200820.lcheck)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200820,0))
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetRange(LOCATION_EXTRA)
--e1:SetCountLimit(1,67200820)
e1:SetCondition(c67200820.discon)
e1:SetOperation(c67200820.disop)
c:RegisterEffect(e1)
end
function c67200820.lcheck(g,lc)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x367b)
end
--
function c67200820.discon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c67200820.spcfilter,1,nil,tp) and eg:IsExists(c67200820.filter1,2,nil,tp)
end
function c67200820.filter1(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c67200820.spcfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSetCard(0x367b)
end
function c67200820.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFlagEffect(tp,67200820)==0 and Duel.SelectYesNo(tp,aux.Stringid(67200820,1)) then
Duel.RegisterFlagEffect(tp,67200820,RESET_PHASE+PHASE_END,0,1)
if Duel.MoveToField(c,tp,tp,LOCATION_MZONE,POS_FACEUP,true)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(67200820,2))
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TO_DECK)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_ONFIELD))
e1:SetTargetRange(1,1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment