Commit 9cd5e7b7 authored by Tachibana's avatar Tachibana

tnndx

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