Commit a845e243 authored by salix5's avatar salix5

Merge pull request #1200 from nekrozar/patch-1

fix Pendulum Activated
parents fe6118b8 48beed84
...@@ -35,7 +35,7 @@ function c18013090.tfilter(c) ...@@ -35,7 +35,7 @@ function c18013090.tfilter(c)
end end
function c18013090.atop1(e,tp,eg,ep,ev,re,r,rp) function c18013090.atop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()~=tp or ep~=tp then return end if Duel.GetTurnPlayer()~=tp or ep~=tp then return end
if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:GetHandler():IsType(TYPE_SPELL) then return end if not re:IsHasType(EFFECT_TYPE_ACTIVATE) or not re:IsActiveType(TYPE_SPELL) then return end
e:GetHandler():RegisterFlagEffect(18013090,RESET_EVENT+0x2fe0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(18013090,RESET_EVENT+0x2fe0000+RESET_PHASE+PHASE_END,0,1)
end end
function c18013090.atcon2(e,tp,eg,ep,ev,re,r,rp) function c18013090.atcon2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -24,7 +24,7 @@ function c27762803.con(e) ...@@ -24,7 +24,7 @@ function c27762803.con(e)
return e:GetHandler():GetFlagEffect(27762803)~=0 return e:GetHandler():GetFlagEffect(27762803)~=0
end end
function c27762803.adop(e,tp,eg,ep,ev,re,r,rp) function c27762803.adop(e,tp,eg,ep,ev,re,r,rp)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsType(TYPE_SPELL) then if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) then
if e:GetHandler():GetFlagEffect(27762803)==0 then if e:GetHandler():GetFlagEffect(27762803)==0 then
e:GetHandler():RegisterFlagEffect(27762803,RESET_EVENT+0x1ff0000,0,0) e:GetHandler():RegisterFlagEffect(27762803,RESET_EVENT+0x1ff0000,0,0)
else else
......
...@@ -195,7 +195,7 @@ function c33900648.windcon2(e) ...@@ -195,7 +195,7 @@ function c33900648.windcon2(e)
return bit.band(c33900648[1-e:GetHandlerPlayer()],ATTRIBUTE_WIND)~=0 return bit.band(c33900648[1-e:GetHandlerPlayer()],ATTRIBUTE_WIND)~=0
end end
function c33900648.actarget(e,te,tp) function c33900648.actarget(e,te,tp)
return te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:GetHandler():IsType(TYPE_SPELL) return te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:IsActiveType(TYPE_SPELL)
end end
function c33900648.costchk(e,te_or_c,tp) function c33900648.costchk(e,te_or_c,tp)
return Duel.CheckLPCost(tp,500) return Duel.CheckLPCost(tp,500)
......
...@@ -32,7 +32,7 @@ function c38318146.acfilter(c) ...@@ -32,7 +32,7 @@ function c38318146.acfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost() return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
end end
function c38318146.actarget(e,te,tp) function c38318146.actarget(e,te,tp)
return te:GetHandler():IsType(TYPE_SPELL) and te:IsHasType(EFFECT_TYPE_ACTIVATE) return te:IsActiveType(TYPE_SPELL) and te:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function c38318146.accost(e,te,tp) function c38318146.accost(e,te,tp)
return Duel.IsExistingMatchingCard(c38318146.acfilter,tp,LOCATION_DECK,0,1,nil) return Duel.IsExistingMatchingCard(c38318146.acfilter,tp,LOCATION_DECK,0,1,nil)
......
...@@ -16,8 +16,7 @@ function c51481927.initial_effect(c) ...@@ -16,8 +16,7 @@ function c51481927.initial_effect(c)
end end
function c51481927.operation(e,tp,eg,ep,ev,re,r,rp) function c51481927.operation(e,tp,eg,ep,ev,re,r,rp)
local te=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT) local te=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT)
local c=te:GetHandler() if te:IsHasType(EFFECT_TYPE_ACTIVATE) and te:IsActiveType(TYPE_SPELL) and te:GetHandler()~=e:GetHandler() then
if te:IsHasType(EFFECT_TYPE_ACTIVATE) and c:IsType(TYPE_SPELL) and c~=e:GetHandler() then
Duel.Recover(e:GetHandlerPlayer(),500,REASON_EFFECT) Duel.Recover(e:GetHandlerPlayer(),500,REASON_EFFECT)
end end
end end
...@@ -28,8 +28,7 @@ function c60258960.initial_effect(c) ...@@ -28,8 +28,7 @@ function c60258960.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c60258960.acop(e,tp,eg,ep,ev,re,r,rp) function c60258960.acop(e,tp,eg,ep,ev,re,r,rp)
local c=re:GetHandler() if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and c:IsType(TYPE_SPELL) and e:GetHandler():GetFlagEffect(1)>0 then
e:GetHandler():AddCounter(0x3001,1) e:GetHandler():AddCounter(0x3001,1)
end end
end end
......
...@@ -12,8 +12,7 @@ function c69724380.initial_effect(c) ...@@ -12,8 +12,7 @@ function c69724380.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c69724380.condition(e,tp,eg,ep,ev,re,r,rp) function c69724380.condition(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() return ep~=tp and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
return ep~=tp and rc:IsType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function c69724380.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c69724380.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end if chk==0 then return Duel.CheckLPCost(tp,1000) 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