Skip to content

Commit bccec0c

Browse files
authored
Add files via upload
1 parent 27b89aa commit bccec0c

52 files changed

Lines changed: 4198 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

official/c13023431.lua

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
--JP name
2+
--Chevreuil, Hunting Scout of the Deep Forest
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
c:EnableReviveLimit()
7+
--Fusion Materials: 1 Level 5 or higher EARTH Warrior monster + 1 EARTH Warrior monster
8+
Fusion.AddProcMix(c,true,true,s.matfilter1,s.matfilter2)
9+
--Unaffected by your opponent's activated effects, during the Main Phase only
10+
local e1=Effect.CreateEffect(c)
11+
e1:SetType(EFFECT_TYPE_SINGLE)
12+
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
13+
e1:SetCode(EFFECT_IMMUNE_EFFECT)
14+
e1:SetRange(LOCATION_MZONE)
15+
e1:SetCondition(function() return Duel.IsMainPhase() end)
16+
e1:SetValue(function(e,te) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActivated() end)
17+
c:RegisterEffect(e1)
18+
--Your opponent's monsters that can attack must attack the monster you control with the highest ATK (their choice, if tied)
19+
local e2a=Effect.CreateEffect(c)
20+
e2a:SetType(EFFECT_TYPE_FIELD)
21+
e2a:SetCode(EFFECT_MUST_ATTACK)
22+
e2a:SetRange(LOCATION_MZONE)
23+
e2a:SetTargetRange(0,LOCATION_MZONE)
24+
c:RegisterEffect(e2a)
25+
local e2b=e2a:Clone()
26+
e2b:SetCode(EFFECT_MUST_ATTACK_MONSTER)
27+
e2b:SetValue(function(e,c) return Duel.GetMatchingGroup(Card.IsFaceup,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil):GetMaxGroup(Card.GetAttack):IsContains(c) end)
28+
c:RegisterEffect(e2b)
29+
--Special Summon 1 EARTH Warrior monster from your GY or banishment
30+
local e3=Effect.CreateEffect(c)
31+
e3:SetDescription(aux.Stringid(id,0))
32+
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
33+
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
34+
e3:SetCode(EVENT_BATTLE_DESTROYING)
35+
e3:SetRange(LOCATION_MZONE)
36+
e3:SetCountLimit(1,id)
37+
e3:SetCondition(s.spcon)
38+
e3:SetTarget(s.sptg)
39+
e3:SetOperation(s.spop)
40+
c:RegisterEffect(e3)
41+
end
42+
function s.matfilter1(c,fc,sumtype,tp)
43+
return c:IsLevelAbove(5) and s.matfilter2(c,fc,sumtype,tp)
44+
end
45+
function s.matfilter2(c,fc,sumtype,tp)
46+
return c:IsAttribute(ATTRIBUTE_EARTH,fc,sumtype,tp) and c:IsRace(RACE_WARRIOR,fc,sumtype,tp)
47+
end
48+
function s.spconfilter(c,tp)
49+
local bc=c:GetBattleTarget()
50+
if not bc:IsPreviousControler(1-tp) then return false end
51+
if c:IsRelateToBattle() then
52+
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsControler(tp)
53+
else
54+
return c:IsPreviousAttributeOnField(ATTRIBUTE_EARTH) and c:IsPreviousRaceOnField(RACE_WARRIOR)
55+
and c:IsPreviousControler(tp)
56+
end
57+
end
58+
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
59+
return eg:IsExists(s.spconfilter,1,e:GetHandler(),tp)
60+
end
61+
function s.spfilter(c,e,tp)
62+
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsFaceup()
63+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
64+
end
65+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
66+
if chk==0 then return Duel.GetMZoneCount(tp)>0
67+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,nil,e,tp) end
68+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE|LOCATION_REMOVED)
69+
end
70+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
71+
if Duel.GetMZoneCount(tp)<=0 then return end
72+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
73+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE|LOCATION_REMOVED,0,1,1,nil,e,tp)
74+
if #g>0 then
75+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
76+
end
77+
end

official/c16066654.lua

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
--JP name
2+
--R.B. Operation Test
3+
--Scripted by The Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--When this card is activated: You can target 1 Level 3 or higher "R.B." monster in your GY; Special Summon it
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetType(EFFECT_TYPE_ACTIVATE)
10+
e1:SetCode(EVENT_FREE_CHAIN)
11+
e1:SetCountLimit(1,id,EFFECT_COUNT_CODE_OATH)
12+
e1:SetTarget(s.target)
13+
e1:SetOperation(s.activate)
14+
c:RegisterEffect(e1)
15+
--Gain LP equal to the combined original ATK of the targeted "R.B." monsters, and if you do, return them to the hand/Extra Deck, then you can Special Summon 1 "R.B." monster from your hand
16+
local e2=Effect.CreateEffect(c)
17+
e2:SetDescription(aux.Stringid(id,1))
18+
e2:SetCategory(CATEGORY_RECOVER+CATEGORY_TOHAND+CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON)
19+
e2:SetType(EFFECT_TYPE_IGNITION)
20+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
21+
e2:SetRange(LOCATION_SZONE)
22+
e2:SetCountLimit(1,{id,1})
23+
e2:SetTarget(s.recthsptg)
24+
e2:SetOperation(s.recthspop)
25+
c:RegisterEffect(e2)
26+
end
27+
s.listed_series={SET_RB}
28+
function s.spfromgyfilter(c,e,tp)
29+
return c:IsLevelAbove(3) and c:IsSetCard(SET_RB) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
30+
end
31+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
32+
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfromgyfilter(chkc,e,tp) end
33+
if chk==0 then return true end
34+
if Duel.IsExistingTarget(s.spfromgyfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
35+
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
36+
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
37+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
38+
local g=Duel.SelectTarget(tp,s.spfromgyfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
39+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,0)
40+
else
41+
e:SetCategory(0)
42+
e:SetProperty(0)
43+
end
44+
end
45+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
46+
local tc=Duel.GetFirstTarget()
47+
if tc and tc:IsRelateToEffect(e) then
48+
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
49+
end
50+
end
51+
function s.recthfilter(c)
52+
return c:IsSetCard(SET_RB) and c:IsFaceup() and (c:IsAbleToHand() or c:IsAbleToExtra())
53+
end
54+
function s.recthsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
55+
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.recthfilter(chkc) end
56+
if chk==0 then return Duel.IsExistingTarget(s.recthfilter,tp,LOCATION_MZONE,0,1,nil) end
57+
local ct=Duel.GetTargetCount(s.recthfilter,tp,LOCATION_MZONE,0,nil)
58+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
59+
local g=Duel.SelectTarget(tp,s.recthfilter,tp,LOCATION_MZONE,0,1,ct,nil)
60+
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetSum(Card.GetBaseAttack))
61+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0)
62+
Duel.SetPossibleOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
63+
end
64+
function s.spfromhandfilter(c,e,tp)
65+
return c:IsSetCard(SET_RB) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
66+
end
67+
function s.recthspop(e,tp,eg,ep,ev,re,r,rp)
68+
local tg=Duel.GetTargetCards(e):Match(Card.IsFaceup,nil)
69+
if #tg==0 then return end
70+
local sum=tg:GetSum(Card.GetBaseAttack)
71+
if Duel.Recover(tp,sum,REASON_EFFECT)>0 and Duel.SendtoHand(tg,nil,REASON_EFFECT)>0 and Duel.GetMZoneCount(tp)>0
72+
and tg:FilterCount(Card.IsLocation,nil,LOCATION_HAND|LOCATION_EXTRA)>0
73+
and Duel.IsExistingMatchingCard(s.spfromhandfilter,tp,LOCATION_HAND,0,1,nil,e,tp) then
74+
Duel.ShuffleHand(tp)
75+
if not Duel.SelectYesNo(tp,aux.Stringid(id,3)) then return end
76+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
77+
local sg=Duel.SelectMatchingCard(tp,s.spfromhandfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
78+
if #sg>0 then
79+
Duel.BreakEffect()
80+
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
81+
end
82+
end
83+
end

official/c17188206.lua

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
--
2+
--R.B. Lambda Blade
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Send 1 "R.B." card from your Deck to the GY, except "R.B. Lambda Blade"
7+
local e1a=Effect.CreateEffect(c)
8+
e1a:SetDescription(aux.Stringid(id,0))
9+
e1a:SetCategory(CATEGORY_TOGRAVE)
10+
e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
11+
e1a:SetProperty(EFFECT_FLAG_DELAY)
12+
e1a:SetCode(EVENT_SUMMON_SUCCESS)
13+
e1a:SetCountLimit(1,id)
14+
e1a:SetTarget(s.tgtg)
15+
e1a:SetOperation(s.tgop)
16+
c:RegisterEffect(e1a)
17+
local e1b=e1a:Clone()
18+
e1b:SetCode(EVENT_SPSUMMON_SUCCESS)
19+
c:RegisterEffect(e1b)
20+
--Destroy this card, and if you do, take control of an opponent's monster, but destroy it during the End Phase card
21+
local e2=Effect.CreateEffect(c)
22+
e2:SetDescription(aux.Stringid(id,1))
23+
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_CONTROL)
24+
e2:SetType(EFFECT_TYPE_QUICK_O)
25+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
26+
e2:SetCode(EVENT_FREE_CHAIN)
27+
e2:SetRange(LOCATION_MZONE)
28+
e2:SetCountLimit(1,{id,1})
29+
e2:SetCondition(s.descon)
30+
e2:SetCost(Cost.PayLP(1400))
31+
e2:SetTarget(s.destg)
32+
e2:SetOperation(s.desop)
33+
e2:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
34+
c:RegisterEffect(e2)
35+
end
36+
s.listed_names={id}
37+
s.listed_series={SET_RB}
38+
function s.tgfilter(c)
39+
return c:IsSetCard(SET_RB) and c:IsAbleToGrave() and not c:IsCode(id)
40+
end
41+
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
42+
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
43+
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
44+
end
45+
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
46+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
47+
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
48+
if #g>0 then
49+
Duel.SendtoGrave(g,REASON_EFFECT)
50+
end
51+
end
52+
function s.desconfilter(c,ec,lg)
53+
return c:IsSetCard(SET_RB) and c:IsLinkMonster() and c:IsFaceup() and (lg:IsContains(c) or c:GetLinkedGroup():IsContains(ec))
54+
end
55+
function s.descon(e,tp,eg,ep,ev,re,r,rp)
56+
local c=e:GetHandler()
57+
return Duel.IsMainPhase(1-tp) and Duel.IsExistingMatchingCard(s.desconfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c,c:GetLinkedGroup())
58+
end
59+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
60+
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end
61+
local c=e:GetHandler()
62+
if chk==0 then return Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
63+
and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end
64+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
65+
local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil)
66+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,c,1,tp,0)
67+
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,0)
68+
end
69+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
70+
local c=e:GetHandler()
71+
local tc=Duel.GetFirstTarget()
72+
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0
73+
and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e)
74+
and tc:IsControler(1-tp) and Duel.GetControl(tc,tp) then
75+
--Destroy it during the End Phase
76+
aux.DelayedOperation(tc,PHASE_END,id,e,tp,function(ag) Duel.Destroy(ag,REASON_EFFECT) end,nil,0,0,aux.Stringid(id,2))
77+
end
78+
end

official/c18300894.lua

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
--JP name
2+
--Silk Bomb Moth
3+
--Scripted by Hatter
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon this card, and if you do, shuffle 1 WIND monster from your GY into the Deck
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_HAND)
12+
e1:SetCountLimit(1,id)
13+
e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(Card.IsAttribute,tp,LOCATION_GRAVE,0,2,nil,ATTRIBUTE_WIND) end)
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
c:RegisterEffect(e1)
17+
--Reveal the top card of your opponent's Deck, and apply the appropriate effect based on its card type
18+
local e2a=Effect.CreateEffect(c)
19+
e2a:SetDescription(aux.Stringid(id,1))
20+
e2a:SetCategory(CATEGORY_REMOVE)
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.rvtg)
26+
e2a:SetOperation(s.rvop)
27+
c:RegisterEffect(e2a)
28+
local e2b=e2a:Clone()
29+
e2b:SetCode(EVENT_SPSUMMON_SUCCESS)
30+
c:RegisterEffect(e2b)
31+
end
32+
function s.tdfilter(c)
33+
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsAbleToDeck()
34+
end
35+
function s.sptg(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)
39+
and Duel.IsExistingMatchingCard(s.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
40+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
41+
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
42+
end
43+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
44+
local c=e:GetHandler()
45+
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
46+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
47+
local g=Duel.SelectMatchingCard(tp,s.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
48+
if #g>0 then
49+
Duel.HintSelection(g)
50+
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
51+
end
52+
end
53+
end
54+
function s.rvtg(e,tp,eg,ep,ev,re,r,rp,chk)
55+
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end
56+
Duel.SetPossibleOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_DECK)
57+
end
58+
function s.rvop(e,tp,eg,ep,ev,re,r,rp)
59+
if Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return end
60+
Duel.DisableShuffleCheck()
61+
Duel.ConfirmDecktop(1-tp,1)
62+
local rvc=Duel.GetDecktopGroup(1-tp,1):GetFirst()
63+
if rvc:IsMonster() then
64+
--Place it in your opponent's Spell & Trap Zone as a face-up Continuous Spell
65+
if Duel.MoveToField(rvc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true) then
66+
--Treat it as a Continuous Spell
67+
local e1=Effect.CreateEffect(e:GetHandler())
68+
e1:SetType(EFFECT_TYPE_SINGLE)
69+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
70+
e1:SetCode(EFFECT_CHANGE_TYPE)
71+
e1:SetValue(TYPE_SPELL|TYPE_CONTINUOUS)
72+
e1:SetReset(RESET_EVENT|(RESETS_STANDARD&~RESET_TURN_SET))
73+
rvc:RegisterEffect(e1)
74+
end
75+
else
76+
--Banish it
77+
Duel.Remove(rvc,POS_FACEUP,REASON_EFFECT)
78+
end
79+
end

official/c23249029.lua

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
--JP name
2+
--Cursed Copycat Noble Arms
3+
--Scripted by the Razgriz
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
aux.AddEquipProcedure(c)
7+
--Equipped monster gains 200 ATK/DEF for each Equip Spell in your field and GY
8+
local e1a=Effect.CreateEffect(c)
9+
e1a:SetType(EFFECT_TYPE_EQUIP)
10+
e1a:SetCode(EFFECT_UPDATE_ATTACK)
11+
e1a:SetValue(s.atkdefval)
12+
c:RegisterEffect(e1a)
13+
local e1b=e1a:Clone()
14+
e1b:SetCode(EFFECT_UPDATE_DEFENSE)
15+
c:RegisterEffect(e1b)
16+
--Special Summon 1 Warrior monster with the same Attribute and Level as the equipped monster but a different name from your Deck, and if you do, equip it with this card, then destroy the monster this card was equipped to
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,0))
19+
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP+CATEGORY_DESTROY)
20+
e2:SetType(EFFECT_TYPE_IGNITION)
21+
e2:SetRange(LOCATION_SZONE)
22+
e2:SetCountLimit(1,id)
23+
e2:SetCondition(function(e) local ec=e:GetHandler():GetEquipTarget() return ec and ec:IsRace(RACE_WARRIOR) end)
24+
e2:SetTarget(s.sptg)
25+
e2:SetOperation(s.spop)
26+
c:RegisterEffect(e2)
27+
end
28+
function s.atkdefvalfilter(c)
29+
return c:IsEquipSpell() and (c:IsFaceup() or c:GetEquipTarget())
30+
end
31+
function s.atkdefval(e,c)
32+
return 200*Duel.GetMatchingGroupCount(s.atkdefvalfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD|LOCATION_GRAVE,0,nil)
33+
end
34+
function s.spfilter(c,e,tp,attr,lv,code,hc)
35+
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(attr) and c:IsLevel(lv) and not c:IsCode(code)
36+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and hc:CheckEquipTarget(c)
37+
end
38+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
39+
local c=e:GetHandler()
40+
local ec=c:GetEquipTarget()
41+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
42+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,ec:GetAttribute(),ec:GetLevel(),ec:GetCode(),c) end
43+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
44+
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0)
45+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,ec,1,tp,0)
46+
end
47+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
48+
local c=e:GetHandler()
49+
--You cannot Special Summon for the rest of this turn, except Warrior monsters
50+
local e1=Effect.CreateEffect(c)
51+
e1:SetDescription(aux.Stringid(id,1))
52+
e1:SetType(EFFECT_TYPE_FIELD)
53+
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
54+
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
55+
e1:SetTargetRange(1,0)
56+
e1:SetTarget(function(e,c) return not c:IsRace(RACE_WARRIOR) end)
57+
e1:SetReset(RESET_PHASE|PHASE_END)
58+
Duel.RegisterEffect(e1,tp)
59+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
60+
local ec=c:GetEquipTarget()
61+
if not ec then return end
62+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
63+
local sc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,ec:GetAttribute(),ec:GetLevel(),ec:GetCode(),c):GetFirst()
64+
if sc and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)>0
65+
and Duel.Equip(tp,c,sc) and ec:IsLocation(LOCATION_MZONE) then
66+
Duel.BreakEffect()
67+
Duel.Destroy(ec,REASON_EFFECT)
68+
end
69+
end

0 commit comments

Comments
 (0)