Commit 271c9246 authored by Nemo Ma's avatar Nemo Ma

fix

parent 9b79974b
--诡雷战队 侦察兵
--21.04.22
local m=11451552
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
......@@ -72,18 +71,19 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp)
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.GetFieldGroupCount(p,LOCATION_DECK,0)<3 or not c:IsRelateToEffect(e) then return end
local g=Duel.GetDecktopGroup(p,3)
Duel.ConfirmCards(p,g)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or not c:IsRelateToEffect(e) then return end
local g=Duel.GetDecktopGroup(tp,3)
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_EQUIP)
local tc=g:Select(p,1,1,nil):GetFirst()
if Duel.Equip(p,tc,c,false) then
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc:IsForbidden() then
Duel.SendtoGrave(tc,REASON_RULE)
elseif cm.equipfd(c,tp,tc) then
Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
......@@ -92,7 +92,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1)
end
Duel.ShuffleDeck(p)
Duel.ShuffleDeck(tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SET_SUMMON_COUNT_LIMIT)
......@@ -100,5 +100,5 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetTargetRange(1,0)
e2:SetValue(2)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,p)
Duel.RegisterEffect(e2,tp)
end
\ No newline at end of file
--诡雷战术 潜伏诱捕
--21.04.22
local m=11451563
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -94,7 +93,7 @@ function cm.trop(e,tp,eg,ep,ev,re,r,rp)
g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
end
if Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)~=0 and rc:IsLocation(LOCATION_MZONE) and rc:IsFaceup() then
local og=Duel.GetOperatedGroup()
local og=Duel.GetOperatedGroup():Filter(Card.IsFacedown,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return elseif ft>#og then ft=#og end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
......
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