Skip to content

Commit 5af8204

Browse files
authored
Added new card scripts
1 parent 89da0ef commit 5af8204

5 files changed

Lines changed: 479 additions & 0 deletions

File tree

pre-release/c101402021.lua

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
--D-HERO デスドグマガイ
2+
--Destiny HERO - Death Dogma
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
c:AddMustBeSpecialSummoned()
8+
--Must be Special Summoned (from your hand or GY) by banishing 3 Warrior and/or DARK monsters from your GY. You can only Special Summon "Destiny HERO - Death Dogma" once per turn this way
9+
local e0=Effect.CreateEffect(c)
10+
e0:SetDescription(aux.Stringid(id,0))
11+
e0:SetType(EFFECT_TYPE_FIELD)
12+
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
13+
e0:SetCode(EFFECT_SPSUMMON_PROC)
14+
e0:SetRange(LOCATION_HAND|LOCATION_GRAVE)
15+
e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
16+
e0:SetCondition(s.spcon)
17+
e0:SetTarget(s.sptg)
18+
e0:SetOperation(s.spop)
19+
e0:SetValue(1)
20+
c:RegisterEffect(e0)
21+
--If Summoned this way: You can activate this effect; inflict 2000 damage to your opponent during the next Standby Phase
22+
local e1=Effect.CreateEffect(c)
23+
e1:SetDescription(aux.Stringid(id,1))
24+
e1:SetCategory(CATEGORY_DAMAGE)
25+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
26+
e1:SetProperty(EFFECT_FLAG_DELAY)
27+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
28+
e1:SetCondition(function(e) return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL+1) end)
29+
e1:SetTarget(s.damtg)
30+
e1:SetOperation(s.damop)
31+
c:RegisterEffect(e1)
32+
--Once per turn, when your opponent activates a card or effect (Quick Effect): You can Fusion Summon 1 DARK or Warrior Fusion Monster from your Extra Deck, by shuffling its materials from your hand, field, and/or GY into the Deck
33+
local fusion_params={
34+
fusfilter=function(c)
35+
return c:IsAttribute(ATTRIBUTE_DARK) or c:IsRace(RACE_WARRIOR)
36+
end,
37+
extratg=function(e,tp,eg,ep,ev,re,r,rp,chk)
38+
if chk==0 then return true end
39+
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND|LOCATION_MZONE|LOCATION_GRAVE)
40+
end,
41+
extraop=Fusion.ShuffleMaterial,
42+
extrafil=function(e,tp,mg)
43+
return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToDeck),tp,LOCATION_GRAVE,0,nil)
44+
end
45+
}
46+
local e2=Effect.CreateEffect(c)
47+
e2:SetDescription(aux.Stringid(id,2))
48+
e2:SetCategory(CATEGORY_FUSION_SUMMON+CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
49+
e2:SetType(EFFECT_TYPE_QUICK_O)
50+
e2:SetCode(EVENT_CHAINING)
51+
e2:SetRange(LOCATION_MZONE)
52+
e2:SetCountLimit(1)
53+
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp end)
54+
e2:SetTarget(Fusion.SummonEffTG(fusion_params))
55+
e2:SetOperation(Fusion.SummonEffOP(fusion_params))
56+
c:RegisterEffect(e2)
57+
end
58+
s.listed_names={id}
59+
function s.spcostfilter(c)
60+
return (c:IsRace(RACE_WARRIOR) or c:IsAttribute(ATTRIBUTE_DARK)) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true)
61+
end
62+
function s.spcon(e,c)
63+
if c==nil then return true end
64+
local tp=e:GetHandlerPlayer()
65+
local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,c)
66+
return #g>=3 and Duel.GetMZoneCount(tp,g)>0 and aux.SelectUnselectGroup(g,e,tp,3,3,aux.ChkfMMZ(1),0)
67+
end
68+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
69+
local g=Duel.GetMatchingGroup(s.spcostfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,c)
70+
local sg=aux.SelectUnselectGroup(g,e,tp,3,3,aux.ChkfMMZ(1),1,tp,HINTMSG_REMOVE,nil,nil,true)
71+
if sg and #sg==3 then
72+
e:SetLabelObject(sg)
73+
return true
74+
end
75+
return false
76+
end
77+
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
78+
local sg=e:GetLabelObject()
79+
if sg and #sg==3 then
80+
Duel.Remove(sg,POS_FACEUP,REASON_COST)
81+
end
82+
end
83+
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
84+
if chk==0 then return true end
85+
Duel.SetPossibleOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000)
86+
end
87+
function s.damop(e,tp,eg,ep,ev,re,r,rp)
88+
local c=e:GetHandler()
89+
aux.RegisterClientHint(c,nil,tp,0,1,aux.Stringid(id,3),RESET_PHASE|PHASE_STANDBY)
90+
--Inflict 2000 damage to your opponent during the next Standby Phase
91+
local e1=Effect.CreateEffect(c)
92+
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
93+
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
94+
e1:SetCountLimit(1)
95+
e1:SetOperation(function() Duel.Damage(1-tp,2000,REASON_EFFECT) end)
96+
e1:SetReset(RESET_PHASE|PHASE_STANDBY)
97+
Duel.RegisterEffect(e1,tp)
98+
end

pre-release/c101402022.lua

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
--D-HERO デビルロードガイ
2+
--Destiny HERO - Doom Liege
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If this card is Normal or Special Summoned: You can target 1 monster your opponent controls; banish it until the next Standby Phase
7+
local e1a=Effect.CreateEffect(c)
8+
e1a:SetDescription(aux.Stringid(id,0))
9+
e1a:SetCategory(CATEGORY_REMOVE)
10+
e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
12+
e1a:SetCode(EVENT_SUMMON_SUCCESS)
13+
e1a:SetCountLimit(1,{id,0})
14+
e1a:SetTarget(s.bantg)
15+
e1a:SetOperation(s.banop)
16+
c:RegisterEffect(e1a)
17+
local e1b=e1a:Clone()
18+
e1b:SetCode(EVENT_SPSUMMON_SUCCESS)
19+
c:RegisterEffect(e1b)
20+
--You can send 1 "Destiny HERO" monster from your Deck to the GY; add 1 "Clock Tower Prison" or "Clock Tower Prison City - Dark City" from your Deck or GY to your hand, also you cannot Special Summon for the rest of this turn, except DARK "HERO" monsters
21+
local e2=Effect.CreateEffect(c)
22+
e2:SetDescription(aux.Stringid(id,1))
23+
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
24+
e2:SetType(EFFECT_TYPE_IGNITION)
25+
e2:SetRange(LOCATION_MZONE)
26+
e2:SetCountLimit(1,{id,1})
27+
e2:SetCost(s.thcost)
28+
e2:SetTarget(s.thtg)
29+
e2:SetOperation(s.thop)
30+
c:RegisterEffect(e2)
31+
end
32+
s.listed_names={75041269,101402062} --"Clock Tower Prison", "Clock Tower Prison City - Dark City"
33+
s.listed_series={SET_DESTINY_HERO,SET_HERO}
34+
function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
35+
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToRemove() end
36+
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
37+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
38+
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,1,nil)
39+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0)
40+
end
41+
function s.banop(e,tp,eg,ep,ev,re,r,rp)
42+
local tc=Duel.GetFirstTarget()
43+
if tc:IsRelateToEffect(e) then
44+
local reset_count=1
45+
local return_condition=nil
46+
if Duel.IsStandbyPhase() then
47+
local turn_count=Duel.GetTurnCount()
48+
reset_count=2
49+
return_condition=function() return Duel.GetTurnCount()~=turn_count end
50+
end
51+
--Banish it until the next Standby Phase
52+
aux.RemoveUntil(tc,nil,REASON_EFFECT,PHASE_STANDBY,id,e,tp,aux.DefaultFieldReturnOp,return_condition,nil,reset_count)
53+
end
54+
end
55+
function s.thcostfilter(c)
56+
return c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster() and c:IsAbleToGraveAsCost()
57+
end
58+
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
59+
if chk==0 then return Duel.IsExistingMatchingCard(s.thcostfilter,tp,LOCATION_DECK,0,1,nil) end
60+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
61+
local g=Duel.SelectMatchingCard(tp,s.thcostfilter,tp,LOCATION_DECK,0,1,1,nil)
62+
Duel.SendtoGrave(g,REASON_COST)
63+
end
64+
function s.thfilter(c)
65+
return c:IsCode(75041269,101402062) and c:IsAbleToHand()
66+
end
67+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
68+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end
69+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE)
70+
end
71+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
72+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
73+
local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil):GetFirst()
74+
if sc then
75+
if sc:IsLocation(LOCATION_GRAVE) then Duel.HintSelection(sc) end
76+
Duel.SendtoHand(sc,nil,REASON_EFFECT)
77+
if sc:IsPreviousLocation(LOCATION_DECK) then Duel.ConfirmCards(1-tp,sc) end
78+
end
79+
--You cannot Special Summon for the rest of this turn, except DARK "HERO" monsters
80+
local e1=Effect.CreateEffect(e:GetHandler())
81+
e1:SetDescription(aux.Stringid(id,2))
82+
e1:SetType(EFFECT_TYPE_FIELD)
83+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
84+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
85+
e1:SetTargetRange(1,0)
86+
e1:SetTarget(function(e,c) return not (c:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(SET_HERO)) end)
87+
e1:SetReset(RESET_PHASE|PHASE_END)
88+
Duel.RegisterEffect(e1,tp)
89+
end

pre-release/c101402023.lua

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
--D-HERO ドレッドノートサーヴァント
2+
--Destiny HERO - Dreadnought Servant
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If you control a "Destiny HERO" monster or a face-up Field Spell: You can Special Summon this card from your hand, then you can destroy 1 card you control, and if you do, add 1 "Polymerization" from your Deck to your hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_HAND)
12+
e1:SetCountLimit(1,{id,0})
13+
e1:SetCondition(s.spcon)
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
c:RegisterEffect(e1)
17+
--If you Special Summon a Level 8 "Destiny HERO" monster(s): You can banish this card from your GY, then target 1 card your opponent controls; place it on top of the Deck
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_TODECK)
21+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
22+
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
23+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
24+
e2:SetRange(LOCATION_GRAVE)
25+
e2:SetCountLimit(1,{id,1})
26+
e2:SetCondition(s.tdcon)
27+
e2:SetCost(Cost.SelfBanish)
28+
e2:SetTarget(s.tdtg)
29+
e2:SetOperation(s.tdop)
30+
c:RegisterEffect(e2)
31+
end
32+
s.listed_series={SET_DESTINY_HERO}
33+
s.listed_names={CARD_POLYMERIZATION}
34+
function s.spconfilter(c)
35+
return (c:IsSetCard(SET_DESTINY_HERO) or c:IsFieldSpell()) and c:IsFaceup()
36+
end
37+
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
38+
return Duel.IsExistingMatchingCard(s.spconfilter,tp,LOCATION_MZONE|LOCATION_FZONE,0,1,nil)
39+
end
40+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
41+
local c=e:GetHandler()
42+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
43+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
44+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
45+
Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD)
46+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
47+
end
48+
function s.thfilter(c)
49+
return c:IsCode(CARD_POLYMERIZATION) and c:IsAbleToHand()
50+
end
51+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
52+
local c=e:GetHandler()
53+
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
54+
and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>0
55+
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
56+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
57+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
58+
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
59+
if #g==0 then return end
60+
Duel.HintSelection(g)
61+
Duel.BreakEffect()
62+
if Duel.Destroy(g,REASON_EFFECT)>0 then
63+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
64+
local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
65+
if #sg>0 then
66+
Duel.SendtoHand(sg,nil,REASON_EFFECT)
67+
Duel.ConfirmCards(1-tp,sg)
68+
end
69+
end
70+
end
71+
end
72+
function s.tdconfilter(c,tp)
73+
return c:IsSummonPlayer(tp) and c:IsLevel(8) and c:IsSetCard(SET_DESTINY_HERO) and c:IsFaceup()
74+
end
75+
function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
76+
return eg:IsExists(s.tdconfilter,1,nil,tp)
77+
end
78+
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
79+
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToDeck() end
80+
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) end
81+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
82+
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil)
83+
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,tp,0)
84+
end
85+
function s.tdop(e)
86+
local tc=Duel.GetFirstTarget()
87+
if tc:IsRelateToEffect(e) then
88+
Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)
89+
end
90+
end

pre-release/c101402037.lua

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
--D-HERO ドレッドノートガイ
2+
--Destiny HERO - Dreadnought
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Fusion Materials: 2 Level 5 or higher "Destiny HERO" monsters
8+
Fusion.AddProcMixN(c,true,true,s.matfilter,2)
9+
--Must be either Fusion Summoned, or Special Summoned (from your Extra Deck) by Tributing 1 "Destiny HERO - Dreadmaster"
10+
c:AddMustBeFusionSummoned()
11+
local e0a=Effect.CreateEffect(c)
12+
e0a:SetDescription(aux.Stringid(id,0))
13+
e0a:SetType(EFFECT_TYPE_FIELD)
14+
e0a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
15+
e0a:SetCode(EFFECT_SPSUMMON_PROC)
16+
e0a:SetRange(LOCATION_EXTRA)
17+
e0a:SetCondition(s.selfspcon)
18+
e0a:SetTarget(s.selfsptg)
19+
e0a:SetOperation(s.selfspop)
20+
e0a:SetValue(1)
21+
c:RegisterEffect(e0a)
22+
--You can only Special Summon "Destiny HERO - Dreadnought" once per turn this way, no matter which method you use
23+
local e0b=Effect.CreateEffect(c)
24+
e0b:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
25+
e0b:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
26+
e0b:SetCode(EVENT_SPSUMMON_SUCCESS)
27+
e0b:SetCondition(s.regcon)
28+
e0b:SetOperation(s.regop)
29+
c:RegisterEffect(e0b)
30+
--If this card is Special Summoned: You can add 2 "Destiny HERO" monsters and/or cards that mention a "Destiny HERO" monster's card name from your Deck to your hand
31+
local e1=Effect.CreateEffect(c)
32+
e1:SetDescription(aux.Stringid(id,1))
33+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
34+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
35+
e1:SetProperty(EFFECT_FLAG_DELAY)
36+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
37+
e1:SetTarget(s.thtg)
38+
e1:SetOperation(s.thop)
39+
c:RegisterEffect(e1)
40+
--This card's ATK becomes the total original ATK of all other "Destiny HERO" monsters in your field and GY
41+
local e2=Effect.CreateEffect(c)
42+
e2:SetType(EFFECT_TYPE_SINGLE)
43+
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
44+
e2:SetCode(EFFECT_SET_ATTACK)
45+
e2:SetRange(LOCATION_MZONE)
46+
e2:SetValue(function(e,c) return Duel.GetMatchingGroup(aux.FaceupFilter(Card.IsSetCard,SET_DESTINY_HERO),c:GetControler(),LOCATION_MZONE|LOCATION_GRAVE,0,c):GetSum(Card.GetBaseAttack) end)
47+
c:RegisterEffect(e2)
48+
end
49+
s.listed_names={40591390} --"Destiny HERO - Dreadmaster"
50+
s.listed_series={SET_DESTINY_HERO}
51+
s.material_setcode={SET_DESTINY_HERO,SET_HERO}
52+
function s.matfilter(c,fc,sumtype,sump)
53+
return c:IsLevelAbove(5) and c:IsSetCard(SET_DESTINY_HERO,fc,sumtype,sump)
54+
end
55+
function s.selfspcostfilter(c,tp,fc)
56+
return c:IsSummonCode(fc,MATERIAL_FUSION,tp,40591390) and c:IsCanBeFusionMaterial(fc,MATERIAL_FUSION,tp) and Duel.GetLocationCountFromEx(tp,tp,c,fc)>0
57+
end
58+
function s.selfspcon(e,c)
59+
if not c then return true end
60+
local tp=c:GetControler()
61+
return Duel.CheckReleaseGroup(tp,s.selfspcostfilter,1,false,1,true,c,tp,nil,nil,nil,tp,c)
62+
end
63+
function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
64+
local g=Duel.SelectReleaseGroup(tp,s.selfspcostfilter,1,1,false,true,true,c,tp,nil,false,nil,tp,c)
65+
if g and #g>0 then
66+
e:SetLabelObject(g)
67+
return true
68+
end
69+
return false
70+
end
71+
function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c)
72+
local g=e:GetLabelObject()
73+
if g and #g>0 then
74+
Duel.Release(g,REASON_COST|REASON_MATERIAL)
75+
end
76+
end
77+
function s.regcon(e)
78+
local c=e:GetHandler()
79+
return c:IsFusionSummoned() or c:IsSummonType(SUMMON_TYPE_SPECIAL+1)
80+
end
81+
function s.regop(e,tp,eg,ep,ev,re,r,rp)
82+
--You can only Special Summon "Destiny HERO - Dreadnought" once per turn this way, no matter which method you use
83+
local e1=Effect.CreateEffect(e:GetHandler())
84+
e1:SetType(EFFECT_TYPE_FIELD)
85+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
86+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
87+
e1:SetTargetRange(1,0)
88+
e1:SetTarget(function(e,c,sump,sumtype) return c:IsOriginalCodeRule(id) and (sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION or sumtype&SUMMON_TYPE_SPECIAL+1==SUMMON_TYPE_SPECIAL+1) end)
89+
e1:SetReset(RESET_PHASE|PHASE_END)
90+
Duel.RegisterEffect(e1,tp)
91+
end
92+
function s.thfilter(c)
93+
return ((c:IsSetCard(SET_DESTINY_HERO) and c:IsMonster()) or c:ListsCodeWithArchetype(SET_DESTINY_HERO)) and c:IsAbleToHand()
94+
end
95+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
96+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,2,nil) end
97+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
98+
end
99+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
100+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
101+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,2,2,nil)
102+
if #g==2 then
103+
Duel.SendtoHand(g,nil,REASON_EFFECT)
104+
Duel.ConfirmCards(1-tp,g)
105+
end
106+
end

0 commit comments

Comments
 (0)