Commit 2be1e9df authored by POLYMER's avatar POLYMER

fix

parent 553c6e3e
......@@ -4,6 +4,9 @@ if not pcall(function() require("expansions/script/c10122001") end) then require
function s.initial_effect(c)
local e1 = Scl.CreateActivateEffect(c,"FreeChain","Destroy",nil,"Destroy,Draw,BanishFacedown", nil, nil, nil, { { "~Target", "Destroy", s.dfilter, "OnField",0, true, true, c }, { "PlayerTarget", "Draw", scl.black_hole_count } }, s.act)
end
function s.dfilter(c)
return c:IsSetCard(0xc333) and c:IsFaceup()
end
function s.act(e,tp)
local g = Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_ONFIELD,0,aux.ExceptThisCard(e))
if #g == 0 then return end
......
......@@ -56,7 +56,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -91,7 +91,8 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if not rc:IsRelateToEffect(re) then return end
local proc=rc:IsCode(12866705) and c:IsCode(12866600)
local b1=rc:IsAbleToGrave() and not rc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED)
local b2=(Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (rc:IsCanBeSpecialSummoned(e,0,tp,false,false)) or rc:IsCanBeSpecialSummoned(e,0,tp,proc,proc))
local b2=(Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and aux.NecroValleyFilter()(tc)
and (rc:IsCanBeSpecialSummoned(e,0,tp,false,false)) or rc:IsCanBeSpecialSummoned(e,0,tp,proc,proc))
if chk==0 then return b1 or b2 end
if re:GetHandler():IsAttribute(ATTRIBUTE_DARK) then
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
......@@ -105,6 +106,12 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,id+o*4,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
Duel.SetTargetCard(rc)
if rc:IsLocation(LOCATION_GRAVE) then
e:SetCategory(CATEGORY_GRAVE_SPSUMMON+CATEGORY_LEAVE_GRAVE)
end
if rc:IsLocation(LOCATION_DECK) then
e:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON)
end
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -67,9 +67,6 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
......
......@@ -27,7 +27,7 @@ function c22021060.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c12607053.activate(e,tp,eg,ep,ev,re,r,rp)
function c22021060.activate(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
......@@ -42,5 +42,6 @@ end
function c22021060.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.ChainAttack()
Duel.ChainAttack()
end
end
......@@ -97,11 +97,11 @@ function s.thop2(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(s.sumfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
local se=e:GetLabelObject()
if Duel.IsExistingMatchingCard(s.sumfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,se)
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
local se=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,s.sumfilter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,se)
if sg:GetCount()>0 then
......
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