Commit 03268b89 authored by Nemo Ma's avatar Nemo Ma

fix

parent 20418ad1
...@@ -1418,7 +1418,7 @@ function Scl.RegisterEffect(reg_obj, reg_eff) ...@@ -1418,7 +1418,7 @@ function Scl.RegisterEffect(reg_obj, reg_eff)
local owner, handler, ignore = Scl.GetRegisterInfo(reg_obj) local owner, handler, ignore = Scl.GetRegisterInfo(reg_obj)
if type(handler) == "number" then if type(handler) == "number" then
Duel.RegisterEffect(reg_eff, handler) Duel.RegisterEffect(reg_eff, handler)
else elseif aux.GetValueType(handler) == "Card" then
handler:RegisterEffect(reg_eff, ignore) handler:RegisterEffect(reg_eff, ignore)
end end
return reg_eff, reg_eff:GetFieldID() return reg_eff, reg_eff:GetFieldID()
...@@ -3229,7 +3229,7 @@ end ...@@ -3229,7 +3229,7 @@ end
2.extra_check_function: add an additional check to the effect cost/target, call extra_check_function(e, tp, eg, ...) to check. 2.extra_check_function: add an additional check to the effect cost/target, call extra_check_function(e, tp, eg, ...) to check.
//return list_typ, extra_check_function //return list_typ, extra_check_function
4. 4.
{ 1.list_typ == "ExtraOperation", 2.extra_operate_function } { 1.list_typ == "ExtraOperation", 2.extra_operate_function }
Paramas explain: Paramas explain:
2.extra_operate_function: add an additional operate to the effect cost/target, call extra_operate_function(current list's selected card(s), all above lists's selected card(s),e, tp, eg, ...) to operate. 2.extra_operate_function: add an additional operate to the effect cost/target, call extra_operate_function(current list's selected card(s), all above lists's selected card(s),e, tp, eg, ...) to operate.
//return list_typ, extra_operate_function //return list_typ, extra_operate_function
...@@ -4717,7 +4717,7 @@ function Scl.ActivateSepllOrTrap(tc, actp, apply_effect, lim_zone) ...@@ -4717,7 +4717,7 @@ function Scl.ActivateSepllOrTrap(tc, actp, apply_effect, lim_zone)
local tg = te:GetTarget() or aux.TRUE local tg = te:GetTarget() or aux.TRUE
local op = te:GetOperation() or aux.TRUE local op = te:GetOperation() or aux.TRUE
tg(te, actp, ceg, cep, cev, cre, cr, crp, 1) tg(te, actp, ceg, cep, cev, cre, cr, crp, 1)
op(te, actp, ceg, cep, cev, cre, cr, crp) op(te, actp, ceg, cep, cev, cre, cr, crp)
end end
if zone == LOCATION_FZONE then if zone == LOCATION_FZONE then
Duel.RaiseEvent(tc, 4179255, te, 0, tp, tp, Duel.GetCurrentChain()) Duel.RaiseEvent(tc, 4179255, te, 0, tp, tp, Duel.GetCurrentChain())
...@@ -5306,7 +5306,7 @@ end ...@@ -5306,7 +5306,7 @@ end
3. Love.IsLinkSeries(c) -- equal to Scl.IsLinkSeries(c, "YiFanJiang") 3. Love.IsLinkSeries(c) -- equal to Scl.IsLinkSeries(c, "YiFanJiang")
4. Love.IsPreviousSeries(c) -- equal to Scl.IsPreviousSeries(c, "YiFanJiang") 4. Love.IsPreviousSeries(c) -- equal to Scl.IsPreviousSeries(c, "YiFanJiang")
5. Love.IsOriginalSeries(c) -- equal to Scl.IsOriginalSeries(c, "YiFanJiang") 5. Love.IsOriginalSeries(c) -- equal to Scl.IsOriginalSeries(c, "YiFanJiang")
6~10 Love.IsXXXXSeriesMonster(c) (XXXX can be "", "Fusion", "Link" ……, see above) -- equal to Scl.IsXXXXSeries(c, "YiFanJiang") and c:IsType(TYPE_MONSTER) 6~10 Love.IsXXXXSeriesMonster(c) (XXXX can be "", "Fusion", "Link" ……, see above) -- equal to Scl.IsXXXXSeries(c, "YiFanJiang") and c:IsType(TYPE_MONSTER)
11~15 Love.IsXXXXSeriesSpell(c) (XXXX can be "", "Fusion", "Link" ……, see above) -- equal to Scl.IsXXXXSeries(c, "YiFanJiang") and c:IsType(TYPE_SPELL) 11~15 Love.IsXXXXSeriesSpell(c) (XXXX can be "", "Fusion", "Link" ……, see above) -- equal to Scl.IsXXXXSeries(c, "YiFanJiang") and c:IsType(TYPE_SPELL)
16~20 Love.IsXXXXSeriesTrap(c) (XXXX can be "", "Fusion", "Link" ……, see above) -- equal to Scl.IsXXXXSeries(c, "YiFanJiang") and c:IsType(TYPE_TRAP) 16~20 Love.IsXXXXSeriesTrap(c) (XXXX can be "", "Fusion", "Link" ……, see above) -- equal to Scl.IsXXXXSeries(c, "YiFanJiang") and c:IsType(TYPE_TRAP)
21~25 Love.IsXXXXSeriesSpellOrTrap(c) (XXXX can be "", "Fusion", "Link" ……, see above) -- equal to Scl.IsXXXXSeries(c, "YiFanJiang") and c:IsType(TYPE_SPELL + TYPE_TRAP) 21~25 Love.IsXXXXSeriesSpellOrTrap(c) (XXXX can be "", "Fusion", "Link" ……, see above) -- equal to Scl.IsXXXXSeries(c, "YiFanJiang") and c:IsType(TYPE_SPELL + TYPE_TRAP)
...@@ -6862,9 +6862,9 @@ Scl.RaiseGlobalSetEvent() ...@@ -6862,9 +6862,9 @@ Scl.RaiseGlobalSetEvent()
--[[ --[[
10100000 -- Scl's library QQ852415212 10100000 -- Scl's library QQ852415212
60152900 -- LaiBill's library QQ529508379 60152900 -- LaiBill's library QQ529508379
B2Sayaka -- "Miki Sayaka" B2Sayaka -- "Miki Sayaka"
......
This diff is collapsed.
--死汰ガエル
function c112538374.initial_effect(c) function c112538374.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(112538374,0)) e1:SetDescription(aux.Stringid(112538374,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -9,36 +11,42 @@ function c112538374.initial_effect(c) ...@@ -9,36 +11,42 @@ function c112538374.initial_effect(c)
e1:SetTarget(c112538374.sptg) e1:SetTarget(c112538374.sptg)
e1:SetOperation(c112538374.spop) e1:SetOperation(c112538374.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(112538374,1)) e2:SetDescription(aux.Stringid(112538374,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,112538474) e2:SetCountLimit(1,112538375)
e2:SetCost(c112538374.hspcost) e2:SetCost(c112538374.hspcost)
e2:SetTarget(c112538374.hsptg) e2:SetTarget(c112538374.hsptg)
e2:SetOperation(c112538374.hspop) e2:SetOperation(c112538374.hspop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--return
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(112538374,2))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1,112538376)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCondition(c112538374.retcon)
e2:SetTarget(c112538374.rettg)
e2:SetOperation(c112538374.retop)
c:RegisterEffect(e2)
--search
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK) e4:SetDescription(aux.Stringid(112538374,3))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetRange(LOCATION_REMOVED) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END) e4:SetCode(EVENT_REMOVE)
e4:SetCountLimit(1,112538574) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCondition(c112538374.retcon) e4:SetCountLimit(1,112538377)
e4:SetTarget(c112538374.rettg) e4:SetTarget(c112538374.thtg)
e4:SetOperation(c112538374.retop) e4:SetOperation(c112538374.thop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_REMOVE)
e5:SetCountLimit(1,112538674)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetTarget(c112538374.thtg)
e5:SetOperation(c112538374.thop)
c:RegisterEffect(e5)
end end
function c112538374.costfilter(c) function c112538374.costfilter(c)
return c:IsRace(RACE_AQUA) and c:IsDiscardable() return c:IsRace(RACE_AQUA) and c:IsDiscardable()
end end
...@@ -52,7 +60,7 @@ function c112538374.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,7 +60,7 @@ function c112538374.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end end
function c112538374.spfilter(c,e,tp) function c112538374.spfilter(c,e,tp)
return not c:IsCode(112538374) and c:IsSetCard(0x12) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x12) and not c:IsCode(112538374) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c112538374.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c112538374.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -67,14 +75,15 @@ function c112538374.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,14 +75,15 @@ function c112538374.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c112538374.rfilter(c) function c112538374.rfilter(c)
return not c:IsCode(112538374) and c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevelBelow(2) return c:IsLevelBelow(2) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_AQUA)
and c:IsAbleToGraveAsCost() and not c:IsCode(112538374) and c:IsAbleToGraveAsCost()
end end
function c112538374.hspcost(e,tp,eg,ep,ev,re,r,rp,chk) function c112538374.hspcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c112538374.rfilter,tp,LOCATION_DECK,0,2,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c112538374.rfilter,tp,LOCATION_DECK,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c112538374.rfilter,tp,LOCATION_DECK,0,2,2,nil) local g=Duel.SelectMatchingCard(tp,c112538374.rfilter,tp,LOCATION_DECK,0,2,2,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c112538374.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) function c112538374.hsptg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -84,36 +93,34 @@ function c112538374.hsptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -84,36 +93,34 @@ function c112538374.hsptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c112538374.hspop(e,tp,eg,ep,ev,re,r,rp) function c112538374.hspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end end
function c112538374.retcon(e,tp,eg,ep,ev,re,r,rp) function c112538374.retcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() return Duel.GetTurnPlayer()~=tp
end end
function c112538374.retfilter(c) function c112538374.dffilter(c)
return c:IsRace(RACE_AQUA) and c:IsAbleToDeck() return c:IsRace(RACE_AQUA) and c:IsAbleToDeck()
end end
function c112538374.rettg(e,tp,eg,ep,ev,re,r,rp,chk) function c112538374.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(c112538374.retfilter,tp,LOCATION_GRAVE,0,nil) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,2,tp,LOCATION_GRAVE+LOCATION_REMOVED)
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,LOCATION_GRAVE+LOCATION_REMOVED)
end end
function c112538374.retop(e,tp,eg,ep,ev,re,r,rp) function c112538374.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local sg=Group.CreateGroup() if not c:IsRelateToEffect(e) then return end
if c:IsRelateToEffect(e) and c:IsFaceup() then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
sg:AddCard(c) local g=Duel.SelectMatchingCard(tp,c112538374.dffilter,tp,LOCATION_GRAVE,0,1,1,nil)
end
local g=Duel.GetMatchingGroup(c112538374.retfilter,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local tc=g:GetFirst()
sg:Merge(g:Select(tp,1,1,nil)) local gg=Group.FromCards(c,tc)
end Duel.SetTargetCard(g)
if sg:GetCount()==2 then Duel.SendtoDeck(gg,nil,2,REASON_EFFECT)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end end
end end
function c112538374.thfilter(c) function c112538374.thfilter(c)
return c:IsRace(RACE_AQUA) and not c:IsCode(112538374) and c:IsAbleToHand() return c:IsRace(RACE_AQUA) and not c:IsCode(112538374) and c:IsAbleToHand()
end end
...@@ -128,4 +135,4 @@ function c112538374.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -128,4 +135,4 @@ function c112538374.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
...@@ -45,7 +45,7 @@ function cm.filter1(c,tp) ...@@ -45,7 +45,7 @@ function cm.filter1(c,tp)
return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0 return c:IsReleasable() and Duel.GetMZoneCount(1-tp,c,tp)>0
end end
function cm.filter2(c) function cm.filter2(c)
return aux.IsCodeListed(c,99518961) and c:IsType(TYPE_MONSTER) return aux.IsCodeListed(c,99518961) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end end
function cm.filter3(c,e,tp) function cm.filter3(c,e,tp)
return c:IsLevelBelow(3) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(3) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -171,6 +171,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -171,6 +171,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp) function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToBattle() and c:IsLocation(LOCATION_MZONE) and c:IsDisabled() then return end
if #BATTLE_ACT_CHECK>0 then if #BATTLE_ACT_CHECK>0 then
local hash={} local hash={}
local class=0 local class=0
......
...@@ -169,6 +169,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -169,6 +169,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp) function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToBattle() and c:IsLocation(LOCATION_MZONE) and c:IsDisabled() then return end
if #BATTLE_ACT_CHECK>0 then if #BATTLE_ACT_CHECK>0 then
local hash={} local hash={}
local class=0 local class=0
......
...@@ -147,6 +147,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -147,6 +147,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp) function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToBattle() and c:IsLocation(LOCATION_MZONE) and c:IsDisabled() then return end
if #BATTLE_CARD_CHECK>0 then if #BATTLE_CARD_CHECK>0 then
local hash={} local hash={}
local class=0 local class=0
......
...@@ -218,6 +218,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -218,6 +218,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp) function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToBattle() and c:IsLocation(LOCATION_MZONE) and c:IsDisabled() then return end
if #BATTLE_CARD_CHECK>0 then if #BATTLE_CARD_CHECK>0 then
local hash={} local hash={}
local class=0 local class=0
......
...@@ -167,6 +167,8 @@ function cm.sfilter(c) ...@@ -167,6 +167,8 @@ function cm.sfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
end end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp) function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToBattle() and c:IsLocation(LOCATION_MZONE) and c:IsDisabled() then return end
local g=Duel.GetMatchingGroup(cm.sfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(cm.sfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local class=g:GetClassCount(Card.GetCode) local class=g:GetClassCount(Card.GetCode)
if class>0 then if class>0 then
......
...@@ -191,6 +191,8 @@ function cm.sfilter(c) ...@@ -191,6 +191,8 @@ function cm.sfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
end end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp) function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToBattle() and c:IsLocation(LOCATION_MZONE) and c:IsDisabled() then return end
local g=Duel.GetMatchingGroup(cm.sfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(cm.sfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local class=g:GetClassCount(Card.GetCode) local class=g:GetClassCount(Card.GetCode)
if class>0 then if class>0 then
......
...@@ -153,6 +153,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -153,6 +153,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp) function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToBattle() and c:IsLocation(LOCATION_MZONE) and c:IsDisabled() then return end
if BATTLE_PHASE_CHECK>0 then if BATTLE_PHASE_CHECK>0 then
local class=BATTLE_PHASE_CHECK local class=BATTLE_PHASE_CHECK
if class>0 then if class>0 then
......
...@@ -159,6 +159,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -159,6 +159,8 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
function cm.drop2(e,tp,eg,ep,ev,re,r,rp) function cm.drop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToBattle() and c:IsLocation(LOCATION_MZONE) and c:IsDisabled() then return end
if BATTLE_PHASE_CHECK>0 then if BATTLE_PHASE_CHECK>0 then
local class=BATTLE_PHASE_CHECK local class=BATTLE_PHASE_CHECK
if class>0 then if class>0 then
......
...@@ -81,7 +81,7 @@ function cm.actarget2(e,te,tp) ...@@ -81,7 +81,7 @@ function cm.actarget2(e,te,tp)
return not CONVIATRESS_BUFF[te] return not CONVIATRESS_BUFF[te]
end end
function cm.extfilter(c) function cm.extfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) and c:IsAbleToGraveAsCost()
end end
function cm.costop2(e,tp,eg,ep,ev,re,r,rp) function cm.costop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -86,7 +86,7 @@ function cm.actarget2(e,te,tp) ...@@ -86,7 +86,7 @@ function cm.actarget2(e,te,tp)
return not CONVIATRESS_BUFF[te] return not CONVIATRESS_BUFF[te]
end end
function cm.extfilter(c) function cm.extfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) and c:IsAbleToGraveAsCost()
end end
function cm.costop2(e,tp,eg,ep,ev,re,r,rp) function cm.costop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -86,7 +86,7 @@ function cm.actarget2(e,te,tp) ...@@ -86,7 +86,7 @@ function cm.actarget2(e,te,tp)
return not CONVIATRESS_BUFF[te] return not CONVIATRESS_BUFF[te]
end end
function cm.extfilter(c) function cm.extfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) and c:IsAbleToGraveAsCost()
end end
function cm.costop2(e,tp,eg,ep,ev,re,r,rp) function cm.costop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -130,7 +130,7 @@ function cm.actarget2(e,te,tp) ...@@ -130,7 +130,7 @@ function cm.actarget2(e,te,tp)
return not CONVIATRESS_BUFF[te] return not CONVIATRESS_BUFF[te]
end end
function cm.extfilter(c) function cm.extfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) return (c:IsLocation(LOCATION_HAND) or c:IsStatus(STATUS_EFFECT_ENABLED)) and (c:IsHasEffect(11451779) or c:IsHasEffect(11451780) or c:IsHasEffect(11451781) or c:IsHasEffect(11451782)) and c:IsAbleToGraveAsCost()
end end
function cm.costop2(e,tp,eg,ep,ev,re,r,rp) function cm.costop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -251,11 +251,11 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp) ...@@ -251,11 +251,11 @@ function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp return ep~=tp
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK,0,1,nil) or Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK,0,1,nil) or Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_DECK,0,nil) local g1=Duel.GetMatchingGroup(cm.filter1,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g2=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
if #g1>0 and (#g2==0 or Duel.SelectOption(tp,aux.Stringid(11451779,0),aux.Stringid(m,1))==0) then if #g1>0 and (#g2==0 or Duel.SelectOption(tp,aux.Stringid(11451779,0),aux.Stringid(m,1))==0) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -37,8 +37,7 @@ function c117981478.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,8 +37,7 @@ function c117981478.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c117981478.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c117981478.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.IsPlayerCanSpecialSummonCount(tp,2) end and Duel.IsPlayerCanSpecialSummonCount(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c117981478.spfilter(c,e,tp) function c117981478.spfilter(c,e,tp)
return c:IsSetCard(0xdd) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xdd) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -130,7 +130,7 @@ function c118776531.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -130,7 +130,7 @@ function c118776531.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c118776531.mpfilter(c) function c118776531.mpfilter(c)
return c:IsFaceup() and c:IsCode(21377582) return c:IsFaceup() and c:IsCode(21377582,57761191)
end end
function c118776531.thop(e,tp,eg,ep,ev,re,r,rp) function c118776531.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -20,7 +20,7 @@ function cm.chainfilter(re,tp,cid) ...@@ -20,7 +20,7 @@ function cm.chainfilter(re,tp,cid)
return not re:GetActivateLocation()==LOCATION_HAND return not re:GetActivateLocation()==LOCATION_HAND
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==0 end if chk==0 then return e:GetHandler():IsDiscardable() and Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
...@@ -29,7 +29,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,7 +29,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetValue(cm.aclimit) e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function cm.aclimit(e,re,tp) function cm.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_HAND return re:GetActivateLocation()==LOCATION_HAND
......
...@@ -89,7 +89,7 @@ end ...@@ -89,7 +89,7 @@ end
function cm.exsetcon(e,tp,eg,ep,ev,re,r,rp) function cm.exsetcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp) local mg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
return #mg>0 and (Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or mc:IsSSetable()) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return #mg>0 and (Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or c:IsSSetable()) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end end
function cm.exsetop(e,tp,eg,ep,ev,re,r,rp) function cm.exsetop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -89,7 +89,7 @@ end ...@@ -89,7 +89,7 @@ end
function cm.exsetcon(e,tp,eg,ep,ev,re,r,rp) function cm.exsetcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp) local mg=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
return #mg>0 and (Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or mc:IsSSetable()) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return #mg>0 and (Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 or c:IsSSetable()) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end end
function cm.exsetop(e,tp,eg,ep,ev,re,r,rp) function cm.exsetop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -13,7 +13,7 @@ function cm.initial_effect(c) ...@@ -13,7 +13,7 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK)end) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return e:GetHandler():IsPreviousLocation(LOCATION_HAND+LOCATION_DECK)end)
e2:SetTarget(cm.settg) e2:SetTarget(cm.settg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.setop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1)) e3:SetDescription(aux.Stringid(m,1))
......
...@@ -103,13 +103,18 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -103,13 +103,18 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(te1) c:RegisterEffect(te1)
end end
if tc.aozora_field_effect then if tc.aozora_field_effect then
local te2=tc.aozora_field_effect:Clone() local te=tc.aozora_field_effect
if te2:GetType()&(EFFECT_TYPE_QUICK_O+EFFECT_TYPE_QUICK_F)~=0 then local dest,cat,con,cost,tg,op=te:GetDescription(),te:GetCategory(),te:GetCondition(),te:GetCost(),te:GetTarget(),te:GetOperation()
te2:SetType(EFFECT_TYPE_IGNITION) local te2=Effect.CreateEffect(c)
te2:SetCode(0) if dest then te2:SetDescription(dest) end
end if cat then te2:SetCategory(cat) end
te2:SetType(EFFECT_TYPE_IGNITION)
te2:SetRange(LOCATION_SZONE) te2:SetRange(LOCATION_SZONE)
te2:SetCountLimit(1) te2:SetCountLimit(1)
if con then te2:SetCondition(con) end
if cost then te2:SetCost(cost) end
if tg then te2:SetTarget(tg) end
if op then te2:SetOperation(op) end
te2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1) te2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
c:RegisterEffect(te2) c:RegisterEffect(te2)
end end
......
...@@ -620,7 +620,7 @@ function cm.actarget3(e,tc,tp) ...@@ -620,7 +620,7 @@ function cm.actarget3(e,tc,tp)
return Duel.GetLocationCount(p,LOCATION_SZONE)>0 and tc:IsType(TYPE_FIELD) and c:IsLocation(LOCATION_FZONE) and c:IsControler(p) and tc:GetControler()==p and tc~=c return Duel.GetLocationCount(p,LOCATION_SZONE)>0 and tc:IsType(TYPE_FIELD) and c:IsLocation(LOCATION_FZONE) and c:IsControler(p) and tc:GetControler()==p and tc~=c
end end
function cm.pcon(e,tp,eg,ep,ev,re,r,rp) function cm.pcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(function(c,tp)return c:GetReasonPlayer()~=tp and c:IsPreviousLocation(LOCATION_DECK) and not c:IsLocation(LOCATION_DECK)end,1,nil,tp) and e:GetHandler():GetSequence()>4 return eg:IsExists(function(c,tp)return c:GetReasonPlayer()==1-tp and c:IsPreviousLocation(LOCATION_DECK) and not c:IsLocation(LOCATION_DECK)end,1,nil,tp) and e:GetHandler():GetSequence()>4
end end
function cm.pfilter(c,tp) function cm.pfilter(c,tp)
return not c:IsLocation(LOCATION_FZONE) and c:GetOriginalType()&TYPE_FIELD~=0 and c:GetActivateEffect():IsActivatable(tp,true,true) return not c:IsLocation(LOCATION_FZONE) and c:GetOriginalType()&TYPE_FIELD~=0 and c:GetActivateEffect():IsActivatable(tp,true,true)
......
...@@ -362,7 +362,7 @@ function cm.IsSumReleasable(c,sc) ...@@ -362,7 +362,7 @@ function cm.IsSumReleasable(c,sc)
end end
return res return res
end end
function cm.fselect(g,c) function cm.fselect(g,c,tp)
local res=true local res=true
for tc in aux.Next(g) do if not cm.IsSumReleasable(tc,c) then res=false end end for tc in aux.Next(g) do if not cm.IsSumReleasable(tc,c) then res=false end end
return res and Duel.GetMZoneCount(tp,g)>0 return res and Duel.GetMZoneCount(tp,g)>0
...@@ -375,14 +375,14 @@ function cm.sumcon(e,c,minc) ...@@ -375,14 +375,14 @@ function cm.sumcon(e,c,minc)
if mi<minc then mi=minc end if mi<minc then mi=minc end
if ma<mi then return false end if ma<mi then return false end
local g=Group.__add(Duel.GetTributeGroup(c),Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,m)) local g=Group.__add(Duel.GetTributeGroup(c),Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,m))
return ma>0 and g:CheckSubGroup(cm.fselect,mi,ma,c) return ma>0 and g:CheckSubGroup(cm.fselect,mi,ma,c,tp)
end end
function cm.sumop(e,tp,eg,ep,ev,re,r,rp,c,minc) function cm.sumop(e,tp,eg,ep,ev,re,r,rp,c,minc)
local mi,ma=c:GetTributeRequirement() local mi,ma=c:GetTributeRequirement()
if minc and mi<minc then mi=minc end if minc and mi<minc then mi=minc end
local g=Group.__add(Duel.GetTributeGroup(c),Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,m)) local g=Group.__add(Duel.GetTributeGroup(c),Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,m))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:SelectSubGroup(tp,cm.fselect,true,mi,ma,c) local sg=g:SelectSubGroup(tp,cm.fselect,true,mi,ma,c,tp)
c:SetMaterial(sg) c:SetMaterial(sg)
if sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.RegisterFlagEffect(tp,m+2500,RESET_PHASE+PHASE_END,0,1) end if sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.RegisterFlagEffect(tp,m+2500,RESET_PHASE+PHASE_END,0,1) end
Duel.SendtoGrave(sg,REASON_RELEASE+REASON_SUMMON+REASON_MATERIAL) Duel.SendtoGrave(sg,REASON_RELEASE+REASON_SUMMON+REASON_MATERIAL)
...@@ -399,7 +399,7 @@ function cm.otcon1(e,c,minc) ...@@ -399,7 +399,7 @@ function cm.otcon1(e,c,minc)
if mi<minc then mi=minc end if mi<minc then mi=minc end
if ma<mi then return false end if ma<mi then return false end
local g=Group.__add(Duel.GetTributeGroup(c),Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,m)) local g=Group.__add(Duel.GetTributeGroup(c),Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,m))
return ma>0 and g:CheckSubGroup(cm.fselect,mi,ma,c) return ma>0 and g:CheckSubGroup(cm.fselect,mi,ma,c,tp)
else else
local mg=Duel.GetMatchingGroup(cm.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp) local mg=Duel.GetMatchingGroup(cm.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg) return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
...@@ -412,7 +412,7 @@ function cm.otop1(e,tp,eg,ep,ev,re,r,rp,c,minc) ...@@ -412,7 +412,7 @@ function cm.otop1(e,tp,eg,ep,ev,re,r,rp,c,minc)
if minc and mi<minc then mi=minc end if minc and mi<minc then mi=minc end
local g=Group.__add(Duel.GetTributeGroup(c),Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,m)) local g=Group.__add(Duel.GetTributeGroup(c),Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,m))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:SelectSubGroup(tp,cm.fselect,true,mi,ma,c) local sg=g:SelectSubGroup(tp,cm.fselect,true,mi,ma,c,tp)
c:SetMaterial(sg) c:SetMaterial(sg)
if sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.RegisterFlagEffect(tp,m+2500,RESET_PHASE+PHASE_END,0,1) end if sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.RegisterFlagEffect(tp,m+2500,RESET_PHASE+PHASE_END,0,1) end
Duel.SendtoGrave(sg,REASON_RELEASE+REASON_SUMMON+REASON_MATERIAL) Duel.SendtoGrave(sg,REASON_RELEASE+REASON_SUMMON+REASON_MATERIAL)
...@@ -428,7 +428,7 @@ function cm.otcon2(e,c,minc) ...@@ -428,7 +428,7 @@ function cm.otcon2(e,c,minc)
local tp=c:GetControler() local tp=c:GetControler()
if Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,tp,LOCATION_DECK,0,1,nil,m) and Duel.GetFlagEffect(tp,m+2500)==0 then if Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,tp,LOCATION_DECK,0,1,nil,m) and Duel.GetFlagEffect(tp,m+2500)==0 then
local g=Group.__add(Duel.GetTributeGroup(c),Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,m)) local g=Group.__add(Duel.GetTributeGroup(c),Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,m))
return minc<=3 and g:CheckSubGroup(cm.fselect,3,3,c) return minc<=3 and g:CheckSubGroup(cm.fselect,3,3,c,tp)
else else
return minc<=3 and Duel.CheckTribute(c,3) return minc<=3 and Duel.CheckTribute(c,3)
end end
...@@ -437,7 +437,7 @@ function cm.otop2(e,tp,eg,ep,ev,re,r,rp,c,minc) ...@@ -437,7 +437,7 @@ function cm.otop2(e,tp,eg,ep,ev,re,r,rp,c,minc)
if Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,tp,LOCATION_DECK,0,1,nil,m) and Duel.GetFlagEffect(tp,m+2500)==0 then if Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,tp,LOCATION_DECK,0,1,nil,m) and Duel.GetFlagEffect(tp,m+2500)==0 then
local g=Group.__add(Duel.GetTributeGroup(c),Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,m)) local g=Group.__add(Duel.GetTributeGroup(c),Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_DECK,0,nil,m))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:SelectSubGroup(tp,cm.fselect,true,3,3,c) local sg=g:SelectSubGroup(tp,cm.fselect,true,3,3,c,tp)
c:SetMaterial(sg) c:SetMaterial(sg)
if sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.RegisterFlagEffect(tp,m+2500,RESET_PHASE+PHASE_END,0,1) end if sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.RegisterFlagEffect(tp,m+2500,RESET_PHASE+PHASE_END,0,1) end
Duel.SendtoGrave(sg,REASON_RELEASE+REASON_SUMMON+REASON_MATERIAL) Duel.SendtoGrave(sg,REASON_RELEASE+REASON_SUMMON+REASON_MATERIAL)
......
...@@ -13,7 +13,7 @@ function cm.initial_effect(c) ...@@ -13,7 +13,7 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon) e1:SetCondition(cm.thcon)
--e1:SetCost(cm.thcost) e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg) e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop) e1:SetOperation(cm.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -34,51 +34,6 @@ function cm.initial_effect(c) ...@@ -34,51 +34,6 @@ function cm.initial_effect(c)
e10:SetTarget(cm.actarget) e10:SetTarget(cm.actarget)
e10:SetOperation(cm.costop) e10:SetOperation(cm.costop)
c:RegisterEffect(e10) c:RegisterEffect(e10)
if not cm.khonsu then
cm.khonsu=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
cm[0]=Duel.SetOperationInfo
Duel.SetOperationInfo=function(...)
local f1,f2=Duel.GetFlagEffect(0,m),Duel.GetFlagEffect(1,m)
if f1>0 then return cm[0](0,CATEGORY_TOGRAVE,nil,1,1,LOCATION_DECK) end
if f2>0 then return cm[0](0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_DECK) end
if f1==0 and f2==0 then return cm[0](...) end
end
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(function(c)return c:GetActivateEffect()end,0,0xff,0xff,nil)
local reg=Card.RegisterEffect
Card.RegisterEffect=function(sc,se,bool)
if se:IsHasType(EFFECT_TYPE_ACTIVATE) then
local tg=se:GetTarget()
if tg then
se:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return tg(e,tp,eg,ep,ev,re,r,rp,0,chkc) end
if chk==0 then return tg(e,tp,eg,ep,ev,re,r,rp,chk) end
tg(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetFlagEffect(tp,m)>0 then Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end
end)
else
se:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if Duel.GetFlagEffect(tp,m)>0 then Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end
end)
end
end
reg(sc,se,bool)
end
for tc in aux.Next(g) do
if tc.initial_effect then
tc:ReplaceEffect(tc:GetOriginalCode(),0)
end
end
Card.RegisterEffect=reg
e:Reset()
end end
function cm.mfilter(c,xyzc) function cm.mfilter(c,xyzc)
return c:IsXyzType(TYPE_MONSTER) and c:IsXyzLevel(xyzc,7) return c:IsXyzType(TYPE_MONSTER) and c:IsXyzLevel(xyzc,7)
...@@ -113,7 +68,7 @@ function cm.chcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -113,7 +68,7 @@ function cm.chcon(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.chop(e,tp,eg,ep,ev,re,r,rp) function cm.chop(e,tp,eg,ep,ev,re,r,rp)
local cat=re:GetCategory() local cat=re:GetCategory()
re:SetCategory(CATEGORY_TOGRAVE) re:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_END) e3:SetCode(EVENT_CHAIN_END)
...@@ -124,7 +79,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp) ...@@ -124,7 +79,7 @@ function cm.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup() local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g) Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,cm.repop) Duel.ChangeChainOperation(ev,cm.repop)
Duel.ResetFlagEffect(1-tp,m) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_DECK)
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
local cat,re=e:GetLabel(),e:GetLabelObject() local cat,re=e:GetLabel(),e:GetLabelObject()
...@@ -143,7 +98,7 @@ function cm.actarget(e,te,tp) ...@@ -143,7 +98,7 @@ function cm.actarget(e,te,tp)
return te:IsHasType(EFFECT_TYPE_ACTIVATE) return te:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function cm.costop(e,tp,eg,ep,ev,re,r,rp) function cm.costop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m+500)>0 then return end if Duel.GetFlagEffect(e:GetHandler():GetControler(),m+500)>0 then return end
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
Duel.RegisterFlagEffect(tp,m+500,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(e:GetHandler():GetControler(),m+500,RESET_PHASE+PHASE_END,0,1)
end end
...@@ -94,6 +94,16 @@ function cm.initial_effect(c) ...@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if not Party_time_globle_check then if not Party_time_globle_check then
Party_time_globle_check=true Party_time_globle_check=true
Party_time_table={} Party_time_table={}
function Party_time_rfilter(c,id)
return c:GetFlagEffectLabel(7439100)==id
end
function Party_time_chain_target(e,te,tp)
return Group.CreateGroup()
end
function Party_time_chain_operation(e,te,tp,tc,mat,sumtype)
if not sumtype then sumtype=SUMMON_TYPE_FUSION end
Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP)
end
function Party_time_RandomSelect(g,tp,count) function Party_time_RandomSelect(g,tp,count)
if #g<=0 then return end if #g<=0 then return end
if count>#g then count=#g end if count>#g then count=#g end
...@@ -117,15 +127,16 @@ function cm.initial_effect(c) ...@@ -117,15 +127,16 @@ function cm.initial_effect(c)
if Duel.GetCurrentChain()~=0 then if Duel.GetCurrentChain()~=0 then
local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(m)==7439100+id and tg:IsLocation(LOCATION_DECK) then if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(7439100)==7439100+id and tg:IsLocation(LOCATION_DECK) then
return _SendtoDeck(tg,1-tg:GetControler(),seq,reason) return _SendtoDeck(tg,1-tg:GetControler(),seq,reason)
end end
if not tp and aux.GetValueType(tg)=="Group" then if not tp and aux.GetValueType(tg)=="Group" then
local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_DECK) local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_DECK)
if sg and sg:GetCount()>0 then if sg and sg:GetCount()>0 then
tg:Sub(sg) local tgc=tg:Clone()
if tg and tg:GetCount()>0 then tgc:Sub(sg)
_SendtoDeck(tg,tp,seq,reason) if tgc and tgc:GetCount()>0 then
_SendtoDeck(tgc,tp,seq,reason)
end end
return _SendtoDeck(sg,1-sg:GetFirst():GetControler(),seq,reason) return _SendtoDeck(sg,1-sg:GetFirst():GetControler(),seq,reason)
end end
...@@ -139,15 +150,16 @@ function cm.initial_effect(c) ...@@ -139,15 +150,16 @@ function cm.initial_effect(c)
if Duel.GetCurrentChain()~=0 then if Duel.GetCurrentChain()~=0 then
local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(m)==7439100+id and tg:IsLocation(LOCATION_HAND) then if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(7439100)==7439100+id and tg:IsLocation(LOCATION_HAND|LOCATION_DECK) then
return _SendtoHand(tg,1-tg:GetControler(),reason) return _SendtoHand(tg,1-tg:GetControler(),reason)
end end
if not tp and aux.GetValueType(tg)=="Group" then if not tp and aux.GetValueType(tg)=="Group" then
local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_HAND) local sg=tg:Filter(Party_time_rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_HAND|LOCATION_DECK)
if sg and sg:GetCount()>0 then if sg and sg:GetCount()>0 then
tg:Sub(sg) local tgc=tg:Clone()
if tg and tg:GetCount()>0 then tgc:Sub(sg)
_SendtoHand(tg,tp,reason) if tgc and tgc:GetCount()>0 then
_SendtoHand(tgc,tp,reason)
end end
return _SendtoHand(sg,1-sg:GetFirst():GetControler(),reason) return _SendtoHand(sg,1-sg:GetFirst():GetControler(),reason)
end end
...@@ -164,7 +176,7 @@ function cm.initial_effect(c) ...@@ -164,7 +176,7 @@ function cm.initial_effect(c)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
local sg=g:Clone() local sg=g:Clone()
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
sg:Merge(ag) sg:Merge(ag)
end end
...@@ -184,7 +196,7 @@ function cm.initial_effect(c) ...@@ -184,7 +196,7 @@ function cm.initial_effect(c)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
local g=Duel.GetMatchingGroup(f,tp,s,o,cg,...) local g=Duel.GetMatchingGroup(f,tp,s,o,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -205,7 +217,7 @@ function cm.initial_effect(c) ...@@ -205,7 +217,7 @@ function cm.initial_effect(c)
local g=Duel.GetReleaseGroup(sp) local g=Duel.GetReleaseGroup(sp)
local g=g:Filter(f,cg,...) local g=g:Filter(f,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -226,7 +238,7 @@ function cm.initial_effect(c) ...@@ -226,7 +238,7 @@ function cm.initial_effect(c)
local g=Duel.GetReleaseGroup(sp) local g=Duel.GetReleaseGroup(sp)
local g=g:Filter(f,cg,...) local g=g:Filter(f,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -249,8 +261,8 @@ function cm.initial_effect(c) ...@@ -249,8 +261,8 @@ function cm.initial_effect(c)
ce:SetType(EFFECT_TYPE_FIELD) ce:SetType(EFFECT_TYPE_FIELD)
ce:SetProperty(EFFECT_FLAG_PLAYER_TARGET) ce:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ce:SetTargetRange(1,0) ce:SetTargetRange(1,0)
ce:SetTarget(cm.chain_target) ce:SetTarget(Party_time_chain_target)
ce:SetOperation(cm.chain_operation) ce:SetOperation(Party_time_chain_operation)
ce:SetValue(aux.TRUE) ce:SetValue(aux.TRUE)
end end
return ce return ce
...@@ -265,7 +277,7 @@ function cm.initial_effect(c) ...@@ -265,7 +277,7 @@ function cm.initial_effect(c)
if not cg or cg:GetCount()<=0 then return end if not cg or cg:GetCount()<=0 then return end
local cg2=cg:Clone() local cg2=cg:Clone()
if aux.GetValueType(ag)=="Group" and Duel.GetFlagEffect(0,7439099)==0 then if aux.GetValueType(ag)=="Group" and Duel.GetFlagEffect(0,7439099)==0 then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
cg2:Merge(ag) cg2:Merge(ag)
end end
...@@ -285,7 +297,7 @@ function cm.initial_effect(c) ...@@ -285,7 +297,7 @@ function cm.initial_effect(c)
local ag=Party_time_table[7439100+id] local ag=Party_time_table[7439100+id]
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
-- --
aux.SubGroupCaptured=Group.CreateGroup() aux.SubGroupCaptured=Group.CreateGroup()
...@@ -305,9 +317,9 @@ function cm.initial_effect(c) ...@@ -305,9 +317,9 @@ function cm.initial_effect(c)
local cg=Group.CreateGroup() local cg=Group.CreateGroup()
local eg=g:Clone() local eg=g:Clone()
local eg1=g:Clone() local eg1=g:Clone()
local eg2=eg:Filter(cm.rfilter,nil,7439100+id) local eg2=eg:Filter(Party_time_rfilter,nil,7439100+id)
local sg1=sg:Clone() local sg1=sg:Clone()
local sg2=sg:Filter(cm.rfilter,nil,7439100+id) local sg2=sg:Filter(Party_time_rfilter,nil,7439100+id)
if not aux.GCheckAdditional then if not aux.GCheckAdditional then
eg:Sub(eg2) eg:Sub(eg2)
eg1:Sub(eg2) eg1:Sub(eg2)
...@@ -370,30 +382,30 @@ function cm.initial_effect(c) ...@@ -370,30 +382,30 @@ function cm.initial_effect(c)
end end
--_CheckGroupRecursiveCapture=aux.CheckGroupRecursiveCapture --_CheckGroupRecursiveCapture=aux.CheckGroupRecursiveCapture
--function aux.CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params) --function aux.CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
-- if Duel.GetCurrentChain()~=0 and Duel.GetFlagEffect(0,7439099)~=0 then -- if Duel.GetCurrentChain()~=0 and Duel.GetFlagEffect(0,7439099)~=0 then
-- local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) -- local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
-- local ag=Party_time_table[7439100+id] -- local ag=Party_time_table[7439100+id]
-- if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then -- if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
-- sg:AddCard(c) -- sg:AddCard(c)
-- local sg2=sg:Clone() -- local sg2=sg:Clone()
-- local pg=sg:Filter(cm.rfilter,nil,7439100+id) -- local pg=sg:Filter(Party_time_rfilter,nil,7439100+id)
-- sg2:Sub(pg) -- sg2:Sub(pg)
-- if aux.GCheckAdditional and (c:GetFlagEffectLabel(7439100)~=id and not aux.GCheckAdditional(sg2,c,g,f,min,max,ext_params) ) then -- if aux.GCheckAdditional and (c:GetFlagEffectLabel(7439100)~=id and not aux.GCheckAdditional(sg2,c,g,f,min,max,ext_params) ) then
-- sg:RemoveCard(c) -- sg:RemoveCard(c)
-- return false -- return false
-- end -- end
-- local res=#sg>=min and #sg<=max and f(sg2,table.unpack(ext_params)) -- local res=#sg>=min and #sg<=max and f(sg2,table.unpack(ext_params))
-- if res then -- if res then
-- aux.SubGroupCaptured:Clear() -- aux.SubGroupCaptured:Clear()
-- aux.SubGroupCaptured:Merge(sg) -- aux.SubGroupCaptured:Merge(sg)
-- else -- else
-- res=#sg<max and g:IsExists(aux. CheckGroupRecursiveCapture,1,sg2,sg,g,f,min,max,ext_params) -- res=#sg<max and g:IsExists(aux. CheckGroupRecursiveCapture,1,sg2,sg,g,f,min,max,ext_params)
-- end -- end
-- sg:RemoveCard(c) -- sg:RemoveCard(c)
-- return res -- return res
-- end -- end
-- end -- end
-- return _CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params) -- return _CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
--end --end
_IsCanBeRitualMaterial=Card.IsCanBeRitualMaterial _IsCanBeRitualMaterial=Card.IsCanBeRitualMaterial
function Card.IsCanBeRitualMaterial(c,sc) function Card.IsCanBeRitualMaterial(c,sc)
...@@ -414,7 +426,7 @@ function cm.initial_effect(c) ...@@ -414,7 +426,7 @@ function cm.initial_effect(c)
local g=Duel.GetMatchingGroup(f,tp,LOCATION_HAND,0,cg,...) local g=Duel.GetMatchingGroup(f,tp,LOCATION_HAND,0,cg,...)
if not g or g:GetCount()<=0 then return false end if not g or g:GetCount()<=0 then return false end
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -427,16 +439,6 @@ function cm.initial_effect(c) ...@@ -427,16 +439,6 @@ function cm.initial_effect(c)
end end
end end
end end
function cm.chain_target(e,te,tp)
return Group.CreateGroup()
end
function cm.chain_operation(e,te,tp,tc,mat,sumtype)
if not sumtype then sumtype=SUMMON_TYPE_FUSION end
Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP)
end
function cm.rfilter(c,id)
return c:GetFlagEffectLabel(7439100)==id
end
function cm.actcon(e) function cm.actcon(e)
return Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_DECK,0,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_DECK,0,1,nil)
end end
......
...@@ -94,6 +94,16 @@ function cm.initial_effect(c) ...@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if not Party_time_globle_check then if not Party_time_globle_check then
Party_time_globle_check=true Party_time_globle_check=true
Party_time_table={} Party_time_table={}
function Party_time_rfilter(c,id)
return c:GetFlagEffectLabel(7439100)==id
end
function Party_time_chain_target(e,te,tp)
return Group.CreateGroup()
end
function Party_time_chain_operation(e,te,tp,tc,mat,sumtype)
if not sumtype then sumtype=SUMMON_TYPE_FUSION end
Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP)
end
function Party_time_RandomSelect(g,tp,count) function Party_time_RandomSelect(g,tp,count)
if #g<=0 then return end if #g<=0 then return end
if count>#g then count=#g end if count>#g then count=#g end
...@@ -106,8 +116,7 @@ function cm.initial_effect(c) ...@@ -106,8 +116,7 @@ function cm.initial_effect(c)
for i=1,id-1,1 do tc=cg:GetNext() end for i=1,id-1,1 do tc=cg:GetNext() end
end end
sg:AddCard(tc) sg:AddCard(tc)
g:RemoveCard(tc) cg:RemoveCard(tc)
cg:DeleteGroup()
end end
--Duel.HintSelection(g) --Duel.HintSelection(g)
Duel.HintSelection(sg) Duel.HintSelection(sg)
...@@ -118,15 +127,16 @@ function cm.initial_effect(c) ...@@ -118,15 +127,16 @@ function cm.initial_effect(c)
if Duel.GetCurrentChain()~=0 then if Duel.GetCurrentChain()~=0 then
local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(m)==7439100+id and tg:IsLocation(LOCATION_DECK) then if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(7439100)==7439100+id and tg:IsLocation(LOCATION_DECK) then
return _SendtoDeck(tg,1-tg:GetControler(),seq,reason) return _SendtoDeck(tg,1-tg:GetControler(),seq,reason)
end end
if not tp and aux.GetValueType(tg)=="Group" then if not tp and aux.GetValueType(tg)=="Group" then
local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_DECK) local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_DECK)
if sg and sg:GetCount()>0 then if sg and sg:GetCount()>0 then
tg:Sub(sg) local tgc=tg:Clone()
if tg and tg:GetCount()>0 then tgc:Sub(sg)
_SendtoDeck(tg,tp,seq,reason) if tgc and tgc:GetCount()>0 then
_SendtoDeck(tgc,tp,seq,reason)
end end
return _SendtoDeck(sg,1-sg:GetFirst():GetControler(),seq,reason) return _SendtoDeck(sg,1-sg:GetFirst():GetControler(),seq,reason)
end end
...@@ -140,15 +150,16 @@ function cm.initial_effect(c) ...@@ -140,15 +150,16 @@ function cm.initial_effect(c)
if Duel.GetCurrentChain()~=0 then if Duel.GetCurrentChain()~=0 then
local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(m)==7439100+id and tg:IsLocation(LOCATION_HAND) then if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(7439100)==7439100+id and tg:IsLocation(LOCATION_HAND|LOCATION_DECK) then
return _SendtoHand(tg,1-tg:GetControler(),reason) return _SendtoHand(tg,1-tg:GetControler(),reason)
end end
if not tp and aux.GetValueType(tg)=="Group" then if not tp and aux.GetValueType(tg)=="Group" then
local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_HAND) local sg=tg:Filter(Party_time_rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_HAND|LOCATION_DECK)
if sg and sg:GetCount()>0 then if sg and sg:GetCount()>0 then
tg:Sub(sg) local tgc=tg:Clone()
if tg and tg:GetCount()>0 then tgc:Sub(sg)
_SendtoHand(tg,tp,reason) if tgc and tgc:GetCount()>0 then
_SendtoHand(tgc,tp,reason)
end end
return _SendtoHand(sg,1-sg:GetFirst():GetControler(),reason) return _SendtoHand(sg,1-sg:GetFirst():GetControler(),reason)
end end
...@@ -165,7 +176,7 @@ function cm.initial_effect(c) ...@@ -165,7 +176,7 @@ function cm.initial_effect(c)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
local sg=g:Clone() local sg=g:Clone()
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
sg:Merge(ag) sg:Merge(ag)
end end
...@@ -185,7 +196,7 @@ function cm.initial_effect(c) ...@@ -185,7 +196,7 @@ function cm.initial_effect(c)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
local g=Duel.GetMatchingGroup(f,tp,s,o,cg,...) local g=Duel.GetMatchingGroup(f,tp,s,o,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -206,7 +217,7 @@ function cm.initial_effect(c) ...@@ -206,7 +217,7 @@ function cm.initial_effect(c)
local g=Duel.GetReleaseGroup(sp) local g=Duel.GetReleaseGroup(sp)
local g=g:Filter(f,cg,...) local g=g:Filter(f,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -227,7 +238,7 @@ function cm.initial_effect(c) ...@@ -227,7 +238,7 @@ function cm.initial_effect(c)
local g=Duel.GetReleaseGroup(sp) local g=Duel.GetReleaseGroup(sp)
local g=g:Filter(f,cg,...) local g=g:Filter(f,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -250,8 +261,8 @@ function cm.initial_effect(c) ...@@ -250,8 +261,8 @@ function cm.initial_effect(c)
ce:SetType(EFFECT_TYPE_FIELD) ce:SetType(EFFECT_TYPE_FIELD)
ce:SetProperty(EFFECT_FLAG_PLAYER_TARGET) ce:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ce:SetTargetRange(1,0) ce:SetTargetRange(1,0)
ce:SetTarget(cm.chain_target) ce:SetTarget(Party_time_chain_target)
ce:SetOperation(cm.chain_operation) ce:SetOperation(Party_time_chain_operation)
ce:SetValue(aux.TRUE) ce:SetValue(aux.TRUE)
end end
return ce return ce
...@@ -266,7 +277,7 @@ function cm.initial_effect(c) ...@@ -266,7 +277,7 @@ function cm.initial_effect(c)
if not cg or cg:GetCount()<=0 then return end if not cg or cg:GetCount()<=0 then return end
local cg2=cg:Clone() local cg2=cg:Clone()
if aux.GetValueType(ag)=="Group" and Duel.GetFlagEffect(0,7439099)==0 then if aux.GetValueType(ag)=="Group" and Duel.GetFlagEffect(0,7439099)==0 then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
cg2:Merge(ag) cg2:Merge(ag)
end end
...@@ -286,7 +297,7 @@ function cm.initial_effect(c) ...@@ -286,7 +297,7 @@ function cm.initial_effect(c)
local ag=Party_time_table[7439100+id] local ag=Party_time_table[7439100+id]
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
-- --
aux.SubGroupCaptured=Group.CreateGroup() aux.SubGroupCaptured=Group.CreateGroup()
...@@ -306,9 +317,9 @@ function cm.initial_effect(c) ...@@ -306,9 +317,9 @@ function cm.initial_effect(c)
local cg=Group.CreateGroup() local cg=Group.CreateGroup()
local eg=g:Clone() local eg=g:Clone()
local eg1=g:Clone() local eg1=g:Clone()
local eg2=eg:Filter(cm.rfilter,nil,7439100+id) local eg2=eg:Filter(Party_time_rfilter,nil,7439100+id)
local sg1=sg:Clone() local sg1=sg:Clone()
local sg2=sg:Filter(cm.rfilter,nil,7439100+id) local sg2=sg:Filter(Party_time_rfilter,nil,7439100+id)
if not aux.GCheckAdditional then if not aux.GCheckAdditional then
eg:Sub(eg2) eg:Sub(eg2)
eg1:Sub(eg2) eg1:Sub(eg2)
...@@ -369,6 +380,33 @@ function cm.initial_effect(c) ...@@ -369,6 +380,33 @@ function cm.initial_effect(c)
end end
return _SelectSubGroup(g,tp,f,cancelable,min,max,...) return _SelectSubGroup(g,tp,f,cancelable,min,max,...)
end end
--_CheckGroupRecursiveCapture=aux.CheckGroupRecursiveCapture
--function aux.CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
-- if Duel.GetCurrentChain()~=0 and Duel.GetFlagEffect(0,7439099)~=0 then
-- local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
-- local ag=Party_time_table[7439100+id]
-- if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
-- sg:AddCard(c)
-- local sg2=sg:Clone()
-- local pg=sg:Filter(Party_time_rfilter,nil,7439100+id)
-- sg2:Sub(pg)
-- if aux.GCheckAdditional and (c:GetFlagEffectLabel(7439100)~=id and not aux.GCheckAdditional(sg2,c,g,f,min,max,ext_params) ) then
-- sg:RemoveCard(c)
-- return false
-- end
-- local res=#sg>=min and #sg<=max and f(sg2,table.unpack(ext_params))
-- if res then
-- aux.SubGroupCaptured:Clear()
-- aux.SubGroupCaptured:Merge(sg)
-- else
-- res=#sg<max and g:IsExists(aux. CheckGroupRecursiveCapture,1,sg2,sg,g,f,min,max,ext_params)
-- end
-- sg:RemoveCard(c)
-- return res
-- end
-- end
-- return _CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
--end
_IsCanBeRitualMaterial=Card.IsCanBeRitualMaterial _IsCanBeRitualMaterial=Card.IsCanBeRitualMaterial
function Card.IsCanBeRitualMaterial(c,sc) function Card.IsCanBeRitualMaterial(c,sc)
if Duel.GetCurrentChain()~=0 then if Duel.GetCurrentChain()~=0 then
...@@ -388,7 +426,7 @@ function cm.initial_effect(c) ...@@ -388,7 +426,7 @@ function cm.initial_effect(c)
local g=Duel.GetMatchingGroup(f,tp,LOCATION_HAND,0,cg,...) local g=Duel.GetMatchingGroup(f,tp,LOCATION_HAND,0,cg,...)
if not g or g:GetCount()<=0 then return false end if not g or g:GetCount()<=0 then return false end
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -401,16 +439,6 @@ function cm.initial_effect(c) ...@@ -401,16 +439,6 @@ function cm.initial_effect(c)
end end
end end
end end
function cm.chain_target(e,te,tp)
return Group.CreateGroup()
end
function cm.chain_operation(e,te,tp,tc,mat,sumtype)
if not sumtype then sumtype=SUMMON_TYPE_FUSION end
Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP)
end
function cm.rfilter(c,id)
return c:GetFlagEffectLabel(7439100)==id
end
function cm.actcon(e) function cm.actcon(e)
local g=Duel.GetMatchingGroup(cm.cfilter,e:GetHandlerPlayer(),LOCATION_DECK,0,1,nil) local g=Duel.GetMatchingGroup(cm.cfilter,e:GetHandlerPlayer(),LOCATION_DECK,0,1,nil)
return g:GetClassCount(Card.GetCode)>=3 return g:GetClassCount(Card.GetCode)>=3
......
...@@ -94,6 +94,16 @@ function cm.initial_effect(c) ...@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if not Party_time_globle_check then if not Party_time_globle_check then
Party_time_globle_check=true Party_time_globle_check=true
Party_time_table={} Party_time_table={}
function Party_time_rfilter(c,id)
return c:GetFlagEffectLabel(7439100)==id
end
function Party_time_chain_target(e,te,tp)
return Group.CreateGroup()
end
function Party_time_chain_operation(e,te,tp,tc,mat,sumtype)
if not sumtype then sumtype=SUMMON_TYPE_FUSION end
Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP)
end
function Party_time_RandomSelect(g,tp,count) function Party_time_RandomSelect(g,tp,count)
if #g<=0 then return end if #g<=0 then return end
if count>#g then count=#g end if count>#g then count=#g end
...@@ -117,15 +127,16 @@ function cm.initial_effect(c) ...@@ -117,15 +127,16 @@ function cm.initial_effect(c)
if Duel.GetCurrentChain()~=0 then if Duel.GetCurrentChain()~=0 then
local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(m)==7439100+id and tg:IsLocation(LOCATION_DECK) then if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(7439100)==7439100+id and tg:IsLocation(LOCATION_DECK) then
return _SendtoDeck(tg,1-tg:GetControler(),seq,reason) return _SendtoDeck(tg,1-tg:GetControler(),seq,reason)
end end
if not tp and aux.GetValueType(tg)=="Group" then if not tp and aux.GetValueType(tg)=="Group" then
local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_DECK) local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_DECK)
if sg and sg:GetCount()>0 then if sg and sg:GetCount()>0 then
tg:Sub(sg) local tgc=tg:Clone()
if tg and tg:GetCount()>0 then tgc:Sub(sg)
_SendtoDeck(tg,tp,seq,reason) if tgc and tgc:GetCount()>0 then
_SendtoDeck(tgc,tp,seq,reason)
end end
return _SendtoDeck(sg,1-sg:GetFirst():GetControler(),seq,reason) return _SendtoDeck(sg,1-sg:GetFirst():GetControler(),seq,reason)
end end
...@@ -139,15 +150,16 @@ function cm.initial_effect(c) ...@@ -139,15 +150,16 @@ function cm.initial_effect(c)
if Duel.GetCurrentChain()~=0 then if Duel.GetCurrentChain()~=0 then
local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(m)==7439100+id and tg:IsLocation(LOCATION_HAND) then if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(7439100)==7439100+id and tg:IsLocation(LOCATION_HAND|LOCATION_DECK) then
return _SendtoHand(tg,1-tg:GetControler(),reason) return _SendtoHand(tg,1-tg:GetControler(),reason)
end end
if not tp and aux.GetValueType(tg)=="Group" then if not tp and aux.GetValueType(tg)=="Group" then
local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_HAND) local sg=tg:Filter(Party_time_rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_HAND|LOCATION_DECK)
if sg and sg:GetCount()>0 then if sg and sg:GetCount()>0 then
tg:Sub(sg) local tgc=tg:Clone()
if tg and tg:GetCount()>0 then tgc:Sub(sg)
_SendtoHand(tg,tp,reason) if tgc and tgc:GetCount()>0 then
_SendtoHand(tgc,tp,reason)
end end
return _SendtoHand(sg,1-sg:GetFirst():GetControler(),reason) return _SendtoHand(sg,1-sg:GetFirst():GetControler(),reason)
end end
...@@ -164,7 +176,7 @@ function cm.initial_effect(c) ...@@ -164,7 +176,7 @@ function cm.initial_effect(c)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
local sg=g:Clone() local sg=g:Clone()
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
sg:Merge(ag) sg:Merge(ag)
end end
...@@ -184,7 +196,7 @@ function cm.initial_effect(c) ...@@ -184,7 +196,7 @@ function cm.initial_effect(c)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
local g=Duel.GetMatchingGroup(f,tp,s,o,cg,...) local g=Duel.GetMatchingGroup(f,tp,s,o,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -205,7 +217,7 @@ function cm.initial_effect(c) ...@@ -205,7 +217,7 @@ function cm.initial_effect(c)
local g=Duel.GetReleaseGroup(sp) local g=Duel.GetReleaseGroup(sp)
local g=g:Filter(f,cg,...) local g=g:Filter(f,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -226,7 +238,7 @@ function cm.initial_effect(c) ...@@ -226,7 +238,7 @@ function cm.initial_effect(c)
local g=Duel.GetReleaseGroup(sp) local g=Duel.GetReleaseGroup(sp)
local g=g:Filter(f,cg,...) local g=g:Filter(f,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -249,8 +261,8 @@ function cm.initial_effect(c) ...@@ -249,8 +261,8 @@ function cm.initial_effect(c)
ce:SetType(EFFECT_TYPE_FIELD) ce:SetType(EFFECT_TYPE_FIELD)
ce:SetProperty(EFFECT_FLAG_PLAYER_TARGET) ce:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ce:SetTargetRange(1,0) ce:SetTargetRange(1,0)
ce:SetTarget(cm.chain_target) ce:SetTarget(Party_time_chain_target)
ce:SetOperation(cm.chain_operation) ce:SetOperation(Party_time_chain_operation)
ce:SetValue(aux.TRUE) ce:SetValue(aux.TRUE)
end end
return ce return ce
...@@ -265,7 +277,7 @@ function cm.initial_effect(c) ...@@ -265,7 +277,7 @@ function cm.initial_effect(c)
if not cg or cg:GetCount()<=0 then return end if not cg or cg:GetCount()<=0 then return end
local cg2=cg:Clone() local cg2=cg:Clone()
if aux.GetValueType(ag)=="Group" and Duel.GetFlagEffect(0,7439099)==0 then if aux.GetValueType(ag)=="Group" and Duel.GetFlagEffect(0,7439099)==0 then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
cg2:Merge(ag) cg2:Merge(ag)
end end
...@@ -285,7 +297,7 @@ function cm.initial_effect(c) ...@@ -285,7 +297,7 @@ function cm.initial_effect(c)
local ag=Party_time_table[7439100+id] local ag=Party_time_table[7439100+id]
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
-- --
aux.SubGroupCaptured=Group.CreateGroup() aux.SubGroupCaptured=Group.CreateGroup()
...@@ -305,9 +317,9 @@ function cm.initial_effect(c) ...@@ -305,9 +317,9 @@ function cm.initial_effect(c)
local cg=Group.CreateGroup() local cg=Group.CreateGroup()
local eg=g:Clone() local eg=g:Clone()
local eg1=g:Clone() local eg1=g:Clone()
local eg2=eg:Filter(cm.rfilter,nil,7439100+id) local eg2=eg:Filter(Party_time_rfilter,nil,7439100+id)
local sg1=sg:Clone() local sg1=sg:Clone()
local sg2=sg:Filter(cm.rfilter,nil,7439100+id) local sg2=sg:Filter(Party_time_rfilter,nil,7439100+id)
if not aux.GCheckAdditional then if not aux.GCheckAdditional then
eg:Sub(eg2) eg:Sub(eg2)
eg1:Sub(eg2) eg1:Sub(eg2)
...@@ -368,6 +380,33 @@ function cm.initial_effect(c) ...@@ -368,6 +380,33 @@ function cm.initial_effect(c)
end end
return _SelectSubGroup(g,tp,f,cancelable,min,max,...) return _SelectSubGroup(g,tp,f,cancelable,min,max,...)
end end
--_CheckGroupRecursiveCapture=aux.CheckGroupRecursiveCapture
--function aux.CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
-- if Duel.GetCurrentChain()~=0 and Duel.GetFlagEffect(0,7439099)~=0 then
-- local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
-- local ag=Party_time_table[7439100+id]
-- if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
-- sg:AddCard(c)
-- local sg2=sg:Clone()
-- local pg=sg:Filter(Party_time_rfilter,nil,7439100+id)
-- sg2:Sub(pg)
-- if aux.GCheckAdditional and (c:GetFlagEffectLabel(7439100)~=id and not aux.GCheckAdditional(sg2,c,g,f,min,max,ext_params) ) then
-- sg:RemoveCard(c)
-- return false
-- end
-- local res=#sg>=min and #sg<=max and f(sg2,table.unpack(ext_params))
-- if res then
-- aux.SubGroupCaptured:Clear()
-- aux.SubGroupCaptured:Merge(sg)
-- else
-- res=#sg<max and g:IsExists(aux. CheckGroupRecursiveCapture,1,sg2,sg,g,f,min,max,ext_params)
-- end
-- sg:RemoveCard(c)
-- return res
-- end
-- end
-- return _CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
--end
_IsCanBeRitualMaterial=Card.IsCanBeRitualMaterial _IsCanBeRitualMaterial=Card.IsCanBeRitualMaterial
function Card.IsCanBeRitualMaterial(c,sc) function Card.IsCanBeRitualMaterial(c,sc)
if Duel.GetCurrentChain()~=0 then if Duel.GetCurrentChain()~=0 then
...@@ -387,7 +426,7 @@ function cm.initial_effect(c) ...@@ -387,7 +426,7 @@ function cm.initial_effect(c)
local g=Duel.GetMatchingGroup(f,tp,LOCATION_HAND,0,cg,...) local g=Duel.GetMatchingGroup(f,tp,LOCATION_HAND,0,cg,...)
if not g or g:GetCount()<=0 then return false end if not g or g:GetCount()<=0 then return false end
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -400,16 +439,6 @@ function cm.initial_effect(c) ...@@ -400,16 +439,6 @@ function cm.initial_effect(c)
end end
end end
end end
function cm.chain_target(e,te,tp)
return Group.CreateGroup()
end
function cm.chain_operation(e,te,tp,tc,mat,sumtype)
if not sumtype then sumtype=SUMMON_TYPE_FUSION end
Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP)
end
function cm.rfilter(c,id)
return c:GetFlagEffectLabel(7439100)==id
end
function cm.actcon(e) function cm.actcon(e)
return Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil)
end end
......
...@@ -94,6 +94,16 @@ function cm.initial_effect(c) ...@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if not Party_time_globle_check then if not Party_time_globle_check then
Party_time_globle_check=true Party_time_globle_check=true
Party_time_table={} Party_time_table={}
function Party_time_rfilter(c,id)
return c:GetFlagEffectLabel(7439100)==id
end
function Party_time_chain_target(e,te,tp)
return Group.CreateGroup()
end
function Party_time_chain_operation(e,te,tp,tc,mat,sumtype)
if not sumtype then sumtype=SUMMON_TYPE_FUSION end
Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP)
end
function Party_time_RandomSelect(g,tp,count) function Party_time_RandomSelect(g,tp,count)
if #g<=0 then return end if #g<=0 then return end
if count>#g then count=#g end if count>#g then count=#g end
...@@ -117,15 +127,16 @@ function cm.initial_effect(c) ...@@ -117,15 +127,16 @@ function cm.initial_effect(c)
if Duel.GetCurrentChain()~=0 then if Duel.GetCurrentChain()~=0 then
local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(m)==7439100+id and tg:IsLocation(LOCATION_DECK) then if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(7439100)==7439100+id and tg:IsLocation(LOCATION_DECK) then
return _SendtoDeck(tg,1-tg:GetControler(),seq,reason) return _SendtoDeck(tg,1-tg:GetControler(),seq,reason)
end end
if not tp and aux.GetValueType(tg)=="Group" then if not tp and aux.GetValueType(tg)=="Group" then
local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_DECK) local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_DECK)
if sg and sg:GetCount()>0 then if sg and sg:GetCount()>0 then
tg:Sub(sg) local tgc=tg:Clone()
if tg and tg:GetCount()>0 then tgc:Sub(sg)
_SendtoDeck(tg,tp,seq,reason) if tgc and tgc:GetCount()>0 then
_SendtoDeck(tgc,tp,seq,reason)
end end
return _SendtoDeck(sg,1-sg:GetFirst():GetControler(),seq,reason) return _SendtoDeck(sg,1-sg:GetFirst():GetControler(),seq,reason)
end end
...@@ -139,15 +150,16 @@ function cm.initial_effect(c) ...@@ -139,15 +150,16 @@ function cm.initial_effect(c)
if Duel.GetCurrentChain()~=0 then if Duel.GetCurrentChain()~=0 then
local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(m)==7439100+id and tg:IsLocation(LOCATION_HAND) then if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(7439100)==7439100+id and tg:IsLocation(LOCATION_HAND|LOCATION_DECK) then
return _SendtoHand(tg,1-tg:GetControler(),reason) return _SendtoHand(tg,1-tg:GetControler(),reason)
end end
if not tp and aux.GetValueType(tg)=="Group" then if not tp and aux.GetValueType(tg)=="Group" then
local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_HAND) local sg=tg:Filter(Party_time_rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_HAND|LOCATION_DECK)
if sg and sg:GetCount()>0 then if sg and sg:GetCount()>0 then
tg:Sub(sg) local tgc=tg:Clone()
if tg and tg:GetCount()>0 then tgc:Sub(sg)
_SendtoHand(tg,tp,reason) if tgc and tgc:GetCount()>0 then
_SendtoHand(tgc,tp,reason)
end end
return _SendtoHand(sg,1-sg:GetFirst():GetControler(),reason) return _SendtoHand(sg,1-sg:GetFirst():GetControler(),reason)
end end
...@@ -164,7 +176,7 @@ function cm.initial_effect(c) ...@@ -164,7 +176,7 @@ function cm.initial_effect(c)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
local sg=g:Clone() local sg=g:Clone()
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
sg:Merge(ag) sg:Merge(ag)
end end
...@@ -184,7 +196,7 @@ function cm.initial_effect(c) ...@@ -184,7 +196,7 @@ function cm.initial_effect(c)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
local g=Duel.GetMatchingGroup(f,tp,s,o,cg,...) local g=Duel.GetMatchingGroup(f,tp,s,o,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -205,7 +217,7 @@ function cm.initial_effect(c) ...@@ -205,7 +217,7 @@ function cm.initial_effect(c)
local g=Duel.GetReleaseGroup(sp) local g=Duel.GetReleaseGroup(sp)
local g=g:Filter(f,cg,...) local g=g:Filter(f,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -226,7 +238,7 @@ function cm.initial_effect(c) ...@@ -226,7 +238,7 @@ function cm.initial_effect(c)
local g=Duel.GetReleaseGroup(sp) local g=Duel.GetReleaseGroup(sp)
local g=g:Filter(f,cg,...) local g=g:Filter(f,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -249,8 +261,8 @@ function cm.initial_effect(c) ...@@ -249,8 +261,8 @@ function cm.initial_effect(c)
ce:SetType(EFFECT_TYPE_FIELD) ce:SetType(EFFECT_TYPE_FIELD)
ce:SetProperty(EFFECT_FLAG_PLAYER_TARGET) ce:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ce:SetTargetRange(1,0) ce:SetTargetRange(1,0)
ce:SetTarget(cm.chain_target) ce:SetTarget(Party_time_chain_target)
ce:SetOperation(cm.chain_operation) ce:SetOperation(Party_time_chain_operation)
ce:SetValue(aux.TRUE) ce:SetValue(aux.TRUE)
end end
return ce return ce
...@@ -265,7 +277,7 @@ function cm.initial_effect(c) ...@@ -265,7 +277,7 @@ function cm.initial_effect(c)
if not cg or cg:GetCount()<=0 then return end if not cg or cg:GetCount()<=0 then return end
local cg2=cg:Clone() local cg2=cg:Clone()
if aux.GetValueType(ag)=="Group" and Duel.GetFlagEffect(0,7439099)==0 then if aux.GetValueType(ag)=="Group" and Duel.GetFlagEffect(0,7439099)==0 then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
cg2:Merge(ag) cg2:Merge(ag)
end end
...@@ -285,7 +297,7 @@ function cm.initial_effect(c) ...@@ -285,7 +297,7 @@ function cm.initial_effect(c)
local ag=Party_time_table[7439100+id] local ag=Party_time_table[7439100+id]
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
-- --
aux.SubGroupCaptured=Group.CreateGroup() aux.SubGroupCaptured=Group.CreateGroup()
...@@ -305,9 +317,9 @@ function cm.initial_effect(c) ...@@ -305,9 +317,9 @@ function cm.initial_effect(c)
local cg=Group.CreateGroup() local cg=Group.CreateGroup()
local eg=g:Clone() local eg=g:Clone()
local eg1=g:Clone() local eg1=g:Clone()
local eg2=eg:Filter(cm.rfilter,nil,7439100+id) local eg2=eg:Filter(Party_time_rfilter,nil,7439100+id)
local sg1=sg:Clone() local sg1=sg:Clone()
local sg2=sg:Filter(cm.rfilter,nil,7439100+id) local sg2=sg:Filter(Party_time_rfilter,nil,7439100+id)
if not aux.GCheckAdditional then if not aux.GCheckAdditional then
eg:Sub(eg2) eg:Sub(eg2)
eg1:Sub(eg2) eg1:Sub(eg2)
...@@ -368,6 +380,33 @@ function cm.initial_effect(c) ...@@ -368,6 +380,33 @@ function cm.initial_effect(c)
end end
return _SelectSubGroup(g,tp,f,cancelable,min,max,...) return _SelectSubGroup(g,tp,f,cancelable,min,max,...)
end end
--_CheckGroupRecursiveCapture=aux.CheckGroupRecursiveCapture
--function aux.CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
-- if Duel.GetCurrentChain()~=0 and Duel.GetFlagEffect(0,7439099)~=0 then
-- local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
-- local ag=Party_time_table[7439100+id]
-- if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
-- sg:AddCard(c)
-- local sg2=sg:Clone()
-- local pg=sg:Filter(Party_time_rfilter,nil,7439100+id)
-- sg2:Sub(pg)
-- if aux.GCheckAdditional and (c:GetFlagEffectLabel(7439100)~=id and not aux.GCheckAdditional(sg2,c,g,f,min,max,ext_params) ) then
-- sg:RemoveCard(c)
-- return false
-- end
-- local res=#sg>=min and #sg<=max and f(sg2,table.unpack(ext_params))
-- if res then
-- aux.SubGroupCaptured:Clear()
-- aux.SubGroupCaptured:Merge(sg)
-- else
-- res=#sg<max and g:IsExists(aux. CheckGroupRecursiveCapture,1,sg2,sg,g,f,min,max,ext_params)
-- end
-- sg:RemoveCard(c)
-- return res
-- end
-- end
-- return _CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
--end
_IsCanBeRitualMaterial=Card.IsCanBeRitualMaterial _IsCanBeRitualMaterial=Card.IsCanBeRitualMaterial
function Card.IsCanBeRitualMaterial(c,sc) function Card.IsCanBeRitualMaterial(c,sc)
if Duel.GetCurrentChain()~=0 then if Duel.GetCurrentChain()~=0 then
...@@ -387,7 +426,7 @@ function cm.initial_effect(c) ...@@ -387,7 +426,7 @@ function cm.initial_effect(c)
local g=Duel.GetMatchingGroup(f,tp,LOCATION_HAND,0,cg,...) local g=Duel.GetMatchingGroup(f,tp,LOCATION_HAND,0,cg,...)
if not g or g:GetCount()<=0 then return false end if not g or g:GetCount()<=0 then return false end
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -400,16 +439,6 @@ function cm.initial_effect(c) ...@@ -400,16 +439,6 @@ function cm.initial_effect(c)
end end
end end
end end
function cm.chain_target(e,te,tp)
return Group.CreateGroup()
end
function cm.chain_operation(e,te,tp,tc,mat,sumtype)
if not sumtype then sumtype=SUMMON_TYPE_FUSION end
Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP)
end
function cm.rfilter(c,id)
return c:GetFlagEffectLabel(7439100)==id
end
function cm.actcon(e) function cm.actcon(e)
return Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_HAND+LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_HAND+LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil)
end end
......
...@@ -94,6 +94,16 @@ function cm.initial_effect(c) ...@@ -94,6 +94,16 @@ function cm.initial_effect(c)
if not Party_time_globle_check then if not Party_time_globle_check then
Party_time_globle_check=true Party_time_globle_check=true
Party_time_table={} Party_time_table={}
function Party_time_rfilter(c,id)
return c:GetFlagEffectLabel(7439100)==id
end
function Party_time_chain_target(e,te,tp)
return Group.CreateGroup()
end
function Party_time_chain_operation(e,te,tp,tc,mat,sumtype)
if not sumtype then sumtype=SUMMON_TYPE_FUSION end
Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP)
end
function Party_time_RandomSelect(g,tp,count) function Party_time_RandomSelect(g,tp,count)
if #g<=0 then return end if #g<=0 then return end
if count>#g then count=#g end if count>#g then count=#g end
...@@ -117,15 +127,16 @@ function cm.initial_effect(c) ...@@ -117,15 +127,16 @@ function cm.initial_effect(c)
if Duel.GetCurrentChain()~=0 then if Duel.GetCurrentChain()~=0 then
local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(m)==7439100+id and tg:IsLocation(LOCATION_DECK) then if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(7439100)==7439100+id and tg:IsLocation(LOCATION_DECK) then
return _SendtoDeck(tg,1-tg:GetControler(),seq,reason) return _SendtoDeck(tg,1-tg:GetControler(),seq,reason)
end end
if not tp and aux.GetValueType(tg)=="Group" then if not tp and aux.GetValueType(tg)=="Group" then
local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_DECK) local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_DECK)
if sg and sg:GetCount()>0 then if sg and sg:GetCount()>0 then
tg:Sub(sg) local tgc=tg:Clone()
if tg and tg:GetCount()>0 then tgc:Sub(sg)
_SendtoDeck(tg,tp,seq,reason) if tgc and tgc:GetCount()>0 then
_SendtoDeck(tgc,tp,seq,reason)
end end
return _SendtoDeck(sg,1-sg:GetFirst():GetControler(),seq,reason) return _SendtoDeck(sg,1-sg:GetFirst():GetControler(),seq,reason)
end end
...@@ -139,15 +150,16 @@ function cm.initial_effect(c) ...@@ -139,15 +150,16 @@ function cm.initial_effect(c)
if Duel.GetCurrentChain()~=0 then if Duel.GetCurrentChain()~=0 then
local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID) local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(m)==7439100+id and tg:IsLocation(LOCATION_HAND) then if not tp and aux.GetValueType(tg)=="Card" and tg:GetFlagEffectLabel(7439100)==7439100+id and tg:IsLocation(LOCATION_HAND|LOCATION_DECK) then
return _SendtoHand(tg,1-tg:GetControler(),reason) return _SendtoHand(tg,1-tg:GetControler(),reason)
end end
if not tp and aux.GetValueType(tg)=="Group" then if not tp and aux.GetValueType(tg)=="Group" then
local sg=tg:Filter(cm.rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_HAND) local sg=tg:Filter(Party_time_rfilter,nil,7439100+id):Filter(Card.IsLocation,nil,LOCATION_HAND|LOCATION_DECK)
if sg and sg:GetCount()>0 then if sg and sg:GetCount()>0 then
tg:Sub(sg) local tgc=tg:Clone()
if tg and tg:GetCount()>0 then tgc:Sub(sg)
_SendtoHand(tg,tp,reason) if tgc and tgc:GetCount()>0 then
_SendtoHand(tgc,tp,reason)
end end
return _SendtoHand(sg,1-sg:GetFirst():GetControler(),reason) return _SendtoHand(sg,1-sg:GetFirst():GetControler(),reason)
end end
...@@ -164,7 +176,7 @@ function cm.initial_effect(c) ...@@ -164,7 +176,7 @@ function cm.initial_effect(c)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
local sg=g:Clone() local sg=g:Clone()
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
sg:Merge(ag) sg:Merge(ag)
end end
...@@ -184,7 +196,7 @@ function cm.initial_effect(c) ...@@ -184,7 +196,7 @@ function cm.initial_effect(c)
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
local g=Duel.GetMatchingGroup(f,tp,s,o,cg,...) local g=Duel.GetMatchingGroup(f,tp,s,o,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -205,7 +217,7 @@ function cm.initial_effect(c) ...@@ -205,7 +217,7 @@ function cm.initial_effect(c)
local g=Duel.GetReleaseGroup(sp) local g=Duel.GetReleaseGroup(sp)
local g=g:Filter(f,cg,...) local g=g:Filter(f,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -226,7 +238,7 @@ function cm.initial_effect(c) ...@@ -226,7 +238,7 @@ function cm.initial_effect(c)
local g=Duel.GetReleaseGroup(sp) local g=Duel.GetReleaseGroup(sp)
local g=g:Filter(f,cg,...) local g=g:Filter(f,cg,...)
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -249,8 +261,8 @@ function cm.initial_effect(c) ...@@ -249,8 +261,8 @@ function cm.initial_effect(c)
ce:SetType(EFFECT_TYPE_FIELD) ce:SetType(EFFECT_TYPE_FIELD)
ce:SetProperty(EFFECT_FLAG_PLAYER_TARGET) ce:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ce:SetTargetRange(1,0) ce:SetTargetRange(1,0)
ce:SetTarget(cm.chain_target) ce:SetTarget(Party_time_chain_target)
ce:SetOperation(cm.chain_operation) ce:SetOperation(Party_time_chain_operation)
ce:SetValue(aux.TRUE) ce:SetValue(aux.TRUE)
end end
return ce return ce
...@@ -265,7 +277,7 @@ function cm.initial_effect(c) ...@@ -265,7 +277,7 @@ function cm.initial_effect(c)
if not cg or cg:GetCount()<=0 then return end if not cg or cg:GetCount()<=0 then return end
local cg2=cg:Clone() local cg2=cg:Clone()
if aux.GetValueType(ag)=="Group" and Duel.GetFlagEffect(0,7439099)==0 then if aux.GetValueType(ag)=="Group" and Duel.GetFlagEffect(0,7439099)==0 then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
cg2:Merge(ag) cg2:Merge(ag)
end end
...@@ -285,7 +297,7 @@ function cm.initial_effect(c) ...@@ -285,7 +297,7 @@ function cm.initial_effect(c)
local ag=Party_time_table[7439100+id] local ag=Party_time_table[7439100+id]
if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
-- --
aux.SubGroupCaptured=Group.CreateGroup() aux.SubGroupCaptured=Group.CreateGroup()
...@@ -305,9 +317,9 @@ function cm.initial_effect(c) ...@@ -305,9 +317,9 @@ function cm.initial_effect(c)
local cg=Group.CreateGroup() local cg=Group.CreateGroup()
local eg=g:Clone() local eg=g:Clone()
local eg1=g:Clone() local eg1=g:Clone()
local eg2=eg:Filter(cm.rfilter,nil,7439100+id) local eg2=eg:Filter(Party_time_rfilter,nil,7439100+id)
local sg1=sg:Clone() local sg1=sg:Clone()
local sg2=sg:Filter(cm.rfilter,nil,7439100+id) local sg2=sg:Filter(Party_time_rfilter,nil,7439100+id)
if not aux.GCheckAdditional then if not aux.GCheckAdditional then
eg:Sub(eg2) eg:Sub(eg2)
eg1:Sub(eg2) eg1:Sub(eg2)
...@@ -368,6 +380,33 @@ function cm.initial_effect(c) ...@@ -368,6 +380,33 @@ function cm.initial_effect(c)
end end
return _SelectSubGroup(g,tp,f,cancelable,min,max,...) return _SelectSubGroup(g,tp,f,cancelable,min,max,...)
end end
--_CheckGroupRecursiveCapture=aux.CheckGroupRecursiveCapture
--function aux.CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
-- if Duel.GetCurrentChain()~=0 and Duel.GetFlagEffect(0,7439099)~=0 then
-- local id=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
-- local ag=Party_time_table[7439100+id]
-- if id~=0 and Duel.GetFlagEffect(0,7439100+id)~=0 then
-- sg:AddCard(c)
-- local sg2=sg:Clone()
-- local pg=sg:Filter(Party_time_rfilter,nil,7439100+id)
-- sg2:Sub(pg)
-- if aux.GCheckAdditional and (c:GetFlagEffectLabel(7439100)~=id and not aux.GCheckAdditional(sg2,c,g,f,min,max,ext_params) ) then
-- sg:RemoveCard(c)
-- return false
-- end
-- local res=#sg>=min and #sg<=max and f(sg2,table.unpack(ext_params))
-- if res then
-- aux.SubGroupCaptured:Clear()
-- aux.SubGroupCaptured:Merge(sg)
-- else
-- res=#sg<max and g:IsExists(aux. CheckGroupRecursiveCapture,1,sg2,sg,g,f,min,max,ext_params)
-- end
-- sg:RemoveCard(c)
-- return res
-- end
-- end
-- return _CheckGroupRecursiveCapture(c,sg,g,f,min,max,ext_params)
--end
_IsCanBeRitualMaterial=Card.IsCanBeRitualMaterial _IsCanBeRitualMaterial=Card.IsCanBeRitualMaterial
function Card.IsCanBeRitualMaterial(c,sc) function Card.IsCanBeRitualMaterial(c,sc)
if Duel.GetCurrentChain()~=0 then if Duel.GetCurrentChain()~=0 then
...@@ -387,7 +426,7 @@ function cm.initial_effect(c) ...@@ -387,7 +426,7 @@ function cm.initial_effect(c)
local g=Duel.GetMatchingGroup(f,tp,LOCATION_HAND,0,cg,...) local g=Duel.GetMatchingGroup(f,tp,LOCATION_HAND,0,cg,...)
if not g or g:GetCount()<=0 then return false end if not g or g:GetCount()<=0 then return false end
if aux.GetValueType(ag)=="Group" then if aux.GetValueType(ag)=="Group" then
ag=ag:Filter(cm.rfilter,nil,7439100+id) ag=ag:Filter(Party_time_rfilter,nil,7439100+id)
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
g:Merge(ag) g:Merge(ag)
end end
...@@ -400,16 +439,6 @@ function cm.initial_effect(c) ...@@ -400,16 +439,6 @@ function cm.initial_effect(c)
end end
end end
end end
function cm.chain_target(e,te,tp)
return Group.CreateGroup()
end
function cm.chain_operation(e,te,tp,tc,mat,sumtype)
if not sumtype then sumtype=SUMMON_TYPE_FUSION end
Duel.SpecialSummon(tc,sumtype,tp,tp,false,false,POS_FACEUP)
end
function cm.rfilter(c,id)
return c:GetFlagEffectLabel(7439100)==id
end
function cm.actcon(e) function cm.actcon(e)
return Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_HAND,0,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_HAND,0,1,nil)
end end
......
...@@ -96,9 +96,7 @@ function c79083105.zntg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -96,9 +96,7 @@ function c79083105.zntg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.IsPlayerAffectedByEffect(tp,79083810) and Duel.IsPlayerAffectedByEffect(tp,79083810) and
Duel.IsPlayerAffectedByEffect(tp,79083910) and Duel.IsPlayerAffectedByEffect(tp,79083910) and
Duel.IsPlayerAffectedByEffect(tp,79083010) and Duel.IsPlayerAffectedByEffect(tp,79083010) and
Duel.IsPlayerAffectedByEffect(tp,79084010) and Duel.IsPlayerAffectedByEffect(tp,79084010)
Duel.IsPlayerAffectedByEffect(tp,79084110) and
Duel.IsPlayerAffectedByEffect(tp,79084210)
if chk==0 then return not b1 end if chk==0 then return not b1 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79083104,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79083104,0))
local zone=Duel.SelectField(tp,1,LOCATION_ONFIELD,0,flag) local zone=Duel.SelectField(tp,1,LOCATION_ONFIELD,0,flag)
...@@ -273,12 +271,12 @@ function c79083105.srfilter(c,e,tp,check) ...@@ -273,12 +271,12 @@ function c79083105.srfilter(c,e,tp,check)
end end
function c79083105.srtg(e,tp,eg,ep,ev,re,r,rp,chk) function c79083105.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.IsExistingMatchingCard(c79083105.srfilter,tp,LOCATION_DECK,0,1,nil,e,tp,check) end if chk==0 then return Duel.IsExistingMatchingCard(c79083105.srfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp,check) end
end end
function c79083105.srop(e,tp,eg,ep,ev,re,r,rp) function c79083105.srop(e,tp,eg,ep,ev,re,r,rp)
local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local check=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c79083105.srfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,check) local g=Duel.SelectMatchingCard(tp,c79083105.srfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp,check)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
if tc:IsAbleToHand() and (not (check and tc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) and tc:IsType(TYPE_MONSTER) and tc:IsType(TYPE_RITUAL)) or Duel.SelectOption(tp,1190,1152)==0) then if tc:IsAbleToHand() and (not (check and tc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) and tc:IsType(TYPE_MONSTER) and tc:IsType(TYPE_RITUAL)) or Duel.SelectOption(tp,1190,1152)==0) then
......
...@@ -33,8 +33,8 @@ function c87490445.initial_effect(c) ...@@ -33,8 +33,8 @@ function c87490445.initial_effect(c)
end end
function c87490445.sxxcost(e,tp,eg,ep,ev,re,r,rp,chk) function c87490445.sxxcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(87490445)==0 end if chk==0 then return c:GetFlagEffect(87491445)==0 end
c:RegisterFlagEffect(87490445,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1) c:RegisterFlagEffect(87491445,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL,0,1)
end end
function c87490445.sxxtg1(e,tp,eg,ep,ev,re,r,rp,chk) function c87490445.sxxtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -72,7 +72,7 @@ function c87490445.sxxop2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,7 +72,7 @@ function c87490445.sxxop2(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c87490445.discon(e,tp,eg,ep,ev,re,r,rp) function c87490445.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(87490445)<2 and re:GetHandlerPlayer()~=tp and Duel.IsChainDisablable(ev) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and re:IsActiveType(TYPE_MONSTER) return c:GetFlagEffect(87490445)<2 and re:GetHandlerPlayer()~=tp and Duel.IsChainDisablable(ev) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and re:IsActiveType(TYPE_MONSTER)
end end
function c87490445.disop(e,tp,eg,ep,ev,re,r,rp) function c87490445.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
--魔女术大贤者
function c98920086.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),c98920086.matfilter,true)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920086,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,98920086)
e1:SetCondition(c98920086.thcon)
e1:SetTarget(c98920086.thtg)
e1:SetOperation(c98920086.thop)
c:RegisterEffect(e1)
--cannot be target/effect indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c98920086.indcon)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98920086,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c98920086.atkcon)
e1:SetCost(c98920086.atkcost)
e1:SetOperation(c98920086.atkop)
c:RegisterEffect(e1)
end
function c98920086.matfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c98920086.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c98920086.thfilter(c)
return c:IsSetCard(0x128,0x150) and c:IsAbleToHand()
end
function c98920086.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920086.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98920086.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98920086.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c98920086.indcon(e)
return ep==tp and Duel.IsExistingMatchingCard(Card.IsRace,tp,LOCATION_GRAVE,0,4,nil,RACE_SPELLCASTER)
end
function c98920086.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetAttackTarget()
if not c then return false end
if c:IsControler(1-tp) then c=Duel.GetAttacker() end
e:SetLabelObject(c)
return c and c:IsRace(RACE_SPELLCASTER) and c:IsRelateToBattle()
end
function c98920086.costfilter(c,tp)
if c:IsLocation(LOCATION_HAND) then return c:IsType(TYPE_SPELL) and c:IsDiscardable() end
return c:IsFaceup() and c:IsAbleToGraveAsCost() and c:IsHasEffect(83289866,tp)
end
function c98920086.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c98920086.costfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil,tp) end
local g=Duel.GetMatchingGroup(c98920086.costfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=g:Select(tp,1,1,nil):GetFirst()
local te=tc:IsHasEffect(83289866,tp)
if te then
te:UseCountLimit(tp)
Duel.SendtoGrave(tc,REASON_COST)
else
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end
end
function c98920086.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
if c:IsFaceup() and c:IsRelateToBattle() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(c:GetAttack()*2)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
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