|
| 1 | +--波紋のバリア -ウェーブ・フォース- |
| 2 | +--Drowning Mirror Force |
| 3 | +local s,id=GetID() |
| 4 | +function s.initial_effect(c) |
| 5 | + --Activate |
| 6 | + local e1=Effect.CreateEffect(c) |
| 7 | + e1:SetCategory(CATEGORY_TODECK) |
| 8 | + e1:SetType(EFFECT_TYPE_ACTIVATE) |
| 9 | + e1:SetCode(EVENT_ATTACK_ANNOUNCE) |
| 10 | + e1:SetCondition(s.condition) |
| 11 | + e1:SetTarget(s.target) |
| 12 | + e1:SetOperation(s.operation) |
| 13 | + c:RegisterEffect(e1) |
| 14 | +end |
| 15 | +function s.condition(e,tp,eg,ep,ev,re,r,rp) |
| 16 | + return eg and eg:GetFirst():IsControler(1-tp) and Duel.GetAttackTarget()==nil |
| 17 | +end |
| 18 | +function s.filter(c) |
| 19 | + return c:IsAttackPos() and c:IsAbleToDeck() |
| 20 | +end |
| 21 | +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) |
| 22 | + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_MZONE,1,nil) end |
| 23 | + local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) |
| 24 | + Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0) |
| 25 | +end |
| 26 | +function s.operation(e,tp,eg,ep,ev,re,r,rp) |
| 27 | + local g=Duel.GetMatchingGroup(s.filter,tp,0,LOCATION_MZONE,nil) |
| 28 | + if #g>0 then |
| 29 | + Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) |
| 30 | + end |
| 31 | +end |
0 commit comments