Commit 382fe77f authored by Amiya's avatar Amiya

修复

parent 121c1df7
Pipeline #31295 passed with stages
in 1 minute and 13 seconds
...@@ -12,7 +12,8 @@ function s.initial_effect(c) ...@@ -12,7 +12,8 @@ function s.initial_effect(c)
end end
function s.tgfilter(c,ec) function s.tgfilter(c,ec)
return c:IsFaceup() and c:IsSetCard(0x150) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsSetCard(0x150) and c:IsAbleToGraveAsCost()
and (Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,ec)) or Duel.GetMZoneCount(tp,c)>0) and (Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,Group.FromCards(c,ec))
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp,c))
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsCanRemoveCounter(tp,1,0,0x1,2,REASON_COST) local b1=Duel.IsCanRemoveCounter(tp,1,0,0x1,2,REASON_COST)
...@@ -24,7 +25,6 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -24,7 +25,6 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
{b1,aux.Stringid(id,1),1}, {b1,aux.Stringid(id,1),1},
{b2,aux.Stringid(id,2),2}) {b2,aux.Stringid(id,2),2})
end end
e:SetLabel(cost)
if cost==1 then if cost==1 then
Duel.RemoveCounter(tp,1,0,0x1,2,REASON_COST) Duel.RemoveCounter(tp,1,0,0x1,2,REASON_COST)
elseif cost==2 then elseif cost==2 then
...@@ -35,12 +35,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,12 +35,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.spfilter(c,e,tp,rc) function s.spfilter(c,e,tp,rc)
return c:IsFaceupEx() and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceupEx() and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetMZoneCount(tp)>0 and (not c:IsLocation(LOCATION_EXTRA) and Duel.GetMZoneCount(tp,rc)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,rc,c)>0) or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,rc,c)>0)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp,nil) local b1=e:IsCostChecked() or (Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp,nil)
and Duel.GetFlagEffect(tp,id)==0 and Duel.GetFlagEffect(tp,id)==0)
local b2=(Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) or not e:IsCostChecked()) local b2=(Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) or not e:IsCostChecked())
and Duel.GetFlagEffect(tp,id+o)==0 and Duel.GetFlagEffect(tp,id+o)==0
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 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