From 6c52ecd15b250bd0cb617a7d3e709be9591cdad8 Mon Sep 17 00:00:00 2001 From: Daniele Conti Date: Wed, 21 Oct 2026 12:39:21 +0200 Subject: [PATCH 1/2] Add nil check for Batteryman Fuel Cell --- official/c74730899.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/official/c74730899.lua b/official/c74730899.lua index 2cb04fe1ae..fca7b275e3 100644 --- a/official/c74730899.lua +++ b/official/c74730899.lua @@ -54,7 +54,7 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.retop(e) local tc=Duel.GetFirstTarget() - if tc:IsRelateToEffect(e) then + if tc and tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end -end \ No newline at end of file +end From adc8d610b98737a7312c4cfa47ce61a504c3b6f8 Mon Sep 17 00:00:00 2001 From: Daniele Conti Date: Wed, 21 Oct 2026 23:35:47 +0200 Subject: [PATCH 2/2] Prevent effect from being available if there are no valid targets --- official/c74730899.lua | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/official/c74730899.lua b/official/c74730899.lua index fca7b275e3..ff0bb4c051 100644 --- a/official/c74730899.lua +++ b/official/c74730899.lua @@ -33,16 +33,12 @@ function s.spcon(e,c) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_MZONE,0,2,nil) end -function s.retcfilter(c) - return c:IsSetCard(SET_BATTERYMAN) -end -function s.retfilter(c,e) - return c:IsAbleToHand() and c:IsCanBeEffectTarget(e) +function s.retcfilter(c,tp) + return c:IsSetCard(SET_BATTERYMAN) and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,c:GetEquipGroup()+c) end function s.retcost(e,tp,eg,ep,ev,re,r,rp,chk) - local dg=Duel.GetMatchingGroup(s.retfilter,tp,0,LOCATION_ONFIELD,nil,e) - if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.retcfilter,1,false,aux.ReleaseCheckTarget,e:GetHandler(),dg) end - local g=Duel.SelectReleaseGroupCost(tp,s.retcfilter,1,1,false,aux.ReleaseCheckTarget,e:GetHandler(),dg) + if chk==0 then return Duel.CheckReleaseGroupCost(tp,s.retcfilter,1,false,nil,e:GetHandler(),tp) end + local g=Duel.SelectReleaseGroupCost(tp,s.retcfilter,1,1,false,nil,e:GetHandler(),tp) Duel.Release(g,REASON_COST) end function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) @@ -54,7 +50,7 @@ function s.rettg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end function s.retop(e) local tc=Duel.GetFirstTarget() - if tc and tc:IsRelateToEffect(e) then + if tc:IsRelateToEffect(e) then Duel.SendtoHand(tc,nil,REASON_EFFECT) end end