Commit 8a020f13 authored by fallenstardust's avatar fallenstardust

fix

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