Commit 6e69ecf7 authored by Tachibana's avatar Tachibana

tnndx

parent 9478999b
...@@ -29,21 +29,23 @@ function c9910501.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,21 +29,23 @@ function c9910501.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetAttack()>e:GetHandler():GetBaseAttack() return e:GetHandler():GetAttack()>e:GetHandler():GetBaseAttack()
end end
function c9910501.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9910501.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
e:SetLabel(c:GetAttack()-c:GetBaseAttack())
end end
function c9910501.desop(e,tp,eg,ep,ev,re,r,rp) function c9910501.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local label=e:GetLabel()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and label>0 then
local diff=math.abs(c:GetBaseAttack()-c:GetAttack())
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-diff) e1:SetValue(-label)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -58,25 +58,29 @@ function c9910507.spfilter(c,e,tp) ...@@ -58,25 +58,29 @@ function c9910507.spfilter(c,e,tp)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false)
end end
function c9910507.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c9910507.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
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(c9910507.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c9910507.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
e:SetLabel(c:GetAttack()-c:GetBaseAttack())
end end
function c9910507.spop(e,tp,eg,ep,ev,re,r,rp) function c9910507.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local label=e:GetLabel()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c9910507.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c9910507.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if g:GetCount()>0 and Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)~=0 then if g:GetCount()>0 and Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)~=0 then
tc:CompleteProcedure() tc:CompleteProcedure()
local diff=math.abs(c:GetBaseAttack()-c:GetAttack()) if label>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-diff) e1:SetValue(-label)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end
end end
end end
function c9910507.atkfilter(c) function c9910507.atkfilter(c)
......
...@@ -79,7 +79,7 @@ function c9910510.costfilter(c) ...@@ -79,7 +79,7 @@ function c9910510.costfilter(c)
end end
function c9910510.discost(e,tp,eg,ep,ev,re,r,rp,chk) function c9910510.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c9910510.costfilter,1,nil) end if chk==0 then return Duel.CheckReleaseGroupEx(tp,c9910510.costfilter,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,c9910510.costfilter,1,1,nil) local g=Duel.SelectReleaseGroupEx(tp,c9910510.costfilter,1,1,nil)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
......
...@@ -32,6 +32,7 @@ function c9910515.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,6 +32,7 @@ function c9910515.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if c:IsFaceup() then g:AddCard(c) end if c:IsFaceup() then g:AddCard(c) end
if chk==0 then return g:GetCount()>0 end if chk==0 then return g:GetCount()>0 end
e:SetLabel(c:GetAttack()-c:GetBaseAttack())
end end
function c9910515.spfilter(c,e,tp,sum) function c9910515.spfilter(c,e,tp,sum)
return c:GetType()&0x81==0x81 and c:IsSetCard(0xa950) and c:IsAttackBelow(sum) return c:GetType()&0x81==0x81 and c:IsSetCard(0xa950) and c:IsAttackBelow(sum)
...@@ -39,8 +40,8 @@ function c9910515.spfilter(c,e,tp,sum) ...@@ -39,8 +40,8 @@ function c9910515.spfilter(c,e,tp,sum)
end end
function c9910515.spop(e,tp,eg,ep,ev,re,r,rp) function c9910515.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local diff=math.abs(c:GetBaseAttack()-c:GetAttack()) local label=e:GetLabel()
if diff==0 then return end if label<=0 then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if c:IsFaceup() and c:IsRelateToEffect(e) then g:AddCard(c) end if c:IsFaceup() and c:IsRelateToEffect(e) then g:AddCard(c) end
local sum=0 local sum=0
...@@ -52,7 +53,7 @@ function c9910515.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +53,7 @@ function c9910515.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-diff) e1:SetValue(-label)
sc:RegisterEffect(e1) sc:RegisterEffect(e1)
if sc:GetAttack()<preatk then sum=sum+preatk-sc:GetAttack() end if sc:GetAttack()<preatk then sum=sum+preatk-sc:GetAttack() end
sc=g:GetNext() sc=g:GetNext()
......
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