Commit ed5bf810 authored by 未闻皂名's avatar 未闻皂名

2020/7/1 修改一些代码

parent 5cb1dffd
No preview for this file type
...@@ -14,20 +14,17 @@ function cm.initial_effect(c) ...@@ -14,20 +14,17 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Atk Up --Atk Up
function cm.filter(c)
return c:IsFaceup()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local atk=Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_MZONE,nil)*300 local atk=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*300
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -32,19 +32,17 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,19 +32,17 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local attr=cc:GetAttribute() local attr=cc:GetAttribute()
local down=cc:GetLevel()*300 local down=cc:GetLevel()*300
local g=Duel.GetMatchingGroup(cm.adfilter,tp,0,LOCATION_MZONE,nil,attr) local g=Duel.GetMatchingGroup(cm.adfilter,tp,0,LOCATION_MZONE,nil,attr)
if g:GetCount()>0 then local tc=g:GetFirst()
local tc=g:GetFirst() while tc do
while tc do local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(-down)
e1:SetValue(-down) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) tc:RegisterEffect(e1)
tc:RegisterEffect(e1) local e2=e1:Clone()
local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetCode(EFFECT_UPDATE_DEFENSE) tc:RegisterEffect(e2)
tc:RegisterEffect(e2) tc=g:GetNext()
tc=g:GetNext()
end
end end
end end
\ No newline at end of file
local m=120130028 local m=120130028
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="兽机界王 弹射恶魔金刚" cm.name="兽机界王 投石车恶魔金刚"
function cm.initial_effect(c) function cm.initial_effect(c)
--Destroy --Destroy
local e1=Effect.CreateEffect(c) local e1=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