Skip to content

Commit cd7c017

Browse files
authored
Some card fixes
Official: - Barrier Resonator: Should also be able to use its effect in the Battle Phase, but not in the End Step. Shouldn't be able to target a monster that has already had this effect applied to it. Should apply the effects even if the target is face-down on resolution. - Eternal Sunshine: Should be able to activate just the card in the Damage Step + fixed the targeting property being overwritten by the Damage Step property for its 2nd effect. - Melffy Playhouse: Should be usable in the Damage Step. - Spiritualism: Shouldn't return the target to the hand if you control it on resolution. - The Continuing Epic of Charles: Its GY effect should be usable in the Damage Step. Unofficial: - Number 92: Heart-eartH Dragon (Anime): Fixed an issue where cards that a different/previous copy of Number 92 saw being placed on the opponent's field would get banished.
1 parent 5c877f4 commit cd7c017

File tree

7 files changed

+115
-110
lines changed

7 files changed

+115
-110
lines changed

official/c11802691.lua

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function s.initial_effect(c)
99
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP+CATEGORY_TOGRAVE)
1010
e1:SetType(EFFECT_TYPE_ACTIVATE)
1111
e1:SetCode(EVENT_FREE_CHAIN)
12-
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E)
12+
e1:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
1313
e1:SetCountLimit(1,id)
1414
e1:SetTarget(s.target)
1515
e1:SetOperation(s.activate)
@@ -19,19 +19,20 @@ function s.initial_effect(c)
1919
e2:SetDescription(aux.Stringid(id,1))
2020
e2:SetCategory(CATEGORY_EQUIP)
2121
e2:SetType(EFFECT_TYPE_QUICK_O)
22-
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
22+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
2323
e2:SetCode(EVENT_FREE_CHAIN)
2424
e2:SetRange(LOCATION_GRAVE)
25-
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER_E)
25+
e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
2626
e2:SetCountLimit(1,{id,1})
27-
e2:SetCost(aux.bfgcost)
27+
e2:SetCondition(aux.StatChangeDamageStepCondition)
28+
e2:SetCost(aux.SelfBanishCost)
2829
e2:SetTarget(s.eqtg)
2930
e2:SetOperation(s.eqop)
3031
c:RegisterEffect(e2)
3132
end
3233
s.listed_series={SET_NOBLE_ARMS,SET_INFERNOBLE_KNIGHT,SET_NOBLE_KNIGHT}
3334
s.listed_names={CARD_INFERNOBLE_CHARLES}
34-
function s.cfilter(c,sft,e,tp)
35+
function s.revfilter(c,sft,e,tp)
3536
return c:IsSetCard(SET_NOBLE_ARMS) and c:IsEquipSpell() and not c:IsPublic()
3637
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,e,tp,c,sft)
3738
end
@@ -44,47 +45,49 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
4445
local sft=Duel.GetLocationCount(tp,LOCATION_SZONE)
4546
if e:GetHandler():IsLocation(LOCATION_HAND) then sft=sft-1 end
4647
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
47-
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil,sft,e,tp) end
48+
and Duel.IsExistingMatchingCard(s.revfilter,tp,LOCATION_HAND,0,1,nil,sft,e,tp) end
4849
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND|LOCATION_DECK)
4950
Duel.SetPossibleOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND)
5051
Duel.SetPossibleOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
5152
end
5253
function s.activate(e,tp,eg,ep,ev,re,r,rp)
5354
local sft=Duel.GetLocationCount(tp,LOCATION_SZONE)
5455
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
55-
local eq=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND,0,1,1,nil,sft,e,tp):GetFirst()
56+
local eq=Duel.SelectMatchingCard(tp,s.revfilter,tp,LOCATION_HAND,0,1,1,nil,sft,e,tp):GetFirst()
5657
if not eq then return end
5758
Duel.ConfirmCards(1-tp,eq)
5859
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
5960
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
6061
local tc=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,e,tp,eq,sft):GetFirst()
6162
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
62-
local eqBool=sft>0 and eq:CheckEquipTarget(tc) and eq:CheckUniqueOnField(tp) and not eq:IsForbidden()
63-
local tgBool=eq:IsAbleToGrave()
64-
if eqBool or tgBool then
65-
Duel.BreakEffect()
66-
local op=Duel.SelectEffect(tp,
67-
{eqBool,aux.Stringid(id,2)},
68-
{tgBool,aux.Stringid(id,3)})
69-
if op==1 then
70-
Duel.Equip(tp,eq,tc)
71-
else
72-
Duel.SendtoGrave(eq,REASON_EFFECT)
73-
end
63+
local b1=sft>0 and eq:CheckEquipTarget(tc) and eq:CheckUniqueOnField(tp) and not eq:IsForbidden()
64+
local b2=eq:IsAbleToGrave()
65+
if not (b1 or b2) then return end
66+
local op=nil
67+
if b1 and b2 then
68+
op=Duel.SelectEffect(tp,
69+
{b1,aux.Stringid(id,2)},
70+
{b2,aux.Stringid(id,3)})
71+
else
72+
op=(b1 and 1) or (b2 and 2)
73+
end
74+
Duel.BreakEffect()
75+
if op==1 then
76+
Duel.Equip(tp,eq,tc)
77+
elseif op==2 then
78+
Duel.SendtoGrave(eq,REASON_EFFECT)
7479
end
7580
end
7681
end
77-
function s.eqfilter(c,p)
78-
return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsMonster()
79-
and c:CheckUniqueOnField(p) and not c:IsForbidden()
82+
function s.eqfilter(c,tp)
83+
return c:IsSetCard(SET_NOBLE_KNIGHT) and c:IsMonster() and c:CheckUniqueOnField(tp) and not c:IsForbidden()
8084
end
8185
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
82-
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE)
83-
and chkc:IsFaceup() and chkc:IsCode(CARD_INFERNOBLE_CHARLES) end
86+
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsCode(CARD_INFERNOBLE_CHARLES) end
8487
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
8588
and Duel.IsExistingTarget(aux.FaceupFilter(Card.IsCode,CARD_INFERNOBLE_CHARLES),tp,LOCATION_MZONE,0,1,nil)
8689
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,nil,tp) end
87-
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
90+
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
8891
Duel.SelectTarget(tp,aux.FaceupFilter(Card.IsCode,CARD_INFERNOBLE_CHARLES),tp,LOCATION_MZONE,0,1,1,nil)
8992
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND|LOCATION_DECK)
9093
end
@@ -94,16 +97,17 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
9497
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
9598
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
9699
local eq=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_HAND|LOCATION_DECK,0,1,1,nil,tp):GetFirst()
97-
if eq and Duel.Equip(tp,eq,tc,true) then
100+
if eq and Duel.Equip(tp,eq,tc,true,true) then
98101
local c=e:GetHandler()
99102
--Equip Limit
100103
local e1=Effect.CreateEffect(c)
101104
e1:SetType(EFFECT_TYPE_SINGLE)
105+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
102106
e1:SetCode(EFFECT_EQUIP_LIMIT)
103-
e1:SetValue(function(_,_c) return _c==tc end)
107+
e1:SetValue(function(e,c) return c==tc end)
104108
e1:SetReset(RESET_EVENT|RESETS_STANDARD)
105109
eq:RegisterEffect(e1)
106-
--Increase 500 ATK
110+
--The equipped monster gains 500 ATK
107111
local e2=Effect.CreateEffect(eq)
108112
e2:SetType(EFFECT_TYPE_EQUIP)
109113
e2:SetCode(EFFECT_UPDATE_ATTACK)

official/c15866454.lua

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,25 @@ local s,id=GetID()
44
function s.initial_effect(c)
55
--Activate
66
local e1=Effect.CreateEffect(c)
7+
e1:SetDescription(aux.Stringid(id,0))
78
e1:SetCategory(CATEGORY_TOHAND)
89
e1:SetType(EFFECT_TYPE_ACTIVATE)
9-
e1:SetCode(EVENT_FREE_CHAIN)
1010
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_INACTIVATE)
11+
e1:SetCode(EVENT_FREE_CHAIN)
1112
e1:SetTarget(s.target)
1213
e1:SetOperation(s.activate)
1314
c:RegisterEffect(e1)
1415
end
15-
function s.filter(c)
16-
return c:IsAbleToHand() and c:IsSpellTrap()
17-
end
1816
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
19-
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and s.filter(chkc) end
20-
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_ONFIELD,1,nil) end
17+
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsSpellTrap() and chkc:IsAbleToHand() end
18+
if chk==0 then return Duel.IsExistingTarget(aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,nil) end
2119
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
22-
local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
23-
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
20+
local g=Duel.SelectTarget(tp,aux.AND(Card.IsSpellTrap,Card.IsAbleToHand),tp,0,LOCATION_ONFIELD,1,1,nil)
21+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,0)
2422
end
2523
function s.activate(e,tp,eg,ep,ev,re,r,rp)
2624
local tc=Duel.GetFirstTarget()
27-
if tc and tc:IsRelateToEffect(e) then
25+
if tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
2826
Duel.SendtoHand(tc,nil,REASON_EFFECT)
2927
end
30-
end
28+
end

official/c28903523.lua

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ function s.initial_effect(c)
66
--Activate
77
local e0=Effect.CreateEffect(c)
88
e0:SetType(EFFECT_TYPE_ACTIVATE)
9+
e0:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
910
e0:SetCode(EVENT_FREE_CHAIN)
11+
e0:SetHintTiming(TIMING_DAMAGE_STEP)
12+
e0:SetCondition(aux.StatChangeDamageStepCondition)
1013
c:RegisterEffect(e0)
1114
--Monsters you control gain 500 DEF for each "Ancient Fairy Dragon", and monster that mentions it, that you control
1215
local e1=Effect.CreateEffect(c)
@@ -21,13 +24,12 @@ function s.initial_effect(c)
2124
e2:SetDescription(aux.Stringid(id,0))
2225
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_DISABLE)
2326
e2:SetType(EFFECT_TYPE_QUICK_O)
24-
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
27+
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
2528
e2:SetCode(EVENT_FREE_CHAIN)
2629
e2:SetRange(LOCATION_SZONE)
27-
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
28-
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
30+
e2:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
2931
e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN)
30-
e2:SetCondition(s.discond)
32+
e2:SetCondition(s.discon)
3133
e2:SetTarget(s.distg)
3234
e2:SetOperation(s.disop)
3335
c:RegisterEffect(e2)
@@ -39,9 +41,9 @@ end
3941
function s.defval(e,c)
4042
return Duel.GetMatchingGroupCount(s.afdfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)*500
4143
end
42-
function s.discond(e,tp,eg,ep,ev,re,r,rp)
44+
function s.discon(e,tp,eg,ep,ev,re,r,rp)
4345
return Duel.GetFlagEffect(tp,id)<Duel.GetMatchingGroupCount(s.afdfilter,tp,LOCATION_ONFIELD,0,nil)
44-
and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
46+
and aux.StatChangeDamageStepCondition()
4547
end
4648
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
4749
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
@@ -52,9 +54,9 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
5254
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,tp,0)
5355
end
5456
function s.disop(e,tp,eg,ep,ev,re,r,rp)
55-
local c=e:GetHandler()
5657
local tc=Duel.GetFirstTarget()
5758
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
59+
local c=e:GetHandler()
5860
--Its current ATK/DEF become halved until the end of this turn
5961
local e1=Effect.CreateEffect(c)
6062
e1:SetType(EFFECT_TYPE_SINGLE)

official/c31539614.lua

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
local s,id=GetID()
55
function s.initial_effect(c)
66
c:EnableReviveLimit()
7-
--Xyz Summon Procedure
7+
--Xyz Summon procedure: 2+ Level 3 monsters
88
Xyz.AddProcedure(c,nil,3,2,nil,nil,99)
99
--Change the ATK/DEF of a monster whose current ATK and/or DEF is different from its original value to its original ATK/DEF
1010
local e1=Effect.CreateEffect(c)
@@ -29,7 +29,7 @@ function s.initial_effect(c)
2929
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
3030
e2:SetRange(LOCATION_MZONE)
3131
e2:SetCountLimit(1)
32-
e2:SetCondition(s.gainatkcon)
32+
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(aux.FaceupFilter(Card.IsControler,tp),1,nil) end)
3333
e2:SetTarget(s.gainatktg)
3434
e2:SetOperation(s.gainatkop)
3535
c:RegisterEffect(e2)
@@ -77,10 +77,6 @@ function s.changeatkdefop(e,tp,eg,ep,ev,re,r,rp)
7777
tc:RegisterEffect(e4)
7878
end
7979
end
80-
function s.gainatkcon(e,tp,eg,ep,ev,re,r,rp)
81-
local c=e:GetHandler()
82-
return not eg:IsContains(c) and eg:IsExists(aux.FaceupFilter(Card.IsControler,tp),1,nil)
83-
end
8480
function s.gainatktg(e,tp,eg,ep,ev,re,r,rp,chk)
8581
local g=eg:Filter(aux.FaceupFilter(Card.IsControler,tp),nil):Match(Card.IsLocation,nil,LOCATION_MZONE)
8682
if chk==0 then return e:GetHandler():GetOverlayCount()>=3 and #g>0 end
@@ -91,7 +87,7 @@ function s.gainatkop(e,tp,eg,ep,ev,re,r,rp)
9187
if #g==0 then return end
9288
local c=e:GetHandler()
9389
for tc in g:Iter() do
94-
--Gains 900 ATK
90+
--That monster(s) gains 900 ATK
9591
local e1=Effect.CreateEffect(c)
9692
e1:SetType(EFFECT_TYPE_SINGLE)
9793
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)

official/c82134632.lua

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ function s.initial_effect(c)
88
e1:SetDescription(aux.Stringid(id,0))
99
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_ATKCHANGE)
1010
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
1112
e1:SetCode(EVENT_FREE_CHAIN)
12-
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
13-
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
13+
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP|TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER_E)
14+
e1:SetCondition(aux.StatChangeDamageStepCondition)
1415
e1:SetCost(s.cost)
1516
e1:SetTarget(s.target)
1617
e1:SetOperation(s.activate)
@@ -20,41 +21,43 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
2021
e:SetLabel(100)
2122
return true
2223
end
23-
function s.filter(c)
24-
return c:IsFaceup() and c:IsRace(RACE_BEAST) and c:IsType(TYPE_XYZ)
24+
function s.beastxyzfilter(c)
25+
return c:IsRace(RACE_BEAST) and c:IsType(TYPE_XYZ) and c:IsFaceup()
2526
end
2627
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
27-
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsAbleToHand() end
28-
local dg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil)
28+
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
29+
local xyzg=Duel.GetMatchingGroup(s.beastxyzfilter,tp,LOCATION_MZONE,0,nil)
2930
if chk==0 then
30-
if e:GetLabel()==100 then
31-
e:SetLabel(0)
32-
return Duel.CheckRemoveOverlayCard(tp,0,0,1,REASON_COST,dg)
33-
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil)
34-
else return false end
31+
local cost_chk=e:GetLabel()==100
32+
e:SetLabel(0)
33+
return cost_chk and Duel.CheckRemoveOverlayCard(tp,0,0,1,REASON_COST,xyzg)
34+
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil)
3535
end
36+
local xyz_max_ct=xyzg:GetSum(Card.GetOverlayCount)
3637
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
37-
local ct=0
38-
for tc in dg:Iter() do
39-
ct=ct+tc:GetOverlayCount()
40-
end
41-
local count=Duel.RemoveOverlayCard(tp,0,0,1,ct,REASON_COST,dg)
38+
local detach_ct=Duel.RemoveOverlayCard(tp,0,0,1,xyz_max_ct,REASON_COST,xyzg)
39+
e:SetLabel(detach_ct)
4240
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
43-
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,count,nil)
44-
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0)
45-
e:SetLabel(count)
41+
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,detach_ct,nil)
42+
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,tp,0)
4643
end
4744
function s.activate(e,tp,eg,ep,ev,re,r,rp)
48-
local g=Duel.GetTargetCards(e)
49-
if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) end
50-
local ct=e:GetLabel()
51-
Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE,0,nil):ForEach(s.op,e:GetHandler(),ct*500)
52-
end
53-
function s.op(tc,c,atk)
54-
local e1=Effect.CreateEffect(c)
55-
e1:SetType(EFFECT_TYPE_SINGLE)
56-
e1:SetCode(EFFECT_UPDATE_ATTACK)
57-
e1:SetValue(atk)
58-
e1:SetReset(RESETS_STANDARD_PHASE_END)
59-
tc:RegisterEffect(e1)
45+
local tg=Duel.GetTargetCards(e)
46+
if #tg>0 then
47+
Duel.SendtoHand(tg,nil,REASON_EFFECT)
48+
end
49+
local atkg=Duel.GetMatchingGroup(s.beastxyzfilter,tp,LOCATION_MZONE,0,nil)
50+
if #atkg==0 then return end
51+
local c=e:GetHandler()
52+
local atk=e:GetLabel()*500
53+
for tc in atkg:Iter() do
54+
--They gain 500 ATK for each material detached to activate this card, until the end of this turn
55+
local e1=Effect.CreateEffect(c)
56+
e1:SetType(EFFECT_TYPE_SINGLE)
57+
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
58+
e1:SetCode(EFFECT_UPDATE_ATTACK)
59+
e1:SetValue(atk)
60+
e1:SetReset(RESETS_STANDARD_PHASE_END)
61+
tc:RegisterEffect(e1)
62+
end
6063
end

0 commit comments

Comments
 (0)