Commit 27fa54d7 authored by nekrozar's avatar nekrozar

fix & update Subterror Nemesis Warrior

https://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=21344

質問の状況のように、効果を発動した「サブテラーの戦士」自身のコントロールが相手に移っている場合でも、自身をリリースする処理は通常通り適用されます。
parent 3daf9773
...@@ -33,25 +33,31 @@ end ...@@ -33,25 +33,31 @@ end
function c16719140.costfilter(c,e,tp,mg,rlv) function c16719140.costfilter(c,e,tp,mg,rlv)
if not (c:IsLevelAbove(0) and c:IsSetCard(0xed) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() if not (c:IsLevelAbove(0) and c:IsSetCard(0xed) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))) then return false end and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN))) then return false end
local lv=c:GetLevel()-rlv return mg:CheckSubGroup(c16719140.fselect,1,c:GetLevel(),tp,c:GetLevel()-rlv)
return mg:GetCount()>0 and (lv<=0 or mg:CheckWithSumGreater(Card.GetOriginalLevel,lv)) end
function c16719140.fselect(g,tp,lv)
if Duel.GetMZoneCount(tp,g)>0 then
if lv<=0 then
return g:GetCount()==1
else
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetOriginalLevel,lv)
end
else return false end
end end
function c16719140.relfilter(c) function c16719140.relfilter(c)
return c:IsLevelAbove(1) and c:IsReleasableByEffect() return c:IsLevelAbove(1) and c:IsReleasableByEffect()
end end
function c16719140.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c16719140.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local mg=Duel.GetReleaseGroup(tp):Filter(c16719140.relfilter,nil) local mg=Duel.GetReleaseGroup(tp):Filter(c16719140.relfilter,c)
if chk==0 then if chk==0 then
if e:GetLabel()~=100 then return false end if e:GetLabel()~=100 then return false end
e:SetLabel(0) e:SetLabel(0)
if not mg:IsContains(c) then return false end if not c:IsLevelAbove(1) or not c:IsReleasableByEffect() or mg:GetCount()==0 then return false end
mg:RemoveCard(c) return Duel.IsExistingMatchingCard(c16719140.costfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mg,c:GetOriginalLevel())
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c16719140.costfilter,tp,LOCATION_DECK,0,1,nil,e,tp,mg,c:GetOriginalLevel())
end end
e:SetLabel(0) e:SetLabel(0)
mg:RemoveCard(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c16719140.costfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mg,c:GetOriginalLevel()) local g=Duel.SelectMatchingCard(tp,c16719140.costfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,mg,c:GetOriginalLevel())
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
...@@ -60,29 +66,24 @@ function c16719140.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -60,29 +66,24 @@ function c16719140.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c16719140.spop1(e,tp,eg,ep,ev,re,r,rp) function c16719140.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<-1 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
local mg=Duel.GetReleaseGroup(tp):Filter(c16719140.relfilter,nil) local mg=Duel.GetReleaseGroup(tp):Filter(c16719140.relfilter,c)
if not mg:IsContains(c) then return end
mg:RemoveCard(c)
if mg:GetCount()==0 then return end if mg:GetCount()==0 then return end
local spos=0 local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_DEFENSE end if tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then spos=spos+POS_FACEUP_DEFENSE end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 then if spos~=0 then
local lv=tc:GetLevel()-c:GetOriginalLevel() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Group.CreateGroup() local g=mg:SelectSubGroup(tp,c16719140.fselect,false,1,tc:GetLevel(),tp,tc:GetLevel()-c:GetOriginalLevel())
if lv<=0 then if g and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) g:AddCard(c)
g=mg:Select(tp,1,1,nil) if Duel.Release(g,REASON_EFFECT)~=0 then
else Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) if tc:IsFacedown() then
g=mg:SelectWithSumGreater(tp,Card.GetOriginalLevel,lv) Duel.ConfirmCards(1-tp,tc)
end end
g:AddCard(c) end
if g:GetCount()>=2 and Duel.Release(g,REASON_EFFECT)~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)
end end
end end
end 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