Commit b5e31f18 authored by wind2009's avatar wind2009

Fix

parent 63cadf84
Pipeline #31903 passed with stages
in 1 minute and 7 seconds
...@@ -31,7 +31,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonPlayer,1,e:GetHandler(),1-tp) return eg:IsExists(Card.IsSummonPlayer,1,e:GetHandler(),1-tp)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return not c:IsSetCard(id) and c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return not c:IsCode(id) and c:IsRace(RACE_REPTILE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
......
...@@ -16,12 +16,6 @@ function s.costfilter(c,tp) ...@@ -16,12 +16,6 @@ function s.costfilter(c,tp)
return (c:IsControler(tp) or c:IsFaceup()) return (c:IsControler(tp) or c:IsFaceup())
and c:IsRace(RACE_REPTILE) and c:IsRace(RACE_REPTILE)
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,s.costfilter,1,REASON_COST,true,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,s.costfilter,1,1,REASON_COST,true,nil,tp)
Duel.Release(g,REASON_COST)
end
function s.filter(c) function s.filter(c)
return c:IsSetCard(0x2c4) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x2c4) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
...@@ -29,21 +23,11 @@ function s.spfilter(c,e,tp) ...@@ -29,21 +23,11 @@ function s.spfilter(c,e,tp)
return c:IsSetCard(0x2c4) return c:IsSetCard(0x2c4)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
--- comment
--- @param e Effect
--- @param tp any
--- @param eg any
--- @param ep any
--- @param ev any
--- @param re any
--- @param r any
--- @param rp any
--- @param chk any
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) local b1=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil)
local b2=true local b2=true
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
if b1 and b2 and e:IsCostChecked() and Duel.CheckReleaseGroupEx(tp,s.costfilter,1,REASON_COST,true,nil,tp) if e:IsCostChecked() and Duel.CheckReleaseGroupEx(tp,s.costfilter,1,REASON_COST,true,nil,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,s.costfilter,1,1,REASON_COST,true,nil,tp) local g=Duel.SelectReleaseGroupEx(tp,s.costfilter,1,1,REASON_COST,true,nil,tp)
...@@ -56,23 +40,21 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,23 +40,21 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local op=0 local op=0
local b1=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) local b1=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil)
local b2=true local b2=true
if b1 then if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(id,2))) then
if not b2 or Duel.SelectYesNo(tp,aux.Stringid(id,2)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then
if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g)
Duel.ConfirmCards(1-tp,g)
end
op=1
end end
op=1
end end
local b3=Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
if b2 and (op==0 or e:GetLabel()==1 and Duel.SelectYesNo(tp,aux.Stringid(id,3))) then if b2 and (op==0 or e:GetLabel()==1 and Duel.SelectYesNo(tp,aux.Stringid(id,3))) then
if op~=0 then if op~=0 then
Duel.BreakEffect() Duel.BreakEffect()
end end
Duel.Damage(tp,800,REASON_EFFECT) Duel.Damage(tp,800,REASON_EFFECT)
local b3=Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
if b3 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then if b3 and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
......
...@@ -4,6 +4,7 @@ function s.initial_effect(c) ...@@ -4,6 +4,7 @@ function s.initial_effect(c)
--select effect --select effect
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target) e1:SetTarget(s.target)
......
...@@ -19,7 +19,7 @@ function s.initial_effect(c) ...@@ -19,7 +19,7 @@ function s.initial_effect(c)
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_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
......
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