Commit cd0e9c37 authored by mercury233's avatar mercury233

fix

parent 3e45ac80
......@@ -26,7 +26,7 @@ function c100420001.initial_effect(c)
c:RegisterEffect(e2)
end
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
function c100420001.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100420001.cfilter,1,nil)
......@@ -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)
end
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
......@@ -11,6 +11,7 @@ function c100420018.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100420018)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(c100420018.spcon)
e1:SetTarget(c100420018.sptg)
e1:SetOperation(c100420018.spop)
c:RegisterEffect(e1)
......@@ -41,6 +42,9 @@ function c100420018.initial_effect(c)
e3:SetOperation(c100420018.dmgop)
c:RegisterEffect(e3)
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)
return c:IsSetCard(0x195) and c:IsFaceup() and c:IsAbleToHand() and not c:IsRace(RACE_MACHINE)
and Duel.GetMZoneCount(tp,c)>0
......
......@@ -9,7 +9,9 @@ function c100420021.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100420021)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(c100420021.spcon)
e1:SetTarget(c100420021.sptg)
e1:SetOperation(c100420021.spop)
c:RegisterEffect(e1)
......@@ -38,6 +40,9 @@ function c100420021.initial_effect(c)
e3:SetOperation(c100420021.desop)
c:RegisterEffect(e3)
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)
return c:IsSetCard(0x195) and c:IsFaceup() and c:IsAbleToHand() and not c:IsRace(RACE_DRAGON)
and Duel.GetMZoneCount(tp,c)>0
......
......@@ -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
Duel.PayLPCost(tp,500)
end
function c100420025.filter(c,e,tp)
function c100420025.filter(c,e,tp,ft)
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
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
if chk==0 then return Duel.IsExistingTarget(c100420025.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
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.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
function c100420025.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if aux.NecroValleyNegateCheck(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
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
......
......@@ -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)
if e:GetLabel()>0 and #rg>0 then
Duel.BreakEffect()
Duel.Release(g,REASON_EFFECT)
Duel.Release(rg,REASON_EFFECT)
end
end
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