Commit 0a3d11db authored by mercury233's avatar mercury233 Committed by DailyShana

fix Call of the Earthbound (#665)

parent 98d9494c
...@@ -14,15 +14,28 @@ function c65743242.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -14,15 +14,28 @@ function c65743242.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c65743242.target(e,tp,eg,ep,ev,re,r,rp,chk) function c65743242.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local ag=eg:GetFirst():GetAttackableTarget() local ag,da=eg:GetFirst():GetAttackableTarget()
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
return ag:IsExists(aux.TRUE,1,at) return ag:IsExists(aux.TRUE,1,at) or (at~=nil and da)
end end
end end
function c65743242.activate(e,tp,eg,ep,ev,re,r,rp) function c65743242.activate(e,tp,eg,ep,ev,re,r,rp)
local ag=eg:GetFirst():GetAttackableTarget() local ag,da=eg:GetFirst():GetAttackableTarget()
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) if da and at~=nil then
local sel=0
Duel.Hint(HINT_SELECTMSG,tp,31)
if ag:IsExists(aux.TRUE,1,at) then
sel=Duel.SelectOption(tp,1213,1214)
else
sel=Duel.SelectOption(tp,1213)
end
if sel==0 then
Duel.ChangeAttackTarget(nil)
return
end
end
Duel.Hint(HINT_SELECTMSG,tp,549)
local g=ag:Select(tp,1,1,at) local g=ag:Select(tp,1,1,at)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
......
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