From a02be56f7affb0f3e247fc011b2f5bc8dfec9358 Mon Sep 17 00:00:00 2001 From: ClaireStanfield Date: Thu, 3 Jul 2025 21:39:31 -0400 Subject: [PATCH] Add Dread Dragon (Anime) --- unofficial/c511027040.lua | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 unofficial/c511027040.lua diff --git a/unofficial/c511027040.lua b/unofficial/c511027040.lua new file mode 100644 index 0000000000..adf14f91a9 --- /dev/null +++ b/unofficial/c511027040.lua @@ -0,0 +1,29 @@ +--ドレッド・ドラゴン (Anime) +--Dread Dragon (Anime) +local s,id=GetID() +function s.initial_effect(c) + --Add 1 Dragon-Type monster from your Deck to your hand + local e1=Effect.CreateEffect(c) + e1:SetDescription(aux.Stringid(id,0)) + e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) + e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) + e1:SetCode(EVENT_BATTLE_DESTROYED) + e1:SetTarget(s.target) + e1:SetOperation(s.operation) + c:RegisterEffect(e1) +end +function s.filter(c) + return c:IsRace(RACE_DRAGON) and c:IsAbleToHand() +end +function s.target(e,tp,eg,ep,ev,re,r,rp,chk) + if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end + Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) +end +function s.operation(e,tp,eg,ep,ev,re,r,rp) + Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) + local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) + if #g>0 then + Duel.SendtoHand(g,nil,REASON_EFFECT) + Duel.ConfirmCards(1-tp,g) + end +end \ No newline at end of file