Skip to content

Commit 3297712

Browse files
authored
Added new card scripts
1 parent 476690e commit 3297712

6 files changed

Lines changed: 495 additions & 0 deletions

File tree

pre-release/c100457103.lua

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
--冥府よりの使者
2+
--Emissaries from Darkness
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If you take battle or effect damage: You can Special Summon this card from your hand, and if you do, gain 2000 LP, then you can apply 1 of these effects
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RECOVER+CATEGORY_DESTROY)
10+
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
12+
e1:SetCode(EVENT_DAMAGE)
13+
e1:SetRange(LOCATION_HAND)
14+
e1:SetCountLimit(1,{id,0})
15+
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
16+
return ep==tp and r&(REASON_BATTLE|REASON_EFFECT)>0
17+
end)
18+
e1:SetTarget(s.sptg)
19+
e1:SetOperation(s.spop)
20+
c:RegisterEffect(e1)
21+
--During the End Phase, if this card was Special Summoned this turn: You can target 1 Trap in your GY; Set it
22+
local e2=Effect.CreateEffect(c)
23+
e2:SetDescription(aux.Stringid(id,1))
24+
e2:SetCategory(CATEGORY_SET)
25+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
26+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
27+
e2:SetCode(EVENT_PHASE+PHASE_END)
28+
e2:SetRange(LOCATION_MZONE)
29+
e2:SetCountLimit(1,{id,1})
30+
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
31+
return e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN)
32+
end)
33+
e2:SetTarget(s.settg)
34+
e2:SetOperation(s.setop)
35+
c:RegisterEffect(e2)
36+
end
37+
s.listed_names={id}
38+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
39+
local c=e:GetHandler()
40+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
41+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
42+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
43+
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000)
44+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE)
45+
Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_MZONE)
46+
end
47+
function s.spfilter(c,e,tp)
48+
return c:IsCode(id) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
49+
end
50+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
51+
local c=e:GetHandler()
52+
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
53+
and Duel.Recover(tp,2000,REASON_EFFECT)>0 then
54+
--● Special Summon 1 "Emissaries from Darkness" from your hand, Deck, or GY
55+
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
56+
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,nil,e,tp)
57+
--● Destroy up to 2 Attack Position monsters your opponent controls
58+
local b2=Duel.IsExistingMatchingCard(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil)
59+
if not ((b1 or b2) and Duel.SelectYesNo(tp,aux.Stringid(id,2))) then return end
60+
local op=Duel.SelectEffect(tp,
61+
{b1,aux.Stringid(id,3)},
62+
{b2,aux.Stringid(id,4)})
63+
if op==1 then
64+
--● Special Summon 1 "Emissaries from Darkness" from your hand, Deck, or GY
65+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
66+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND|LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil,e,tp)
67+
if #g>0 then
68+
Duel.BreakEffect()
69+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
70+
end
71+
elseif op==2 then
72+
--● Destroy up to 2 Attack Position monsters your opponent controls
73+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
74+
local g=Duel.SelectMatchingCard(tp,Card.IsAttackPos,tp,0,LOCATION_MZONE,1,2,nil)
75+
if #g>0 then
76+
Duel.HintSelection(g)
77+
Duel.BreakEffect()
78+
Duel.Destroy(g,REASON_EFFECT)
79+
end
80+
end
81+
end
82+
end
83+
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
84+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsTrap() and chkc:IsSSetable() end
85+
if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsTrap,Card.IsSSetable),tp,LOCATION_GRAVE,0,1,nil) end
86+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
87+
local g=Duel.SelectTarget(tp,aux.AND(Card.IsTrap,Card.IsSSetable),tp,LOCATION_GRAVE,0,1,1,nil)
88+
Duel.SetOperationInfo(0,CATEGORY_SET,g,1,tp,0)
89+
end
90+
function s.setop(e,tp,eg,ep,ev,re,r,rp)
91+
local tc=Duel.GetFirstTarget()
92+
if tc:IsRelateToEffect(e) then
93+
Duel.SSet(tp,tc)
94+
end
95+
end

pre-release/c101402031.lua

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
--ミズティックコール
2+
--Misstic Call
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If this card is in your hand or GY: You can discard 1 other Spellcaster monster or 1 Spell/Trap; Special Summon this card, but banish it when it leaves the field
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_HAND|LOCATION_GRAVE)
12+
e1:SetCountLimit(1,{id,0})
13+
e1:SetCost(Cost.Discard(s.selfspcostfilter,true))
14+
e1:SetTarget(s.selfsptg)
15+
e1:SetOperation(s.selfspop)
16+
c:RegisterEffect(e1)
17+
-- If this card is Normal or Special Summoned: You can banish 1 Level 4 Spellcaster monster from your Deck, and if you do, during the End Phase of this turn, add it to your hand or Special Summon it
18+
local e2a=Effect.CreateEffect(c)
19+
e2a:SetDescription(aux.Stringid(id,1))
20+
e2a:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
21+
e2a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
22+
e2a:SetProperty(EFFECT_FLAG_DELAY)
23+
e2a:SetCode(EVENT_SUMMON_SUCCESS)
24+
e2a:SetCountLimit(1,{id,1})
25+
e2a:SetTarget(s.bantg)
26+
e2a:SetOperation(s.banop)
27+
c:RegisterEffect(e2a)
28+
local e2b=e2a:Clone()
29+
e2b:SetCode(EVENT_SPSUMMON_SUCCESS)
30+
c:RegisterEffect(e2b)
31+
end
32+
function s.selfspcostfilter(c)
33+
return c:IsRace(RACE_SPELLCASTER) or c:IsSpellTrap()
34+
end
35+
function s.selfsptg(e,tp,eg,ep,ev,re,r,rp,chk)
36+
local c=e:GetHandler()
37+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
38+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
39+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
40+
end
41+
function s.selfspop(e,tp,eg,ep,ev,re,r,rp)
42+
local c=e:GetHandler()
43+
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
44+
--Banish it when it leaves the field
45+
local e1=Effect.CreateEffect(c)
46+
e1:SetDescription(3300)
47+
e1:SetType(EFFECT_TYPE_SINGLE)
48+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
49+
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
50+
e1:SetValue(LOCATION_REMOVED)
51+
e1:SetReset(RESET_EVENT|RESETS_REDIRECT)
52+
c:RegisterEffect(e1,true)
53+
end
54+
end
55+
function s.banfilter(c)
56+
return c:IsLevel(4) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToRemove()
57+
end
58+
function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk)
59+
if chk==0 then return Duel.IsExistingMatchingCard(s.banfilter,tp,LOCATION_DECK,0,1,nil) end
60+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
61+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
62+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
63+
end
64+
function s.banop(e,tp,eg,ep,ev,re,r,rp)
65+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
66+
local rg=Duel.SelectMatchingCard(tp,s.banfilter,tp,LOCATION_DECK,0,1,1,nil)
67+
if #rg==0 or Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)==0 or not rg:GetFirst():IsLocation(LOCATION_REMOVED) then return end
68+
--During the End Phase of this turn, add it to your hand or Special Summon it
69+
aux.DelayedOperation(rg,PHASE_END,id,e,tp,function(ag)
70+
aux.ToHandOrElse(ag:GetFirst(),tp,
71+
function(tc)
72+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
73+
end,
74+
function(tc)
75+
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
76+
end,
77+
aux.Stringid(id,2)
78+
)
79+
end)
80+
end

pre-release/c101402034.lua

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
--カートゥーン・シェード
2+
--Cartoon Shade
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Must be Special Summoned (from your hand) while a face-up monster that cannot be Normal Summoned/Set is on the field
8+
local e0=Effect.CreateEffect(c)
9+
e0:SetDescription(aux.Stringid(id,0))
10+
e0:SetType(EFFECT_TYPE_FIELD)
11+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
12+
e0:SetCode(EFFECT_SPSUMMON_PROC)
13+
e0:SetRange(LOCATION_HAND)
14+
e0:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
15+
e0:SetCondition(function(e,c)
16+
if c==nil then return true end
17+
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
18+
and Duel.IsExistingMatchingCard(aux.FaceupFilter(aux.NOT(Card.IsSummonableCard)),0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
19+
end)
20+
c:RegisterEffect(e0)
21+
--If this card is Special Summoned: You can add 1 monster with 2000 ATK or DEF that cannot be Normal Summoned/Set from your Deck to your hand
22+
local e1=Effect.CreateEffect(c)
23+
e1:SetDescription(aux.Stringid(id,1))
24+
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
25+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
26+
e1:SetProperty(EFFECT_FLAG_DELAY)
27+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
28+
e1:SetTarget(s.thtg)
29+
e1:SetOperation(s.thop)
30+
c:RegisterEffect(e1)
31+
--If this card on the field is Tributed: You can target 1 card on the field, or you can target 2 if you control a monster with 2000 ATK or DEF; return that card(s) to the hand
32+
local e2=Effect.CreateEffect(c)
33+
e2:SetDescription(aux.Stringid(id,2))
34+
e2:SetCategory(CATEGORY_TOHAND)
35+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
36+
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
37+
e2:SetCode(EVENT_RELEASE)
38+
e2:SetCondition(function(e)
39+
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
40+
end)
41+
e2:SetTarget(s.retthtg)
42+
e2:SetOperation(s.retthop)
43+
c:RegisterEffect(e2)
44+
end
45+
function s.monsterwith2000ATKDEF(c)
46+
return c:IsAttack(2000) or c:IsDefense(2000)
47+
end
48+
function s.thfilter(c)
49+
return s.monsterwith2000ATKDEF(c) and not c:IsSummonableCard() and c:IsAbleToHand()
50+
end
51+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
52+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
53+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
54+
end
55+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
56+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
57+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
58+
if #g>0 then
59+
Duel.SendtoHand(g,nil,REASON_EFFECT)
60+
Duel.ConfirmCards(1-tp,g)
61+
end
62+
end
63+
function s.retthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
64+
if chkc then return chkc:IsOnField() and chkc:IsAbleToHand() end
65+
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
66+
local maxct=Duel.IsExistingMatchingCard(aux.FaceupFilter(s.monsterwith2000ATKDEF),tp,LOCATION_MZONE,0,1,nil) and 2 or 1
67+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
68+
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,maxct,nil)
69+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0)
70+
end
71+
function s.retthop(e,tp,eg,ep,ev,re,r,rp)
72+
local tg=Duel.GetTargetCards(e)
73+
if #tg>0 then
74+
Duel.SendtoHand(tg,nil,REASON_EFFECT)
75+
end
76+
end

pre-release/c101402078.lua

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
--祟リ紙ノ報イ
2+
--Cursed Paper Retribution
3+
--scripted by Naim
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Target 1 monster you control and 1 face-up card your opponent controls; destroy your monster, and if you do, negate the effects of that opponent's card until the end of this turn
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
12+
e1:SetCode(EVENT_FREE_CHAIN)
13+
e1:SetCountLimit(1,{id,0})
14+
e1:SetTarget(s.destg)
15+
e1:SetOperation(s.desop)
16+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
17+
c:RegisterEffect(e1)
18+
--If this Set card is sent to the GY: You can target 1 face-up card your opponent controls; negate its effects
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetDescription(aux.Stringid(id,1))
21+
e2:SetCategory(CATEGORY_DISABLE)
22+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
23+
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
24+
e2:SetCode(EVENT_TO_GRAVE)
25+
e2:SetCountLimit(1,{id,1})
26+
e2:SetCondition(s.negatecon)
27+
e2:SetTarget(s.negatetg)
28+
e2:SetOperation(s.negateop)
29+
c:RegisterEffect(e2)
30+
end
31+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
32+
if chkc then return false end
33+
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil)
34+
and Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end
35+
local g=Duel.GetTargetGroup(nil,tp,LOCATION_MZONE,0,nil)+Duel.GetTargetGroup(Card.IsNegatable,tp,0,LOCATION_ONFIELD,nil)
36+
local tg=aux.SelectUnselectGroup(g,e,tp,2,2,aux.dpcheck(Card.GetControler),1,tp,HINTMSG_TARGET)
37+
Duel.SetTargetCard(tg)
38+
local group_to_destroy,group_to_negate=tg:Split(Card.IsControler,nil,tp)
39+
e:GetChainData().group_to_destroy=group_to_destroy
40+
e:GetChainData().group_to_negate=group_to_negate
41+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,group_to_destroy,1,tp,0)
42+
Duel.SetOperationInfo(0,CATEGORY_DISABLE,group_to_negate,1,tp,0)
43+
end
44+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
45+
local tg=Duel.GetTargetCards(e)
46+
if #tg==0 then return end
47+
local destroy_tc=(tg&(e:GetChainData().group_to_destroy)):GetFirst()
48+
local negate_tc=(tg&(e:GetChainData().group_to_negate)):GetFirst()
49+
if destroy_tc and destroy_tc:IsControler(tp) and Duel.Destroy(destroy_tc,REASON_EFFECT)>0
50+
and negate_tc and negate_tc:IsControler(1-tp) and negate_tc:IsNegatable() then
51+
--Negate the effects of that opponent's card until the end of this turn
52+
negate_tc:NegateEffects(e:GetHandler(),RESET_PHASE|PHASE_END,true)
53+
end
54+
end
55+
function s.negatecon(e,tp,eg,ep,ev,re,r,rp)
56+
local c=e:GetHandler()
57+
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN)
58+
end
59+
function s.negatetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
60+
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsNegatable() end
61+
if chk==0 then return Duel.IsExistingTarget(Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,nil) end
62+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NEGATE)
63+
local g=Duel.SelectTarget(tp,Card.IsNegatable,tp,0,LOCATION_ONFIELD,1,1,nil)
64+
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0)
65+
end
66+
function s.negateop(e,tp,eg,ep,ev,re,r,rp)
67+
local tc=Duel.GetFirstTarget()
68+
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
69+
--Negate its effects
70+
tc:NegateEffects(e:GetHandler(),nil,true)
71+
end
72+
end

0 commit comments

Comments
 (0)