Skip to content

Commit cc01127

Browse files
authored
Added new card scripts
1 parent 48eaa30 commit cc01127

File tree

2 files changed

+138
-0
lines changed

2 files changed

+138
-0
lines changed

pre-release/c100348003.lua

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
--クロスロードランナー
2+
--Supersonic Chick
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card from your GY (if it was there when the card was sent) or hand (even if not) (but banish it when it leaves the field), then if "Junk Warrior" or another monster that mentions it is on the field, you can change all monsters your opponent controls with 1900 or more ATK to Defense Position, also you cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_POSITION)
10+
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
11+
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP,EFFECT_FLAG2_CHECK_SIMULTANEOUS)
12+
e1:SetCode(EVENT_TO_GRAVE)
13+
e1:SetRange(LOCATION_HAND|LOCATION_GRAVE)
14+
e1:SetCountLimit(1,id)
15+
e1:SetCondition(s.spcon)
16+
e1:SetTarget(s.sptg)
17+
e1:SetOperation(s.spop)
18+
c:RegisterEffect(e1)
19+
end
20+
s.listed_name={CARD_JUNK_WARRIOR}
21+
function s.spconfilter(c,tp)
22+
return c:IsType(TYPE_TUNER) and c:IsControler(tp)
23+
end
24+
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
25+
return eg:IsExists(s.spconfilter,1,nil,tp)
26+
end
27+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
28+
local c=e:GetHandler()
29+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
30+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
31+
and (c:IsLocation(LOCATION_HAND) or not eg:IsContains(c)) end
32+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
33+
Duel.SetPossibleOperationInfo(0,CATEGORY_POSITION,nil,1,1-tp,LOCATION_MZONE)
34+
end
35+
function s.posfilter(c)
36+
return c:IsAttackAbove(1900) and c:IsAttackPos() and c:IsFaceup() and c:IsCanChangePosition()
37+
end
38+
function s.junkwarriorfilter(c)
39+
return (c:IsCode(CARD_JUNK_WARRIOR) or (c:ListsCode(CARD_JUNK_WARRIOR) and c:IsMonster())) and c:IsFaceup()
40+
end
41+
function s.spop(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+
local g=Duel.GetMatchingGroup(s.posfilter,tp,0,LOCATION_MZONE,nil)
54+
if #g>0 and Duel.IsExistingMatchingCard(s.junkwarriorfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
55+
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
56+
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
57+
end
58+
end
59+
--You cannot Special Summon from the Extra Deck for the rest of this turn, except Synchro Monsters
60+
local e2=Effect.CreateEffect(c)
61+
e2:SetDescription(aux.Stringid(id,2))
62+
e2:SetType(EFFECT_TYPE_FIELD)
63+
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
64+
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
65+
e2:SetTargetRange(1,0)
66+
e2:SetTarget(function(e,c) return c:IsLocation(LOCATION_EXTRA) and not c:IsSynchroMonster() end)
67+
e2:SetReset(RESET_PHASE|PHASE_END)
68+
Duel.RegisterEffect(e2,tp)
69+
--"Clock Lizard" check
70+
aux.addTempLizardCheck(c,tp,function(e,c) return not c:IsOriginalType(TYPE_SYNCHRO) end)
71+
end

pre-release/c100444148.lua

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
--
2+
--Dragon Gate
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Xyz Summon procedure: 2 Level 6 monsters OR 1 Rank 3 or lower Xyz Monster you control
8+
Xyz.AddProcedure(c,nil,6,2,s.ovfilter,aux.Stringid(id,0),2,s.xyzop)
9+
--Cannot be used as material for an Xyz Summon the turn it was Xyz Summoned
10+
local e0=Effect.CreateEffect(c)
11+
e0:SetType(EFFECT_TYPE_SINGLE)
12+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
13+
e0:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
14+
e0:SetCondition(s.cannotxyzmatcon)
15+
e0:SetValue(1)
16+
c:RegisterEffect(e0)
17+
--Make this card able to attack all monsters your opponent controls, once each, also detach any number of materials from this card, and if you do, it gains 1000 ATK for each card type (Monster, Spell, or Trap) detached, and if it does, any monsters your opponent currently controls lose that much ATK
18+
local e1=Effect.CreateEffect(c)
19+
e1:SetDescription(aux.Stringid(id,1))
20+
e1:SetCategory(CATEGORY_ATKCHANGE)
21+
e1:SetType(EFFECT_TYPE_IGNITION)
22+
e1:SetRange(LOCATION_MZONE)
23+
e1:SetCountLimit(1)
24+
e1:SetTarget(s.atktg)
25+
e1:SetOperation(s.atkop)
26+
c:RegisterEffect(e1)
27+
end
28+
function s.ovfilter(c,tp,lc)
29+
return c:IsRankBelow(3) and c:IsType(TYPE_XYZ,lc,SUMMON_TYPE_XYZ,tp) and c:IsFaceup()
30+
end
31+
function s.xyzop(e,tp,chk)
32+
if chk==0 then return not Duel.HasFlagEffect(tp,id) end
33+
return Duel.RegisterFlagEffect(tp,id,RESET_PHASE|PHASE_END,EFFECT_FLAG_OATH,1)
34+
end
35+
function s.cannotxyzmatcon(e)
36+
local c=e:GetHandler()
37+
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsXyzSummoned()
38+
end
39+
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
40+
local c=e:GetHandler()
41+
if chk==0 then return c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
42+
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,c,1,tp,1000)
43+
end
44+
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
45+
local c=e:GetHandler()
46+
if not c:IsRelateToEffect(e) then return end
47+
--For the rest of this turn, this card can attack all monsters your opponent controls, once each
48+
local e1=Effect.CreateEffect(c)
49+
e1:SetDescription(aux.Stringid(id,2))
50+
e1:SetType(EFFECT_TYPE_SINGLE)
51+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
52+
e1:SetCode(EFFECT_ATTACK_ALL)
53+
e1:SetValue(1)
54+
e1:SetReset(RESETS_STANDARD_PHASE_END)
55+
c:RegisterEffect(e1)
56+
if c:RemoveOverlayCard(tp,1,c:GetOverlayCount(),REASON_EFFECT)>0 and c:IsFaceup() then
57+
local atk=1000*Duel.GetOperatedGroup():GetClassCount(Card.GetMainCardType)
58+
--It gains 1000 ATK for each card type (Monster, Spell, or Trap) detached
59+
if c:UpdateAttack(atk,RESETS_STANDARD_DISABLE_PHASE_END)==atk then
60+
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
61+
for tc in g:Iter() do
62+
--And if it does, any monsters your opponent currently controls lose that much ATK
63+
tc:UpdateAttack(-atk,RESETS_STANDARD_PHASE_END,c)
64+
end
65+
end
66+
end
67+
end

0 commit comments

Comments
 (0)