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
100230501
100200265
100234001
100235001
100235002
\ No newline at end of file
......@@ -17,10 +17,12 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
--synchro effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_MAIN_END)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.sccon)
e2:SetTarget(s.sctg)
......@@ -41,7 +43,7 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
......@@ -66,12 +68,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.sccon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return false end
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
return Duel.IsMainPhase() and Duel.GetTurnPlayer()~=tp
end
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
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)
......
......@@ -46,15 +46,16 @@ function s.ntcon(e,c,minc)
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)
end
function s.cfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsLevelAbove(1)
function s.lvcfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsLevelAbove(1) and c:IsPosition(POS_FACEUP_ATTACK)
end
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
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(s.lvcfilter,nil,1-tp)
if g:GetCount()>0 then
Duel.Hint(HINT_CARD,0,id)
local g=eg:Filter(s.cfilter,nil,1-tp)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -63,6 +64,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
......
......@@ -19,7 +19,7 @@ function s.initial_effect(c)
--get effect
local e3=Effect.CreateEffect(c)
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:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1)
......@@ -30,9 +30,8 @@ function s.initial_effect(c)
c:RegisterEffect(e3)
end
function s.cfilter(c,e,tp)
local lv=c:GetLevel()
return lv>0 and c:IsRace(RACE_FISH) and c:IsSetCard(0x1b8)
and Duel.GetMZoneCount(tp,c)>0 and (c:IsControler(tp) or c:IsFaceup())
return c:IsRace(RACE_FISH) and Duel.GetMZoneCount(tp,c)>0
and (c:IsControler(tp) or c:IsFaceup())
end
function s.spfilter(c,e,tp)
return c:IsRace(RACE_FISH) and c:IsSetCard(0x1b8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -40,7 +39,6 @@ end
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
local g=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetLevel())
Duel.Release(g,REASON_COST)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -70,7 +68,7 @@ end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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)
end
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