Commit cd0e9c37 authored by mercury233's avatar mercury233

fix

parent 3e45ac80
...@@ -26,7 +26,7 @@ function c100420001.initial_effect(c) ...@@ -26,7 +26,7 @@ function c100420001.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c100420001.cfilter(c) function c100420001.cfilter(c)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsType(TYPE_TOKEN) return c:IsReason(REASON_BATTLE+REASON_EFFECT)
end end
function c100420001.spcon(e,tp,eg,ep,ev,re,r,rp) function c100420001.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100420001.cfilter,1,nil) return eg:IsExists(c100420001.cfilter,1,nil)
...@@ -76,5 +76,5 @@ function c100420001.dspop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,5 +76,5 @@ function c100420001.dspop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
function c100420001.splimit(e,c) function c100420001.splimit(e,c)
return not c:IsRace(RACE_DRAGON+RACE_DINOSAUR+RACE_SEASERPENT+RACE_WYRM) return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_DRAGON+RACE_DINOSAUR+RACE_SEASERPENT+RACE_WYRM)
end end
...@@ -11,6 +11,7 @@ function c100420018.initial_effect(c) ...@@ -11,6 +11,7 @@ function c100420018.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100420018) e1:SetCountLimit(1,100420018)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(c100420018.spcon)
e1:SetTarget(c100420018.sptg) e1:SetTarget(c100420018.sptg)
e1:SetOperation(c100420018.spop) e1:SetOperation(c100420018.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -41,6 +42,9 @@ function c100420018.initial_effect(c) ...@@ -41,6 +42,9 @@ function c100420018.initial_effect(c)
e3:SetOperation(c100420018.dmgop) e3:SetOperation(c100420018.dmgop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c100420018.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c100420018.spfilter(c,tp) function c100420018.spfilter(c,tp)
return c:IsSetCard(0x195) and c:IsFaceup() and c:IsAbleToHand() and not c:IsRace(RACE_MACHINE) return c:IsSetCard(0x195) and c:IsFaceup() and c:IsAbleToHand() and not c:IsRace(RACE_MACHINE)
and Duel.GetMZoneCount(tp,c)>0 and Duel.GetMZoneCount(tp,c)>0
......
...@@ -9,7 +9,9 @@ function c100420021.initial_effect(c) ...@@ -9,7 +9,9 @@ function c100420021.initial_effect(c)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100420021)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(c100420021.spcon)
e1:SetTarget(c100420021.sptg) e1:SetTarget(c100420021.sptg)
e1:SetOperation(c100420021.spop) e1:SetOperation(c100420021.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -38,6 +40,9 @@ function c100420021.initial_effect(c) ...@@ -38,6 +40,9 @@ function c100420021.initial_effect(c)
e3:SetOperation(c100420021.desop) e3:SetOperation(c100420021.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c100420021.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c100420021.spfilter(c,tp) function c100420021.spfilter(c,tp)
return c:IsSetCard(0x195) and c:IsFaceup() and c:IsAbleToHand() and not c:IsRace(RACE_DRAGON) return c:IsSetCard(0x195) and c:IsFaceup() and c:IsAbleToHand() and not c:IsRace(RACE_DRAGON)
and Duel.GetMZoneCount(tp,c)>0 and Duel.GetMZoneCount(tp,c)>0
......
...@@ -17,22 +17,23 @@ function c100420025.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,22 +17,23 @@ function c100420025.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500) Duel.PayLPCost(tp,500)
end end
function c100420025.filter(c,e,tp) function c100420025.filter(c,e,tp,ft)
return c:IsSetCard(0x195) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x195) and c:IsType(TYPE_MONSTER)
and (c:IsAbleToHand() or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))) and (c:IsAbleToHand() or ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE))
end end
function c100420025.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100420025.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100420025.filter(chkc,e,tp) end local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.IsExistingTarget(c100420025.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100420025.filter(chkc,e,tp,ft) end
if chk==0 then return Duel.IsExistingTarget(c100420025.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp,ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100420025.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) Duel.SelectTarget(tp,c100420025.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,ft)
end end
function c100420025.activate(e,tp,eg,ep,ev,re,r,rp) function c100420025.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
if aux.NecroValleyNegateCheck(tc) then return end if aux.NecroValleyNegateCheck(tc) then return end
if not aux.NecroValleyFilter()(tc) then return end if not aux.NecroValleyFilter()(tc) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else else
......
...@@ -53,7 +53,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +53,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
local rg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) local rg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
if e:GetLabel()>0 and #rg>0 then if e:GetLabel()>0 and #rg>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Release(g,REASON_EFFECT) Duel.Release(rg,REASON_EFFECT)
end end
end end
function s.relfilter(c) function s.relfilter(c)
......
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