Commit 5056a95c authored by wind2009's avatar wind2009

Update リンカーネイト・アンヴェイル・メイル

parent 9a18e34e
No preview for this file type
...@@ -25,14 +25,23 @@ function s.initial_effect(c) ...@@ -25,14 +25,23 @@ function s.initial_effect(c)
e3:SetTarget(s.eftg) e3:SetTarget(s.eftg)
e3:SetLabelObject(e2) e3:SetLabelObject(e2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--equip from grave
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2)) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCategory(CATEGORY_EQUIP) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE) e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetOperation(s.regop)
e4:SetOperation(s.eqzop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,2))
e5:SetCategory(CATEGORY_EQUIP)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_GRAVE)
e5:SetCondition(s.eqcon)
e5:SetTarget(s.eqtg)
e5:SetOperation(s.eqop)
c:RegisterEffect(e5)
end end
function s.ibcon(e,tp,eg,ep,ev,re,r,rp) function s.ibcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget() local ec=e:GetHandler():GetEquipTarget()
...@@ -71,38 +80,27 @@ function s.eftg(e,c) ...@@ -71,38 +80,27 @@ function s.eftg(e,c)
return c:IsType(TYPE_MONSTER) and c:GetEquipGroup():IsContains(e:GetHandler()) return c:IsType(TYPE_MONSTER) and c:GetEquipGroup():IsContains(e:GetHandler())
and c:IsType(TYPE_XYZ) and c:IsType(TYPE_XYZ)
end end
function s.eqzop(e,tp,eg,ep,ev,re,r,rp) function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local fid=c:GetFieldID()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(c)
e1:SetOperation(s.eqcon)
e1:SetOperation(s.eqop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp) function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
local fid=e:GetLabel() return e:GetHandler():GetFlagEffect(id)>0
return Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil,fid)
end end
function s.eqfilter(c,fid) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
return c:GetFlagEffectLabel(id)==fid if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function s.eqfilter2(c,ec) function s.eqfilter(c,ec)
return c:IsType(TYPE_XYZ) and c:IsFaceup() return c:IsType(TYPE_XYZ) and c:IsFaceup()
and ec:CheckEquipTarget(c) and ec:CheckUniqueOnField(tp,LOCATION_SZONE) and not ec:IsForbidden() and ec:CheckEquipTarget(c) and ec:CheckUniqueOnField(tp,LOCATION_SZONE) and not ec:IsForbidden()
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id) local ec=e:GetHandler()
local ec=e:GetLabelObject() if ec:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil,ec) then
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.eqfilter2,tp,LOCATION_MZONE,0,1,nil,ec) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,s.eqfilter2,tp,LOCATION_MZONE,0,1,1,nil,ec):GetFirst() local tg=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,0,1,1,nil,ec)
Duel.Equip(tp,ec,tc) Duel.HintSelection(tg)
Duel.Equip(tp,ec,tg:GetFirst())
end end
end end
\ No newline at end of file
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