Commit 01e7440a authored by POLYMER's avatar POLYMER

fix

parent 8001e727
......@@ -28,7 +28,21 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
for i=1,Duel.GetCurrentChain() do
local tgp,te,cid=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_EFFECT,CHAININFO_CHAIN_ID)
if tgp~=tp then
te:SetOperation(cm.repop(te:GetOperation(),cid))
local op=te:GetOperation()
te:SetOperation(cm.repop(op,cid))
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetLabel(i)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==e:GetLabel() end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) re:SetOperation(op) end)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_CHAIN_NEGATED)
Duel.RegisterEffect(e2,tp)
--[[local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
......
......@@ -11,7 +11,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_END_PHASE,0)
e1:SetHintTiming(TIMING_END_PHASE+TIMING_STANDBY_PHASE)
e1:SetCondition(function(e,tp) return (Duel.GetCurrentPhase()~=PHASE_MAIN1 and Duel.GetCurrentPhase()~=PHASE_MAIN2) or Duel.GetTurnPlayer()==1-tp end)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
......
......@@ -132,7 +132,9 @@ function cm.acfilter(c)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.acfilter,tp,0,0x1c,1,nil) end
local g=Duel.GetMatchingGroup(cm.acfilter,tp,0,0x1c,nil)
if chk==0 then return #g>0 end
Duel.HintSelection(g)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
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