Commit 2d96a6fd authored by zengsxing's avatar zengsxing

fix

parent b3738aee
Pipeline #41665 passed with stages
in 3 minutes and 31 seconds
...@@ -31,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=Duel.GetMatchingGroupCount(s.eqfilter,tp,LOCATION_GRAVE,0,nil) local ct=Duel.GetMatchingGroupCount(s.eqfilter,tp,LOCATION_GRAVE,0,nil)
if ft>ct then ft=ct end if ft>ct then ft=ct end
if ft<=0 then return end if ft>0 then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0,TYPES_TOKEN_MONSTER,500,500,1,RACE_WARRIOR,ATTRIBUTE_EARTH) then return end if not Duel.IsPlayerCanSpecialSummonMonster(tp,id+o,0,TYPES_TOKEN_MONSTER,500,500,1,RACE_WARRIOR,ATTRIBUTE_EARTH) then return end
local ctn=true local ctn=true
...@@ -61,6 +61,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,6 +61,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
......
--ミラーバリア --ミラーバリア
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddCodeList(c,100255002)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
...@@ -69,7 +70,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +70,8 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.atkcon)
e1:SetCost(s.atkcost) e1:SetCost(s.atkcost)
e1:SetOperation(s.atkop) e1:SetOperation(s.atkop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -79,12 +81,18 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,12 +81,18 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetCode(EFFECT_EQUIP_LIMIT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(1) e3:SetValue(1)
e3:SetValue(s.eqlimit)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3) c:RegisterEffect(e3)
else else
c:CancelToGrave(false) c:CancelToGrave(false)
end end
end end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler():GetEquipTarget()
local bc=c:GetBattleTarget()
return bc
end
function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(id)==0 end if chk==0 then return c:GetFlagEffect(id)==0 end
...@@ -97,6 +105,9 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,6 +105,9 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(bc,REASON_EFFECT) Duel.Destroy(bc,REASON_EFFECT)
end end
end end
function s.eqlimit(e,c)
return e:GetHandler():GetEquipTarget()==c or c:IsControler(e:GetHandlerPlayer())
end
function s.filter(c) function s.filter(c)
return c:IsCode(100255002) and c:IsAbleToHand() return c:IsCode(100255002) and c:IsAbleToHand()
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