Skip to content

Commit 2b8e2f7

Browse files
authored
Added new card scripts
1 parent 6e24144 commit 2b8e2f7

File tree

3 files changed

+122
-0
lines changed

3 files changed

+122
-0
lines changed

pre-release/c100201001.lua

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
--契約を結びし竜の戦士
2+
--Dragonic Warrior
3+
local s,id=GetID()
4+
function s.initial_effect(c)
5+
--Special Summon 1 Level 4 or lower Dragon monster from your hand or Deck, except "Dragonic Warrior", but its effects are negated
6+
local e1=Effect.CreateEffect(c)
7+
e1:SetDescription(aux.Stringid(id,0))
8+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
9+
e1:SetType(EFFECT_TYPE_IGNITION)
10+
e1:SetRange(LOCATION_MZONE)
11+
e1:SetCountLimit(1,id)
12+
e1:SetCost(Cost.Discard(function(c,e,tp) return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,c,e,tp) end))
13+
e1:SetTarget(s.sptg)
14+
e1:SetOperation(s.spop)
15+
c:RegisterEffect(e1)
16+
end
17+
s.listed_names={id}
18+
function s.spfilter(c,e,tp)
19+
return c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and not c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
20+
end
21+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
22+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0
23+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp) end
24+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK)
25+
end
26+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
27+
if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=0 then return end
28+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
29+
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp):GetFirst()
30+
if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
31+
--Negate its effects
32+
sc:NegateEffects(e:GetHandler())
33+
end
34+
Duel.SpecialSummonComplete()
35+
end

pre-release/c100201002.lua

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
--アイン・ロイド
2+
--Einroid
3+
local s,id=GetID()
4+
function s.initial_effect(c)
5+
--Send 2 Level 4 or lower Machine monsters from your Deck to the GY
6+
local e1=Effect.CreateEffect(c)
7+
e1:SetDescription(aux.Stringid(id,0))
8+
e1:SetCategory(CATEGORY_TOGRAVE)
9+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
10+
e1:SetProperty(EFFECT_FLAG_DELAY)
11+
e1:SetCode(EVENT_DESTROYED)
12+
e1:SetCountLimit(1,id)
13+
e1:SetCondition(function(e) return e:GetHandler():IsReason(REASON_BATTLE|REASON_EFFECT) end)
14+
e1:SetTarget(s.tgtg)
15+
e1:SetOperation(s.tgop)
16+
c:RegisterEffect(e1)
17+
end
18+
function s.tgfilter(c,e,tp)
19+
return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave()
20+
end
21+
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
22+
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,2,nil) end
23+
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK)
24+
end
25+
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
26+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
27+
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,2,2,nil)
28+
if #g==2 then
29+
Duel.SendtoGrave(g,REASON_EFFECT)
30+
end
31+
end

pre-release/c100201003.lua

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
--妖魔ヌリカベ
2+
--Nurikabe
3+
local s,id=GetID()
4+
function s.initial_effect(c)
5+
--Special Summon both 1 other Zombie monster from your GY and this card, but their effects are negated, also banish them when they leave the field
6+
local e1=Effect.CreateEffect(c)
7+
e1:SetDescription(aux.Stringid(id,0))
8+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
9+
e1:SetType(EFFECT_TYPE_IGNITION)
10+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
11+
e1:SetRange(LOCATION_GRAVE)
12+
e1:SetCountLimit(1,id)
13+
e1:SetCondition(aux.exccon)
14+
e1:SetCost(Cost.PayLP(1000))
15+
e1:SetTarget(s.sptg)
16+
e1:SetOperation(s.spop)
17+
c:RegisterEffect(e1)
18+
end
19+
function s.spfilter(c,e,tp)
20+
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
21+
end
22+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
23+
local c=e:GetHandler()
24+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc~=c and s.spfilter(chkc,e,tp) end
25+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>=2
26+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
27+
and not Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT)
28+
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end
29+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
30+
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp)
31+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g+c,2,tp,0)
32+
end
33+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
34+
if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=2 or Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then return end
35+
local c=e:GetHandler()
36+
local tc=Duel.GetFirstTarget()
37+
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
38+
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
39+
for sc in Group.FromCards(c,tc):Iter() do
40+
if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
41+
--Negate its effects
42+
sc:NegateEffects(c)
43+
--Banish it when it leaves the field
44+
local e1=Effect.CreateEffect(c)
45+
e1:SetDescription(3300)
46+
e1:SetType(EFFECT_TYPE_SINGLE)
47+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
48+
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
49+
e1:SetValue(LOCATION_REMOVED)
50+
e1:SetReset(RESET_EVENT|RESETS_REDIRECT)
51+
sc:RegisterEffect(e1,true)
52+
end
53+
end
54+
end
55+
Duel.SpecialSummonComplete()
56+
end

0 commit comments

Comments
 (0)