Commit b6702fd0 authored by wind2009's avatar wind2009

Fix

parent c1f324a9
No preview for this file type
...@@ -47,7 +47,7 @@ end ...@@ -47,7 +47,7 @@ end
function s.checkop(e,tp,eg,ep,ev,re,r,rp) function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetCount() local tc=eg:GetCount()
for tc in aux.Next(eg) do for tc in aux.Next(eg) do
if tc:IsPreviousLocation(LOCATION_DECK+LOCATION_HAND) if tc:IsPreviousLocation(LOCATION_DECK+LOCATION_HAND) and not tc:IsCode(id)
and tc:IsType(TYPE_MONSTER) then and tc:IsType(TYPE_MONSTER) then
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(1-tp,id,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(1-tp,id,RESET_PHASE+PHASE_END,0,1)
......
...@@ -16,7 +16,7 @@ function s.initial_effect(c) ...@@ -16,7 +16,7 @@ function s.initial_effect(c)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
...@@ -26,12 +26,11 @@ function s.initial_effect(c) ...@@ -26,12 +26,11 @@ function s.initial_effect(c)
e2:SetTarget(s.sptg) e2:SetTarget(s.sptg)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy --search
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2)) e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o*2) e3:SetCountLimit(1,id+o*2)
e3:SetCost(s.thcost2) e3:SetCost(s.thcost2)
......
...@@ -66,7 +66,7 @@ function s.rfilter(c,tp,ec) ...@@ -66,7 +66,7 @@ function s.rfilter(c,tp,ec)
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)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE,0,c,tp) local g=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE,0,c,tp,c)
if chk==0 then return #g>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) end if chk==0 then return #g>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_RELEASE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
......
...@@ -106,9 +106,11 @@ end ...@@ -106,9 +106,11 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=2 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if g:CheckSubGroup(s.spgcheck,3,3,tp) then
local sg=g:SelectSubGroup(tp,s.spgcheck,false,3,3,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if sg:GetCount()>2 then local sg=g:SelectSubGroup(tp,s.spgcheck,false,3,3,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) if sg:GetCount()>2 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end end
end end
\ No newline at end of file
...@@ -18,7 +18,7 @@ function s.initial_effect(c) ...@@ -18,7 +18,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--negate --negate
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_NEGATE) e3:SetCategory(CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
......
...@@ -13,6 +13,7 @@ function s.initial_effect(c) ...@@ -13,6 +13,7 @@ function s.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT) e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCondition(s.rmcon)
e2:SetTarget(s.rmtarget) e2:SetTarget(s.rmtarget)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetValue(LOCATION_REMOVED) e2:SetValue(LOCATION_REMOVED)
...@@ -37,6 +38,9 @@ function s.initial_effect(c) ...@@ -37,6 +38,9 @@ function s.initial_effect(c)
e4:SetLabelObject(e3) e4:SetLabelObject(e3)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function s.rmtarget(e,c) function s.rmtarget(e,c)
return c:IsLocation(LOCATION_MZONE) and not c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsLocation(LOCATION_MZONE) and not c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
...@@ -46,7 +50,6 @@ end ...@@ -46,7 +50,6 @@ end
function s.costfilter(c,tp) function s.costfilter(c,tp)
return c:IsSetCard(0x2c1) and c:IsAbleToDeckAsCost() return c:IsSetCard(0x2c1) and c:IsAbleToDeckAsCost()
and bit.band(c:GetType(),TYPE_SPELL+TYPE_CONTINUOUS)==TYPE_SPELL+TYPE_CONTINUOUS and bit.band(c:GetType(),TYPE_SPELL+TYPE_CONTINUOUS)==TYPE_SPELL+TYPE_CONTINUOUS
and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
end end
function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
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