Commit fbf6376c authored by Huangnan's avatar Huangnan

fix

parent d2db1b8e
Pipeline #33666 passed with stages
in 87 minutes and 32 seconds
No preview for this file type
...@@ -543,7 +543,6 @@ ...@@ -543,7 +543,6 @@
16104212 1 -- 16104212 1 --
16104218 1 -- 16104218 1 --
16104220 1 -- 16104220 1 --
16104222 1 --
16104224 1 -- 16104224 1 --
16104226 1 -- 16104226 1 --
16104228 1 -- 16104228 1 --
......
expansions/pics/12400103.jpg

96.2 KB | W: | H:

expansions/pics/12400103.jpg

89.6 KB | W: | H:

expansions/pics/12400103.jpg
expansions/pics/12400103.jpg
expansions/pics/12400103.jpg
expansions/pics/12400103.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/12400121.jpg

189 KB | W: | H:

expansions/pics/12400121.jpg

89.4 KB | W: | H:

expansions/pics/12400121.jpg
expansions/pics/12400121.jpg
expansions/pics/12400121.jpg
expansions/pics/12400121.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/52700703.jpg

96.1 KB | W: | H:

expansions/pics/52700703.jpg

95.3 KB | W: | H:

expansions/pics/52700703.jpg
expansions/pics/52700703.jpg
expansions/pics/52700703.jpg
expansions/pics/52700703.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81903001.jpg

25.4 KB | W: | H:

expansions/pics/81903001.jpg

83.7 KB | W: | H:

expansions/pics/81903001.jpg
expansions/pics/81903001.jpg
expansions/pics/81903001.jpg
expansions/pics/81903001.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -63,7 +63,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +63,6 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.ConfirmCards(1-tp,g)
end end
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -99,11 +99,15 @@ function s.ovop(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,11 +99,15 @@ function s.ovop(e,tp,eg,ep,ev,re,r,rp)
if #g1>0 and c:IsRelateToEffect(e) then if #g1>0 and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg1=g1:Select(tp,1,1,nil) local sg1=g1:Select(tp,1,1,nil)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.ovfilter3),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) local og=sg1:GetFirst():GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,sg1) Duel.Overlay(c,sg1)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.ovfilter3),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then if #g2>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg2=g2:Select(tp,1,1,nil) local sg2=g2:Select(tp,1,2,nil)
Duel.Overlay(c,sg2) Duel.Overlay(c,sg2)
end end
end end
......
...@@ -13,7 +13,7 @@ function s.initial_effect(c) ...@@ -13,7 +13,7 @@ function s.initial_effect(c)
ge:SetOperation(s.geop) ge:SetOperation(s.geop)
Duel.RegisterEffect(ge,0) Duel.RegisterEffect(ge,0)
end end
--quest --五难题
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
...@@ -21,7 +21,7 @@ function s.initial_effect(c) ...@@ -21,7 +21,7 @@ function s.initial_effect(c)
e1:SetCost(s.quecost) e1:SetCost(s.quecost)
e1:SetOperation(s.queop) e1:SetOperation(s.queop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --梦中的优昙华
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
...@@ -30,7 +30,7 @@ function s.initial_effect(c) ...@@ -30,7 +30,7 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.spcon) e2:SetCondition(s.spcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --辉夜的耍帅
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
...@@ -39,25 +39,71 @@ function s.initial_effect(c) ...@@ -39,25 +39,71 @@ function s.initial_effect(c)
e3:SetTarget(s.sutg) e3:SetTarget(s.sutg)
e3:SetOperation(s.suop) e3:SetOperation(s.suop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--back --辉夜的回笼觉
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e4:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetValue(LOCATION_HAND) e4:SetValue(LOCATION_HAND)
c:RegisterEffect(e4) c:RegisterEffect(e4)
-- local e44=Effect.CreateEffect(c)
e44:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e44:SetCode(EVENT_LEAVE_FIELD)
e44:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e44:SetOperation(s.wordop)
c:RegisterEffect(e44)
--永别
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD) e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_REPLACE_DAMAGE) e5:SetCode(EFFECT_REPLACE_DAMAGE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetRange(LOCATION_HAND) e5:SetRange(LOCATION_HAND)
e5:SetTargetRange(1,0) e5:SetTargetRange(1,0)
e5:SetCondition(s.ancon)
e5:SetValue(s.damval) e5:SetValue(s.damval)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function s.damval(e,re,val,r,rp,rc)
local tp=e:GetHandlerPlayer()
local c=e:GetHandler()
if val>=Duel.GetLP(tp) and Duel.GetFlagEffect(tp,id+1)>0 and c:IsAbleToRemove(tp,POS_FACEDOWN,REASON_EFFECT) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetOperation(s.cleanop)
Duel.RegisterEffect(e1,tp)
return 0
end
return val
end
function s.cleanop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetOwner()
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_CARD,nil,id+2)
Duel.Remove(c,POS_FACEDOWN,REASON_EFFECT)
Duel.Hint(24,0,aux.Stringid(id,5))
Duel.Hint(24,0,aux.Stringid(id,6))
e:Reset()
else
Duel.Hint(HINT_CARD,nil,id+2)
Duel.Remove(c,POS_FACEDOWN,REASON_EFFECT)
Duel.Hint(24,0,aux.Stringid(id,7))
e:Reset()
end
end
function s.wordop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(24,0,aux.Stringid(id,4))
end
function s.wordop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(24,0,aux.Stringid(id,5))
Duel.Hint(24,0,aux.Stringid(id,6))
end
function s.gecon(e,tp,eg,ep,ev,re,r,rp) function s.gecon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsCode,1,nil,id) return eg:IsExists(Card.IsCode,1,nil,id)
end end
...@@ -96,6 +142,8 @@ end ...@@ -96,6 +142,8 @@ end
function s.sutg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sutg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id+1)>0 end if chk==0 then return Duel.GetFlagEffect(tp,id+1)>0 end
local ct=Duel.GetFlagEffect(tp,id+1) local ct=Duel.GetFlagEffect(tp,id+1)
local c=e:GetHandler()
Duel.Hint(24,0,aux.Stringid(c:GetOriginalCodeRule(),3))
for i=1,ct do for i=1,ct do
if i==1 then if i==1 then
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
...@@ -103,8 +151,6 @@ function s.sutg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -103,8 +151,6 @@ function s.sutg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0)
end end
elseif i==2 then elseif i==2 then
--local mg1=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)
--local mg2=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
end end
...@@ -124,70 +170,45 @@ end ...@@ -124,70 +170,45 @@ end
function s.suop(e,tp,eg,ep,ev,re,r,rp) function s.suop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFlagEffect(tp,id+1) local ct=Duel.GetFlagEffect(tp,id+1)
local c=e:GetHandler()
for i=1,ct do for i=1,ct do
if i==1 then if i==1 then
-- 第一个效果:清对方场
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if #g>0 then if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
elseif i==2 then elseif i==2 then
-- 第二个效果:回收魔陷
local mg1=Duel.SelectMatchingCard(tp,s.mfilter,tp,LOCATION_GRAVE,0,1,1,nil) local mg1=Duel.SelectMatchingCard(tp,s.mfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local mg2=Duel.SelectMatchingCard(tp,s.tfilter,tp,LOCATION_GRAVE,0,1,1,nil) local mg2=Duel.SelectMatchingCard(tp,s.tfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SSet(tp,mg1+mg2) Duel.SSet(tp,mg1+mg2)
-- 特殊召唤怪兽
local mg3=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil) local mg3=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #mg3>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #mg3>0 then
Duel.SpecialSummon(mg3,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(mg3,0,tp,tp,false,false,POS_FACEUP)
end end
elseif i==3 then elseif i==3 then
-- 第三个效果:恢复LP
Duel.SetLP(tp,8000) Duel.SetLP(tp,8000)
elseif i==4 then elseif i==4 then
-- 第四个效果:抗破坏 local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetTargetRange(1,0) e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetValue(s.efilter) e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e,tp) Duel.RegisterEffect(e1,tp)
elseif i>=5 then elseif i>=5 then
-- 第五个效果:永续全破坏+烧血 local e2=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_CANNOT_DISEFFECT) e2:SetProperty(EFFECT_CANNOT_DISEFFECT)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetOperation(s.damop) e2:SetOperation(s.forop)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
end end
end end
function s.efilter(e,ct) function s.forop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,nil,id+1)
return true
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,nil,id)
Duel.Destroy(Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD),REASON_EFFECT) Duel.Destroy(Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD),REASON_EFFECT)
Duel.Damage(1-tp,2000,REASON_EFFECT) Duel.Damage(1-tp,2000,REASON_EFFECT)
end end
\ No newline at end of file
function s.ancon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,id+1)>0
end
function s.damval(e,re,val,r,rp,rc)
local tp=e:GetHandlerPlayer()
local c=e:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(id,2)) and c:IsAbleToRemove(tp,POS_FACEDOWN,REASON_EFFECT) then
Duel.Remove(c,POS_FACEDOWN,REASON_EFFECT)
return 0
end
return val
end
\ No newline at end of file
...@@ -55,7 +55,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
if Duel.GetLP(tp)>Duel.GetLP(1-tp) and Duel.GetLP(tp)>1000 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then if Duel.GetLP(tp)>Duel.GetLP(1-tp) and Duel.GetLP(tp)>1000 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.PayLPCost(1-tp,1000) Duel.PayLPCost(tp,1000)
Duel.Draw(tp,1) Duel.Draw(tp,1)
end end
end end
...@@ -71,11 +71,11 @@ end ...@@ -71,11 +71,11 @@ end
function s.tdop(e,tp,eg,ep,ev,re,r,rp) function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
if c:IsAbleToDeck() and (not c:IsSSetable() or Duel.SelectOption(tp,1105,aux.Stringid(id,3))==1) then if c:IsAbleToDeck() and (not c:IsSSetable() or Duel.SelectOption(tp,1105,aux.Stringid(id,3))==0) then
Duel.SSet(tp,c)
else
Duel.SendtoDeck(c,nil,2,REASON_EFFECT) Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
Duel.Recover(tp,2000,REASON_EFFECT) Duel.Recover(tp,2000,REASON_EFFECT)
else
Duel.SSet(tp,c)
end end
end end
end end
\ No newline at end of file
...@@ -67,7 +67,7 @@ function s.pop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +67,7 @@ function s.pop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,6,nil) local g=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,6,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
local dr=math.ceil(og:GetCount()/3) local dr=math.ceil(og:GetCount()/3)
if dr>0 then if dr>0 then
......
...@@ -7,7 +7,7 @@ function s.initial_effect(c) ...@@ -7,7 +7,7 @@ function s.initial_effect(c)
aux.EnableReviveLimitPendulumSummonable(c,LOCATION_HAND+LOCATION_EXTRA) aux.EnableReviveLimitPendulumSummonable(c,LOCATION_HAND+LOCATION_EXTRA)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1)) e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
...@@ -148,7 +148,7 @@ function s.eaop(e,tp,eg,ep,ev,re,r,rp) ...@@ -148,7 +148,7 @@ function s.eaop(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetLP(tp)>Duel.GetLP(1-tp) and Duel.GetLP(tp)>=800 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then and Duel.GetLP(tp)>Duel.GetLP(1-tp) and Duel.GetLP(tp)>=800 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.PayLPCost(tp,800) Duel.PayLPCost(tp,800)
if Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsPreviousControler(1-tp) then if Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)~=0 and re:GetHandler():IsPreviousControler(1-tp) then
local d=eg:GetFirst() local d=eg:GetFirst()
local upatk=d:GetBaseAttack() local upatk=d:GetBaseAttack()
if d:GetBaseAttack()<d:GetBaseDefense() then upatk=d:GetBaseDefense() end if d:GetBaseAttack()<d:GetBaseDefense() then upatk=d:GetBaseDefense() end
......
...@@ -33,7 +33,7 @@ function s.isstad(c,at) ...@@ -33,7 +33,7 @@ function s.isstad(c,at)
return s.stad(c)<=at return s.stad(c)<=at
end end
function s.gcheck(g,tp,lv) function s.gcheck(g,tp,lv)
local lp=lv*5000 local lp=lv*500
local cp=g:GetSum(s.stad) local cp=g:GetSum(s.stad)
local at=cp-lp local at=cp-lp
return Duel.GetMZoneCount(tp,g)>0 return Duel.GetMZoneCount(tp,g)>0
...@@ -47,7 +47,7 @@ function s.rfilter(c,e,tp,mg1,mg2) ...@@ -47,7 +47,7 @@ function s.rfilter(c,e,tp,mg1,mg2)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
end end
function s.mfilter(c) function s.mfilter(c)
return (c:IsAttackAbove(1) or c:IsDefenseAbove(1)) and c:IsAbleToGrave() return c:IsFaceupEx() and (c:IsAttackAbove(1) or c:IsDefenseAbove(1)) and c:IsAbleToGrave()
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -79,7 +79,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
return return
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat=mg:SelectSubGroup(tp,s.gcheck,false,1,99,tp,tc:GetLevel()) local mat=mg:SelectSubGroup(tp,s.gcheck,true,1,99,tp,tc:GetLevel())
if not mat then goto cancel end if not mat then goto cancel end
tc:SetMaterial(mat) tc:SetMaterial(mat)
local mat2=mat:Filter(Card.IsLocation,nil,LOCATION_EXTRA):Filter(s.mfilter,nil) local mat2=mat:Filter(Card.IsLocation,nil,LOCATION_EXTRA):Filter(s.mfilter,nil)
...@@ -105,11 +105,11 @@ end ...@@ -105,11 +105,11 @@ end
function s.tdop(e,tp,eg,ep,ev,re,r,rp) function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
if c:IsAbleToDeck() and (not c:IsSSetable() or Duel.SelectOption(tp,1105,aux.Stringid(id,2))==1) then if c:IsAbleToDeck() and (not c:IsSSetable() or Duel.SelectOption(tp,1105,aux.Stringid(id,2))==0) then
Duel.SSet(tp,c)
else
Duel.SendtoDeck(c,nil,2,REASON_EFFECT) Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
Duel.Recover(tp,2000,REASON_EFFECT) Duel.Recover(tp,2000,REASON_EFFECT)
else
Duel.SSet(tp,c)
end end
end end
end end
\ No newline at end of file
...@@ -56,6 +56,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,6 +56,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
if Duel.GetLP(tp)>Duel.GetLP(1-tp) and Duel.GetLP(tp)>1000 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then if Duel.GetLP(tp)>Duel.GetLP(1-tp) and Duel.GetLP(tp)>1000 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.PayLPCost(tp,1000)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #sg>0 then if #sg>0 then
...@@ -73,11 +74,11 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,11 +74,11 @@ function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToExtraAsCost() end if chk==0 then return c:IsAbleToExtra() end
Duel.SendtoExtraP(c,nil,REASON_COST+REASON_DISCARD) Duel.SendtoExtraP(c,nil,REASON_COST+REASON_DISCARD)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsSetCard(0x96ea) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,false) return c:IsFaceupEx() and c:IsSetCard(0x96ea) and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end end
...@@ -89,14 +90,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,14 +90,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,SUMMON_TYPE_RITUAL,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.PayLPCost(tp,tc:GetAttack()+tc:GetDefense()) Duel.PayLPCost(tp,tc:GetAttack()+tc:GetDefense())
end end
end end
function s.rmfilter(c,tp) function s.rmfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) return c:IsFaceup() and c:IsType(TYPE_RITUAL)
and Duel.IsExistingMatchingCard(s.rrfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c:GetAttack(),c:GetDefense()) and Duel.IsExistingMatchingCard(s.rrfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetAttack(),c:GetDefense())
end end
function s.rrfilter(c,atk,def) function s.rrfilter(c,atk,def)
return c:IsFaceup() and (c:IsAttackBelow(atk) or c:IsDefense(def)) and c:IsReleasable() return c:IsFaceup() and (c:IsAttackBelow(atk) or c:IsDefense(def)) and c:IsReleasable()
...@@ -113,7 +114,9 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -113,7 +114,9 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
local upatk=tc:GetBaseAttack() local upatk=tc:GetBaseAttack()
if tc:GetBaseAttack()<tc:GetBaseDefense() then upatk=tc:GetBaseDefense() end if tc:GetBaseAttack()<tc:GetBaseDefense() then upatk=tc:GetBaseDefense() end
Duel.PayLPCost(tp,upatk) Duel.PayLPCost(tp,upatk)
local g=Duel.GetMatchingGroup(s.rrfilter,tp,0,LOCATION_MZONE,nil,c:GetAttack(),c:GetDefense()) local g=Duel.GetMatchingGroup(s.rrfilter,tp,0,LOCATION_MZONE,tc,c:GetAttack(),c:GetDefense())
Duel.Destroy(g,REASON_EFFECT) if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end end
end end
\ No newline at end of file
...@@ -45,7 +45,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
if Duel.GetLP(tp)>Duel.GetLP(1-tp) and Duel.GetLP(tp)>1000 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if Duel.GetLP(tp)>Duel.GetLP(1-tp) and Duel.GetLP(tp)>1000 and Duel.IsPlayerCanDraw(tp,1) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.PayLPCost(1-tp,1000) Duel.PayLPCost(tp,1000)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
......
--虚拟占卜师 狼-半-仙 --虚拟占卜师 狼-半-仙
local m=33703042 local s,id,o=GetID()
local cm=_G["c"..m] function s.initial_effect(c)
function cm.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,nil,9,3,cm.ovfilter,aux.Stringid(m,0)) aux.AddXyzProcedure(c,nil,9,3,s.ovfilter,aux.Stringid(id,0),3,nil)
c:EnableReviveLimit() c:EnableReviveLimit()
-- 新增效果
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1)) e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.thcost) e1:SetCountLimit(1)
e1:SetTarget(cm.thtg) e1:SetCost(s.rmcost)
e1:SetOperation(cm.thop) e1:SetTarget(s.rmtg)
e1:SetLabel(1) e1:SetOperation(s.rmop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(m,2))
e2:SetLabel(2)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetDescription(aux.Stringid(m,3))
e3:SetLabel(3)
c:RegisterEffect(e3)
end end
function cm.ovfilter(c) function s.ovfilter(c)
return (c:IsType(TYPE_XYZ) and c:IsRankAbove(7)) or (c:IsType(TYPE_SYNCHRO) and c:IsLevelAbove(7)) return c:IsFaceup() and (c:IsRankAbove(7)or c:IsLevelAbove(7))and c:IsType(TYPE_SYNCHRO+TYPE_XYZ)
end end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) -- 新效果相关函数
local ct=e:GetLabel() function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,ct,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) local oc=e:GetHandler():GetOverlayCount()
e:GetHandler():RemoveOverlayCard(tp,ct,ct,REASON_COST) e:SetLabel(oc) -- 记录去除的素材数量
e:GetHandler():RemoveOverlayCard(tp,oc,oc,REASON_COST)
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) end function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED) if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) end
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local temp =e:GetLabel()
if temp == 1 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) then
local g=Duel.GetDecktopGroup(tp,Duel.GetFieldGroupCount(tp,LOCATION_HAND,0))
if g:FilterCount(Card.IsAbleToRemove,nil,POS_FACEDOWN)==Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) then
Duel.DisableShuffleCheck()
Duel.ConfirmDecktop(tp,Duel.GetFieldGroupCount(tp,LOCATION_HAND,0))
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
local sc =Group.Select(g,tp,1,1,nil)
Duel.SendtoHand(sc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sc)
Duel.ShuffleHand(tp)
end
elseif temp ==2 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>5 then
local g=Duel.GetDecktopGroup(tp,5)
if g:FilterCount(Card.IsAbleToRemove,nil,POS_FACEDOWN)==5 then
Duel.DisableShuffleCheck()
Duel.ConfirmDecktop(tp,5)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
local sc =Group.Select(g,tp,1,1,nil)
Duel.SendtoHand(sc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sc)
Duel.ShuffleHand(tp)
end
elseif temp ==3 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 then
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_DECK,0,1,1,nil)
Duel.DisableShuffleCheck()
Duel.ConfirmCards(1-tp,g)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
local sc =Group.Select(g,tp,1,1,nil)
Duel.SendtoHand(sc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sc)
Duel.ShuffleHand(tp)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local oc=e:GetLabel()
if ct>0 then
local res=false
if oc>=3 then
res=Duel.SelectYesNo(tp,aux.Stringid(id,2))
end
if res then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_DECK,0,ct,ct,nil)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
local xc=sg:GetFirst()
while xc do
xc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
xc=sg:GetNext()
end
else
-- 查看并里侧除外
local g=Duel.GetDecktopGroup(tp,ct)
Duel.ConfirmDecktop(tp,ct)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
local xc=g:GetFirst()
while xc do
xc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
xc=g:GetNext()
end
end
-- 追加效果处理
if oc>=2 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
if not res then
local exg=Duel.GetDecktopGroup(tp,5)
Duel.Remove(exg,POS_FACEDOWN,REASON_EFFECT)
local xc=exg:GetFirst()
while xc do
xc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
xc=exg:GetNext()
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_DECK,0,5,5,nil)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
local xc=sg:GetFirst()
while xc do
xc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
xc=sg:GetNext()
end
end
end
-- 修改后的持续效果
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PREDRAW)
e1:SetRange(LOCATION_REMOVED)
e1:SetCountLimit(1)
e1:SetCondition(s.drcon)
e1:SetOperation(s.drop)
Duel.RegisterEffect(e1,tp)
end
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(s.ffilter,tp,LOCATION_REMOVED,0,1,nil) then
e:Reset()
end
return Duel.IsTurnPlayer(tp)
and Duel.IsExistingMatchingCard(s.ffilter,tp,LOCATION_REMOVED,0,1,nil)
end
function s.ffilter(c)
return c:GetFlagEffect(id)>0 -- 新增过滤函数
end end
-- 新增操作处理函数
function s.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ffilter,tp,LOCATION_REMOVED,0,nil)
if #g>0 then
local sg=g:RandomSelect(tp,1)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
-- 持续效果
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_DRAW,1)
Duel.RegisterEffect(e1,tp)
end
end
\ No newline at end of file
...@@ -28,7 +28,7 @@ function c65810120.initial_effect(c) ...@@ -28,7 +28,7 @@ function c65810120.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
-- --
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_REMOVE+CATEGORY_GRAVE_SPSUMMON+CATEGORY_LEAVE_GRAVE+CATEGORY_SPECIAL_SUMMON) e5:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_SPSUMMON+CATEGORY_LEAVE_GRAVE+CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION) e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE) e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,65810120) e5:SetCountLimit(1,65810120)
......
...@@ -60,7 +60,7 @@ function cm.initial_effect(c) ...@@ -60,7 +60,7 @@ function cm.initial_effect(c)
end end
--link materials --link materials
function cm.sucai(c) function cm.sucai(c)
return c:IsType(TYPE_LINK) and c:GetAttack()==0 and c:IsType(TYPE_MONSTER) and c:IsLinkAbove(3) and c:IsType(TYPE_EFFECT) and not c:GetMaterial():IsExists(cm.sucaif,1,nil) return c:IsType(TYPE_LINK) and c:IsType(TYPE_MONSTER) and c:IsLinkAbove(3) and c:IsType(TYPE_EFFECT) and not c:GetMaterial():IsExists(cm.sucaif,1,nil)
end end
function cm.sucaif(c) function cm.sucaif(c)
return c:GetBaseAttack()~=0 return c:GetBaseAttack()~=0
......
...@@ -84,10 +84,10 @@ end ...@@ -84,10 +84,10 @@ end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
local tg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
local tg=Duel.GetMatchingGroup(cm.tgfilter,tp,LOCATION_DECK,0,nil)
if #tg>0 and Duel.IsPlayerCanDraw(1-tp) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then if #tg>0 and Duel.IsPlayerCanDraw(1-tp) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(HINTMSG_SELECT,tp,HINTMSG_TOGRAVE) Duel.Hint(HINTMSG_SELECT,tp,HINTMSG_TOGRAVE)
local sg=tg:Select(tp,1,1,nil) local sg=tg:Select(tp,1,1,nil)
......
...@@ -9,6 +9,7 @@ function cm.initial_effect(c) ...@@ -9,6 +9,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -83,7 +84,7 @@ function cm.xyzfilter(c,e,tp,lv) ...@@ -83,7 +84,7 @@ function cm.xyzfilter(c,e,tp,lv)
end end
function cm.xtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.xtg(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
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.rmfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.rmfilter),tp,LOCATION_GRAVE,0,2,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_GRAVE)
end end
...@@ -97,6 +98,7 @@ function cm.xop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,6 +98,7 @@ function cm.xop(e,tp,eg,ep,ev,re,r,rp)
local sc=Duel.SelectMatchingCard(tp,cm.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv):GetFirst() local sc=Duel.SelectMatchingCard(tp,cm.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lv):GetFirst()
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
Duel.Overlay(sc,g) Duel.Overlay(sc,g)
sc:CompleteProcedure()
end end
end end
......
...@@ -17,10 +17,10 @@ function cm.initial_effect(c) ...@@ -17,10 +17,10 @@ function cm.initial_effect(c)
e1:SetTarget(cm.sptg)--效果判定 e1:SetTarget(cm.sptg)--效果判定
e1:SetOperation(cm.spop)--效果处理 e1:SetOperation(cm.spop)--效果处理
c:RegisterEffect(e1) c:RegisterEffect(e1)
--reverse damage --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1)) e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_RECOVER)--回额外卡组 e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)--场上变化触发+诱发选发效果 e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)--场上变化触发+诱发选发效果
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)--伤害步骤时+场合诱发 e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)--伤害步骤时+场合诱发
e2:SetCode(EVENT_RELEASE)--解放时 e2:SetCode(EVENT_RELEASE)--解放时
......
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