Commit be9ef105 authored by wind2009's avatar wind2009

Fix

parent 8df0989f
Pipeline #32988 passed with stages
in 1 minute and 41 seconds
No preview for this file type
#created by ygomobile #created by ygomobile
100230501 100230501
100200265 100200265
\ No newline at end of file 100234001
100235001
100235002
\ No newline at end of file
...@@ -17,10 +17,12 @@ function s.initial_effect(c) ...@@ -17,10 +17,12 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--synchro effect --synchro effect
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetCondition(s.sccon) e2:SetCondition(s.sccon)
e2:SetTarget(s.sctg) e2:SetTarget(s.sctg)
...@@ -41,7 +43,7 @@ end ...@@ -41,7 +43,7 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
...@@ -66,12 +68,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,12 +68,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.sccon(e,tp,eg,ep,ev,re,r,rp) function s.sccon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return false end return Duel.IsMainPhase() and Duel.GetTurnPlayer()~=tp
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function s.mfilter(c) function s.mfilter(c)
return c:IsRank(RACE_WARRIOR) and c:IsType(TYPE_MONSTER) and c:IsFaceup() return c:IsRace(RACE_WARRIOR) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end end
function s.syncheck(g,tp,syncard) function s.syncheck(g,tp,syncard)
return g:IsExists(s.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard) return g:IsExists(s.mfilter,1,nil) and syncard:IsSynchroSummonable(nil,g,#g-1,#g-1) and aux.SynMixHandCheck(g,tp,syncard)
......
...@@ -46,22 +46,24 @@ function s.ntcon(e,c,minc) ...@@ -46,22 +46,24 @@ function s.ntcon(e,c,minc)
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.cfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(s.cfilter,c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end end
function s.cfilter(c,tp) function s.lvcfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsLevelAbove(1) return c:IsSummonPlayer(tp) and c:IsLevelAbove(1) and c:IsPosition(POS_FACEUP_ATTACK)
end end
function s.lvcon(e,tp,eg,ep,ev,re,r,rp) function s.lvcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,1-tp) return eg:IsExists(s.lvcfilter,1,nil,1-tp)
end end
function s.lvop(e,tp,eg,ep,ev,re,r,rp) function s.lvop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id) local g=eg:Filter(s.lvcfilter,nil,1-tp)
local g=eg:Filter(s.cfilter,nil,1-tp) if g:GetCount()>0 then
for tc in aux.Next(g) do Duel.Hint(HINT_CARD,0,id)
local e1=Effect.CreateEffect(e:GetHandler()) for tc in aux.Next(g) do
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetValue(7) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(7)
tc:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end end
end end
function s.negcon(e,tp,eg,ep,ev,re,r,rp) function s.negcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,7 +19,7 @@ function s.initial_effect(c) ...@@ -19,7 +19,7 @@ function s.initial_effect(c)
--get effect --get effect
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_NEGATE) e3:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1) e3:SetCountLimit(1)
...@@ -30,9 +30,8 @@ function s.initial_effect(c) ...@@ -30,9 +30,8 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.cfilter(c,e,tp) function s.cfilter(c,e,tp)
local lv=c:GetLevel() return c:IsRace(RACE_FISH) and Duel.GetMZoneCount(tp,c)>0
return lv>0 and c:IsRace(RACE_FISH) and c:IsSetCard(0x1b8) and (c:IsControler(tp) or c:IsFaceup())
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsRace(RACE_FISH) and c:IsSetCard(0x1b8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_FISH) and c:IsSetCard(0x1b8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -40,7 +39,6 @@ end ...@@ -40,7 +39,6 @@ end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,nil,e,tp) end if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,nil,e,tp) local g=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetLevel())
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -70,7 +68,7 @@ end ...@@ -70,7 +68,7 @@ end
function s.discon(e,tp,eg,ep,ev,re,r,rp) function s.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsSetCard(0x11b8) return c:IsSetCard(0x11b8)
and not c:IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp and not c:IsStatus(STATUS_BATTLE_DESTROYED)
and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainDisablable(ev) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainDisablable(ev)
end end
function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
......
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