Commit ad6d988b authored by Tachibana's avatar Tachibana

tnndx

parent a9368196
...@@ -53,25 +53,29 @@ function cm.ctcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,25 +53,29 @@ function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsCode(17035300) return re and re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsCode(17035300)
end end
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() return c:IsFaceup() and c:IsControlerCanBeChanged() and c:IsAttackAbove(0)
end
function cm.filter1(c)
return c:IsFaceup() and c:IsAttackAbove(0)
end end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil) Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,1-tp,LOCATION_MZONE)
local tg=g:GetMinGroup(Card.GetAttack) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,tg,1,0,0)
end end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp) function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.filter1,tp,0,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
local sg=g:GetMaxGroup(Card.GetAttack) local sg=g:GetMaxGroup(Card.GetAttack)
if sg:GetCount()>1 then if sg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
sg=sg:Select(tp,1,1,nil) sg=sg:Select(tp,1,1,nil)
Duel.HintSelection(sg)
end end
local tc=sg:GetFirst() local tc=sg:GetFirst()
Duel.GetControl(tc,tp) if Duel.GetControl(tc,tp)~=0 then
Duel.Damage(1-tp,tc:GetAttack(),REASON_EFFECT) Duel.Damage(1-tp,tc:GetAttack(),REASON_EFFECT)
end
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
......
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