Commit 8d1ca9e0 authored by mercury233's avatar mercury233

fix

parent 85ac055e
...@@ -51,6 +51,7 @@ function c101010081.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,6 +51,7 @@ function c101010081.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c101010081.cfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c101010081.cfilter),tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(101010081,0)) then and Duel.SelectYesNo(tp,aux.Stringid(101010081,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101010081.cfilter),tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101010081.cfilter),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
......
...@@ -34,17 +34,18 @@ function c101011010.initial_effect(c) ...@@ -34,17 +34,18 @@ function c101011010.initial_effect(c)
e3:SetOperation(c101011010.desop) e3:SetOperation(c101011010.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101011010.tgfilter(c) function c101011010.tgfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(c101011010.thfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetCode()) return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGrave()
and Duel.IsExistingMatchingCard(c101011010.thfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetCode())
end end
function c101011010.thfilter(c,code) function c101011010.thfilter(c,code)
return c:IsSetCard(0x237) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() and not c:IsCode(code) return c:IsSetCard(0x237) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() and not c:IsCode(code)
end end
function c101011010.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101011010.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c101011010.tgfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and c101011010.tgfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c101011010.tgfilter,tp,LOCATION_SZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c101011010.tgfilter,tp,LOCATION_SZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c101011010.tgfilter,tp,LOCATION_SZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c101011010.tgfilter,tp,LOCATION_SZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end end
......
...@@ -51,7 +51,7 @@ function c101011013.atkcon(e) ...@@ -51,7 +51,7 @@ function c101011013.atkcon(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer() return Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end end
function c101011013.atkval(e,c) function c101011013.atkval(e,c)
return Duel.GetFieldGroupCount(e:GetHandler(),0,LOCATION_MZONE)*300 return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)*300
end end
function c101011013.xatkcon(e,tp,eg,ep,ev,re,r,rp) function c101011013.xatkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)
......
...@@ -7,8 +7,8 @@ function c101011021.initial_effect(c) ...@@ -7,8 +7,8 @@ function c101011021.initial_effect(c)
e1:SetDescription(aux.Stringid(101011021,0)) e1:SetDescription(aux.Stringid(101011021,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END) e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101011021) e1:SetCountLimit(1,101011021)
e1:SetCondition(c101011021.spcon) e1:SetCondition(c101011021.spcon)
...@@ -27,24 +27,34 @@ function c101011021.initial_effect(c) ...@@ -27,24 +27,34 @@ function c101011021.initial_effect(c)
e2:SetOperation(c101011021.cpop) e2:SetOperation(c101011021.cpop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101011021.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
function c101011021.spfilter(c,e,tp)
return c:IsSetCard(0x128) and c:IsType(TYPE_MONSTER) and not c:IsCode(101011021) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101011021.spcon(e,tp,eg,ep,ev,re,r,rp) function c101011021.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end end
function c101011021.costfilter(c,tp)
if c:IsLocation(LOCATION_HAND) then return c:IsType(TYPE_SPELL) and c:IsDiscardable() end
return c:IsFaceup() and c:IsAbleToGraveAsCost() and c:IsHasEffect(83289866,tp)
end
function c101011021.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101011021.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() and Duel.IsExistingMatchingCard(c101011021.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101011021.costfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil,tp) end
local g=Duel.GetMatchingGroup(c101011021.costfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,c101011021.cfilter,tp,LOCATION_HAND,0,1,1,nil) local tc=g:Select(tp,1,1,nil):GetFirst()
local te=tc:IsHasEffect(83289866,tp)
if te then
te:UseCountLimit(tp)
Duel.Release(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(tc,REASON_COST)
else
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end
end
function c101011021.spfilter(c,e,tp)
return c:IsSetCard(0x128) and not c:IsCode(101011021) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101011021.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101011021.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101011021.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c101011021.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c101011021.spop(e,tp,eg,ep,ev,re,r,rp) function c101011021.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -6,6 +6,7 @@ function c101011070.initial_effect(c) ...@@ -6,6 +6,7 @@ function c101011070.initial_effect(c)
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN) e0:SetCode(EVENT_FREE_CHAIN)
e0:SetHintTiming(0,TIMING_MAIN_END+TIMING_END_PHASE)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--actlimit --actlimit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -67,7 +68,7 @@ function c101011070.atop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +68,7 @@ function c101011070.atop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET) e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c101011070.atlimit) e1:SetValue(c101011070.atlimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
......
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