Commit 91da42fd authored by wind2009's avatar wind2009

Fix

parent 7c8e37bb
Pipeline #41499 passed with stages
in 2 minutes and 7 seconds
...@@ -68,12 +68,11 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,12 +68,11 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp)
c:SetCardTarget(tc) c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.nrcon) e1:SetCondition(s.nrcon)
e1:SetValue(1) e1:SetValue(1)
e1:SetLabelObject(c)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
...@@ -95,6 +94,5 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,6 +94,5 @@ function s.ctop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.nrcon(e) function s.nrcon(e)
local c=e:GetLabelObject() return e:GetOwner():IsHasCardTarget(e:GetHandler())
return c:GetCardTarget():IsContains(e:GetHandler())
end end
...@@ -44,7 +44,7 @@ function s.initial_effect(c) ...@@ -44,7 +44,7 @@ function s.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function s.desfilter(c,tp) function s.desfilter(c,tp)
return c:IsLocation(LOCATION_SZONE) and c:IsControler(1-tp) return c:IsLocation(LOCATION_SZONE) and c:IsControler(1-tp) and c:GetSequence()<5
end end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp) function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.desfilter,1,e:GetHandler(),tp) return eg:IsExists(s.desfilter,1,e:GetHandler(),tp)
......
...@@ -32,25 +32,25 @@ function s.initial_effect(c) ...@@ -32,25 +32,25 @@ function s.initial_effect(c)
e3:SetOperation(s.desop) e3:SetOperation(s.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.filter(c,e,tp) function s.filter(c)
return c:IsSummonPlayer(1-tp) return c:IsAllTypes(TYPE_EFFECT+TYPE_MONSTER) and c:IsFaceup()
end end
function s.tkcon(e,tp,eg,ep,ev,re,r,rp) function s.tkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.filter,1,nil,nil,tp) return eg:IsExists(s.filter,1,nil)
end end
function s.cfilter(c,g,e,tp) function s.cfilter(c,g,tp)
return g:IsContains(c) and c:IsType(TYPE_EFFECT) and c:IsFaceup() return g:IsContains(c) and c:IsAllTypes(TYPE_EFFECT+TYPE_MONSTER) and c:IsFaceup()
and Duel.GetLocationCount(1-c:GetControler(),LOCATION_MZONE)>0 and Duel.GetLocationCount(1-c:GetControler(),LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0,TYPES_TOKEN_MONSTER,0,0,3,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,1-c:GetControler()) and Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0,TYPES_TOKEN_MONSTER,0,0,3,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,1-c:GetControler())
end end
function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and chkc:IsType(TYPE_EFFECT) if chkc then return eg:IsContains(chkc) and chkc:IsAllTypes(TYPE_EFFECT+TYPE_MONSTER)
and chkc:IsFaceup() and chkc:IsOnField() and chkc:IsFaceup() and chkc:IsOnField()
and Duel.GetLocationCount(1-chkc:GetControler(),LOCATION_MZONE)>0 and Duel.GetLocationCount(1-chkc:GetControler(),LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0,TYPES_TOKEN_MONSTER,0,0,3,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,1-chkc:GetControler()) and Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0,TYPES_TOKEN_MONSTER,0,0,3,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,1-chkc:GetControler())
end end
if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,eg,e,tp) end if chk==0 then return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,eg,tp) end
local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,eg,e,tp) local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,eg,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end end
...@@ -58,7 +58,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER)) then return end if not (tc:IsRelateToChain() and tc:IsType(TYPE_MONSTER)) then return end
local sp=tc:GetControler() local sp=tc:GetControler()
if Duel.GetLocationCount(sp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(1-sp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0,TYPES_TOKEN_MONSTER,0,0,3,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,1-sp) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0,TYPES_TOKEN_MONSTER,0,0,3,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP_DEFENSE,1-sp) then return end
local token=Duel.CreateToken(tp,id+o) local token=Duel.CreateToken(tp,id+o)
Duel.SpecialSummon(token,0,tp,1-sp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(token,0,tp,1-sp,false,false,POS_FACEUP_DEFENSE)
...@@ -77,7 +77,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,7 +77,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
g:AddCard(c) g:AddCard(c)
if Duel.Destroy(g,REASON_EFFECT)~=0 then if Duel.Destroy(g,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
if not og:IsContains(c) then return end if not og:IsContains(c) or og:GetCount()<2 then return end
local atk=og:GetCount()-1 local atk=og:GetCount()-1
local token=Duel.CreateToken(tp,id+o*2) local token=Duel.CreateToken(tp,id+o*2)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
......
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