Commit 7e1272dd authored by TanakaKotoha's avatar TanakaKotoha

Suit

parent 4abf63a0
...@@ -19,7 +19,6 @@ function cm.initial_effect(c) ...@@ -19,7 +19,6 @@ function cm.initial_effect(c)
e2:SetDescription(aux.Stringid(17060834,1)) e2:SetDescription(aux.Stringid(17060834,1))
e2:SetCategory(CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,17060834) e2:SetCountLimit(1,17060834)
e2:SetTarget(cm.tgtg) e2:SetTarget(cm.tgtg)
...@@ -60,7 +59,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -60,7 +59,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(g,nil,2,REASON_COST) Duel.SendtoDeck(g,nil,2,REASON_COST)
end end
function cm.tgfilter(c) function cm.tgfilter(c)
return c:IsSetCard(0x7f0) and not c:IsCode(m) and c:IsAbleToGrave() return c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and c:IsSetCard(0x7f0) and not c:IsCode(17060834)
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -32,23 +32,22 @@ function c60152017.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,23 +32,22 @@ function c60152017.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60152017.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c60152017.filter,tp,LOCATION_MZONE,0,1,nil) end
local sg=Duel.GetMatchingGroup(c60152017.filter,tp,LOCATION_MZONE,0,nil) local sg=Duel.GetMatchingGroup(c60152017.filter,tp,LOCATION_MZONE,0,nil)
if sg:GetCount()>0 then if sg:GetCount()>0 then
local atk=0 local atk=sg:GetSum(Card.GetAttack)
local tc=sg:GetFirst()
while tc do
local tatk=tc:GetAttack()
if tatk<0 then tatk=0 end
atk=atk+tatk
tc=sg:GetNext()
end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,atk) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,atk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_RELEASE,sg,sg:GetCount(),0,0)
end end
function c60152017.filter2(c)
if c:IsPreviousPosition(POS_FACEUP) then
return c:GetPreviousAttackOnField()
else return 0 end
end
function c60152017.activate(e,tp,eg,ep,ev,re,r,rp) function c60152017.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c60152017.filter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c60152017.filter,tp,LOCATION_MZONE,0,nil)
if Duel.Release(g,REASON_EFFECT)>0 then if g:GetCount()>0 and Duel.Release(g,REASON_EFFECT)~=0 then
local atk=g:GetSum(Card.GetAttack) local og=Duel.GetOperatedGroup()
local atk=og:GetSum(c60152017.filter2)
Duel.Damage(tp,atk,REASON_EFFECT,true) Duel.Damage(tp,atk,REASON_EFFECT,true)
Duel.Damage(1-tp,atk,REASON_EFFECT,true) Duel.Damage(1-tp,atk,REASON_EFFECT,true)
Duel.RDComplete() Duel.RDComplete()
......
...@@ -50,10 +50,12 @@ function c75646537.initial_effect(c) ...@@ -50,10 +50,12 @@ function c75646537.initial_effect(c)
--cannot be target --cannot be target
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD) e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e7:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e7:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e7:SetRange(LOCATION_MZONE) e7:SetRange(LOCATION_MZONE)
e7:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e7:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e7:SetValue(c75646537.etarget) e7:SetTarget(c75646537.etarget)
e7:SetValue(1)
local e8=e7:Clone() local e8=e7:Clone()
e8:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e8:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
local e9=Effect.CreateEffect(c) local e9=Effect.CreateEffect(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