|
| 1 | +--超伝導恐獣 |
| 2 | +--Super Conductor Tyranno |
| 3 | +--Scripted by YoshiDuels |
| 4 | +local s,id=GetID() |
| 5 | +function s.initial_effect(c) |
| 6 | + --inflict 500 damage |
| 7 | + local e1=Effect.CreateEffect(c) |
| 8 | + e1:SetDescription(aux.Stringid(id,0)) |
| 9 | + e1:SetCategory(CATEGORY_DAMAGE) |
| 10 | + e1:SetType(EFFECT_TYPE_IGNITION) |
| 11 | + e1:SetRange(LOCATION_MZONE) |
| 12 | + e1:SetCountLimit(1) |
| 13 | + e1:SetCost(s.cost) |
| 14 | + e1:SetTarget(s.target) |
| 15 | + e1:SetOperation(s.operation) |
| 16 | + c:RegisterEffect(e1) |
| 17 | +end |
| 18 | +function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) |
| 19 | + if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,1,nil) end |
| 20 | +end |
| 21 | +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) |
| 22 | + if chk==0 then return true end |
| 23 | + Duel.SetTargetPlayer(1-tp) |
| 24 | + Duel.SetTargetParam(1000) |
| 25 | + Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000) |
| 26 | +end |
| 27 | +function s.operation(e,tp,eg,ep,ev,re,r,rp) |
| 28 | + --Requirement |
| 29 | + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) |
| 30 | + local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_MZONE,0,1,1,nil) |
| 31 | + if Duel.SendtoGrave(g,REASON_COST)<1 then return end |
| 32 | + --Effect |
| 33 | + local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) |
| 34 | + Duel.Damage(p,d,REASON_EFFECT) |
| 35 | + --Cannot attack directly |
| 36 | + local c=e:GetHandler() |
| 37 | + local e3=Effect.CreateEffect(c) |
| 38 | + e3:SetDescription(3206) |
| 39 | + e3:SetType(EFFECT_TYPE_SINGLE) |
| 40 | + e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT) |
| 41 | + e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE) |
| 42 | + e3:SetReset(RESETS_STANDARD_PHASE_END) |
| 43 | + c:RegisterEffect(e3) |
| 44 | +end |
0 commit comments