Commit 1d1ca6f4 authored by zengsxing's avatar zengsxing

fix

parent b3f01c2e
Pipeline #41061 passed with stages
in 3 minutes and 37 seconds
No preview for this file type
......@@ -43,10 +43,10 @@ function s.mfilter(c)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.mfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.mfilter,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(s.mfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,s.mfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -55,15 +55,19 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToChain() and tc:IsFaceup() and ct>0 then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.CheckEquipTarget),tp,LOCATION_GRAVE+LOCATION_HAND,0,nil,tc)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct)
if not sg or sg:GetCount()==0 then return end
for ec in aux.Next(sg) do
Duel.Equip(tp,ec,tc,true,true)
if Duel.Equip(tp,ec,tc,true,true) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetDescription(aux.Stringid(id,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e1:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE))
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e1,true)
end
end
Duel.EquipComplete()
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