|
| 1 | +--マクスヴァスル・ザッハーク |
| 2 | +--Maxvassal Zahhak |
| 3 | +--Scripted by YoshiDuels |
| 4 | +local s,id=GetID() |
| 5 | +function s.initial_effect(c) |
| 6 | + --Send the top 2 cards of deck to GY |
| 7 | + local e1=Effect.CreateEffect(c) |
| 8 | + e1:SetType(EFFECT_TYPE_IGNITION) |
| 9 | + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DECKDES) |
| 10 | + e1:SetRange(LOCATION_MZONE) |
| 11 | + e1:SetCountLimit(1) |
| 12 | + e1:SetCost(s.cost) |
| 13 | + e1:SetTarget(s.target) |
| 14 | + e1:SetOperation(s.operation) |
| 15 | + c:RegisterEffect(e1) |
| 16 | +end |
| 17 | +function s.cfilter(c) |
| 18 | + return c:IsMonster() and c:IsAbleToGraveAsCost() |
| 19 | +end |
| 20 | +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) |
| 21 | + if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end |
| 22 | +end |
| 23 | +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) |
| 24 | + if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end |
| 25 | + Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2) |
| 26 | +end |
| 27 | +function s.thfilter(c) |
| 28 | + return c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsType(TYPE_MAXIMUM) and c:IsLevel(10) and c:IsAbleToHand() |
| 29 | +end |
| 30 | +function s.operation(e,tp,eg,ep,ev,re,r,rp) |
| 31 | + --Requirement |
| 32 | + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) |
| 33 | + local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil) |
| 34 | + if Duel.SendtoGrave(g,REASON_COST)<1 then return end |
| 35 | + --Effect |
| 36 | + if Duel.DiscardDeck(tp,2,REASON_EFFECT)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_GRAVE,0,1,nil) |
| 37 | + and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then |
| 38 | + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) |
| 39 | + local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) |
| 40 | + if #g>0 then |
| 41 | + Duel.SendtoHand(g,nil,REASON_EFFECT) |
| 42 | + Duel.ConfirmCards(1-tp,g) |
| 43 | + end |
| 44 | + end |
| 45 | +end |
0 commit comments