Commit fac425cd authored by POLYMER's avatar POLYMER

fix

parent 2cbe37fa
......@@ -33,6 +33,27 @@ function c114303426.initial_effect(c)
e4:SetTarget(c114303426.actarget)
e4:SetOperation(c114303426.costop)
c:RegisterEffect(e4)
if not c114303426.initcheck then
c114303426.initcheck=true
local st=Effect.SetTargetRange
Effect.SetTargetRange=function(e,s,o)
if e:GetOwner():IsOriginalCodeRule(51194046) and e:GetCode()==EFFECT_MATERIAL_CHECK then
return st(e,LOCATION_HAND+LOCATION_DECK,LOCATION_HAND+LOCATION_DECK)
else
return st(e,s,o)
end
end
local rg=Duel.GetMatchingGroup(Card.IsOriginalCodeRule,tp,0xff,0xff,nil,51194046)
for tc in aux.Next(rg) do
if tc.initial_effect then
local tinit=c114303426.initial_effect
c114303426.initial_effect=function() end
tc:ReplaceEffect(114303426,0)
c114303426.initial_effect=tinit
tc.initial_effect(tc)
end
end
end
end
function c114303426.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetPreviousControler()==tp and c:IsSetCard(0xaa)
......
......@@ -61,6 +61,33 @@ function c118776531.initial_effect(c)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c118776531.clearop)
Duel.RegisterEffect(ge2,0)
local st=Effect.SetTarget
Effect.SetTarget=function(e,tg)
if e:GetDescription()==aux.Stringid(58984738,1) or e:GetDescription()==aux.Stringid(22499034,1) then
return st(e,c118776531.tg)
else
return st(e,tg)
end
end
local so=Effect.SetOperation
Effect.SetOperation=function(e,op)
if e:GetDescription()==aux.Stringid(58984738,1) or e:GetDescription()==aux.Stringid(22499034,1) then
return so(e,c118776531.op)
else
return so(e,op)
end
end
local rg=Duel.GetMatchingGroup(Card.IsOriginalCodeRule,tp,0xff,0xff,nil,58984738,22499034)
for tc in aux.Next(rg) do
if tc.initial_effect then
local tinit=c118776531.initial_effect
c118776531.initial_effect=function() end
tc:ReplaceEffect(118776531,0)
c118776531.initial_effect=tinit
tc.initial_effect(tc)
end
end
end
end
......@@ -163,22 +190,6 @@ end
--change script
local st=Effect.SetTarget
Effect.SetTarget=function(e,tg)
if e:GetDescription()==aux.Stringid(58984738,1) or e:GetDescription()==aux.Stringid(22499034,1) then
return st(e,c118776531.tg)
else
return st(e,tg)
end
end
local so=Effect.SetOperation
Effect.SetOperation=function(e,op)
if e:GetDescription()==aux.Stringid(58984738,1) or e:GetDescription()==aux.Stringid(22499034,1) then
return so(e,c118776531.op)
else
return so(e,op)
end
end
function c118776531.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
......
......@@ -17,6 +17,35 @@ function c121082832.initial_effect(c)
e2:SetCondition(c121082832.chcon)
e2:SetOperation(c121082832.chop)
c:RegisterEffect(e2)
if not c121082832.initcheck then
c121082832.initcheck=true
local st=Effect.SetTarget
Effect.SetTarget=function(e,tg)
if e:GetOwner():IsOriginalCodeRule(92746535) and e:GetCategory()==CATEGORY_TOHAND+CATEGORY_SEARCH then
return st(e,c121082832.thtg)
else
return st(e,tg)
end
end
local so=Effect.SetOperation
Effect.SetOperation=function(e,op)
if e:GetOwner():IsOriginalCodeRule(92746535) and e:GetCategory()==CATEGORY_TOHAND+CATEGORY_SEARCH then
return so(e,c121082832.thop)
else
return so(e,op)
end
end
local rg=Duel.GetMatchingGroup(Card.IsOriginalCodeRule,tp,0xff,0xff,nil,92746535)
for tc in aux.Next(rg) do
if tc.initial_effect then
local tinit=c121082832.initial_effect
c121082832.initial_effect=function() end
tc:ReplaceEffect(121082832,0)
c121082832.initial_effect=tinit
tc.initial_effect(tc)
end
end
end
end
function c121082832.actcost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -183,23 +212,6 @@ function c121082832.nofilter(e,re,tp)
return re:GetHandler():IsCode(73468603)
end
local st=Effect.SetTarget
Effect.SetTarget=function(e,tg)
if e:GetOwner():IsOriginalCodeRule(92746535) and e:GetCategory()==CATEGORY_TOHAND+CATEGORY_SEARCH then
return st(e,c121082832.thtg)
else
return st(e,tg)
end
end
local so=Effect.SetOperation
Effect.SetOperation=function(e,op)
if e:GetOwner():IsOriginalCodeRule(92746535) and e:GetCategory()==CATEGORY_TOHAND+CATEGORY_SEARCH then
return so(e,c121082832.thop)
else
return so(e,op)
end
end
function c121082832.thfilter(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
......
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