Commit 0ed33303 authored by songtongtong's avatar songtongtong

Merge branch 'master' of git.mycard.moe:alstroemeria-silentlove/ygopro-222DIY-cards

parents ff39b403 93d7a338
Pipeline #22670 passed with stages
in 27 minutes and 36 seconds
--审判之剑
local m=33330177
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -19,9 +18,14 @@ end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.cfilter2(c)
return c:IsAbleToRemove()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,0,LOCATION_MZONE,1,nil) or Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.cfilter,tp,0,LOCATION_MZONE,nil)
local g2=Duel.GetMatchingGroup(cm.cfilter2,tp,LOCATION_HAND,0,nil)
Group.Merge(g,g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function cm.damfilter(c)
......@@ -47,7 +51,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.damfilter,tp,0,LOCATION_MZONE,1,nil) then
Duel.BreakEffect()
local tg=Duel.GetMatchingGroup(cm.damfilter,tp,0,LOCATION_MZONE,nil)
local dam=tg:GetSum(Card.GetAttack)
local dam=tg:GetSum(Card.GetAttack)+tg:GetSum(Card.GetDefense)
Duel.Damage(1-tp,dam*2,REASON_EFFECT)
end
end
......
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