Commit 10d535cd authored by mercury233's avatar mercury233

fix

parent 2550dcd9
......@@ -15,7 +15,7 @@ function c100343002.initial_effect(c)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
......@@ -52,11 +52,12 @@ end
function c100343002.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100343002.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end
function c100343002.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100343002.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
......@@ -64,7 +65,7 @@ function c100343002.thop(e,tp,eg,ep,ev,re,r,rp)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.SendtoDeck(sg,nil,1,REASON_EFFECT)
Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
end
end
end
......@@ -5,7 +5,7 @@ function c100343003.initial_effect(c)
aux.AddCodeList(c,68468459)
--negate attack
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
......
......@@ -21,6 +21,7 @@ function c100343032.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,100343032)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100343032.thtg)
......@@ -46,6 +47,13 @@ function c100343032.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c100343032.fselect(sg)
if #sg==1 then
return sg:GetFirst():IsLocation(LOCATION_MZONE)
else
return sg:GetFirst():IsLocation(LOCATION_GRAVE) and sg:GetNext():IsLocation(LOCATION_GRAVE)
end
end
function c100343032.operation(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c100343032.filter1,tp,LOCATION_MZONE,0,nil)
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100343032.filter2),tp,LOCATION_GRAVE,0,nil)
......@@ -60,13 +68,6 @@ function c100343032.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c100343032.fselect(sg)
if #sg==1 then
return sg:GetFirst():IsLocation(LOCATION_MZONE)
else
return sg:GetFirst():IsLocation(LOCATION_GRAVE) and sg:GetNext():IsLocation(LOCATION_GRAVE)
end
end
function c100343032.thfilter(c)
return not c:IsCode(100343032) and c:IsSetCard(0x15d) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
......
......@@ -26,7 +26,6 @@ function c100343041.initial_effect(c)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c100343041.descon)
e2:SetTarget(c100343041.destg)
e2:SetOperation(c100343041.desop)
c:RegisterEffect(e2)
end
......@@ -51,6 +50,7 @@ function c100343041.rmop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
e:GetHandler():RegisterFlagEffect(100343041,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
......@@ -60,26 +60,17 @@ function c100343041.descon(e,tp,eg,ep,ev,re,r,rp)
return c:IsSummonType(SUMMON_TYPE_FUSION) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c100343041.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,1-tp,LOCATION_MZONE)
end
function c100343041.desop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCountLimit(1)
e1:SetCondition(c100343041.descon2)
e1:SetOperation(c100343041.desop2)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100343041.descon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_MZONE,nil)>0
end
function c100343041.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,100343041)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
......
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