Skip to content

Commit

Permalink
fix ヒーローバリア
Browse files Browse the repository at this point in the history
■自分フィールド上に「E・HERO」と名のついたモンスターが表側表示で存在しない状況でも発動できます。
  • Loading branch information
salix5 committed Aug 15, 2023
1 parent 5bd4a54 commit 93cb69f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions c44676200.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,26 @@ function c44676200.filter(c)
return c:IsFaceup() and c:IsSetCard(0x3008)
end
function c44676200.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()<PHASE_MAIN2
and Duel.IsExistingMatchingCard(c44676200.filter,tp,LOCATION_MZONE,0,1,nil)
return Duel.GetTurnPlayer()~=tp and aux.bpcon(e,tp,eg,ep,ev,re,r,rp)
end
function c44676200.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetAttacker() then Duel.NegateAttack()
if Duel.GetAttacker() and c44676200.discon(e,tp,eg,ep,ev,re,r,rp) then
Duel.NegateAttack()
else
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c44676200.discon)
e1:SetOperation(c44676200.disop)
Duel.RegisterEffect(e1,tp)
end
end
function c44676200.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c44676200.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c44676200.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,44676200)
Duel.NegateAttack()
e:Reset()
end

0 comments on commit 93cb69f

Please sign in to comment.