Skip to content

Commit 55f8a89

Browse files
authored
Added new card scripts
1 parent 9562ce1 commit 55f8a89

File tree

4 files changed

+322
-0
lines changed

4 files changed

+322
-0
lines changed

pre-release/c100447018.lua

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
--ドラグニティ-クイリヌス
2+
--Dragunity Quirinus
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Your "Dragunity" monsters cannot be destroyed by battle while this card is equipped with an Equip Card
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetType(EFFECT_TYPE_FIELD)
9+
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
10+
e1:SetRange(LOCATION_MZONE)
11+
e1:SetTargetRange(LOCATION_MZONE,0)
12+
e1:SetCondition(function(e) return e:GetHandler():HasEquipCard() end)
13+
e1:SetTarget(function(e,c) return c:IsSetCard(SET_DRAGUNITY) end)
14+
e1:SetValue(1)
15+
c:RegisterEffect(e1)
16+
--Add 1 "Dragunity" Spell/Trap from your Deck to your hand
17+
local e2a=Effect.CreateEffect(c)
18+
e2a:SetDescription(aux.Stringid(id,0))
19+
e2a:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
20+
e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
21+
e2a:SetProperty(EFFECT_FLAG_DELAY)
22+
e2a:SetCode(EVENT_SUMMON_SUCCESS)
23+
e2a:SetCountLimit(1,id)
24+
e2a:SetTarget(s.thtg)
25+
e2a:SetOperation(s.thop)
26+
c:RegisterEffect(e2a)
27+
local e2b=e2a:Clone()
28+
e2b:SetCode(EVENT_SPSUMMON_SUCCESS)
29+
c:RegisterEffect(e2b)
30+
--Return 1 "Dragunity" Monster Card you control to the hand/Extra Deck, then you can Special Summon 1 "Dragunity" monster from your hand
31+
local e3=Effect.CreateEffect(c)
32+
e3:SetDescription(aux.Stringid(id,1))
33+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
34+
e3:SetType(EFFECT_TYPE_IGNITION)
35+
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
36+
e3:SetRange(LOCATION_MZONE)
37+
e3:SetCountLimit(1,{id,1})
38+
e3:SetTarget(s.thsptg)
39+
e3:SetOperation(s.thspop)
40+
c:RegisterEffect(e3)
41+
end
42+
s.listed_series={SET_DRAGUNITY}
43+
function s.thfilter(c)
44+
return c:IsSetCard(SET_DRAGUNITY) and c:IsSpellTrap() and c:IsAbleToHand()
45+
end
46+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
47+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
48+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
49+
end
50+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
51+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
52+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
53+
if #g>0 then
54+
Duel.SendtoHand(g,nil,REASON_EFFECT)
55+
Duel.ConfirmCards(1-tp,g)
56+
end
57+
end
58+
function s.thorextfilter(c)
59+
return c:IsSetCard(SET_DRAGUNITY) and c:IsMonsterCard() and c:IsFaceup() and (c:IsAbleToHand() or c:IsAbleToExtra())
60+
end
61+
function s.thsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
62+
local c=e:GetHandler()
63+
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.thorextfilter(chkc) and chkc~=c end
64+
if chk==0 then return Duel.IsExistingTarget(s.thorextfilter,tp,LOCATION_ONFIELD,0,1,c) end
65+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
66+
local g=Duel.SelectTarget(tp,s.thorextfilter,tp,LOCATION_ONFIELD,0,1,1,c)
67+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0)
68+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
69+
end
70+
function s.spfilter(c,e,tp)
71+
return c:IsSetCard(SET_DRAGUNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
72+
end
73+
function s.thspop(e,tp,eg,ep,ev,re,r,rp)
74+
local tc=Duel.GetFirstTarget()
75+
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND|LOCATION_EXTRA) then
76+
if tc:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(tp) end
77+
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
78+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
79+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
80+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
81+
if #g>0 then
82+
Duel.BreakEffect()
83+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
84+
end
85+
end
86+
end
87+
end

pre-release/c100447019.lua

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
--ドラグニティ-ファルシオン
2+
--Dragunity Falchion
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Equip 1 Dragon "Dragunity" monster from your Deck or GY to 1 "Dragunity" monster you control as an Equip Spell
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_EQUIP)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
12+
e1:SetRange(LOCATION_HAND|LOCATION_GRAVE)
13+
e1:SetCountLimit(1,id)
14+
e1:SetCost(Cost.SelfBanish)
15+
e1:SetTarget(s.eqtg)
16+
e1:SetOperation(s.eqop)
17+
c:RegisterEffect(e1)
18+
--Banish 1 face-up card your opponent controls
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetDescription(aux.Stringid(id,1))
21+
e2:SetCategory(CATEGORY_REMOVE)
22+
e2:SetType(EFFECT_TYPE_IGNITION)
23+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
24+
e2:SetRange(LOCATION_SZONE)
25+
e2:SetCountLimit(1,{id,1})
26+
e2:SetCondition(s.rmcon)
27+
e2:SetCost(Cost.SelfToGrave)
28+
e2:SetTarget(s.rmtg)
29+
e2:SetOperation(s.rmop)
30+
c:RegisterEffect(e2)
31+
end
32+
s.listed_series={SET_DRAGUNITY}
33+
function s.eqfilter(c,tp)
34+
return c:IsRace(RACE_DRAGON) and c:IsSetCard(SET_DRAGUNITY) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
35+
end
36+
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
37+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsSetCard(SET_DRAGUNITY) and chkc:IsFaceup() end
38+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
39+
and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsSetCard,SET_DRAGUNITY),tp,LOCATION_MZONE,0,1,nil)
40+
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,e:GetHandler(),tp) end
41+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
42+
Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsSetCard,SET_DRAGUNITY),tp,LOCATION_MZONE,0,1,1,nil)
43+
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK|LOCATION_GRAVE)
44+
end
45+
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
46+
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
47+
local tc=Duel.GetFirstTarget()
48+
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
49+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
50+
local ec=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,tp):GetFirst()
51+
if ec and Duel.Equip(tp,ec,tc) then
52+
--Equip limit
53+
local e1=Effect.CreateEffect(ec)
54+
e1:SetType(EFFECT_TYPE_SINGLE)
55+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
56+
e1:SetCode(EFFECT_EQUIP_LIMIT)
57+
e1:SetValue(function(e,c) return c==tc end)
58+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
59+
ec:RegisterEffect(e1)
60+
end
61+
end
62+
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
63+
local ec=e:GetHandler():GetEquipTarget()
64+
return ec and ec:IsSetCard(SET_DRAGUNITY)
65+
end
66+
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
67+
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() and chkc:IsFaceup() end
68+
if chk==0 then return Duel.IsExistingTarget(aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,nil) end
69+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
70+
local g=Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsAbleToRemove),tp,0,LOCATION_ONFIELD,1,1,nil)
71+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,tp,0)
72+
end
73+
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
74+
local tc=Duel.GetFirstTarget()
75+
if tc:IsRelateToEffect(e) then
76+
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
77+
end
78+
end

pre-release/c100447020.lua

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
--ドラグニティナイト-アーレウス
2+
--Dragunity Knight - Areus
3+
local s,id=GetID()
4+
function s.initial_effect(c)
5+
c:EnableReviveLimit()
6+
--Synchro Summon procedure: 1 Tuner + 1+ non-Tuner Synchro Monsters
7+
Synchro.AddProcedure(c,nil,1,1,Synchro.NonTunerEx(Card.IsType,TYPE_SYNCHRO),1,99)
8+
--Negate the effects of face-up cards your opponent controls, up to the number of face-up Monster Cards in your Spell & Trap Zone, until the end of this turn
9+
local e1a=Effect.CreateEffect(c)
10+
e1a:SetDescription(aux.Stringid(id,0))
11+
e1a:SetCategory(CATEGORY_DISABLE)
12+
e1a:SetType(EFFECT_TYPE_IGNITION)
13+
e1a:SetProperty(EFFECT_FLAG_CARD_TARGET)
14+
e1a:SetRange(LOCATION_MZONE)
15+
e1a:SetCountLimit(1,id)
16+
e1a:SetCondition(function(e) return not e:GetHandler():HasEquipCard() end)
17+
e1a:SetTarget(s.distg)
18+
e1a:SetOperation(s.disop)
19+
c:RegisterEffect(e1a)
20+
--This is a Quick Effect if this card is equipped with an Equip Card
21+
local e1b=e1a:Clone()
22+
e1b:SetType(EFFECT_TYPE_QUICK_O)
23+
e1b:SetCode(EVENT_FREE_CHAIN)
24+
e1b:SetCondition(function(e) return e:GetHandler():HasEquipCard() end)
25+
e1b:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
26+
c:RegisterEffect(e1b)
27+
--Special Summon this card, then you can Special Summon 1 "Dragunity" Tuner from your GY
28+
local e2=Effect.CreateEffect(c)
29+
e2:SetDescription(aux.Stringid(id,1))
30+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
31+
e2:SetType(EFFECT_TYPE_IGNITION)
32+
e2:SetRange(LOCATION_SZONE)
33+
e2:SetCountLimit(1,{id,1})
34+
e2:SetCondition(function(e) return e:GetHandler():GetEquipTarget() end)
35+
e2:SetTarget(s.sptg)
36+
e2:SetOperation(s.spop)
37+
c:RegisterEffect(e2)
38+
end
39+
s.listed_series={SET_DRAGUNITY}
40+
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
41+
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsNegatable() end
42+
local ct=Duel.GetMatchingGroupCount(aux.FaceupFilter(Card.IsMonsterCard),tp,LOCATION_STZONE,0,nil)
43+
if chk==0 then return ct>0 and Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end
44+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE)
45+
local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,ct,nil)
46+
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0)
47+
end
48+
function s.disop(e,tp,eg,ep,ev,re,r,rp)
49+
local c=e:GetHandler()
50+
local tg=Duel.GetTargetCards(e)
51+
for tc in tg:Iter() do
52+
--Negate their effects until the end of this turn
53+
tc:NegateEffects(c,RESETS_STANDARD_PHASE_END,true)
54+
end
55+
end
56+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
57+
local c=e:GetHandler()
58+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
59+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
60+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
61+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
62+
end
63+
function s.spfilter(c,e,tp)
64+
return c:IsSetCard(SET_DRAGUNITY) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
65+
end
66+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
67+
local c=e:GetHandler()
68+
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
69+
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
70+
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp)
71+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
72+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
73+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
74+
if #g>0 then
75+
Duel.BreakEffect()
76+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
77+
end
78+
end
79+
end

pre-release/c100447021.lua

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
--ドラグニティロード-ゲオルギアス
2+
--Dragunity Lord - Georgius
3+
local s,id=GetID()
4+
function s.initial_effect(c)
5+
c:EnableReviveLimit()
6+
--Link Summon procedure: 2+ monsters, including a Tuner
7+
Link.AddProcedure(c,nil,2,4,s.tunermatcheck)
8+
--Your opponent cannot activate the effects of monsters in the GY while this card is equipped with a "Dragunity" card
9+
local e1=Effect.CreateEffect(c)
10+
e1:SetType(EFFECT_TYPE_FIELD)
11+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
12+
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
13+
e1:SetRange(LOCATION_MZONE)
14+
e1:SetTargetRange(0,1)
15+
e1:SetCondition(function(e) return e:GetHandler():GetEquipGroup():IsExists(Card.IsSetCard,1,nil,SET_DRAGUNITY) end)
16+
e1:SetValue(function(e,re,tp) return re:IsMonsterEffect() and re:GetHandler():IsLocation(LOCATION_GRAVE) end)
17+
c:RegisterEffect(e1)
18+
--Special Summon 1 Level 5 or higher "Dragunity" monster from your Extra Deck or GY
19+
local e2a=Effect.CreateEffect(c)
20+
e2a:SetDescription(aux.Stringid(id,0))
21+
e2a:SetCategory(CATEGORY_SPECIAL_SUMMON)
22+
e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
23+
e2a:SetProperty(EFFECT_FLAG_DELAY)
24+
e2a:SetCode(EVENT_SPSUMMON_SUCCESS)
25+
e2a:SetCountLimit(1,id)
26+
e2a:SetCondition(function(e) return e:GetHandler():IsLinkSummoned() end)
27+
e2a:SetTarget(s.sptg)
28+
e2a:SetOperation(s.spop)
29+
c:RegisterEffect(e2a)
30+
local e2b=e2a:Clone()
31+
e2b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
32+
e2b:SetRange(LOCATION_MZONE)
33+
e2b:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp) end)
34+
c:RegisterEffect(e2b)
35+
--Negate an opponent's activated Spell/Trap Card or effect
36+
local e3=Effect.CreateEffect(c)
37+
e3:SetDescription(aux.Stringid(id,1))
38+
e3:SetCategory(CATEGORY_DISABLE)
39+
e3:SetType(EFFECT_TYPE_QUICK_O)
40+
e3:SetCode(EVENT_CHAINING)
41+
e3:SetRange(LOCATION_MZONE)
42+
e3:SetCountLimit(1,{id,1})
43+
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and re:IsSpellTrapEffect() and Duel.IsChainDisablable(ev) end)
44+
e3:SetCost(s.discost)
45+
e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0) end)
46+
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.NegateEffect(ev) end)
47+
c:RegisterEffect(e3)
48+
aux.DoubleSnareValidity(c,LOCATION_MZONE)
49+
end
50+
s.listed_series={SET_DRAGUNITY}
51+
function s.tunermatcheck(g,lc,sumtype,tp)
52+
return g:IsExists(Card.IsType,1,nil,TYPE_TUNER,lc,sumtype,tp)
53+
end
54+
function s.spfilter(c,e,tp,mmz_chk)
55+
if not (c:IsLevelAbove(5) and c:IsSetCard(SET_DRAGUNITY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)) then return false end
56+
if c:IsLocation(LOCATION_EXTRA) then
57+
return Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
58+
else
59+
return mmz_chk
60+
end
61+
end
62+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
63+
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0) end
64+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA|LOCATION_GRAVE)
65+
end
66+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
67+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
68+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_EXTRA|LOCATION_GRAVE,0,1,1,nil,e,tp,Duel.GetLocationCount(tp,LOCATION_MZONE)>0)
69+
if #g>0 then
70+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
71+
end
72+
end
73+
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
74+
if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsEquipCard,Card.IsAbleToGraveAsCost),tp,LOCATION_ONFIELD,0,1,nil) end
75+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
76+
local g=Duel.SelectMatchingCard(tp,aux.AND(Card.IsEquipCard,Card.IsAbleToGraveAsCost),tp,LOCATION_ONFIELD,0,1,1,nil)
77+
Duel.SendtoGrave(g,REASON_COST)
78+
end

0 commit comments

Comments
 (0)