Commit 96c0f1fb authored by wind2009's avatar wind2009

Fix ナイトメア・スローン

修复里侧表示于贝尔被破坏也能触发②效果、可以根据被破坏的对方于贝尔怪兽的等级选卡的bug
parent 226ca185
Pipeline #25226 passed with stages
in 1 minute and 1 second
No preview for this file type
......@@ -26,7 +26,7 @@ function s.initial_effect(c)
end
function s.val(e,c)
local r=c:GetRace()
if bit.band(r,RACE_INSECT+RACE_PLANT+RACE_REPTILE)>0 then return 300
if bit.band(r,RACE_INSECT+RACE_PLANT+RACE_REPTILE)~=0 then return 300
else return -300 end
end
function s.filter1(c)
......@@ -59,7 +59,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then
if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_HAND) then
......
......@@ -9,7 +9,7 @@ function s.initial_effect(c)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_LEAVE_FIELD)
......@@ -27,7 +27,7 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg=g:Select(tp,1,1,nil)
local tc=sg:GetFirst()
if tc:IsAbleToHand() and not Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
......@@ -39,18 +39,18 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.cfilter(c,tp)
return c:IsSetCard(0x1a5) and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
return c:IsSetCard(0x1a5) and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.filter(c,lv)
return c:IsSetCard(0x1a5) and (c:IsLevel(lv-1) or c:IsLevel(lv+1))
function s.filter(c,lv,tp)
return s.cfilter(c,tp) and (c:IsLevel(lv-1) or c:IsLevel(lv+1))
end
function s.spfilter(c,e,tp,eg)
local lv=c:GetLevel()
return c:IsSetCard(0x1a5) and c:IsFaceupEx() and c:IsAbleToHand()
and eg:IsExists(s.filter,1,nil,lv)
and eg:IsExists(s.filter,1,nil,lv,tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp,eg) 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