Commit 2a56e423 authored by wind2009's avatar wind2009

Fix

parent ea78aec2
Pipeline #41753 passed with stages
in 1 minute and 53 seconds
...@@ -60,10 +60,11 @@ function s.bfilter(c) ...@@ -60,10 +60,11 @@ function s.bfilter(c)
and (c:IsAbleToHand() or c:IsAbleToExtra()) and (c:IsAbleToHand() or c:IsAbleToExtra())
end end
function s.bstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.bstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and s.bfilter(chkc) and chkc~=e:GetHandler() end local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(s.bfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and s.bfilter(chkc) and chkc~=c end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT) if chk==0 then return Duel.IsExistingTarget(s.bfilter,tp,LOCATION_ONFIELD,0,1,c) end
local g=Duel.SelectTarget(tp,s.bfilter,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.bfilter,tp,LOCATION_ONFIELD,0,1,1,c)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:IsAbleToExtra() then if tc:IsAbleToExtra() then
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
......
...@@ -4,7 +4,6 @@ function s.initial_effect(c) ...@@ -4,7 +4,6 @@ function s.initial_effect(c)
--equip --equip
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_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE+LOCATION_HAND) e1:SetRange(LOCATION_GRAVE+LOCATION_HAND)
...@@ -44,7 +43,7 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -44,7 +43,7 @@ function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then if tc:IsRelateToChain() and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
local ec=g:GetFirst() local ec=g:GetFirst()
......
...@@ -19,6 +19,7 @@ function s.initial_effect(c) ...@@ -19,6 +19,7 @@ function s.initial_effect(c)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(s.discon2) e2:SetCondition(s.discon2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon --spsummon
......
...@@ -82,7 +82,7 @@ end ...@@ -82,7 +82,7 @@ end
function s.discon(e,tp,eg,ep,ev,re,r,rp) function s.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return ep==1-tp return ep==1-tp
and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainDisablable(ev)
end end
function s.cgfilter(c) function s.cgfilter(c)
return c:IsFaceup() and c:GetEquipTarget() and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:GetEquipTarget() and c:IsAbleToGraveAsCost()
......
...@@ -10,7 +10,7 @@ function s.initial_effect(c) ...@@ -10,7 +10,7 @@ function s.initial_effect(c)
--apply effect --apply effect
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP+CATEGORY_GRAVE_ACTION) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
...@@ -31,7 +31,6 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,7 +31,6 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil) local b1=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil)
local b2=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local b2=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function s.op(e,tp,eg,ep,ev,re,r,rp) function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -13,9 +13,12 @@ function s.initial_effect(c) ...@@ -13,9 +13,12 @@ function s.initial_effect(c)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.racefilter(c,sc)
return c:IsFaceup() and aux.SameValueCheck(Group.FromCards(c,sc),Card.GetRace)
end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsSetCard(0x9c,0x53) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x9c,0x53) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsRace),tp,LOCATION_ONFIELD,0,1,nil,c:GetRace()) and not Duel.IsExistingMatchingCard(s.racefilter,tp,LOCATION_ONFIELD,0,1,nil,c)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsSetCard(0x9c,0x53) and c:IsFaceup() return c:IsSetCard(0x9c,0x53) and c:IsFaceup()
...@@ -25,7 +28,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -25,7 +28,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local sg=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,e:GetHandler(),REASON_EFFECT+REASON_DISCARD) local sg=Duel.GetMatchingGroup(Card.IsDiscardable,tp,LOCATION_HAND,0,e:GetHandler(),REASON_EFFECT+REASON_DISCARD)
local b1=sg:GetCount()>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) local b1=sg:GetCount()>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.GetMZoneCount(tp)>0 and Duel.GetMZoneCount(tp)>0
local ct=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):FilterCount(s.cfilter,nil) local ct=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,0,nil)
local b2=ct>0 and Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil) local b2=ct>0 and Duel.IsExistingTarget(aux.NegateMonsterFilter,tp,0,LOCATION_MZONE,1,nil)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=0 local op=0
...@@ -59,7 +62,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +62,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local dg=sg:Select(tp,1,1,nil) local dg=sg:Select(tp,1,1,nil)
Duel.ShuffleHand(tp)
if Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)~=0 if Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -4,7 +4,7 @@ function s.initial_effect(c) ...@@ -4,7 +4,7 @@ function s.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,nil,4,3,nil,nil,99) aux.AddXyzProcedure(c,nil,4,3,nil,nil,99)
c:EnableReviveLimit() c:EnableReviveLimit()
--Cannot be effect --Cannot be effect target
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
...@@ -17,7 +17,7 @@ function s.initial_effect(c) ...@@ -17,7 +17,7 @@ function s.initial_effect(c)
--Search --Search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0)) e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
......
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