You need to sign in or sign up before continuing.
Commit 644f3059 authored by DailyShana's avatar DailyShana

fix

『「XXX」1体』 means 「XXX」 must be monster, which is different to 『「XXX」1枚』
parent ade5220d
......@@ -20,7 +20,6 @@ function c29843091.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<3 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,29843092,0xf,0x4011,0,1000,2,RACE_BEAST,ATTRIBUTE_LIGHT,POS_FACEUP_DEFENCE,1-tp) then return end
local g=Group.CreateGroup()
for i=1,3 do
local token=Duel.CreateToken(tp,29843091+i)
if Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_DEFENCE) then
......@@ -36,7 +35,6 @@ function c29843091.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EVENT_DESTROYED)
e2:SetOperation(c29843091.damop)
token:RegisterEffect(e2,true)
g:AddCard(token)
end
end
Duel.SpecialSummonComplete()
......
......@@ -34,42 +34,26 @@ function c5126490.initial_effect(c)
e4:SetValue(1)
c:RegisterEffect(e4)
end
function c5126490.spfilter(c,code)
return c:IsFaceup() and c:IsCode(code) and c:IsAbleToGraveAsCost()
function c5126490.spfilter1(c,tp)
return c:IsFaceup() and c:IsCode(89943723) and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c5126490.spfilter2,tp,LOCATION_MZONE,0,1,c)
end
function c5126490.spfilter2(c)
return c:IsFaceup() and c:IsCode(78371393) and c:IsAbleToGraveAsCost()
end
function c5126490.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
local g1=Duel.GetMatchingGroup(c5126490.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c5126490.spfilter,tp,LOCATION_ONFIELD,0,nil,78371393)
if g1:GetCount()==0 or g2:GetCount()==0 then return false end
if ft>0 then return true end
local f1=g1:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
local f2=g2:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)
if ft==-1 then return f1>0 and f2>0
else return f1>0 or f2>0 end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c5126490.spfilter1,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c5126490.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g1=Duel.GetMatchingGroup(c5126490.spfilter,tp,LOCATION_ONFIELD,0,nil,89943723)
local g2=Duel.GetMatchingGroup(c5126490.spfilter,tp,LOCATION_ONFIELD,0,nil,78371393)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,c5126490.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c5126490.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst())
g1:Merge(g2)
local g=Group.CreateGroup()
local tc=nil
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
tc=g1:Select(tp,1,1,nil):GetFirst()
end
g:AddCard(tc)
g1:Remove(Card.IsCode,nil,tc:GetCode())
ft=ft+1
end
Duel.SendtoGrave(g,REASON_COST)
Duel.SendtoGrave(g1,REASON_COST)
end
function c5126490.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetAttackTarget()~=nil end
......
......@@ -16,9 +16,9 @@ function c65496056.cfilter(c)
return c:IsFaceup() and c:IsCode(22702055) and c:IsAbleToGraveAsCost()
end
function c65496056.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c65496056.cfilter,tp,LOCATION_SZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c65496056.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c65496056.cfilter,tp,LOCATION_SZONE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c65496056.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c65496056.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -31,7 +31,7 @@ function c71525232.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
local atk=g:GetMaxGroup(Card.GetAttack)
local mg,atk=g:GetMaxGroup(Card.GetAttack)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,atk)
end
function c71525232.operation(e,tp,eg,ep,ev,re,r,rp)
......@@ -40,12 +40,12 @@ function c71525232.operation(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
local mg,atk=g:GetMaxGroup(Card.GetPreviousAttackOnField)
local ct=Duel.Damage(1-tp,atk,REASON_EFFECT)
if ct>0 then
local dam=Duel.Damage(1-tp,atk,REASON_EFFECT)
if dam>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(ct)
e1:SetValue(dam)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
......
......@@ -14,9 +14,9 @@ function c8251996.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c8251996.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c8251996.cfilter,tp,LOCATION_MZONE,0,1,nil,12482652)
and Duel.IsExistingMatchingCard(c8251996.cfilter,tp,LOCATION_MZONE,0,1,nil,42941100)
and Duel.IsExistingMatchingCard(c8251996.cfilter,tp,LOCATION_MZONE,0,1,nil,79335209)
return Duel.IsExistingMatchingCard(c8251996.cfilter,tp,LOCATION_ONFIELD,0,1,nil,12482652)
and Duel.IsExistingMatchingCard(c8251996.cfilter,tp,LOCATION_ONFIELD,0,1,nil,42941100)
and Duel.IsExistingMatchingCard(c8251996.cfilter,tp,LOCATION_ONFIELD,0,1,nil,79335209)
end
function c8251996.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end
......
......@@ -11,16 +11,15 @@ function c89086566.initial_effect(c)
c:RegisterEffect(e1)
end
function c89086566.cfilter(c)
local code=c:GetCode()
return c:IsFaceup() and (code==40640057 or code==40703223) and c:IsDestructable()
return c:IsFaceup() and c:IsCode(40640057,40703223) and c:IsDestructable()
end
function c89086566.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c89086566.cfilter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(c89086566.cfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c89086566.cfilter,tp,LOCATION_ONFIELD,0,1,nil) end
local g=Duel.GetMatchingGroup(c89086566.cfilter,tp,LOCATION_ONFIELD,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c89086566.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c89086566.cfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(c89086566.cfilter,tp,LOCATION_ONFIELD,0,nil)
local dt=Duel.Destroy(g,REASON_EFFECT)
if dt==0 then return end
local dg=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil)
......
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