Skip to content

Commit 7137aad

Browse files
authored
Various script fixes/updates
- Ancient Gear Fusion: Should be able to use Fusion Materials from the Deck even when using a face-down "Ancient Gear Golem" or "Ancient Gear Golem - Ultimate Pound" you control. - Bad Aim: Simplify the exclusion of this card and the activated card from the targeting. - Big Shield Gardna: Added missing effect categories. - Blackfeather Darkrage Dragon: Don't prompt the player to select a number if they only have 1 card in their Deck. - Dual Assembwurm: The ATK change should disappear if this card's effects are later negated + it shouldn't banish anything if this card isn't face-up on the field anymore on resolution. - Gigantic Cephalotus: Check that the Plant monster was in the Monster Zone rather than on the field. - Miracle Fertilizer: The Normal Summon/Set restriction should now be tied to the effect activation and not the successful Special Summon. - Reptilianne Vaskii: Shouldn't destroy the target if it's not controlled by the opp on resolution. - Scrap Wyvern: Added missing effect categories + the destroyed card doesn't need to still be a monster after being destroyed. - Sealing Ceremony of Mokuton: Added missing effect category + general polish. - Shaddoll Schism: Fixed an issue with the "cannot attack directly" and "send to the GY" parts of the effect. - Super Crashbug: Added missing listed names + simplify the Special Summon procedure. - Wild Tornado: Shouldn't reveal the Set card. - Yummy★Redemption: Made the targeting selection of the GY effect smoother. - Other various small fixes and updates.
1 parent bd523e9 commit 7137aad

23 files changed

+406
-468
lines changed

official/c13035077.lua

Lines changed: 39 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3,71 +3,63 @@
33
local s,id=GetID()
44
function s.initial_effect(c)
55
--Activate
6-
local e1=Effect.CreateEffect(c)
7-
e1:SetType(EFFECT_TYPE_ACTIVATE)
8-
e1:SetCode(EVENT_FREE_CHAIN)
9-
c:RegisterEffect(e1)
10-
--atk&def
6+
local e0=Effect.CreateEffect(c)
7+
e0:SetType(EFFECT_TYPE_ACTIVATE)
8+
e0:SetCode(EVENT_FREE_CHAIN)
9+
c:RegisterEffect(e0)
10+
--All "True Draco" and "True King" monsters on the field gain 300 ATK/DEF
11+
local e1a=Effect.CreateEffect(c)
12+
e1a:SetType(EFFECT_TYPE_FIELD)
13+
e1a:SetCode(EFFECT_UPDATE_ATTACK)
14+
e1a:SetRange(LOCATION_FZONE)
15+
e1a:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
16+
e1a:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_TRUE_DRACO_KING))
17+
e1a:SetValue(300)
18+
c:RegisterEffect(e1a)
19+
local e1b=e1a:Clone()
20+
e1b:SetCode(EFFECT_UPDATE_DEFENSE)
21+
c:RegisterEffect(e1b)
22+
--The first time each Tribute Summoned "True Draco" or "True King" monster would be destroyed by battle each turn, it is not destroyed
1123
local e2=Effect.CreateEffect(c)
1224
e2:SetType(EFFECT_TYPE_FIELD)
13-
e2:SetCode(EFFECT_UPDATE_ATTACK)
25+
e2:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
1426
e2:SetRange(LOCATION_FZONE)
1527
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
16-
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,SET_TRUE_DRACO_KING))
17-
e2:SetValue(300)
28+
e2:SetTarget(function(e,c) return c:IsTributeSummoned() and c:IsSetCard(SET_TRUE_DRACO_KING) end)
29+
e2:SetValue(function(e,re,r,rp) return (r&REASON_BATTLE)>0 and 1 or 0 end)
1830
c:RegisterEffect(e2)
19-
local e3=e2:Clone()
20-
e3:SetCode(EFFECT_UPDATE_DEFENSE)
31+
--Destroy 1 other card you control or in your hand, and if you do, add 1 "True Draco" or "True King" card from your Deck to your hand
32+
local e3=Effect.CreateEffect(c)
33+
e3:SetDescription(aux.Stringid(id,0))
34+
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
35+
e3:SetType(EFFECT_TYPE_IGNITION)
36+
e3:SetRange(LOCATION_FZONE)
37+
e3:SetCountLimit(1)
38+
e3:SetTarget(s.destg)
39+
e3:SetOperation(s.desop)
2140
c:RegisterEffect(e3)
22-
--indes
23-
local e4=Effect.CreateEffect(c)
24-
e4:SetType(EFFECT_TYPE_FIELD)
25-
e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
26-
e4:SetRange(LOCATION_FZONE)
27-
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
28-
e4:SetTarget(s.indtg)
29-
e4:SetValue(s.indct)
30-
c:RegisterEffect(e4)
31-
--destroy
32-
local e5=Effect.CreateEffect(c)
33-
e5:SetDescription(aux.Stringid(id,0))
34-
e5:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH)
35-
e5:SetType(EFFECT_TYPE_IGNITION)
36-
e5:SetRange(LOCATION_FZONE)
37-
e5:SetCountLimit(1)
38-
e5:SetTarget(s.destg)
39-
e5:SetOperation(s.desop)
40-
c:RegisterEffect(e5)
4141
end
4242
s.listed_series={SET_TRUE_DRACO_KING}
43-
function s.indtg(e,c)
44-
return c:IsTributeSummoned() and c:IsSetCard(SET_TRUE_DRACO_KING)
45-
end
46-
function s.indct(e,re,r,rp)
47-
if (r&REASON_BATTLE)~=0 then
48-
return 1
49-
else return 0 end
50-
end
5143
function s.thfilter(c)
5244
return c:IsSetCard(SET_TRUE_DRACO_KING) and c:IsAbleToHand()
5345
end
5446
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
55-
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,e:GetHandler())
56-
and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
5747
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND|LOCATION_ONFIELD,0,e:GetHandler())
58-
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
48+
if chk==0 then return #g>0 and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
49+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0)
5950
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
6051
end
6152
function s.desop(e,tp,eg,ep,ev,re,r,rp)
62-
if not e:GetHandler():IsRelateToEffect(e) then return end
53+
local c=e:GetHandler()
54+
local exc=c:IsRelateToEffect(e) and c or nil
6355
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
64-
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,e:GetHandler())
65-
if #g>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
56+
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND|LOCATION_ONFIELD,0,1,1,exc)
57+
if #g>0 and Duel.Destroy(g,REASON_EFFECT)>0 then
6658
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
67-
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
68-
if #g>0 then
69-
Duel.SendtoHand(g,nil,REASON_EFFECT)
70-
Duel.ConfirmCards(1-tp,g)
59+
local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
60+
if #sg>0 then
61+
Duel.SendtoHand(sg,nil,REASON_EFFECT)
62+
Duel.ConfirmCards(1-tp,sg)
7163
end
7264
end
7365
end

official/c16886617.lua

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,47 @@
33
local s,id=GetID()
44
function s.initial_effect(c)
55
c:EnableReviveLimit()
6+
c:AddMustBeSpecialSummoned()
7+
--There can only be 1 face-up "Reptilianne Vaskii" on the field
68
c:SetUniqueOnField(1,1,id)
7-
--cannot special summon
9+
--You can Special Summon (from your hand) by Tributing 2 face-up monsters with 0 ATK from either field
10+
local e0=Effect.CreateEffect(c)
11+
e0:SetType(EFFECT_TYPE_FIELD)
12+
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
13+
e0:SetCode(EFFECT_SPSUMMON_PROC)
14+
e0:SetRange(LOCATION_HAND)
15+
e0:SetCondition(s.spcon)
16+
e0:SetTarget(s.sptg)
17+
e0:SetOperation(s.spop)
18+
c:RegisterEffect(e0)
19+
--Destroy 1 face-up monster your opponent controls
820
local e1=Effect.CreateEffect(c)
9-
e1:SetType(EFFECT_TYPE_SINGLE)
10-
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
11-
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
12-
e1:SetValue(0)
21+
e1:SetDescription(aux.Stringid(id,1))
22+
e1:SetCategory(CATEGORY_DESTROY)
23+
e1:SetType(EFFECT_TYPE_IGNITION)
24+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
25+
e1:SetRange(LOCATION_MZONE)
26+
e1:SetCountLimit(1)
27+
e1:SetTarget(s.destg)
28+
e1:SetOperation(s.desop)
1329
c:RegisterEffect(e1)
14-
--special summon
15-
local e2=Effect.CreateEffect(c)
16-
e2:SetType(EFFECT_TYPE_FIELD)
17-
e2:SetCode(EFFECT_SPSUMMON_PROC)
18-
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
19-
e2:SetRange(LOCATION_HAND)
20-
e2:SetCondition(s.spcon)
21-
e2:SetTarget(s.sptg)
22-
e2:SetOperation(s.spop)
23-
c:RegisterEffect(e2)
24-
--destroy
25-
local e5=Effect.CreateEffect(c)
26-
e5:SetDescription(aux.Stringid(id,0))
27-
e5:SetCategory(CATEGORY_DESTROY)
28-
e5:SetType(EFFECT_TYPE_IGNITION)
29-
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
30-
e5:SetRange(LOCATION_MZONE)
31-
e5:SetCountLimit(1)
32-
e5:SetTarget(s.destg)
33-
e5:SetOperation(s.desop)
34-
c:RegisterEffect(e5)
3530
end
36-
function s.rfilter(c)
31+
s.listed_names={id}
32+
function s.spcostfilter(c)
3733
return c:IsFaceup() and c:IsAttack(0) and c:IsReleasable()
3834
end
3935
function s.spcon(e,c)
4036
if c==nil then return true end
41-
local tp=e:GetHandlerPlayer()
42-
local rg=Duel.GetMatchingGroup(s.rfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
43-
return #rg>0 and aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),0)
37+
local rg=Duel.GetMatchingGroup(s.spcostfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
38+
return #rg>=2 and aux.SelectUnselectGroup(rg,e,e:GetHandlerPlayer(),2,2,aux.ChkfMMZ(1),0)
4439
end
4540
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
46-
local rg=Duel.GetMatchingGroup(s.rfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
41+
local rg=Duel.GetMatchingGroup(s.spcostfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
4742
local g=aux.SelectUnselectGroup(rg,e,tp,2,2,aux.ChkfMMZ(1),1,tp,HINTMSG_RELEASE,nil,nil,true)
4843
if #g>0 then
4944
g:KeepAlive()
5045
e:SetLabelObject(g)
51-
return true
46+
return true
5247
end
5348
return false
5449
end
@@ -63,11 +58,11 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
6358
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
6459
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
6560
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
66-
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
61+
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,tp,0)
6762
end
6863
function s.desop(e,tp,eg,ep,ev,re,r,rp)
6964
local tc=Duel.GetFirstTarget()
70-
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
65+
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(1-tp) then
7166
Duel.Destroy(tc,REASON_EFFECT)
7267
end
7368
end

official/c1802450.lua

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,40 @@
33
local s,id=GetID()
44
function s.initial_effect(c)
55
--Activate
6+
local e0=Effect.CreateEffect(c)
7+
e0:SetType(EFFECT_TYPE_ACTIVATE)
8+
e0:SetCode(EVENT_FREE_CHAIN)
9+
c:RegisterEffect(e0)
10+
--Banish up to 2 cards from the opponent's GY
611
local e1=Effect.CreateEffect(c)
7-
e1:SetType(EFFECT_TYPE_ACTIVATE)
12+
e1:SetDescription(aux.Stringid(id,0))
13+
e1:SetCategory(CATEGORY_REMOVE)
14+
e1:SetType(EFFECT_TYPE_QUICK_O)
15+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
816
e1:SetCode(EVENT_FREE_CHAIN)
9-
e1:SetHintTiming(0,TIMING_END_PHASE)
17+
e1:SetRange(LOCATION_SZONE)
18+
e1:SetCountLimit(1)
19+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
20+
e1:SetCost(s.rmcost)
21+
e1:SetTarget(s.rmtg)
22+
e1:SetOperation(s.rmop)
1023
c:RegisterEffect(e1)
11-
--remove
12-
local e2=Effect.CreateEffect(c)
13-
e2:SetDescription(aux.Stringid(id,1))
14-
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
15-
e2:SetType(EFFECT_TYPE_QUICK_O)
16-
e2:SetRange(LOCATION_SZONE)
17-
e2:SetCode(EVENT_FREE_CHAIN)
18-
e2:SetCountLimit(1)
19-
e2:SetHintTiming(0,TIMING_END_PHASE)
20-
e2:SetCost(s.rmcost)
21-
e2:SetTarget(s.rmtg)
22-
e2:SetOperation(s.rmop)
23-
c:RegisterEffect(e2)
24-
end
25-
function s.rmfilter(c,e)
26-
return c:IsAbleToRemove() and aux.SpElimFilter(c) and (not e or c:IsCanBeEffectTarget(e))
2724
end
2825
function s.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
29-
local dg=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,nil,e)
30-
if chk==0 then return Duel.CheckReleaseGroupCost(tp,aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_EARTH),1,false,aux.ReleaseCheckTarget,nil,dg) end
31-
local cg=Duel.SelectReleaseGroupCost(tp,aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_EARTH),1,1,false,aux.ReleaseCheckTarget,nil,dg)
32-
Duel.Release(cg,REASON_COST)
26+
if chk==0 then return Duel.CheckReleaseGroupCost(tp,aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_EARTH),1,false,nil,nil) end
27+
local g=Duel.SelectReleaseGroupCost(tp,aux.FaceupFilter(Card.IsAttribute,ATTRIBUTE_EARTH),1,1,false,nil,nil)
28+
Duel.Release(g,REASON_COST)
3329
end
3430
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
35-
if chkc then return chkc:IsLocation(LOCATION_MZONE|LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.rmfilter(chkc) end
36-
if chk==0 then return Duel.IsExistingTarget(s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,nil) end
31+
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
32+
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
3733
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
38-
local g=Duel.SelectTarget(tp,s.rmfilter,tp,0,LOCATION_MZONE|LOCATION_GRAVE,1,2,nil)
39-
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
34+
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,2,nil)
35+
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,tp,0)
4036
end
4137
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
42-
if not e:GetHandler():IsRelateToEffect(e) then return end
43-
local g=Duel.GetTargetCards(e)
44-
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
38+
local tg=Duel.GetTargetCards(e)
39+
if #tg>0 then
40+
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
41+
end
4542
end

official/c21011044.lua

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,54 @@
44
local s,id=GetID()
55
function s.initial_effect(c)
66
--Activate
7-
local e1=Effect.CreateEffect(c)
8-
e1:SetType(EFFECT_TYPE_ACTIVATE)
9-
e1:SetCode(EVENT_FREE_CHAIN)
10-
e1:SetHintTiming(0,TIMING_MAIN_END)
7+
local e0=Effect.CreateEffect(c)
8+
e0:SetType(EFFECT_TYPE_ACTIVATE)
9+
e0:SetCode(EVENT_FREE_CHAIN)
10+
c:RegisterEffect(e0)
11+
--Fusion Summon 1 "Shaddoll" Fusion Monster from your Extra Deck, by banishing Fusion Materials mentioned on it from your field or GY, but it cannot attack directly
12+
local e1=Fusion.CreateSummonEff({handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_SHADDOLL),matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove),
13+
extrafil=s.fextra,extraop=Fusion.BanishMaterial,stage2=s.stage2,desc=aux.Stringid(id,0),extratg=s.extratg})
14+
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TOGRAVE)
15+
e1:SetType(EFFECT_TYPE_QUICK_O)
16+
e1:SetRange(LOCATION_SZONE)
17+
e1:SetHintTiming(0,TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
18+
e1:SetCountLimit(1,id)
19+
e1:SetCondition(function() return Duel.IsMainPhase() end)
1120
c:RegisterEffect(e1)
12-
--Fusion Summon 1 "Shaddoll" monster
13-
local e2=Fusion.CreateSummonEff({handler=c,fusfilter=aux.FilterBoolFunction(Card.IsSetCard,SET_SHADDOLL),matfilter=Fusion.OnFieldMat(Card.IsAbleToRemove),
14-
extrafil=s.fextra,extraop=Fusion.BanishMaterial,stage2=s.sstage2,desc=aux.Stringid(id,0),extratg=s.extratarget})
15-
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TOGRAVE)
16-
e2:SetType(EFFECT_TYPE_QUICK_O)
17-
e2:SetHintTiming(0,TIMING_MAIN_END)
18-
e2:SetCountLimit(1,id)
19-
e2:SetCondition(function() return Duel.IsMainPhase() end)
20-
e2:SetRange(LOCATION_SZONE)
21-
c:RegisterEffect(e2)
2221
end
2322
s.listed_series={SET_SHADDOLL}
2423
function s.fextra(e,tp,mg)
2524
if not Duel.IsPlayerAffectedByEffect(tp,CARD_SPIRIT_ELIMINATION) then
2625
return Duel.GetMatchingGroup(Fusion.IsMonsterFilter(Card.IsAbleToRemove),tp,LOCATION_GRAVE,0,nil)
2726
end
2827
end
29-
function s.sstage2(e,tc,tp,sg,chk)
28+
function s.tgfilter(c,attr)
29+
return c:IsAttribute(attr) and c:IsFaceup() and c:IsAbleToGrave()
30+
end
31+
function s.stage2(e,tc,tp,sg,chk)
3032
if chk==1 then
3133
--It cannot attack directly
3234
local e1=Effect.CreateEffect(e:GetHandler())
33-
e1:SetDescription(aux.Stringid(id,2))
35+
e1:SetDescription(3207)
3436
e1:SetType(EFFECT_TYPE_SINGLE)
3537
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
3638
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
3739
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
3840
tc:RegisterEffect(e1)
39-
local att=tc:GetAttribute()
40-
if Duel.IsExistingMatchingCard(s.sameatt,tp,0,LOCATION_MZONE,1,nil,att) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
41-
Duel.BreakEffect()
41+
local attr=tc:GetAttribute()
42+
if Duel.IsExistingMatchingCard(s.tgfilter,tp,0,LOCATION_MZONE,1,nil,attr)
43+
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
4244
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
43-
local tg=Duel.SelectMatchingCard(tp,s.sameatt,tp,0,LOCATION_MZONE,1,1,nil,att)
44-
if #tg>0 then
45-
Duel.HintSelection(tg)
46-
Duel.SendtoGrave(tg,REASON_EFFECT)
45+
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,0,LOCATION_MZONE,1,1,nil,attr)
46+
if #g>0 then
47+
Duel.HintSelection(g)
48+
Duel.BreakEffect()
49+
Duel.SendtoGrave(g,REASON_EFFECT)
4750
end
4851
end
4952
end
5053
end
51-
function s.sameatt(c,att)
52-
return c:IsFaceup() and c:IsAttribute(att) and c:IsAbleToGrave()
53-
end
54-
function s.extratarget(e,tp,eg,ep,ev,re,r,rp,chk)
54+
function s.extratg(e,tp,eg,ep,ev,re,r,rp,chk)
5555
if chk==0 then return true end
5656
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE|LOCATION_GRAVE)
5757
Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_MZONE)

0 commit comments

Comments
 (0)