Commit 8a020f13 authored by fallenstardust's avatar fallenstardust

fix

添加提示文字
parent c3ec18cc
...@@ -26,15 +26,15 @@ function cm.initial_effect(c) ...@@ -26,15 +26,15 @@ function cm.initial_effect(c)
e2:SetTarget(cm.pentg) e2:SetTarget(cm.pentg)
e2:SetOperation(cm.penop) e2:SetOperation(cm.penop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to EX --to EX
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOEXTRA) e3:SetCategory(CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_PZONE) e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,m+o) e3:SetCountLimit(1,m+o)
e3:SetCondition(cm.tecon) e3:SetCondition(cm.tecon)
e3:SetTarget(cm.tetg) e3:SetTarget(cm.tetg)
e3:SetOperation(cm.teop) e3:SetOperation(cm.teop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -83,39 +83,39 @@ function cm.penop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,39 +83,39 @@ function cm.penop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and c:IsType(TYPE_XYZ+TYPE_SYNCHRO+TYPE_FUSION) and c:IsReason(REASON_DESTROY) and c:IsType(TYPE_XYZ+TYPE_SYNCHRO+TYPE_FUSION) and c:IsReason(REASON_DESTROY)
and (c:IsReason(REASON_BATTLE) or c:GetReasonPlayer()==1-tp) and (c:IsReason(REASON_BATTLE) or c:GetReasonPlayer()==1-tp)
end end
function cm.tefilter(c,race) function cm.tefilter(c,race)
return c:IsType(TYPE_PENDULUM) and c:GetOriginalRace()&race~=0 return c:IsType(TYPE_PENDULUM) and c:GetOriginalRace()&race~=0
end end
function cm.tecon(e,tp,eg,ep,ev,re,r,rp) function cm.tecon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp) return eg:IsExists(cm.cfilter,1,nil,tp)
end end
function cm.tetg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(cm.cfilter,nil,tp) local g=eg:Filter(cm.cfilter,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
while tc do while tc do
local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_DECK,0,nil,tc:GetOriginalRace()) local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_DECK,0,nil,tc:GetOriginalRace())
sg:Merge(rg) sg:Merge(rg)
tc=g:GetNext() tc=g:GetNext()
end end
if chk==0 then return sg:GetCount()>0 end if chk==0 then return sg:GetCount()>0 end
end end
function cm.teop(e,tp,eg,ep,ev,re,r,rp) function cm.teop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.cfilter,nil,tp) local g=eg:Filter(cm.cfilter,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
local sg=Group.CreateGroup() local sg=Group.CreateGroup()
while tc do while tc do
local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_DECK,0,nil,tc:GetOriginalRace()) local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_DECK,0,nil,tc:GetOriginalRace())
sg:Merge(rg) sg:Merge(rg)
tc=g:GetNext() tc=g:GetNext()
end end
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(84521924,2)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,0))
local exg=sg:Select(tp,1,1,nil) local exg=sg:Select(tp,1,1,nil)
Duel.SendtoExtraP(exg,nil,REASON_EFFECT) Duel.SendtoExtraP(exg,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -38,6 +38,13 @@ function s.initial_effect(c) ...@@ -38,6 +38,13 @@ function s.initial_effect(c)
e3:SetTarget(s.sptg) e3:SetTarget(s.sptg)
e3:SetOperation(s.spop) e3:SetOperation(s.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetLabelObject(e3)
e4:SetOperation(s.chk)
c:RegisterEffect(e4)
end end
function s.tgfilter(c) function s.tgfilter(c)
return c:IsFacedown() and c:IsAbleToGrave() return c:IsFacedown() and c:IsAbleToGrave()
...@@ -73,8 +80,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,8 +80,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ct=c:GetOverlayCount() return c:GetReasonPlayer()==1-tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and e:GetLabel()>0
return c:GetReasonPlayer()==1-tp and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and ct>0
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsSetCard(0x1a4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x1a4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -89,4 +95,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,4 +95,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end
function s.chk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(e:GetHandler():GetOverlayCount())
end end
\ No newline at end of file
No preview for this file type
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