Skip to content

Commit 36c5567

Browse files
authored
Added new card scripts
1 parent cb7964b commit 36c5567

17 files changed

+1287
-0
lines changed

pre-release/c100450001.lua

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
--ラーニング・エルフ
2+
--Learning Elf
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Set 1 Trap from your Deck with an effect that equips itself to a monster
7+
local e1a=Effect.CreateEffect(c)
8+
e1a:SetDescription(aux.Stringid(id,0))
9+
e1a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
10+
e1a:SetProperty(EFFECT_FLAG_DELAY)
11+
e1a:SetCode(EVENT_SUMMON_SUCCESS)
12+
e1a:SetCountLimit(1,{id,0})
13+
e1a:SetTarget(s.settg)
14+
e1a:SetOperation(s.setop)
15+
c:RegisterEffect(e1a)
16+
local e1b=e1a:Clone()
17+
e1b:SetCode(EVENT_SPSUMMON_SUCCESS)
18+
c:RegisterEffect(e1b)
19+
--Draw 1 card
20+
local e2=Effect.CreateEffect(c)
21+
e2:SetDescription(aux.Stringid(id,1))
22+
e2:SetCategory(CATEGORY_DRAW)
23+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
24+
e2:SetProperty(EFFECT_FLAG_DELAY)
25+
e2:SetCode(EVENT_TO_GRAVE)
26+
e2:SetCountLimit(1,{id,1})
27+
e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end)
28+
e2:SetTarget(s.drtg)
29+
e2:SetOperation(s.drop)
30+
c:RegisterEffect(e2)
31+
end
32+
function s.setfilter(c)
33+
return c:IsEquipTrap() and c:IsSSetable()
34+
end
35+
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
36+
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
37+
end
38+
function s.setop(e,tp,eg,ep,ev,re,r,rp)
39+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
40+
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
41+
if #g>0 then
42+
Duel.SSet(tp,g)
43+
end
44+
end
45+
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
46+
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
47+
Duel.SetTargetPlayer(tp)
48+
Duel.SetTargetParam(1)
49+
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
50+
end
51+
function s.drop(e,tp,eg,ep,ev,re,r,rp)
52+
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
53+
Duel.Draw(p,d,REASON_EFFECT)
54+
end

pre-release/c100450002.lua

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
--武装転生
2+
--Armament Reincarnation
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
local TOKEN_ARMAMENT_REINCARNATION=id+100
6+
function s.initial_effect(c)
7+
--Special Summon "Armament Reincarnation Tokens" (Warrior/LIGHT/Level 1/ATK 500/DEF 500) up to the number of Equip Spells, and Traps with an effect that equip themselves to a monster, in your GY, then you can destroy as many cards in your Spell & Trap Zone as possible, including this card, then Set as many Equip Spells, and Traps with an effect that equip themselves to a monster, as possible from your GY
8+
local e1=Effect.CreateEffect(c)
9+
e1:SetDescription(aux.Stringid(id,0))
10+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DESTROY)
11+
e1:SetType(EFFECT_TYPE_ACTIVATE)
12+
e1:SetCode(EVENT_FREE_CHAIN)
13+
e1:SetTarget(s.target)
14+
e1:SetOperation(s.activate)
15+
c:RegisterEffect(e1)
16+
end
17+
s.listed_names={TOKEN_ARMAMENT_REINCARNATION}
18+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
19+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
20+
and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARMAMENT_REINCARNATION,0,TYPES_TOKEN,500,500,1,RACE_WARRIOR,ATTRIBUTE_LIGHT)
21+
and Duel.IsExistingMatchingCard(aux.OR(Card.IsEquipSpell,Card.IsEquipTrap),tp,LOCATION_GRAVE,0,1,nil) end
22+
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0)
23+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
24+
Duel.SetPossibleOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,tp,0)
25+
end
26+
function s.setfilter(c)
27+
return (c:IsEquipSpell() or c:IsEquipTrap()) and c:IsSSetable(true)
28+
end
29+
function s.activate(e,tp,eg,ep,ev,re,r,rp)
30+
local c=e:GetHandler()
31+
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
32+
local max_ct=Duel.GetMatchingGroupCount(aux.OR(Card.IsEquipSpell,Card.IsEquipTrap),tp,LOCATION_GRAVE,0,nil)
33+
if ft>0 and max_ct>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,TOKEN_ARMAMENT_REINCARNATION,0,TYPES_TOKEN,500,500,1,RACE_WARRIOR,ATTRIBUTE_LIGHT) then
34+
ft=math.min(ft,max_ct)
35+
if Duel.IsPlayerAffectedByEffect(tp,CARD_BLUEEYES_SPIRIT) then ft=1 end
36+
if ft>1 then
37+
ft=Duel.AnnounceNumberRange(tp,1,ft)
38+
end
39+
for i=1,ft do
40+
local token=Duel.CreateToken(tp,TOKEN_ARMAMENT_REINCARNATION)
41+
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
42+
end
43+
if Duel.SpecialSummonComplete()>0 and c:IsRelateToEffect(e) and e:IsHasType(EFFECT_TYPE_ACTIVATE)
44+
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_GRAVE,0,1,nil)
45+
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
46+
local g=Duel.GetFieldGroup(tp,LOCATION_STZONE,0)
47+
Duel.BreakEffect()
48+
if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.GetOperatedGroup():IsContains(c)then
49+
local st_zones=Duel.GetLocationCount(tp,LOCATION_SZONE,0)
50+
if st_zones>0 then
51+
local equip_g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.setfilter),tp,LOCATION_GRAVE,0,nil)
52+
local sg=Group.CreateGroup()
53+
if #equip_g>st_zones then
54+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
55+
sg=equip_g:Select(tp,st_zones,st_zones,nil)
56+
else
57+
sg=equip_g
58+
end
59+
if #sg>0 then
60+
Duel.BreakEffect()
61+
if Duel.SSet(tp,sg)>0 then
62+
local set_traps=Duel.GetOperatedGroup():Match(Card.IsTrap,nil)
63+
for sc in set_traps:Iter() do
64+
--These Traps can be activated this turn
65+
local e1=Effect.CreateEffect(c)
66+
e1:SetType(EFFECT_TYPE_SINGLE)
67+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
68+
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
69+
e1:SetReset(RESETS_STANDARD_PHASE_END)
70+
sc:RegisterEffect(e1)
71+
end
72+
end
73+
end
74+
end
75+
end
76+
end
77+
end
78+
--For the rest of this turn, you cannot Special Summon
79+
local e2=Effect.CreateEffect(c)
80+
e2:SetDescription(aux.Stringid(id,2))
81+
e2:SetType(EFFECT_TYPE_FIELD)
82+
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
83+
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
84+
e2:SetTargetRange(1,0)
85+
e2:SetReset(RESET_PHASE|PHASE_END)
86+
Duel.RegisterEffect(e2,tp)
87+
end

pre-release/c100450003.lua

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
--ミラーバリア
2+
--Mirror Barrier
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Equip this card to 1 face-up monster you control as an Equip Card with this effect: ● Once per Battle Step, if the equipped monster battles an opponent's monster: You can destroy that opponent's monster.
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_EQUIP)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
12+
e1:SetCode(EVENT_FREE_CHAIN)
13+
e1:SetCost(aux.RemainFieldCost)
14+
e1:SetTarget(s.target)
15+
e1:SetOperation(s.operation)
16+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMING_BATTLE_PHASE|TIMINGS_CHECK_MONSTER_E)
17+
c:RegisterEffect(e1)
18+
--Add 1 "Armament Reincarnation" from your Deck to your hand
19+
local e2=Effect.CreateEffect(c)
20+
e2:SetDescription(aux.Stringid(id,1))
21+
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
22+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
23+
e2:SetProperty(EFFECT_FLAG_DELAY)
24+
e2:SetCode(EVENT_DESTROYED)
25+
e2:SetCountLimit(1,id)
26+
e2:SetTarget(s.thtg)
27+
e2:SetOperation(s.thop)
28+
c:RegisterEffect(e2)
29+
end
30+
s.listed_names={100450002} --"Armament Reincarnation"
31+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
32+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
33+
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
34+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
35+
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
36+
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,tp,0)
37+
end
38+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
39+
local c=e:GetHandler()
40+
if not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end
41+
local tc=Duel.GetFirstTarget()
42+
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Equip(tp,c,tc) then
43+
--● Once per Battle Step, if the equipped monster battles an opponent's monster: You can destroy that opponent's monster.
44+
local e1=Effect.CreateEffect(c)
45+
e1:SetDescription(aux.Stringid(id,2))
46+
e1:SetCategory(CATEGORY_DESTROY)
47+
e1:SetType(EFFECT_TYPE_QUICK_O)
48+
e1:SetCode(EVENT_FREE_CHAIN)
49+
e1:SetRange(LOCATION_SZONE)
50+
e1:SetCondition(s.descon)
51+
e1:SetTarget(s.destg)
52+
e1:SetOperation(s.desop)
53+
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
54+
e1:SetHintTiming(TIMING_BATTLE_PHASE)
55+
c:RegisterEffect(e1)
56+
--Equip limit
57+
local e2=Effect.CreateEffect(c)
58+
e2:SetType(EFFECT_TYPE_SINGLE)
59+
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
60+
e2:SetCode(EFFECT_EQUIP_LIMIT)
61+
e2:SetValue(function(e,c) return c==tc end)
62+
e2:SetReset(RESET_EVENT|RESETS_STANDARD)
63+
c:RegisterEffect(e2)
64+
else
65+
c:CancelToGrave(false)
66+
end
67+
end
68+
function s.thfilter(c)
69+
return c:IsCode(100450002) and c:IsAbleToHand()
70+
end
71+
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
72+
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
73+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
74+
end
75+
function s.thop(e,tp,eg,ep,ev,re,r,rp)
76+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
77+
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
78+
if #g>0 then
79+
Duel.SendtoHand(g,nil,REASON_EFFECT)
80+
Duel.ConfirmCards(1-tp,g)
81+
end
82+
end
83+
function s.descon(e,tp,eg,ep,ev,re,r,rp)
84+
local c=e:GetHandler()
85+
if not (Duel.IsBattleStep() and not c:HasFlagEffect(id)) then return false end
86+
local ec=c:GetEquipTarget()
87+
local bc=ec:GetBattleTarget()
88+
return ec and ec:IsRelateToBattle() and bc and bc:IsControler(1-tp)
89+
end
90+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
91+
if chk==0 then return true end
92+
local c=e:GetHandler()
93+
local bc=c:GetEquipTarget():GetBattleTarget()
94+
e:SetLabelObject(bc)
95+
bc:CreateEffectRelation(e)
96+
c:RegisterFlagEffect(id,RESET_EVENT|RESETS_STANDARD|RESET_PHASE|PHASE_DAMAGE,0,1)
97+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,tp,0)
98+
end
99+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
100+
local bc=e:GetLabelObject()
101+
if bc:IsRelateToEffect(e) and bc:IsControler(1-tp) then
102+
Duel.Destroy(bc,REASON_EFFECT)
103+
end
104+
end

pre-release/c100450004.lua

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
--M・HERO ファウンティン
2+
--Masked HERO Fountain
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon 1 "HERO" monster from your hand in Defense Position
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_HAND)
12+
e1:SetCountLimit(1,{id,0})
13+
e1:SetCost(Cost.SelfReveal)
14+
e1:SetTarget(s.sptg)
15+
e1:SetOperation(s.spop)
16+
c:RegisterEffect(e1)
17+
--Set 1 "Mask Change" from your Deck or GY
18+
local e2=Effect.CreateEffect(c)
19+
e2:SetDescription(aux.Stringid(id,1))
20+
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
21+
e2:SetProperty(EFFECT_FLAG_DELAY)
22+
e2:SetCode(EVENT_TO_GRAVE)
23+
e2:SetCountLimit(1,{id,1})
24+
e2:SetCondition(s.setcon)
25+
e2:SetTarget(s.settg)
26+
e2:SetOperation(s.setop)
27+
c:RegisterEffect(e2)
28+
end
29+
s.listed_series={SET_HERO}
30+
s.listed_names={21143940} --"Mask Change"
31+
function s.spfilter(c,e,tp)
32+
return c:IsSetCard(SET_HERO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
33+
end
34+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
35+
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
36+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
37+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
38+
end
39+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
40+
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
41+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
42+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
43+
if #g>0 then
44+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
45+
end
46+
end
47+
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
48+
local c=e:GetHandler()
49+
return (c:IsReason(REASON_COST) and re and re:IsActivated()) or c:IsReason(REASON_EFFECT)
50+
end
51+
function s.setfilter(c)
52+
return c:IsCode(21143940) and c:IsSSetable()
53+
end
54+
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
55+
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK|LOCATION_GRAVE,0,1,nil) end
56+
end
57+
function s.setop(e,tp,eg,ep,ev,re,r,rp)
58+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
59+
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK|LOCATION_GRAVE,0,1,1,nil)
60+
if #g>0 then
61+
Duel.SSet(tp,g)
62+
end
63+
end

pre-release/c100450005.lua

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
--猛毒マムシ
2+
--Poisonous Viper
3+
--scripted by pyrQ
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Special Summon it, or if your opponent controls no monsters, Special Summon it to their field in Defense Position instead
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
10+
e1:SetType(EFFECT_TYPE_IGNITION)
11+
e1:SetRange(LOCATION_HAND)
12+
e1:SetCost(Cost.SelfReveal)
13+
e1:SetTarget(s.sptg)
14+
e1:SetOperation(s.spop)
15+
c:RegisterEffect(e1)
16+
--Take 500 damage
17+
local e2=Effect.CreateEffect(c)
18+
e2:SetDescription(aux.Stringid(id,1))
19+
e2:SetCategory(CATEGORY_DAMAGE)
20+
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
21+
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
22+
e2:SetRange(LOCATION_MZONE)
23+
e2:SetCountLimit(1)
24+
e2:SetCondition(function(e,tp) return Duel.IsTurnPlayer(tp) end)
25+
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,500) end)
26+
e2:SetOperation(function(e,tp) Duel.Damage(tp,500,REASON_EFFECT) end)
27+
c:RegisterEffect(e2)
28+
--Destroy 1 Set Spell/Trap your opponent controls
29+
local e3a=Effect.CreateEffect(c)
30+
e3a:SetDescription(aux.Stringid(id,2))
31+
e3a:SetCategory(CATEGORY_DESTROY)
32+
e3a:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
33+
e3a:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
34+
e3a:SetCode(EVENT_REMOVE)
35+
e3a:SetCountLimit(1,id)
36+
e3a:SetTarget(s.destg)
37+
e3a:SetOperation(s.desop)
38+
c:RegisterEffect(e3a)
39+
local e3b=e3a:Clone()
40+
e3b:SetCode(EVENT_TO_GRAVE)
41+
e3b:SetCondition(function(e) return e:GetHandler():IsReason(REASON_EFFECT) end)
42+
c:RegisterEffect(e3b)
43+
end
44+
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
45+
local c=e:GetHandler()
46+
if chk==0 then
47+
if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 then
48+
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
49+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
50+
else
51+
local opp=1-tp
52+
return Duel.GetLocationCount(opp,LOCATION_MZONE)>0
53+
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,opp)
54+
end
55+
end
56+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,tp,0)
57+
end
58+
function s.spop(e,tp,eg,ep,ev,re,r,rp)
59+
local c=e:GetHandler()
60+
if c:IsRelateToEffect(e) then
61+
if Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 then
62+
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
63+
else
64+
Duel.SpecialSummon(c,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)
65+
end
66+
end
67+
end
68+
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
69+
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_SZONE) and chkc:IsFacedown() end
70+
if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_SZONE,1,nil) end
71+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
72+
local tc=Duel.SelectTarget(tp,Card.IsFacedown,tp,0,LOCATION_SZONE,1,1,nil):GetFirst()
73+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,tp,0)
74+
Duel.SetChainLimit(function(e,ep,tp) return e:GetHandler()~=tc end)
75+
end
76+
function s.desop(e,tp,eg,ep,ev,re,r,rp)
77+
local tc=Duel.GetFirstTarget()
78+
if tc:IsRelateToEffect(e) then
79+
Duel.Destroy(tc,REASON_EFFECT)
80+
end
81+
end

0 commit comments

Comments
 (0)