|
| 1 | +--援奏のコンダーグラー |
| 2 | +--Condurglar the Assisting Anthem |
| 3 | +--scripted by YoshiDuels |
| 4 | +local s,id=GetID() |
| 5 | +function s.initial_effect(c) |
| 6 | + --Increase Level by 1 |
| 7 | + local e1=Effect.CreateEffect(c) |
| 8 | + e1:SetType(EFFECT_TYPE_IGNITION) |
| 9 | + e1:SetRange(LOCATION_MZONE) |
| 10 | + e1:SetCountLimit(1) |
| 11 | + e1:SetCost(s.cost) |
| 12 | + e1:SetTarget(s.target) |
| 13 | + e1:SetOperation(s.operation) |
| 14 | + c:RegisterEffect(e1) |
| 15 | +end |
| 16 | +s.listed_names={160012063,160013060} |
| 17 | +function s.tdfilter(c) |
| 18 | + return c:IsMonster() and c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_PSYCHIC) and not c:IsAttack(1300) and c:IsAbleToDeckOrExtraAsCost() |
| 19 | +end |
| 20 | +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) |
| 21 | + if chk==0 then return Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,2,nil) end |
| 22 | +end |
| 23 | +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) |
| 24 | + if chk==0 then return e:GetHandler():HasLevel() end |
| 25 | +end |
| 26 | +function s.setfilter(c) |
| 27 | + return c:IsCode(160012063,160013060) and c:IsSSetable() |
| 28 | +end |
| 29 | +function s.operation(e,tp,eg,ep,ev,re,r,rp) |
| 30 | + --Requirement |
| 31 | + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) |
| 32 | + local td=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,2,2,nil) |
| 33 | + if #td==0 then return end |
| 34 | + Duel.HintSelection(td) |
| 35 | + if Duel.SendtoDeck(td,nil,SEQ_DECKSHUFFLE,REASON_COST)~=2 then return end |
| 36 | + --Effect |
| 37 | + local c=e:GetHandler() |
| 38 | + c:UpdateLevel(3,RESETS_STANDARD_PHASE_END,c) |
| 39 | + local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_GRAVE,0,nil) |
| 40 | + if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then |
| 41 | + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) |
| 42 | + local sg=g:Select(tp,1,1,nil) |
| 43 | + Duel.BreakEffect() |
| 44 | + local posg=Duel.GetMatchingGroup(Card.IsCanChangePositionRush,tp,0,LOCATION_MZONE,nil) |
| 45 | + if Duel.SSet(tp,sg)>0 and #posg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then |
| 46 | + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) |
| 47 | + local sc=Group.Select(posg,tp,1,1,nil) |
| 48 | + if #sc==0 then return end |
| 49 | + Duel.HintSelection(sc) |
| 50 | + Duel.BreakEffect() |
| 51 | + Duel.ChangePosition(sc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) |
| 52 | + end |
| 53 | + end |
| 54 | +end |
0 commit comments