Commit 08a6e7e2 authored by Amiya's avatar Amiya

莫忘新卡修复

parent 0085fd27
...@@ -5,7 +5,7 @@ function s.initial_effect(c) ...@@ -5,7 +5,7 @@ function s.initial_effect(c)
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1a1),2,true) aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1a1),2,true)
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_TOGRAVE) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_DESTROY+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
...@@ -54,13 +54,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,13 +54,14 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg1=g:SelectSubGroup(tp,aux.dncheck,false,1,2) local tg1=g:SelectSubGroup(tp,aux.dncheck,false,1,2)
Duel.SendtoHand(tg1,nil,REASON_EFFECT) if tg1 then
Duel.ConfirmCards(1-tp,tg1) Duel.SendtoHand(tg1,nil,REASON_EFFECT)
Duel.ShuffleHand(tp) Duel.ConfirmCards(1-tp,tg1)
Duel.ShuffleHand(tp)
end
end end
end end
function s.tdtg(e,c) function s.tdtg(e,c)
......
...@@ -7,6 +7,7 @@ function s.initial_effect(c) ...@@ -7,6 +7,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCondition(s.condition)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -30,15 +31,28 @@ function s.initial_effect(c) ...@@ -30,15 +31,28 @@ function s.initial_effect(c)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function s.spcfilter(c,tp) function s.spcfilter1(c)
return c:IsReason(REASON_EFFECT)
and c:IsPreviousLocation(LOCATION_MZONE)
end
function s.spcfilter2(c,tp)
return c:IsReason(REASON_EFFECT) return c:IsReason(REASON_EFFECT)
and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
end end
function s.regcon(e,tp,eg,ep,ev,re,r,rp) function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.spcfilter,1,nil,tp) return eg:IsExists(s.spcfilter1,1,nil)
end end
function s.regop(e,tp,eg,ep,ev,re,r,rp) function s.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) if eg:IsExists(s.spcfilter2,1,nil,0) then
Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
if eg:IsExists(s.spcfilter2,1,nil,1) then
Duel.RegisterFlagEffect(1,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end end
function s.filter1(c,e) function s.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
...@@ -88,7 +102,7 @@ end ...@@ -88,7 +102,7 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter2,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter2,nil,e)
local mg2=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_GRAVE,0,nil,e) local mg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter1),tp,LOCATION_GRAVE,0,nil,e)
if Duel.GetFlagEffect(tp,id)~=0 then if Duel.GetFlagEffect(tp,id)~=0 then
mg1:Merge(mg2) mg1:Merge(mg2)
end end
......
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