Commit c68f6d64 authored by Amiya's avatar Amiya

Merge branch 'master' of git.moenext.com:mycard/pre-release-database-cdb

parents bb2e873a 2d96a6fd
Pipeline #41668 passed with stages
in 3 minutes and 25 seconds
...@@ -31,33 +31,34 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,33 +31,34 @@ 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
while ft>0 and ctn do while ft>0 and ctn do
local token=Duel.CreateToken(tp,id+o) local token=Duel.CreateToken(tp,id+o)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
ft=ft-1 ft=ft-1
if ft<=0 or not Duel.SelectYesNo(tp,aux.Stringid(id,1)) then ctn=false end if ft<=0 or not Duel.SelectYesNo(tp,aux.Stringid(id,1)) then ctn=false end
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_SZONE,0,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_SZONE,0,nil)
if Duel.Destroy(g,REASON_EFFECT)>0 then if Duel.Destroy(g,REASON_EFFECT)>0 then
local sg=Duel.GetMatchingGroup(s.eqfilter2,tp,LOCATION_GRAVE,0,nil) local sg=Duel.GetMatchingGroup(s.eqfilter2,tp,LOCATION_GRAVE,0,nil)
local count=Duel.GetLocationCount(tp,LOCATION_SZONE) local count=Duel.GetLocationCount(tp,LOCATION_SZONE)
if count>sg:GetCount() then count=sg:GetCount() end if count>sg:GetCount() then count=sg:GetCount() end
local tg=sg:Select(tp,count,count,nil) local tg=sg:Select(tp,count,count,nil)
Duel.SSet(tp,tg) Duel.SSet(tp,tg)
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,2)) e1:SetDescription(aux.Stringid(id,2))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end
end end
end end
end end
......
--ミラーバリア --ミラーバリア
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