Skip to content

Commit 348da1f

Browse files
authored
Add files via upload
1 parent 637b74b commit 348da1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+7388
-0
lines changed

official/c17954937.lua

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
--Japanese name
2+
--Mitsurugi Great Purification
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Negate an effect activated by the opponent, and if you do, destroy that card.
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_CHAINING)
12+
e1:SetCountLimit(1,id)
13+
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==1-tp and Duel.IsChainDisablable(ev) end)
14+
e1:SetCost(s.discost)
15+
e1:SetTarget(s.distg)
16+
e1:SetOperation(s.disop)
17+
c:RegisterEffect(e1)
18+
--Special Summon 1 Reptile monster from your GY, and if you do, Tribute 1 other monster you control
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetDescription(aux.Stringid(id,1))
21+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
22+
e2:SetType(EFFECT_TYPE_QUICK_O)
23+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
24+
e2:SetCode(EVENT_FREE_CHAIN)
25+
e2:SetRange(LOCATION_GRAVE)
26+
e2:SetCountLimit(1,id)
27+
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
28+
e2:SetCost(aux.SelfBanishCost)
29+
e2:SetTarget(s.sptg)
30+
e2:SetOperation(s.spop)
31+
c:RegisterEffect(e2)
32+
end
33+
function s.costfilter(c)
34+
return c:IsLevelAbove(5) and c:IsRace(RACE_REPTILE)
35+
end
36+
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
37+
if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.costfilter,1,false,nil,nil) end
38+
local g=Duel.SelectReleaseGroupCost(tp,s.costfilter,1,1,false,nil,nil)
39+
Duel.Release(g,REASON_COST)
40+
end
41+
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
42+
if chk==0 then return true end
43+
local rc=re:GetHandler()
44+
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
45+
if rc:IsRelateToEffect(re) and rc:IsDestructable() then
46+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0)
47+
end
48+
end
49+
function s.disop(e,tp,eg,ep,ev,re,r,rp)
50+
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
51+
Duel.Destroy(eg,REASON_EFFECT)
52+
end
53+
end
54+
function s.spfilter(c,e,tp)
55+
return c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
56+
end
57+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
58+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end
59+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
60+
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
61+
and Duel.IsExistingMatchingCard(Card.IsReleasableByEffect,tp,LOCATION_MZONE,0,1,nil) end
62+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
63+
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
64+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0)
65+
local rg=Duel.GetMatchingGroup(Card.IsReleasableByEffect,tp,LOCATION_MZONE,0,nil)
66+
Duel.SetOperationInfo(0,CATEGORY_RELEASE,rg,1,tp,0)
67+
end
68+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
69+
local tc=Duel.GetFirstTarget()
70+
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
71+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
72+
local g=Duel.SelectMatchingCard(tp,Card.IsReleasableByEffect,tp,LOCATION_MZONE,0,1,1,tc)
73+
if #g>0 then
74+
Duel.HintSelection(g)
75+
Duel.Release(g,REASON_EFFECT)
76+
end
77+
end
78+
end

official/c18176525.lua

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
--Japanese name
2+
--Mitsurugi no Mikoto, Saji
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Add to your hand 1 "Mitsurugi" card from your GY or that is banished
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
10+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetProperty(EFFECT_FLAG_DELAY)
12+
e1:SetCode(EVENT_SUMMON_SUCCESS)
13+
e1:SetCountLimit(1,id)
14+
e1:SetTarget(s.thtg)
15+
e1:SetOperation(s.thop)
16+
c:RegisterEffect(e1)
17+
local e2=e1:Clone()
18+
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
19+
c:RegisterEffect(e2)
20+
local e3=e1:Clone()
21+
e3:SetCode(EVENT_RELEASE)
22+
c:RegisterEffect(e3)
23+
--If another Reptile monster(s) you control would be destroyed by battle or card effect, you can Tribute this card instead
24+
local e4=Effect.CreateEffect(c)
25+
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
26+
e4:SetCode(EFFECT_DESTROY_REPLACE)
27+
e4:SetRange(LOCATION_MZONE)
28+
e4:SetCountLimit(1,{id,1})
29+
e4:SetTarget(s.reptg)
30+
e4:SetValue(function(e,c) return s.repfilter(c,e:GetHandlerPlayer()) end)
31+
e4:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) Duel.Release(e:GetHandler(),REASON_EFFECT|REASON_REPLACE) end)
32+
c:RegisterEffect(e4)
33+
end
34+
s.listed_series={SET_MITSURUGI}
35+
function s.thfilter(c)
36+
return c:IsSetCard(SET_MITSURUGI) and c:IsSpellTrap() and c:IsAbleToHand()
37+
end
38+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
39+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
40+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
41+
end
42+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
43+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
44+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
45+
if #g>0 then
46+
Duel.SendtoHand(g,nil,REASON_EFFECT)
47+
Duel.ConfirmCards(1-tp,g)
48+
end
49+
end
50+
function s.repfilter(c,tp)
51+
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_REPTILE)
52+
and c:IsReason(REASON_BATTLE|REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
53+
end
54+
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
55+
local c=e:GetHandler()
56+
if chk==0 then return eg:IsExists(s.repfilter,1,c,tp)
57+
and c:IsReleasableByEffect(e) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
58+
return Duel.SelectEffectYesNo(tp,c,96)
59+
end

official/c19899073.lua

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
--Japanese name
2+
--Ame no Murakumo no Mitsurugi
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Destroy all monsters your opponent controls
8+
local e1=Effect.CreateEffect(c)
9+
e1:SetDescription(aux.Stringid(id,0))
10+
e1:SetCategory(CATEGORY_DESTROY)
11+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
12+
e1:SetProperty(EFFECT_FLAG_DELAY)
13+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
14+
e1:SetCountLimit(1,id)
15+
e1:SetTarget(s.destg)
16+
e1:SetOperation(s.desop)
17+
c:RegisterEffect(e1)
18+
--Negate an opponent's activated effect
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetDescription(aux.Stringid(id,1))
21+
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_HANDES)
22+
e2:SetType(EFFECT_TYPE_QUICK_O)
23+
e2:SetCode(EVENT_CHAINING)
24+
e2:SetRange(LOCATION_MZONE)
25+
e2:SetCountLimit(1,{id,1})
26+
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and (Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,0,LOCATION_HAND,1,nil,REASON_EFFECT,1-tp) or Duel.IsChainDisablable(ev)) end)
27+
e2:SetTarget(s.distg)
28+
e2:SetOperation(s.disop)
29+
c:RegisterEffect(e2)
30+
--Add 1 "Mitsurugi" card from your Deck to your hand then you can Special Summon this card
31+
local e3=Effect.CreateEffect(c)
32+
e3:SetDescription(aux.Stringid(id,2))
33+
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
34+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
35+
e3:SetProperty(EFFECT_FLAG_DELAY)
36+
e3:SetCode(EVENT_RELEASE)
37+
e3:SetCountLimit(1,{id,2})
38+
e3:SetTarget(s.thtg)
39+
e3:SetOperation(s.thop)
40+
c:RegisterEffect(e3)
41+
end
42+
s.listed_series={SET_MITSURUGI}
43+
s.listed_names={id,81560239} --"Mitsurugi Ritual"
44+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
45+
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
46+
if chk==0 then return #g>0 end
47+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,tp,0)
48+
end
49+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
50+
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
51+
if #g>0 then
52+
Duel.Destroy(g,REASON_EFFECT)
53+
end
54+
end
55+
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
56+
if chk==0 then return true end
57+
Duel.SetPossibleOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
58+
Duel.SetPossibleOperationInfo(0,CATEGORY_HANDES,nil,1,1-tp,1)
59+
end
60+
function s.disop(e,tp,eg,ep,ev,re,r,rp)
61+
local b1=Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,0,LOCATION_HAND,1,nil,REASON_EFFECT,1-tp)
62+
local b2=Duel.IsChainDisablable(ev)
63+
local op=nil
64+
if b1 and b2 then
65+
op=Duel.SelectEffect(1-tp,
66+
{b1,aux.Stringid(id,3)},
67+
{b2,aux.Stringid(id,4)})
68+
else
69+
op=(b1 and 1) or (b2 and 2)
70+
end
71+
if op==1 then
72+
Duel.DiscardHand(1-tp,nil,1,1,REASON_EFFECT|REASON_DISCARD,nil)
73+
elseif op==2 then
74+
Duel.NegateEffect(ev)
75+
end
76+
end
77+
function s.thfilter(c)
78+
return c:IsSetCard(SET_MITSURUGI) and c:IsAbleToHand() and not c:IsCode(id)
79+
end
80+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
81+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
82+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
83+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,tp,0)
84+
end
85+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
86+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
87+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
88+
if #g==0 or Duel.SendtoHand(g,nil,REASON_EFFECT)==0 then return end
89+
Duel.ConfirmCards(1-tp,g)
90+
local c=e:GetHandler()
91+
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
92+
and Duel.SelectYesNo(tp,aux.Stringid(id,5)) then
93+
Duel.BreakEffect()
94+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
95+
end
96+
end

official/c20011655.lua

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
--Japanese name
2+
--Beast of Talwar - The Sword Summit
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If you control no monsters, you can Special Summon this card (from your hand)
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_FIELD)
10+
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
11+
e1:SetCode(EFFECT_SPSUMMON_PROC)
12+
e1:SetRange(LOCATION_HAND)
13+
e1:SetCondition(s.spcon)
14+
c:RegisterEffect(e1)
15+
--The first time this card would be destroyed by an opponent's card effect each turn, it is not destroyed
16+
local e2=Effect.CreateEffect(c)
17+
e2:SetType(EFFECT_TYPE_SINGLE)
18+
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
19+
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
20+
e2:SetRange(LOCATION_MZONE)
21+
e2:SetCountLimit(1)
22+
e2:SetValue(function(e,re,r,rp) return (r&REASON_EFFECT)>0 and rp==1-e:GetHandlerPlayer() end)
23+
c:RegisterEffect(e2)
24+
--Neither player can target other monsters with Equip Spell Cards or effects
25+
local e3=Effect.CreateEffect(c)
26+
e3:SetType(EFFECT_TYPE_FIELD)
27+
e3:SetProperty(EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
28+
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
29+
e3:SetRange(LOCATION_MZONE)
30+
e3:SetTarget(function(e,c) return c~=e:GetHandler() and c:IsMonster() and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED)) end)
31+
e3:SetValue(s.tgval)
32+
c:RegisterEffect(e3)
33+
end
34+
function s.spcon(e,c)
35+
if c==nil then return true end
36+
local tp=e:GetHandlerPlayer()
37+
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
38+
end
39+
function s.tgval(e,re,rp)
40+
if not (re:IsSpellEffect() and re:IsActiveType(TYPE_EQUIP)) then return false end
41+
local typ,eff=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_TYPE,CHAININFO_TRIGGERING_EFFECT)
42+
if eff==re then
43+
return typ&(TYPE_SPELL|TYPE_EQUIP)==TYPE_SPELL|TYPE_EQUIP
44+
else
45+
return re:GetHandler():IsEquipSpell()
46+
end
47+
end

official/c21147203.lua

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
--Japanese name
2+
--Minimalian
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card from your hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_HAND)
12+
e1:SetCountLimit(1,id)
13+
e1:SetCost(s.selfspcost)
14+
e1:SetTarget(s.selfsptg)
15+
e1:SetOperation(s.selfspop)
16+
c:RegisterEffect(e1)
17+
--Special Summon 1 monster from your Deck with the same original Type and Attribute that the banished monster had on the field, but 1 or 2 Levels lower than its original Level
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
21+
e2:SetType(EFFECT_TYPE_IGNITION)
22+
e2:SetRange(LOCATION_MZONE)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetCost(s.deckspcost)
25+
e2:SetTarget(s.decksptg)
26+
e2:SetOperation(s.deckspop)
27+
c:RegisterEffect(e2)
28+
end
29+
function s.selfspcost(e,tp,eg,ep,ev,re,r,rp,chk)
30+
local c=e:GetHandler()
31+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,c) end
32+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
33+
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND,0,1,1,c)
34+
Duel.Remove(g,POS_FACEUP,REASON_COST)
35+
end
36+
function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk)
37+
local c=e:GetHandler()
38+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
39+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
40+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
41+
end
42+
function s.selfspop(e,tp,eg,ep,ev,re,r,rp)
43+
local c=e:GetHandler()
44+
if c:IsRelateToEffect(e) then
45+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
46+
end
47+
end
48+
function s.deckspcostfilter(c,e,tp)
49+
return c:IsAbleToRemoveAsCost() and c:IsLevelBelow(4) and c:IsFaceup() and Duel.GetMZoneCount(tp,c)>0
50+
and Duel.IsExistingMatchingCard(s.deckspfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetOriginalRace(),c:GetOriginalAttribute(),c:GetOriginalLevel())
51+
end
52+
function s.deckspfilter(c,e,tp,rac,att,lvl)
53+
return c:IsOriginalRace(rac) and c:IsOriginalAttribute(att) and c:IsLevel(lvl-1,lvl-2)
54+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
55+
end
56+
function s.deckspcost(e,tp,eg,ep,ev,re,r,rp,chk)
57+
if chk==0 then return Duel.IsExistingMatchingCard(s.deckspcostfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
58+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
59+
local sc=Duel.SelectMatchingCard(tp,s.deckspcostfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
60+
e:SetLabel(sc:GetOriginalRace(),sc:GetOriginalAttribute(),sc:GetOriginalLevel())
61+
Duel.Remove(sc,POS_FACEUP,REASON_COST)
62+
end
63+
function s.decksptg(e,tp,eg,ep,ev,re,r,rp,chk)
64+
if chk==0 then return true end
65+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
66+
end
67+
function s.deckspop(e,tp,eg,ep,ev,re,r,rp)
68+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
69+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
70+
local rac,att,lvl=e:GetLabel()
71+
local g=Duel.SelectMatchingCard(tp,s.deckspfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,rac,att,lvl)
72+
if #g>0 then
73+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
74+
end
75+
end

0 commit comments

Comments
 (0)