Commit 7c8e37bb authored by wind2009's avatar wind2009

Fix 先手必掌

parent 046a03a4
Pipeline #41498 canceled with stages
in 2 seconds
No preview for this file type
......@@ -21,10 +21,9 @@ end
function s.effcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not d or a:GetControler()==d:GetControler() then return false end
if a:IsControler(tp) then e:SetLabelObject(a) else e:SetLabelObject(d) end
local g=a:GetColumnGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE)
if g:IsContains(d) then e:SetLabel(1) else e:SetLabel(0) end
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)
......@@ -39,16 +38,20 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local d=0
if e:GetLabel()==1 then
if not tc:IsRelateToChain() then return end
d=Duel.SelectOption(tp,aux.Stringid(id,1),aux.Stringid(id,2),aux.Stringid(id,3))+1
else
d=Duel.TossDice(tp,1)
end
if not tc:IsRelateToChain() then return end
if d==1 or d==4 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,4))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_ONFIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCountLimit(1)
e1:SetValue(s.indct)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
......@@ -60,12 +63,14 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(-500)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsHasEffect(EFFECT_REVERSE_UPDATE) then
if not tc:IsHasEffect(EFFECT_REVERSE_UPDATE) then
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,5))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e3:SetValue(s.efilter)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
......@@ -77,10 +82,12 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp)
e4:SetValue(1000)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
if tc:IsHasEffect(EFFECT_REVERSE_UPDATE) then
if not tc:IsHasEffect(EFFECT_REVERSE_UPDATE) then
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,6))
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e5:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e5:SetValue(1)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e5)
......
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