Commit 9cd5e7b7 authored by Tachibana's avatar Tachibana

tnndx

parent 8ed2134b
......@@ -84,20 +84,18 @@ end
function c16160006.chcondition(e,tp,eg,ep,ev,re,r,rp)
if e==re or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()~=1 then return false end
local tc=g:GetFirst()
e:SetLabelObject(tc)
return tc:IsOnField()
if not g or g:GetCount()==0 then return false end
return true
end
function c16160006.choperation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED)
local ct=ev
local ce,cp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local ce,cp=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local tf=ce:GetTarget()
local ceg,cep,cev,cre,cr,crp=Duel.GetChainEvent(ct)
local tc=g:RandomSelect(tp,1)
if tf(re,rp,ceg,cep,cev,cre,cr,crp,0,tc) then
Duel.ChangeTargetCard(ev,tc)
local ceg,cep,cev,cre,cr,crp=Duel.GetChainEvent(ev)
local tg=g:RandomSelect(tp,1)
local tc=tg:GetFirst()
if tf(ce,cp,ceg,cep,cev,cre,cr,crp,0,tc) then
Duel.ChangeTargetCard(ev,tg)
else
Duel.NegateEffect(ev)
end
......@@ -140,7 +138,7 @@ function c16160006.filter(c,sc)
end
function c16160006.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(c16160006.filter,nil,e:GetHandler())
if not sg then return end
if sg:GetCount()==0 then return end
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
----
......
......@@ -116,8 +116,8 @@ function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return true
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,e:GetLabel())
e:SetLabel(eg:GetFirst():GetOriginalCode())
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,e:GetLabel())
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
......@@ -130,7 +130,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local code=e:GetLabelObject()
local code=e:GetLabelObject():GetLabel()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
local g=Duel.SelectMatchingCard(e:GetHandlerPlayer(),cm.desfilter,e:GetHandlerPlayer(),LOCATION_REMOVED+LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,code)
......
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