Commit cd017715 authored by salix5's avatar salix5 Committed by GitHub

Apply suggestions from code review

Co-authored-by: wind2009's avatarWind2009-Louse <wind.jackey@qq.com>
parent 6a0cd9be
...@@ -52,7 +52,7 @@ end ...@@ -52,7 +52,7 @@ end
function s.coinop(e,tp,eg,ep,ev,re,r,rp) function s.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local res=-1 local res=-1
if c:IsHasEffect(73206827) then if Duel.IsPlayerAffectedByEffect(tp,73206827) then
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
if b1 and not b2 then if b1 and not b2 then
......
...@@ -106,7 +106,7 @@ end ...@@ -106,7 +106,7 @@ end
function s.coinop(e,tp,eg,ep,ev,re,r,rp) function s.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local res=-1 local res=-1
if c:IsHasEffect(73206827) then if Duel.IsPlayerAffectedByEffect(tp,73206827) then
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp)
if b1 and not b2 then if b1 and not b2 then
......
...@@ -60,7 +60,7 @@ end ...@@ -60,7 +60,7 @@ end
function s.coinop(e,tp,eg,ep,ev,re,r,rp) function s.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local res=-1 local res=-1
if c:IsHasEffect(73206827) then if Duel.IsPlayerAffectedByEffect(tp,73206827) then
local b1=Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) local b1=Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) local b2=Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil)
if b1 and not b2 then if b1 and not b2 then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment