Commit 304373ee authored by 森野さくら's avatar 森野さくら 🐟

Replace c60152905.lua

parent 8b199bf7
......@@ -20,7 +20,7 @@ function c60152905.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60152905,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
......@@ -29,6 +29,10 @@ function c60152905.initial_effect(c)
e2:SetTarget(c60152905.e2tg)
e2:SetOperation(c60152905.e2op)
c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCondition(c60152905.e2con1)
e4:SetCode(EVENT_CHAINING)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60152905,2))
......@@ -104,9 +108,14 @@ function c60152905.e1op(e,tp,eg,ep,ev,re,r,rp)
end
end
function c60152905.e2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(60152905,1-tp,ACTIVITY_CHAIN)>0
return Duel.GetCustomActivityCount(60152905,1-tp,ACTIVITY_CHAIN)>0 and Duel.GetCurrentChain()==0 and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)==0
end
function c60152905.e2con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(60152905,1-tp,ACTIVITY_CHAIN)>0 and Duel.GetCurrentChain()>0
and Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)==0
end
function c60152905.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL
if chk==0 then return true end
local ng=Group.CreateGroup()
local dg=Group.CreateGroup()
......@@ -117,10 +126,18 @@ function c60152905.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
ng:AddCard(tc)
end
end
Duel.SetTargetPlayer(p)
Duel.SetTargetParam(1000)
Duel.SetTargetCard(dg)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0)
end
function c60152905.e2op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if p==PLAYER_ALL then
Duel.Damage(0,d,REASON_EFFECT,true)
Duel.Damage(1,d,REASON_EFFECT,true)
Duel.RDComplete()
Duel.BreakEffect()
local dg=Group.CreateGroup()
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
......@@ -128,12 +145,10 @@ function c60152905.e2op(e,tp,eg,ep,ev,re,r,rp)
local tc=te:GetHandler()
if tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) then
dg:AddCard(tc)
end
end
end
end
Duel.Damage(tp,1000,REASON_EFFECT,true)
Duel.Damage(1-tp,1000,REASON_EFFECT,true)
Duel.RDComplete()
end
function c60152905.e3tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true 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