Commit 444f015b authored by wind2009's avatar wind2009

Fix DDカウント・サーベイヤー

parent a617e5f1
Pipeline #31266 passed with stages
in 1 minute and 43 seconds
...@@ -49,28 +49,28 @@ function s.rlcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,28 +49,28 @@ function s.rlcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.rlcfilter,1,nil,tp) return eg:IsExists(s.rlcfilter,1,nil,tp)
end end
function s.rlfilter(c,e) function s.rlfilter(c,e)
return c:IsFaceup() and c:IsCanBeEffectTarget(e) and not c:IsImmuneToEffect(e) return c:IsFaceup() and c:IsCanBeEffectTarget(e)
end end
function s.gcheck(g,tp) function s.gcheck(g)
return (g:GetClassCount(Card.GetRace)==1 or g:GetClassCount(Card.GetAttribute)==1) return (g:GetClassCount(Card.GetRace)==1 or g:GetClassCount(Card.GetAttribute)==1)
and g:IsExists(s.atkfilter,1,nil,g) and g:IsExists(s.atkfilter,1,nil,g)
end end
function s.rltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.rltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(s.rlfilter,tp,0,LOCATION_MZONE,nil,e) local g=Duel.GetMatchingGroup(s.rlfilter,tp,0,LOCATION_MZONE,nil,e)
if chkc then return false end if chkc then return false end
if chk==0 then return g:CheckSubGroup(s.gcheck,3,3,tp) end if chk==0 then return g:CheckSubGroup(s.gcheck,3,3) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local sg=g:SelectSubGroup(tp,s.gcheck,false,3,3,tp) local sg=g:SelectSubGroup(tp,s.gcheck,false,3,3)
Duel.SetTargetCard(sg) Duel.SetTargetCard(sg)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,sg,2,0,0) Duel.SetOperationInfo(0,CATEGORY_RELEASE,sg,2,0,0)
end end
function s.atkfilter(c,g) function s.atkfilter(c,g)
local sg=g:Clone() local sg=g:Clone()
sg:Sub(Group.FromCards(c)) sg:Sub(Group.FromCards(c))
return sg:FilterCount(Card.IsReleasable,nil)==2 return sg:FilterCount(Card.IsReleasableByEffect,nil)==2
end end
function s.crlfilteer(c,e) function s.crlfilteer(c,e)
return c:IsRelateToEffect(e) and c:IsFaceup() and not c:IsImmuneToEffect(e) and c:IsType(TYPE_MONSTER) return c:IsRelateToEffect(e) and c:IsFaceup() and c:IsType(TYPE_MONSTER)
end end
function s.rlop(e,tp,eg,ep,ev,re,r,rp) function s.rlop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
...@@ -82,20 +82,22 @@ function s.rlop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,20 +82,22 @@ function s.rlop(e,tp,eg,ep,ev,re,r,rp)
tg:Sub(sg) tg:Sub(sg)
local atk=tg:GetSum(Card.GetAttack) local atk=tg:GetSum(Card.GetAttack)
local def=tg:GetSum(Card.GetDefense) local def=tg:GetSum(Card.GetDefense)
Duel.Release(tg,REASON_EFFECT) local rc=Duel.Release(tg,REASON_EFFECT)
local tc=sg:GetFirst() if rc==2 then
local e1=Effect.CreateEffect(e:GetHandler()) local tc=sg:GetFirst()
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetValue(atk) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(atk)
tc:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
local e2=Effect.CreateEffect(e:GetHandler()) tc:RegisterEffect(e1)
e2:SetType(EFFECT_TYPE_SINGLE) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetValue(def) e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetValue(def)
tc:RegisterEffect(e2) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end end
end end
function s.cfilter(c) function s.cfilter(c)
......
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