Commit 784071bc authored by POLYMER's avatar POLYMER

fix

parent 14888612
No preview for this file type
......@@ -78,10 +78,13 @@ function c11513082.thop(e,tp,eg,ep,ev,re,r,rp)
local pc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c11513082.thfil,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc and pc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
Duel.SendtoDeck(pc,nil,2,REASON_EFFECT)
if tc then
if Duel.SendtoHand(tc,tp,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tc)
if pc:IsRelateToEffect(e) then
Duel.SendtoDeck(pc,nil,2,REASON_EFFECT)
end
end
end
end
function c11513082.damcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -62,11 +62,11 @@ end
function c11513090.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c11513090.sprfilter,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_REMOVED,0,nil)
local g=Duel.GetMatchingGroup(c11513090.sprfilter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED,0,nil)
return g:CheckSubGroup(c11513090.fselect,2,2,tp,c)
end
function c11513090.sprtg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c11513090.sprfilter,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_REMOVED,0,nil)
local g=Duel.GetMatchingGroup(c11513090.sprfilter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_REMOVED,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,c11513090.fselect,true,2,2,tp,c)
if sg then
......
......@@ -14,7 +14,6 @@ function c11771560.initial_effect(c)
e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,11771560)
e2:SetCondition(c11771560.con1)
e2:SetTarget(c11771560.tg1)
e2:SetOperation(c11771560.op1)
c:RegisterEffect(e2)
......@@ -64,10 +63,6 @@ function c11771560.initial_effect(c)
c:RegisterEffect(e6)
end
-- 1
function c11771560.con1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c11771560.filter1(c,tp,mg)
return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsSynchroSummonable(nil,mg)
end
......
--湖畔魔女 泰妮布里雅
function c11771595.initial_effect(c)
c:EnableReviveLimit()
-- 特殊召唤
-- 特殊召唤条件
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c11771595.con1)
e1:SetTarget(c11771595.tg1)
e1:SetOperation(c11771595.op1)
e1:SetCondition(c11771595.spcon)
e1:SetTarget(c11771595.sptg)
e1:SetOperation(c11771595.spop)
c:RegisterEffect(e1)
-- 1
-- 除外特招
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11771595,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,11771595)
e2:SetCondition(c11771595.con2)
e2:SetTarget(c11771595.tg2)
e2:SetOperation(c11771595.op2)
e2:SetTarget(c11771595.sptg2)
e2:SetOperation(c11771595.spop2)
c:RegisterEffect(e2)
-- 2
local e2a=e2:Clone()
e2a:SetType(EFFECT_TYPE_QUICK_O)
e2a:SetCode(EVENT_FREE_CHAIN)
e2a:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2a:SetCondition(c11771595.spcon2)
c:RegisterEffect(e2a)
-- 战吼三选一
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(11771595,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_DRAW+CATEGORY_HANDES+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(c11771595.tg3)
e3:SetOperation(c11771595.op3)
e3:SetTarget(c11771595.efftg)
e3:SetOperation(c11771595.effop)
c:RegisterEffect(e3)
-- 3
-- 除外回收
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(11771595,2))
e4:SetCategory(CATEGORY_TOHAND)
......@@ -42,31 +46,31 @@ function c11771595.initial_effect(c)
e4:SetCode(EVENT_REMOVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,11771596)
e4:SetTarget(c11771595.tg4)
e4:SetOperation(c11771595.op4)
e4:SetTarget(c11771595.thtg)
e4:SetOperation(c11771595.thop)
c:RegisterEffect(e4)
end
-- 1
function c11771595.spfilter1(c,att)
-- 召唤条件相关函数
function c11771595.spfilter(c,att)
return c:IsAttribute(att) and c:IsAbleToRemoveAsCost()
end
function c11771595.con1(e,c)
function c11771595.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_GRAVE,0,nil)
local lg=g:Filter(c11771595.spfilter1,nil,ATTRIBUTE_LIGHT)
local dg=g:Filter(c11771595.spfilter1,nil,ATTRIBUTE_DARK)
local lg=g:Filter(c11771595.spfilter,nil,ATTRIBUTE_LIGHT)
local dg=g:Filter(c11771595.spfilter,nil,ATTRIBUTE_DARK)
if #lg==0 or #dg==0 then return false end
if #lg==1 and #dg==1 and lg:GetFirst()==dg:GetFirst() then return false end
return true
end
function c11771595.tg1(e,tp,eg,ep,ev,re,r,rp,c)
function c11771595.sptg(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemoveAsCost,tp,LOCATION_GRAVE,0,nil)
local lg=g:Filter(c11771595.spfilter1,nil,ATTRIBUTE_LIGHT)
local lg=g:Filter(c11771595.spfilter,nil,ATTRIBUTE_LIGHT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=lg:Select(tp,1,1,nil)
local tc1=g1:GetFirst()
local dg=g:Filter(c11771595.spfilter1,tc1,ATTRIBUTE_DARK)
local dg=g:Filter(c11771595.spfilter,tc1,ATTRIBUTE_DARK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=dg:Select(tp,1,1,nil)
g1:Merge(g2)
......@@ -75,65 +79,67 @@ function c11771595.tg1(e,tp,eg,ep,ev,re,r,rp,c)
e:SetLabelObject(g1)
return true
end
function c11771595.op1(e,tp,eg,ep,ev,re,r,rp,c)
function c11771595.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
if g then
Duel.Remove(g,POS_FACEUP,REASON_COST)
g:DeleteGroup()
end
end
-- 2
function c11771595.rmfilter2(c)
-- 1
function c11771595.rmfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsAbleToRemove()
end
function c11771595.cfilter2(c)
return c:IsFaceup() and not c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
function c11771595.filter2(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function c11771595.con2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return true end
return not Duel.IsExistingMatchingCard(c11771595.cfilter2,tp,LOCATION_MZONE,0,1,nil)
function c11771595.spcon2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return #g>0 and #g==Duel.GetMatchingGroupCount(c11771595.filter2,tp,LOCATION_MZONE,0,nil)
end
function c11771595.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c11771595.rmfilter2(chkc) end
function c11771595.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c11771595.rmfilter(chkc) end
if chk==0 then
return Duel.IsExistingTarget(c11771595.rmfilter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
return Duel.IsExistingTarget(c11771595.rmfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c11771595.rmfilter2,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,2,nil)
local g=Duel.SelectTarget(tp,c11771595.rmfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11771595.op2(e,tp,eg,ep,ev,re,r,rp)
function c11771595.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetTargetCards(e)
if #tg<2 then return end
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or #tg<2 then return end
local rtg=tg:Filter(Card.IsRelateToEffect,nil,e)
if #rtg<2 then return end
if Duel.Remove(rtg,POS_FACEUP,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end
end
-- 3
function c11771595.thfilter3(c)
-- 2
function c11771595.thfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsAbleToHand()
end
function c11771595.disfilter3(c)
function c11771595.disfilter(c)
return c:IsFaceup()
end
function c11771595.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c11771595.thfilter3,tp,LOCATION_REMOVED,0,1,nil)
function c11771595.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c11771595.thfilter,tp,LOCATION_REMOVED,0,1,nil)
and Duel.GetFlagEffect(tp,11771595+200)==0
local b2=Duel.IsPlayerCanDraw(tp,2)
and Duel.GetFlagEffect(tp,11771595+300)==0
local b3=Duel.IsExistingMatchingCard(c11771595.disfilter3,tp,0,LOCATION_MZONE,1,nil)
local b3=Duel.IsExistingMatchingCard(c11771595.disfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.GetFlagEffect(tp,11771595+400)==0
if chk==0 then return b1 or b2 or b3 end
end
function c11771595.op3(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(c11771595.thfilter3,tp,LOCATION_REMOVED,0,1,nil)
function c11771595.effop(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(c11771595.thfilter,tp,LOCATION_REMOVED,0,1,nil)
and Duel.GetFlagEffect(tp,11771595+200)==0
local b2=Duel.IsPlayerCanDraw(tp,2)
and Duel.GetFlagEffect(tp,11771595+300)==0
local b3=Duel.IsExistingMatchingCard(c11771595.disfilter3,tp,0,LOCATION_MZONE,1,nil)
local b3=Duel.IsExistingMatchingCard(c11771595.disfilter,tp,0,LOCATION_MZONE,1,nil)
and Duel.GetFlagEffect(tp,11771595+400)==0
local ops,opval={},{}
if b1 then
......@@ -154,7 +160,7 @@ function c11771595.op3(e,tp,eg,ep,ev,re,r,rp)
if sel==1 then
Duel.RegisterFlagEffect(tp,11771595+200,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11771595.thfilter3,tp,LOCATION_REMOVED,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c11771595.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......@@ -167,7 +173,7 @@ function c11771595.op3(e,tp,eg,ep,ev,re,r,rp)
else
Duel.RegisterFlagEffect(tp,11771595+400,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE)
local g=Duel.SelectMatchingCard(tp,c11771595.disfilter3,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c11771595.disfilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -181,12 +187,12 @@ function c11771595.op3(e,tp,eg,ep,ev,re,r,rp)
end
end
end
-- 4
function c11771595.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
-- 3
function c11771595.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c11771595.op4(e,tp,eg,ep,ev,re,r,rp)
function c11771595.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_REMOVED) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
......
......@@ -59,6 +59,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if cl==3 and tg:GetClassCount(Card.GetCode)>=2 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=tg:SelectSubGroup(tp,aux.dncheck,false,2,2)
if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
......@@ -32,7 +32,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if cl==2 and #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=tg:Select(tp,1,1,nil)
if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
......@@ -40,7 +40,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if cl==5 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g:SelectSubGroup(tp,aux.dncheck,false,1,3)
if sg1 then
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
......
......@@ -41,7 +41,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
if cl==6 and #g>0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg1=g:SelectSubGroup(tp,aux.dncheck,false,1,3)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg2=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
......
......@@ -28,7 +28,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,nil)
if cl==3 and #tg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=tg:Select(tp,1,1,nil)
if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
......
......@@ -65,7 +65,7 @@ function s.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.ovfilter2,tp,LOCATION_DECK,0,nil)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:Select(tp,1,1,nil)
Duel.Overlay(c,sg)
end
......
......@@ -129,17 +129,17 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g3=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_REMOVED,0,nil)
local sg=Group.CreateGroup()
if g1:GetCount()>0 and ((g2:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(id,3))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g1:Select(tp,1,1,nil)
sg:Merge(sg1)
end
if g2:GetCount()>0 and ((sg:GetCount()==0 and g3:GetCount()==0) or Duel.SelectYesNo(tp,aux.Stringid(id,4))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g2:Select(tp,1,1,nil)
sg:Merge(sg2)
end
if g3:GetCount()>0 and (sg:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(id,5))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg3=g3:Select(tp,1,1,nil)
sg:Merge(sg3)
end
......
--人理之诗 日轮啊,顺从死亡
function c22025170.initial_effect(c)
aux.AddCodeList(c,22022780)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c22025170.cost)
e1:SetTarget(c22025170.target)
e1:SetOperation(c22025170.activate)
c:RegisterEffect(e1)
end
function c22025170.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lp=Duel.GetLP(tp)
if chk==0 then return Duel.CheckLPCost(tp,lp-2500,true) end
e:SetLabel(lp-2500)
Duel.PayLPCost(tp,lp-2500,true)
end
function c22025170.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,sg,sg:GetCount(),0,0)
Duel.SelectOption(tp,aux.Stringid(22025170,1))
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
Duel.SelectOption(tp,aux.Stringid(22025170,2))
end
end
function c22025170.cfilter(c)
return c:IsFaceup() and c:IsCode(22022780)
end
function c22025170.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
if sg:GetCount()>0 and Duel.SelectOption(tp,aux.Stringid(22025170,3)) and Duel.Release(sg,REASON_EFFECT)~=0 then
if not Duel.IsExistingMatchingCard(c22025170.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.BreakEffect()
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_CARD,0,22022780)
Duel.SelectOption(tp,aux.Stringid(22025170,4))
end
end
end
......@@ -110,6 +110,7 @@ function cm.target(e, tp, eg, ep, ev, re, r, rp, chk)
Duel.SetOperationInfo(0, CATEGORY_EQUIP, g, 1, 0, 0)
else
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, c, 1, 0, 0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
......
......@@ -36,7 +36,6 @@ function cm.initial_effect(c)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e5:SetCondition(cm.descon)
e5:SetTarget(cm.target)
e5:SetOperation(cm.operation)
c:RegisterEffect(e5)
......@@ -68,36 +67,32 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
c:RegisterFlagEffect(0,RESET_EVENT+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,0))
end
end
function cm.dfilter(c)
return c:IsFaceup() and c:IsCode(40010230)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
--if Duel.GetFlagEffect(tp,m)>0 then return e:GetHandler():GetFlagEffect(m+1)<2
--else return e:GetHandler():GetFlagEffect(m+1)<1 end
return Duel.GetFlagEffect(tp,40009560)>0 or Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
if chk==0 then
local b
if Duel.GetFlagEffect(tp,m)>0 then
b=c:GetFlagEffect(m+1)<2
else
b=c:GetFlagEffect(m+1)<1
end
return b and Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil)
end
c:RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local count = Duel.GetFlagEffect(tp, m+1)
if count >= 2 then return false end
if Duel.GetFlagEffect(tp, 40009560) <= 0 or Duel.IsExistingMatchingCard(cm.dfilter, tp, LOCATION_MZONE, 0, 1, nil) then return false end
if count == 1 and Duel.GetFlagEffect(tp, m) <= 0 then return false end
--if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp, m+1, RESET_PHASE+PHASE_END, 0, 1)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if ((tc:IsFaceup() and not tc:IsDisabled()) or tc:IsType(TYPE_TRAPMONSTER)) and tc:IsRelateToEffect(e) then
......@@ -124,8 +119,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e3)
end
end
e:GetHandler():RegisterFlagEffect(m+1,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
......@@ -41,6 +41,7 @@ end
function cm.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and aux.IsCodeListed(c,40020225)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
......@@ -48,23 +49,31 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(g:GetFirst():GetType())
Duel.Release(g,REASON_COST)
end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.spfilter1(c,e,tp)
return aux.IsCodeListed(c,40020225) and not c:IsCode(m) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(cm.spfilter1,tp,LOCATION_DECK,0,nil,e,tp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
if bit.band(e:GetLabel(),TYPE_SYNCHRO)~=0 and g2:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) > 0 then
if bit.band(e:GetLabel(),TYPE_SYNCHRO)~=0 then
local g=Duel.GetMatchingGroup(cm.spfilter1,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
end
......
......@@ -90,7 +90,7 @@ function s.sprcon(e,c)
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE,0,nil)
local tg=g:Filter(Card.IsAbleToGraveAsCost,nil)
return #tg>0 and #tg==#g
return Duel.GetTurnCount()>=20 and #tg>0 and #tg==#g
end
function s.sprtg(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(s.sprfilter,tp,LOCATION_MZONE,0,nil)
......
......@@ -32,6 +32,11 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
--by bibeak_will↓
Duel.SetChainLimit(c72100514.chlimit)
end
function c72100514.chlimit(e,ep,tp)
return tp==ep
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
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