Skip to content

Commit c998c19

Browse files
authored
Added new card scripts
1 parent 9deb98e commit c998c19

2 files changed

Lines changed: 143 additions & 0 deletions

File tree

pre-release/c101302037.lua

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
--サイキッカー・オラクル
2+
--Axon Kicker Oracle
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Fusion Materials: 1 Psychic monster + 1 Synchro, Xyz, or Link Monster
8+
Fusion.AddProcMix(c,true,true,aux.FilterBoolFunctionEx(Card.IsRace,RACE_PSYCHIC),aux.FilterBoolFunctionEx(Card.IsType,TYPE_SYNCHRO|TYPE_XYZ|TYPE_LINK))
9+
--After this card is Fusion Summoned, it gains 1000 ATK for each Synchro, Xyz, and Link Monster used as it material until the end of the next turn
10+
local e0=Effect.CreateEffect(c)
11+
e0:SetType(EFFECT_TYPE_SINGLE)
12+
e0:SetCode(EFFECT_MATERIAL_CHECK)
13+
e0:SetValue(function(e,c) e:SetLabel(c:GetMaterial():FilterCount(Card.IsType,nil,TYPE_SYNCHRO|TYPE_XYZ|TYPE_LINK)) end)
14+
c:RegisterEffect(e0)
15+
local e1=Effect.CreateEffect(c)
16+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
17+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
18+
e1:SetCondition(function(e) return e:GetHandler():IsFusionSummoned() end)
19+
e1:SetOperation(function(e) e:GetHandler():UpdateAttack(e0:GetLabel()*1000,RESETS_STANDARD_DISABLE_PHASE_END,nil,2) end)
20+
c:RegisterEffect(e1)
21+
--Negate an opponent's Special Summon and banish that monster(s)
22+
local e2=Effect.CreateEffect(c)
23+
e2:SetDescription(aux.Stringid(id,0))
24+
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_REMOVE)
25+
e2:SetType(EFFECT_TYPE_QUICK_O)
26+
e2:SetCode(EVENT_SPSUMMON)
27+
e2:SetRange(LOCATION_MZONE)
28+
e2:SetCountLimit(1,id)
29+
e2:SetCondition(function(e,tp,eg,ep) return ep==1-tp and Duel.GetCurrentChain()==0 end)
30+
e2:SetTarget(s.negsumtg)
31+
e2:SetOperation(s.negsumop)
32+
c:RegisterEffect(e2)
33+
--Special Summon this card
34+
local e3=Effect.CreateEffect(c)
35+
e3:SetDescription(aux.Stringid(id,1))
36+
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
37+
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
38+
e3:SetProperty(EFFECT_FLAG_DELAY)
39+
e3:SetCode(EVENT_TO_GRAVE)
40+
e3:SetCountLimit(1,{id,1})
41+
e3:SetCondition(function(e) local c=e:GetHandler() return c:IsFusionSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end)
42+
e3:SetCost(s.spcost)
43+
e3:SetTarget(s.sptg)
44+
e3:SetOperation(s.spop)
45+
c:RegisterEffect(e3)
46+
end
47+
s.miracle_synchro_fusion=true
48+
s.listed_series={SET_TELEPORT}
49+
function s.negsumtg(e,tp,eg,ep,ev,re,r,rp,chk)
50+
if chk==0 then return eg:IsExists(Card.IsAbleToRemove,1,nil) end
51+
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,#eg,tp,0)
52+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,#eg,tp,0)
53+
end
54+
function s.negsumop(e,tp,eg,ep,ev,re,r,rp)
55+
Duel.NegateSummon(eg)
56+
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
57+
end
58+
function s.spcostfilter(c)
59+
return c:IsSetCard(SET_TELEPORT) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) and c:IsAbleToRemoveAsCost()
60+
end
61+
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
62+
if chk==0 then return Duel.IsExistingMatchingCard(s.spcostfilter,tp,LOCATION_GRAVE,0,1,nil) end
63+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
64+
local g=Duel.SelectMatchingCard(tp,s.spcostfilter,tp,LOCATION_GRAVE,0,1,1,nil)
65+
Duel.Remove(g,POS_FACEUP,REASON_COST)
66+
end
67+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
68+
local c=e:GetHandler()
69+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
70+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
71+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
72+
end
73+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
74+
local c=e:GetHandler()
75+
if c:IsRelateToEffect(e) then
76+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
77+
end
78+
end

pre-release/c101302042.lua

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
--静寂のサイコソーサレス
2+
--Serene Psychic Sorceress
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Synchro Summon procedure: 1 Tuner + 1+ non-Tuner monsters
8+
Synchro.AddProcedure(c,nil,1,1,Synchro.NonTuner(nil),1,99)
9+
--Set 1 "Teleport" Normal or Quick-Play Spell from your Deck, GY, or banishment
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetDescription(aux.Stringid(id,0))
12+
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
13+
e1:SetProperty(EFFECT_FLAG_DELAY)
14+
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
15+
e1:SetCountLimit(1,id)
16+
e1:SetCondition(function(e) return e:GetHandler():IsSynchroSummoned() end)
17+
e1:SetCost(Cost.PayLP(1000))
18+
e1:SetTarget(s.settg)
19+
e1:SetOperation(s.setop)
20+
c:RegisterEffect(e1)
21+
--Return 1 card your opponent controls to the hand
22+
local e2=Effect.CreateEffect(c)
23+
e2:SetDescription(aux.Stringid(id,1))
24+
e2:SetCategory(CATEGORY_TOHAND)
25+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
26+
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
27+
e2:SetCode(EVENT_TO_GRAVE)
28+
e2:SetCountLimit(1,{id,1})
29+
e2:SetCondition(function(e) local c=e:GetHandler() return c:IsSynchroSummoned() and c:IsPreviousLocation(LOCATION_MZONE) end)
30+
e2:SetTarget(s.rthtg)
31+
e2:SetOperation(s.rthop)
32+
c:RegisterEffect(e2)
33+
end
34+
s.listed_series={SET_TELEPORT}
35+
function s.setfilter(c)
36+
return c:IsSetCard(SET_TELEPORT) and (c:IsNormalSpell() or c:IsQuickPlaySpell()) and c:IsSSetable() and (c:IsFaceup() or not c:IsLocation(LOCATION_REMOVED))
37+
end
38+
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
39+
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil) end
40+
Duel.SetPossibleOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
41+
end
42+
function s.setop(e,tp,eg,ep,ev,re,r,rp)
43+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
44+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil)
45+
if #g>0 then
46+
Duel.SSet(tp,g)
47+
end
48+
end
49+
function s.target2con(c)
50+
return c:IsRace(RACE_PSYCHIC) and c:IsType(TYPE_FUSION|TYPE_SYNCHRO) and c:IsFaceup()
51+
end
52+
function s.rthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
53+
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
54+
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
55+
local ct=Duel.IsExistingMatchingCard(s.target2con,tp,LOCATION_MZONE,0,1,nil) and 2 or 1
56+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
57+
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,ct,nil)
58+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0)
59+
end
60+
function s.rthop(e,tp,eg,ep,ev,re,r,rp)
61+
local tg=Duel.GetTargetCards(e)
62+
if #tg>0 then
63+
Duel.SendtoHand(tg,nil,REASON_EFFECT)
64+
end
65+
end

0 commit comments

Comments
 (0)