Commit 067d662d authored by gggg's avatar gggg

eratta

parent cb8ba08f
No preview for this file type
......@@ -16,27 +16,12 @@ function cm.initial_effect(c)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return Senya.check_set_elem(c) or c:IsType(TYPE_XYZ) or c:GetSummonLocation()~=LOCATION_EXTRA
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 and
Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not Senya.check_set_elem(c) and c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ)
end
function cm.filter1(c,e,tp)
return c:GetRank()==4 and Senya.check_set_elem(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(e:GetHandler()),c)>0
end
......
......@@ -14,29 +14,14 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return Senya.check_set_elem(c) or c:IsType(TYPE_XYZ) or c:GetSummonLocation()~=LOCATION_EXTRA
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetMZoneCount(tp)>0
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not Senya.check_set_elem(c) and c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ)
end
function cm.filter(c,e,tp)
return Senya.check_set_elem(c) and c:GetRank()==4 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -31,24 +31,6 @@ function cm.initial_effect(c)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return Senya.check_set_elem(c) or c:GetSummonLocation()~=LOCATION_EXTRA
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not Senya.check_set_elem(c) and c:IsLocation(LOCATION_EXTRA)
end
function cm.filter(c)
return Senya.check_set_elem(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(m) and c:GetLevel()==4
......
......@@ -11,7 +11,6 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCost(cm.cost)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
......@@ -22,24 +21,6 @@ function cm.initial_effect(c)
e3:SetCondition(cm.efcon)
e3:SetOperation(cm.efop)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,cm.counterfilter)
end
function cm.counterfilter(c)
return Senya.check_set_elem(c) or c:GetSummonLocation()~=LOCATION_EXTRA
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not Senya.check_set_elem(c) and c:IsLocation(LOCATION_EXTRA)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsLevelBelow(4) and c:IsLevelAbove(4)
......
......@@ -7,14 +7,14 @@ function cm.initial_effect(c)
--Senya.setreg(c,m,37564299)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,m)
--e1:SetCountLimit(1,m)
e1:SetCondition(Senya.CheckNoExtra)
e1:SetCost(cm.rmcost)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.rmop)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
......@@ -41,23 +41,32 @@ end
--changes
--effects
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.thcost(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.thfilter(c)
return Senya.check_set_sawawa(c) and c:IsAbleToHand() and (not c:IsCode(m))
function cm.thfilter(c,e,tp,ft)
return Senya.check_set_sawawa(c) and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) and (not c:IsCode(m))
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,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,e:GetHandler()) then ft=0 end
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp,ft) end
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,e:GetHandler()) then ft=0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ft)
local tc=g:GetFirst()
if tc then
if ft>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
cm.Senya_name_with_sawawa=true
function cm.initial_effect(c)
Senya.SawawaCommonEffect(c,2,true,false,cm.sfilter)
Senya.SawawaCommonEffect(c,1,true,false,cm.sfilter)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DESTROY)
......
......@@ -4,8 +4,8 @@ local m=37564202
local cm=_G["c"..m]
cm.Senya_name_with_sawawa=true
function cm.initial_effect(c)
Senya.SawawaCommonEffect(c,2,true,true,false)
local e1=Effect.CreateEffect(c)
Senya.SawawaCommonEffect(c,1,true,true,false)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(37564202,1))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
......
......@@ -4,7 +4,7 @@ local m=37564214
local cm=_G["c"..m]
cm.Senya_name_with_sawawa=true
function cm.initial_effect(c)
Senya.SawawaCommonEffect(c,2,true,false,false)
Senya.SawawaCommonEffect(c,1,true,false,false)
--move
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
cm.Senya_name_with_sawawa=true
function cm.initial_effect(c)
Senya.SawawaCommonEffect(c,2,true,false,false)
Senya.SawawaCommonEffect(c,1,true,false,false)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_REMOVE)
......
......@@ -25,6 +25,10 @@ function cm.initial_effect(c)
e4:SetTarget(cm.destg)
e4:SetOperation(cm.desop)
c:RegisterEffect(e4)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
......
......@@ -4,7 +4,7 @@ local m=37564221
local cm=_G["c"..m]
cm.Senya_name_with_sawawa=true
function cm.initial_effect(c)
Senya.SawawaCommonEffect(c,2,true,false,false)
Senya.SawawaCommonEffect(c,1,true,false,false)
local e9=Effect.CreateEffect(c)
e9:SetDescription(aux.Stringid(37564221,1))
e9:SetCategory(CATEGORY_POSITION)
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
Duel.LoadScript("c37564765.lua")
cm.Senya_name_with_sawawa=true
function cm.initial_effect(c)
Senya.SawawaCommonEffect(c,2,true,false,false)
Senya.SawawaCommonEffect(c,1,true,false,false)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_CONTROL)
......
......@@ -3,7 +3,7 @@ Duel.LoadScript("c37564765.lua")
local m=37564310
local cm=_G["c"..m]
function cm.initial_effect(c)
Senya.AddXyzProcedureRank(c,nil,nil,3,3)
Senya.AddXyzProcedureRank(c,nil,nil,2,2)
--atk
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
......
......@@ -10,7 +10,7 @@ function cm.initial_effect(c)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetProperty(EFFECT_FLAG_DELAY)
e0:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) and not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,e:GetHandler())
end)
e0:SetOperation(cm.skipop)
c:RegisterEffect(e0)
......@@ -41,10 +41,18 @@ function cm.skipop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetLabel(ct)
e1:SetTargetRange(1,1)
e1:SetTargetRange(0,1)
e1:SetTarget(cm.sumlimit)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(aux.TRUE)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
Duel.RegisterEffect(e1,tp)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsType(e:GetLabel())
......
......@@ -10,9 +10,30 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
end
function cm.chainfilter(re,tp,cid)
local rc=re:GetHandler()
return rc.Senya_desc_with_nanahira
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==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_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.aclimit(e,re,tp)
local rc=re:GetHandler()
return not rc.Senya_desc_with_nanahira
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
......
......@@ -37,7 +37,7 @@ function cm.initial_effect(c)
end
end
function cm.f(c)
return c:IsFacedown() and c:GetType()==TYPE_SPELL and c:GetActivateEffect()
return c:IsFacedown() and c:GetType()==TYPE_SPELL and c:GetActivateEffect() and (c.Senya_desc_with_nanahira or c:GetOwner()==1-tp)
end
function cm.add(rg)
return function(tc)
......@@ -62,11 +62,11 @@ function cm.reg(e,tp,eg,ep,ev,re,r,rp)
for i=0,1 do
local rg2=rg:Filter(Card.IsControler,nil,i)
if Duel.IsPlayerAffectedByEffect(i,m) then
rg2:ForEach(function(tc)
if tc:IsLocation(LOCATION_SZONE) and cm.f(tc) then return end
for tc in aux.Next(rg2) do
if tc:IsLocation(LOCATION_SZONE) and cm.f(tc,i) then return end
cm.rmv(rg)(tc)
end)
local g=Duel.GetMatchingGroup(cm.f,i,LOCATION_SZONE,0,nil)
end
local g=Duel.GetMatchingGroup(cm.f,i,LOCATION_SZONE,0,nil,i)
g:Sub(rg)
g:ForEach(cm.add(rg))
else
......
......@@ -52,6 +52,9 @@ end
function cm.xyzfilter1(c,xyzc)
return c:IsFaceup() and c:IsCanBeXyzMaterial(xyzc)
end
function cm.disfilter(c)
return c:IsType(TYPE_PENDULUM) and c:IsDiscardable()
end
function cm.xyzcon(e,c,og,min,max)
if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
......@@ -68,7 +71,7 @@ function cm.xyzcon(e,c,og,min,max)
else
mg=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_MZONE,0,nil,c)
local exg=Duel.GetMatchingGroup(cm.xyzfilter1,tp,LOCATION_PZONE,0,nil,c)
if #exg==2 and Duel.GetLocationCountFromEx(tp,tp,exg,c)>0 and Duel.GetFlagEffect(tp,m)==0 and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_XMATERIAL) then return true end
if #exg==2 and Duel.GetLocationCountFromEx(tp,tp,exg,c)>0 and Duel.GetFlagEffect(tp,m)==0 and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_XMATERIAL) and Duel.IsExistingMatchingCard(cm.disfilter,tp,LOCATION_HAND,0,1,nil) then return true end
end
local sg=Group.CreateGroup()
local ce={Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_XMATERIAL)}
......@@ -97,6 +100,7 @@ function cm.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
mg=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_MZONE,0,nil,c)
local exg=Duel.GetMatchingGroup(cm.xyzfilter1,tp,LOCATION_PZONE,0,nil,c)
if #exg==2 and Duel.GetLocationCountFromEx(tp,tp,exg,c)>0 and Duel.GetFlagEffect(tp,m)==0 and not Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_XMATERIAL) and (not Senya.CheckGroup(mg,Senya.CheckFieldFilter,nil,minc,maxc,tp,c) or Duel.SelectYesNo(tp,m*16)) then
Duel.DiscardHand(tp,cm.disfilter,1,1,REASON_COST+REASON_DISCARD)
Duel.HintSelection(exg)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
c:SetMaterial(exg)
......@@ -151,9 +155,9 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.PConditionFilter(c,e,tp)
local bool=Auxiliary.PendulumSummonableBool(c)
return (c:IsLocation(LOCATION_HAND) or (c:IsFaceup() and c:IsType(TYPE_PENDULUM)))
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,bool,bool)
and not c:IsForbidden()
and not c:IsForbidden() and c:IsType(TYPE_PENDULUM)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
......
......@@ -49,7 +49,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
--[[local tc=g:GetFirst()
if tc:IsLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -60,7 +60,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end]]
end
end
function cm.aclimit(e,re,tp)
......
......@@ -7,17 +7,17 @@ function cm.initial_effect(c)
end
function cm.effect_condition_3L(c,fc)
return c:IsLocation(LOCATION_MZONE)
return true -- :IsLocation(LOCATION_MZONE)
end
function cm.effect_operation_3L(c,ctlm)
local e=Senya.NegateEffectModule(c,ctlm)
e:SetDescription(m*16+1)
e:SetReset(RESET_EVENT+0x1fe0000)
e:SetCost(Senya.DescriptionCost())
local con=e:GetCondition()
--[[local con=e:GetCondition()
e:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) and con(e,tp,eg,ep,ev,re,r,rp)
end)
end)]]
c:RegisterEffect(e,true)
return e
end
......@@ -18,29 +18,20 @@ end
function cm.effect_operation_3L(c)
local ex1=Effect.CreateEffect(c)
ex1:SetType(EFFECT_TYPE_FIELD)
ex1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE)
ex1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
ex1:SetRange(LOCATION_MZONE)
ex1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
ex1:SetTargetRange(0xff,0xff)
ex1:SetValue(LOCATION_DECK)
ex1:SetTargetRange(0,1)
ex1:SetValue(LOCATION_REMOVED)
ex1:SetTarget(function(e,c)
return c:GetOwner()~=e:GetHandlerPlayer()
end)
ex1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(ex1,true)
local ex2=ex1:Clone()
ex2:SetCode(EFFECT_CANNOT_TO_GRAVE)
ex2:SetTargetRange(0,LOCATION_DECK+LOCATION_EXTRA)
ex2:SetTarget(function(e,c)
return c:GetOwner()~=e:GetHandlerPlayer() and (c:IsLocation(LOCATION_DECK)
or (c:IsLocation(LOCATION_EXTRA) and (c:GetOriginalType() & TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)~=0))
end)
ex2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(ex2,true)
return ex1,ex2
return ex1
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Senya.check_set_3L(c) and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(e:GetHandler()),c)>0
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Senya.check_set_3L(c) and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(e:GetHandler()),c)>0 and c:IsLevel(7)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
......
......@@ -15,6 +15,10 @@ function cm.initial_effect(c)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
end
function cm.desfilter(c,tp)
return Senya.RemoveEffect_3L(tp,c,1,1,true)
......
......@@ -13,6 +13,10 @@ function cm.initial_effect(c)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
end
function cm.filter(c,e,tp,mg,tc)
return c:IsType(TYPE_FUSION) and Senya.check_set_3L(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and mg:IsExists(cm.rfilter,1,tc,tc,c,tp)
......
......@@ -112,7 +112,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummonStep(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
tc:ReplaceEffect(80316585,0x1fe1000,1)
--tc:ReplaceEffect(80316585,0x1fe1000,1)
Duel.SpecialSummonComplete()
else
local mat2=cm.fselect(tp,tc,mg2,chkf)
......@@ -127,11 +127,13 @@ function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFirstCardTarget()
end
function cm.cfilter(c)
return Senya.check_set_3L(c) and c:IsDiscardable()
return Senya.check_set_3L(c) and not c:IsPublic() -- c:IsDiscardable()
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,cm.cfilter,1,1,REASON_COST+REASON_DISCARD,nil)
--Duel.DiscardHand(tp,cm.cfilter,1,1,REASON_COST+REASON_DISCARD,nil)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
end
function cm.sfilter(c,tp,fc,e)
if not fc then return false end
......
......@@ -14,6 +14,10 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
end
function cm.cfilter(c,ori)
return Senya.check_set_sayuri(c) and c:IsFaceup() and (c:GetType() & 0x81)==0x81
......
......@@ -13,6 +13,10 @@ function cm.initial_effect(c)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
c:RegisterEffect(e2)
end
function cm.filter(c,e,tp,eg,ep,ev,re,r,rp)
local te=Senya.sayuri_activate_effect[c]
......
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