Commit e11d04e0 authored by wind2009's avatar wind2009

Merge branch 'patch-1' into 'master'

fix The League of Uniform Nomenclature Strikes

See merge request mycard/pre-release-database-cdb!86
parents afc7448a 3dc05659
...@@ -38,6 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,6 +38,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,2,2,nil,code,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,2,2,nil,code,tp)
if #g<2 then return end if #g<2 then return end
g:KeepAlive()
local ec=g:GetFirst() local ec=g:GetFirst()
while ec do while ec do
if Duel.Equip(tp,ec,tc) then if Duel.Equip(tp,ec,tc) then
...@@ -57,12 +58,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,12 +58,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetLabelObject(g)
e1:SetCondition(s.chkcon) e1:SetCondition(s.chkcon)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1) e2:SetValue(1)
e2:SetLabelObject(g)
e2:SetCondition(s.chkcon) e2:SetCondition(s.chkcon)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
...@@ -81,9 +84,13 @@ end ...@@ -81,9 +84,13 @@ end
function s.splimit(e,c) function s.splimit(e,c)
return c:GetOriginalRace()&e:GetLabel()==0 return c:GetOriginalRace()&e:GetLabel()==0
end end
function s.chkfilter(c,id,eg)
return c:GetFlagEffect(id)>0 and eg:IsContains(c)
end
function s.chkcon(e) function s.chkcon(e)
local c=e:GetHandler() local eg=e:GetHandler():GetEquipGroup()
return c:GetEquipGroup():Filter(Card.GetFlagEffect,nil,id):GetCount()>=2 local g=e:GetLabelObject()
return g:Filter(s.chkfilter,nil,id,eg):GetCount()==2
end end
function s.eqlimit(e,c) function s.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
......
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