Commit 90bda552 authored by wind2009's avatar wind2009

Fix 武器庫整理

parent 1d1ca6f4
Pipeline #41062 passed with stages
in 3 minutes and 46 seconds
...@@ -52,4 +52,5 @@ ...@@ -52,4 +52,5 @@
101303073 101303073
101303074 101303074
101303075 101303075
101303076 101303076
\ No newline at end of file 101303078
\ No newline at end of file
pics/101303078.jpg

50.1 KB | W: | H:

pics/101303078.jpg

95.1 KB | W: | H:

pics/101303078.jpg
pics/101303078.jpg
pics/101303078.jpg
pics/101303078.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -3,20 +3,24 @@ local s,id,o=GetID() ...@@ -3,20 +3,24 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--send --send
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetTarget(s.tgtg) e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop) e1:SetOperation(s.tgop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--equip --equip
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_EQUIP) e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(s.eqtg) e2:SetTarget(s.eqtg)
...@@ -31,19 +35,23 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,19 +35,23 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function s.tgop(e,tp,eg,ep,ev,re,r,rp) function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,2) local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,2)
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
end end
end end
function s.mfilter(c) function s.eqfilter(c,tc,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(Card.CheckEquipTarget,c:GetControler(),LOCATION_GRAVE+LOCATION_HAND,0,1,nil,c) return c:IsAllTypes(TYPE_EQUIP+TYPE_SPELL) and c:CheckEquipTarget(tc) and not c:IsForbidden()
and c:CheckUniqueOnField(tp,LOCATION_SZONE)
end
function s.mfilter(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(s.eqfilter,c:GetControler(),LOCATION_GRAVE+LOCATION_HAND,0,1,nil,c,tp)
end end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 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) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end if chk==0 then return Duel.IsExistingTarget(s.mfilter,tp,LOCATION_MZONE,0,1,nil,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,s.mfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,s.mfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
...@@ -52,8 +60,8 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,8 +60,8 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE) local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ct>2 then ct=2 end if ct>2 then ct=2 end
if tc:IsRelateToChain() and tc:IsFaceup() and ct>0 then if tc:IsRelateToChain() and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) and ct>0 then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.CheckEquipTarget),tp,LOCATION_GRAVE+LOCATION_HAND,0,nil,tc) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,nil,tc,tp)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct) local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,ct)
if not sg or sg:GetCount()==0 then return end if not sg or sg:GetCount()==0 then return end
for ec in aux.Next(sg) do for ec in aux.Next(sg) do
......
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