Commit e1bb5ca6 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 e189ab0f
...@@ -47,7 +47,7 @@ function s.spfilter(c,e,tp) ...@@ -47,7 +47,7 @@ function s.spfilter(c,e,tp)
return c:IsSetCard(0x5) and c:IsLevel(10) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsSetCard(0x5) and c:IsLevel(10) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function s.thfilter(c) function s.thfilter(c)
return c.toss_coin and c:IsAbleToHand() return c:IsEffectProperty(aux.EffectCategoryFilter(CATEGORY_COIN)) and c:IsAbleToHand()
end 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()
......
...@@ -31,7 +31,7 @@ function s.initial_effect(c) ...@@ -31,7 +31,7 @@ function s.initial_effect(c)
end end
s.toss_coin=true s.toss_coin=true
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceup() and c.toss_coin return c:IsFaceup() and c:IsEffectProperty(aux.EffectCategoryFilter(CATEGORY_COIN))
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
...@@ -52,7 +52,7 @@ function s.cointg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,7 +52,7 @@ function s.cointg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end end
function s.setfilter(c) function s.setfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSSetable() and c.toss_coin return c:IsType(TYPE_SPELL) and c:IsSSetable() and c:IsEffectProperty(aux.EffectCategoryFilter(CATEGORY_COIN))
end end
function s.desfilter(c) function s.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:GetSequence()<5 return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:GetSequence()<5
......
...@@ -28,7 +28,7 @@ function s.initial_effect(c) ...@@ -28,7 +28,7 @@ function s.initial_effect(c)
end end
s.toss_coin=true s.toss_coin=true
function s.thfilter(c) function s.thfilter(c)
return not c:IsCode(id) and c.toss_coin and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return not c:IsCode(id) and c:IsEffectProperty(aux.EffectCategoryFilter(CATEGORY_COIN)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
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