Skip to content

Commit 06336ed

Browse files
committed
"Eternal Sunshine" fix
Fixed a bug where the player would be unable to activate it in the Damage Step
1 parent 684ef6e commit 06336ed

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pre-release/c101208071.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ function s.initial_effect(c)
2424
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
2525
e2:SetCode(EVENT_FREE_CHAIN)
2626
e2:SetRange(LOCATION_SZONE)
27+
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
2728
e2:SetHintTiming(0,TIMING_STANDBY_PHASE|TIMING_MAIN_END|TIMINGS_CHECK_MONSTER)
2829
e2:SetCountLimit(1,0,EFFECT_COUNT_CODE_CHAIN)
29-
e2:SetCondition(function(e,tp) return Duel.GetFlagEffect(tp,id)<Duel.GetMatchingGroupCount(s.afdfilter,tp,LOCATION_ONFIELD,0,nil) end)
30+
e2:SetCondition(s.discond)
3031
e2:SetTarget(s.distg)
3132
e2:SetOperation(s.disop)
3233
c:RegisterEffect(e2)
@@ -38,6 +39,10 @@ end
3839
function s.defval(e,c)
3940
return Duel.GetMatchingGroupCount(s.afdfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)*500
4041
end
42+
function s.discond(e,tp,eg,ep,ev,re,r,rp)
43+
return Duel.GetFlagEffect(tp,id)<Duel.GetMatchingGroupCount(s.afdfilter,tp,LOCATION_ONFIELD,0,nil)
44+
and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
45+
end
4146
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
4247
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
4348
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end

0 commit comments

Comments
 (0)