|
| 1 | +--任務完了 |
| 2 | +--New Start |
| 3 | +--Scripted by YoshiDuels |
| 4 | +local s,id=GetID() |
| 5 | +function s.initial_effect(c) |
| 6 | + -- Destroy |
| 7 | + local e1=Effect.CreateEffect(c) |
| 8 | + e1:SetDescription(aux.Stringid(id,0)) |
| 9 | + e1:SetCategory(CATEGORY_DESTROY) |
| 10 | + e1:SetType(EFFECT_TYPE_ACTIVATE) |
| 11 | + e1:SetCode(EVENT_SUMMON_SUCCESS) |
| 12 | + e1:SetCost(s.cost) |
| 13 | + e1:SetTarget(s.target) |
| 14 | + e1:SetOperation(s.operation) |
| 15 | + c:RegisterEffect(e1) |
| 16 | +end |
| 17 | +s.listed_names={160421024} |
| 18 | +function s.tdfilter(c) |
| 19 | + return ((c:IsMonster() and c:IsLevel(7)) or c:IsCode(160421024)) and c:IsAbleToDeckOrExtraAsCost() |
| 20 | +end |
| 21 | +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) |
| 22 | + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end |
| 23 | +end |
| 24 | +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) |
| 25 | + local tc=eg:GetFirst() |
| 26 | + if chk==0 then return ep==1-tp and tc:IsFaceup() and tc:IsLocation(LOCATION_MZONE) end |
| 27 | + tc:CreateEffectRelation(e) |
| 28 | + Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) |
| 29 | +end |
| 30 | +function s.operation(e,tp,eg,ep,ev,re,r,rp) |
| 31 | + --Requirement |
| 32 | + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) |
| 33 | + local td=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil) |
| 34 | + Duel.HintSelection(td) |
| 35 | + if Duel.SendtoDeck(td,nil,SEQ_DECKBOTTOM,REASON_COST)<1 then return end |
| 36 | + --Effect |
| 37 | + local tc=eg:GetFirst() |
| 38 | + local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) |
| 39 | + if tc and Duel.Destroy(tc,REASON_EFFECT)>0 and ct<5 and Duel.IsPlayerCanDraw(tp,5-ct) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then |
| 40 | + Duel.Draw(tp,5-ct,REASON_EFFECT) |
| 41 | + end |
| 42 | +end |
0 commit comments