Commit 94f15d2f authored by mercury233's avatar mercury233 Committed by GitHub

fix 先手必掌

parent 1f71a4fa
......@@ -13,24 +13,20 @@ function s.initial_effect(c)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(s.effcon)
e2:SetTarget(s.efftg)
e2:SetOperation(s.effop)
c:RegisterEffect(e2)
end
function s.effcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a:IsControler(tp) then e:SetLabelObject(a) else e:SetLabelObject(d) end
local g=a:GetColumnGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE)
if d and g:IsContains(d) then e:SetLabel(1) else e:SetLabel(0) end
return true
end
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(e:GetLabelObject())
if e:GetLabel()~=1 then
local a,d=Duel.GetBattleMonster(tp)
if chk==0 then return a end
Duel.SetTargetCard(a)
local g=a:GetColumnGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE)
if d and g:IsContains(d) then
e:SetLabel(1)
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
else
e:SetLabel(0)
end
end
function s.effop(e,tp,eg,ep,ev,re,r,rp)
......
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