Commit 67c9f811 authored by wind2009's avatar wind2009

Fix

parent 39aad5df
......@@ -46,20 +46,21 @@ end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.eqfilter(c)
return c:IsType(TYPE_EQUIP) and not c:IsForbidden()
function s.eqfilter(c,tp)
return c:IsType(TYPE_EQUIP) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_SZONE)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToChain() then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE,0,1,ft,nil)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE,0,1,ft,nil,tp)
if g:GetCount()>0 then
for tc in aux.Next(g) do
Duel.Equip(tp,tc,c,false,true)
......
--終獄龍機Ⅻ-ドラストリウス
--終獄龍機ⅩⅡ-ドラストリウス
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
......@@ -57,6 +57,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,aux.ExceptThisCard(e),tp)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
......@@ -94,9 +95,10 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
local g=Duel.SelectMatchingCard(tp,s.eqfilter,tp,0,LOCATION_MZONE,1,1,aux.ExceptThisCard(e),tp)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
......
......@@ -40,7 +40,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
if Duel.Destroy(g,REASON_EFFECT)>0 and c:IsRelateToChain()
if Duel.Destroy(g,REASON_EFFECT)>0
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
......
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