Skip to content

Commit 4f977bc

Browse files
authored
Added new card scripts
1 parent 1d69120 commit 4f977bc

File tree

5 files changed

+414
-0
lines changed

5 files changed

+414
-0
lines changed

pre-release/c101303026.lua

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
--蒼穹を睨めるダーク
2+
--Dark Staring at the Blue Sky
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetProperty(EFFECT_FLAG_DELAY,EFFECT_FLAG2_CHECK_SIMULTANEOUS)
12+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
13+
e1:SetRange(LOCATION_GRAVE)
14+
e1:SetCountLimit(1,{id,0})
15+
e1:SetCondition(s.spcon)
16+
e1:SetTarget(s.sptg)
17+
e1:SetOperation(s.spop)
18+
c:RegisterEffect(e1)
19+
--Negate that monster effect that includes an effect that Special Summons a monster(s), and if you do, destroy that card
20+
local e2=Effect.CreateEffect(c)
21+
e2:SetDescription(aux.Stringid(id,1))
22+
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
23+
e2:SetType(EFFECT_TYPE_QUICK_O)
24+
e2:SetCode(EVENT_CHAINING)
25+
e2:SetRange(LOCATION_MZONE)
26+
e2:SetCountLimit(1,{id,1})
27+
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return re:IsMonsterEffect() and re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) and Duel.IsChainDisablable(ev) end)
28+
e2:SetCost(s.discost)
29+
e2:SetTarget(s.distg)
30+
e2:SetOperation(s.disop)
31+
c:RegisterEffect(e2)
32+
--Return 1 of your other banished monsters to the GY
33+
local e3=Effect.CreateEffect(c)
34+
e3:SetDescription(aux.Stringid(id,2))
35+
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
36+
e3:SetCode(EVENT_PHASE+PHASE_END)
37+
e3:SetRange(LOCATION_REMOVED)
38+
e3:SetCountLimit(1,{id,2})
39+
e3:SetCondition(function(e) return e:GetHandler():GetTurnID()==Duel.GetTurnCount() end)
40+
e3:SetTarget(s.rtgtg)
41+
e3:SetOperation(s.rtgop)
42+
c:RegisterEffect(e3)
43+
end
44+
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
45+
return rp==1-tp and re and re:IsActivated() and re:IsMonsterEffect()
46+
and eg:IsExists(Card.IsSummonLocation,1,nil,LOCATION_DECK|LOCATION_EXTRA)
47+
end
48+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
49+
local c=e:GetHandler()
50+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
51+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
52+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
53+
end
54+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
55+
local c=e:GetHandler()
56+
if c:IsRelateToEffect(e) then
57+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
58+
end
59+
end
60+
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
61+
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,nil) end
62+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
63+
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,nil)
64+
Duel.Remove(g,POS_FACEUP,REASON_COST)
65+
end
66+
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
67+
if chk==0 then return true end
68+
local rc=re:GetHandler()
69+
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,tp,0)
70+
if rc:IsDestructable() and rc:IsRelateToEffect(re) then
71+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,tp,0)
72+
end
73+
end
74+
function s.disop(e,tp,eg,ep,ev,re,r,rp)
75+
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
76+
Duel.Destroy(eg,REASON_EFFECT)
77+
end
78+
end
79+
function s.rtgtg(e,tp,eg,ep,ev,re,r,rp,chk)
80+
if chk==0 then return Duel.IsExistingMatchingCard(aux.FaceupFilter(Card.IsMonster),tp,LOCATION_REMOVED,0,1,e:GetHandler()) end
81+
end
82+
function s.rtgop(e,tp,eg,ep,ev,re,r,rp)
83+
local c=e:GetHandler()
84+
local exc=c:IsRelateToEffect(e) and c or nil
85+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOGRAVE)
86+
local g=Duel.SelectMatchingCard(tp,aux.FaceupFilter(Card.IsMonster),tp,LOCATION_REMOVED,0,1,1,exc)
87+
if #g>0 then
88+
Duel.HintSelection(g)
89+
Duel.SendtoGrave(g,REASON_EFFECT)
90+
end
91+
end

pre-release/c101303030.lua

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
--ファースト・ペンギン
2+
--First Penguin
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--If you control no face-up monsters, you can Special Summon this card (from your hand), and if you do, it is treated as a Tuner
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.selfspcon)
14+
e1:SetOperation(s.selfspop)
15+
c:RegisterEffect(e1)
16+
--Add 1 WATER monster with the same Type as the revealed monster, but 1 Level lower, from your Deck to your hand, then you can change this card to face-down Defense Position, also you cannot Special Summon from the Extra Deck for the rest of this turn, except WATER monsters
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_POSITION)
20+
e2:SetType(EFFECT_TYPE_IGNITION)
21+
e2:SetRange(LOCATION_MZONE)
22+
e2:SetCountLimit(1,id)
23+
e2:SetCost(Cost.AND(Cost.Discard(),Cost.Reveal(s.revealfilter,false,1,1,function(e,tp,g) local sc=g:GetFirst() e:SetLabel(sc:GetRace(),sc:GetLevel()-1) end,LOCATION_EXTRA)))
24+
e2:SetTarget(s.thtg)
25+
e2:SetOperation(s.thop)
26+
c:RegisterEffect(e2)
27+
end
28+
function s.selfspcon(e,c)
29+
if c==nil then return true end
30+
local tp=e:GetHandlerPlayer()
31+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
32+
and not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
33+
end
34+
function s.selfspop(e,tp,eg,ep,ev,re,r,rp,c)
35+
--It is treated as a Tuner
36+
local e1=Effect.CreateEffect(c)
37+
e1:SetType(EFFECT_TYPE_SINGLE)
38+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
39+
e1:SetCode(EFFECT_ADD_TYPE)
40+
e1:SetValue(TYPE_TUNER)
41+
e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TOFIELD))
42+
c:RegisterEffect(e1)
43+
end
44+
function s.revealfilter(c,e,tp)
45+
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsSynchroMonster() and not c:IsLevel(1) and not c:IsPublic()
46+
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetRace(),c:GetLevel()-1)
47+
end
48+
function s.thfilter(c,race,lv)
49+
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(race) and c:IsLevel(lv) and c:IsAbleToHand()
50+
end
51+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
52+
if chk==0 then return true end
53+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
54+
Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,e:GetHandler(),1,tp,0)
55+
end
56+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
57+
local c=e:GetHandler()
58+
local race,lv=e:GetLabel()
59+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
60+
local sc=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,race,lv):GetFirst()
61+
if sc and Duel.SendtoHand(sc,nil,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_HAND) then
62+
Duel.ConfirmCards(1-tp,sc)
63+
Duel.ShuffleHand(tp)
64+
if c:IsRelateToEffect(e) and c:IsCanTurnSet() and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
65+
Duel.BreakEffect()
66+
Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE)
67+
end
68+
end
69+
--You cannot Special Summon from the Extra Deck for the rest of this turn, except WATER monsters
70+
local e1=Effect.CreateEffect(c)
71+
e1:SetDescription(aux.Stringid(id,3))
72+
e1:SetType(EFFECT_TYPE_FIELD)
73+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
74+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
75+
e1:SetTargetRange(1,0)
76+
e1:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsAttribute(ATTRIBUTE_WATER) end)
77+
e1:SetReset(RESET_PHASE|PHASE_END)
78+
Duel.RegisterEffect(e1,tp)
79+
--"Clock Lizard" check
80+
aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalAttribute(ATTRIBUTE_WATER) end)
81+
end

pre-release/c101303077.lua

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
--禁断儀式術
2+
--Forbidden Ritual Art
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Ritual Summon 1 Ritual Monster from your GY, by banishing monsters from your GY whose total Levels equal its Level, but destroy it during the End Phase
7+
local e1=Ritual.AddProcEqual({
8+
handler=c,
9+
location=LOCATION_GRAVE,
10+
matfilter=function(c) return c:IsLocation(LOCATION_GRAVE) end,
11+
extrafil=s.rextra,
12+
extratg=s.extratg,
13+
stage2=s.stage2
14+
})
15+
e1:SetCategory(e1:GetCategory()+CATEGORY_REMOVE)
16+
e1:SetCountLimit(1,{id,0})
17+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
18+
c:RegisterEffect(e1)
19+
--Apply an "once this turn, when you Ritual Summon with a card effect that requires use of monster Tributes, you can also banish Ritual Monsters from your GY as monsters used for the Ritual Summon" effect
20+
local e2=Effect.CreateEffect(c)
21+
e2:SetType(EFFECT_TYPE_QUICK_O)
22+
e2:SetCode(EVENT_FREE_CHAIN)
23+
e2:SetRange(LOCATION_GRAVE)
24+
e2:SetCountLimit(1,{id,1})
25+
e2:SetCost(Cost.SelfBanish)
26+
e2:SetOperation(s.effop)
27+
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
28+
c:RegisterEffect(e2)
29+
end
30+
function s.rextra(e,tp,eg,ep,ev,re,r,rp,chk)
31+
if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then
32+
return Duel.GetMatchingGroup(aux.AND(Card.HasLevel,Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil)
33+
end
34+
end
35+
function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk)
36+
if chk==0 then return true end
37+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
38+
end
39+
function s.stage2(mat,e,tp,eg,ep,ev,re,r,rp,rc)
40+
--Destroy it during the End Phase
41+
aux.DelayedOperation(rc,PHASE_END,id,e,tp,function(ag) Duel.Destroy(ag,REASON_EFFECT) end,nil,0,0,aux.Stringid(id,2))
42+
end
43+
function s.effop(e,tp,eg,ep,ev,re,r,rp)
44+
local c=e:GetHandler()
45+
aux.RegisterClientHint(c,0,tp,1,0,aux.Stringid(id,3))
46+
--Once this turn, when you Ritual Summon with a card effect that requires use of monster Tributes, you can also banish Ritual Monsters from your GY as monsters used for the Ritual Summon
47+
local e1=Effect.CreateEffect(c)
48+
e1:SetType(EFFECT_TYPE_FIELD)
49+
e1:SetCode(EFFECT_EXTRA_RITUAL_MATERIAL)
50+
e1:SetCountLimit(1,id)
51+
e1:SetTargetRange(LOCATION_GRAVE,0)
52+
e1:SetCondition(function(e) return not Duel.HasFlagEffect(tp,id) end)
53+
e1:SetTarget(function(e,c) return c:IsRitualMonster() and c:IsAbleToRemove() end)
54+
e1:SetValue(1)
55+
Duel.RegisterEffect(e1,tp)
56+
end

pre-release/c101303079.lua

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
--舌先減少
2+
--Tip of the Tongue Reduction
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Negate that opponent's effect that was activated by declaring exactly 1 card name, then you can add 1 card with that name from your Deck to your hand
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_TOHAND+CATEGORY_SEARCH)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_CHAINING)
12+
e1:SetCondition(s.discon)
13+
e1:SetTarget(s.distg)
14+
e1:SetOperation(s.disop)
15+
c:RegisterEffect(e1)
16+
--Make 1 face-up monster your opponent controls lose 500 ATK
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_ATKCHANGE)
20+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
21+
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
22+
e2:SetCode(EVENT_DESTROYED)
23+
e2:SetCondition(s.atkcon)
24+
e2:SetTarget(s.atktg)
25+
e2:SetOperation(s.atkop)
26+
c:RegisterEffect(e2)
27+
end
28+
function s.discon(e,tp,eg,ep,ev,re,r,rp)
29+
local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_ANNOUNCE)
30+
return rp==1-tp and ex and cv&(ANNOUNCE_CARD|ANNOUNCE_CARD_FILTER)>0 and Duel.IsChainDisablable(ev)
31+
end
32+
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk)
33+
if chk==0 then return true end
34+
Duel.SetPossibleOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
35+
end
36+
function s.thfilter(c,code)
37+
return c:IsCode(code) and c:IsAbleToHand()
38+
end
39+
function s.disop(e,tp,eg,ep,ev,re,r,rp)
40+
if Duel.NegateEffect(ev) then
41+
local declared_card=Duel.GetChainInfo(ev,CHAININFO_TARGET_PARAM)
42+
if Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,declared_card)
43+
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
44+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
45+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,declared_card)
46+
if #g>0 then
47+
Duel.BreakEffect()
48+
Duel.SendtoHand(g,nil,REASON_EFFECT)
49+
Duel.ConfirmCards(1-tp,g)
50+
end
51+
end
52+
end
53+
end
54+
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
55+
local c=e:GetHandler()
56+
return c:IsPreviousPosition(POS_FACEDOWN) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
57+
and rp==1-tp and c:IsReason(REASON_EFFECT)
58+
end
59+
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
60+
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
61+
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
62+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATKDEF)
63+
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
64+
end
65+
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
66+
local tc=Duel.GetFirstTarget()
67+
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
68+
--It loses 500 ATK
69+
tc:UpdateAttack(-500,nil,e:GetHandler())
70+
end
71+
end

0 commit comments

Comments
 (0)