Commit 955c066c authored by wind2009's avatar wind2009

Merge branch 'patch-1' into 'master'

fix--魔轟神レヴェルゼブル

See merge request mycard/pre-release-database-cdb!115
parents dd8a9892 ba5d5888
...@@ -32,25 +32,27 @@ function s.ctcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,25 +32,27 @@ function s.ctcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function s.costfilter(c) function s.costfilter(c,tp)
return c:IsSetCard(0x35) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x35) and c:IsType(TYPE_MONSTER) and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0 and Duel.IsExistingTarget(s.ntrfilter,tp,0,LOCATION_MZONE,1,c)
end
function s.ntrfilter(c)
return c:IsFaceup() and c:IsControlerCanBeChanged(true)
end end
function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,s.costfilter,1,REASON_EFFECT,false,nil) if chk==0 then return Duel.CheckReleaseGroupEx(tp,s.costfilter,1,REASON_EFFECT,false,nil,tp) end
and Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil,true) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end end
function s.ctop(e,tp,eg,ep,ev,re,r,rp) function s.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rg=Duel.GetReleaseGroup(tp,false,REASON_EFFECT):Filter(s.costfilter,nil) local rg=Duel.GetReleaseGroup(tp,false,REASON_EFFECT):Filter(s.costfilter,nil,tp)
local og=Duel.GetMatchingGroup(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,nil,true) local og=Duel.GetMatchingGroup(s.ntrfilter,tp,0,LOCATION_MZONE,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:Select(tp,1,og:GetCount(),nil) local sg=rg:Select(tp,1,og:GetCount(),nil)
local ct=Duel.Release(sg,REASON_EFFECT) local ct=Duel.Release(sg,REASON_EFFECT)
if ct>0 then if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local tg=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,ct,ct,nil) local tg=Duel.SelectMatchingCard(tp,s.ntrfilter,tp,0,LOCATION_MZONE,ct,ct,nil)
Duel.HintSelection(tg) Duel.HintSelection(tg)
if not Duel.GetControl(tg,tp) then return end if not Duel.GetControl(tg,tp) then return end
local cg=tg:Filter(Card.IsControler,nil,tp) local cg=tg:Filter(Card.IsControler,nil,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