Commit 2147995b authored by wind2009's avatar wind2009

Fix Bot Herder

parent 6c1f571d
No preview for this file type
......@@ -9,3 +9,5 @@
100246001
100246002
100247147
100247149
100248001
\ No newline at end of file
--Bot Herder
local s,id,o=GetID()
function s.initial_effect(c)
--
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -17,19 +18,21 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil,tp)
end
function s.ctfilter(c)
return c:IsControlerCanBeChanged(true)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsOnField() and tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end
if tc and tc:IsOnField() and tc:IsFacedown() then Duel.ConfirmCards(tp,tc) end
if not tc:IsRelateToChain() or tc:GetOwner()==tp then
Duel.Damage(1-tp,200,REASON_EFFECT)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,0,LOCATION_MZONE,tc)
if g:GetCount()>0 then
Duel.BreakEffect()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,ft,ft,tc)
Duel.GetControl(g,tp)
end
end
end
\ No newline at end of file
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