Commit 4ec614c7 authored by POLYMER's avatar POLYMER

fix

parent 4f472bba
......@@ -5,7 +5,7 @@ function cm.initial_effect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(0xff)
e5:SetRange(0xf3)
e5:SetCost(cm.spcost)
e5:SetOperation(cm.spcop)
c:RegisterEffect(e5)
......@@ -24,9 +24,9 @@ function cm.initial_effect(c)
local _ReturnToField=Duel.ReturnToField
local _Equip=Duel.Equip
function Duel.MoveToField(c,tp,...)
if c:IsHasEffect(m) then
if c:IsLocation(0xf3) and c:IsHasEffect(m) then
return
elseif c:GetOriginalCode()==m then
elseif c:IsLocation(0xf3) and c:GetOriginalCode()==m then
if not cm.spcost(nil,nil,tp,c) then return end
cm.spcop(nil,tp,nil,nil,nil,nil,nil,nil,c)
end
......@@ -43,9 +43,9 @@ function cm.initial_effect(c)
return _ReturnToField(c,...)
end
function Duel.Equip(tp,c,mc,...)
if c:IsHasEffect(m) then
if c:IsLocation(0xf3) and c:IsHasEffect(m) then
return
elseif c:GetOriginalCode()==m then
elseif c:IsLocation(0xf3) and c:GetOriginalCode()==m then
if not cm.spcost(nil,nil,tp,c) then return end
cm.spcop(nil,tp,nil,nil,nil,nil,nil,nil,c)
end
......
......@@ -30,31 +30,20 @@ function cm.initial_effect(c)
e3:SetValue(function(e,c) local res=c:GetFlagEffect(m)>0 c:ResetFlagEffect(m) return res end)
Duel.RegisterEffect(e3,0)
local _MoveToField=Duel.MoveToField
local _ReturnToField=Duel.ReturnToField
local _Equip=Duel.Equip
function Duel.MoveToField(c,tp,...)
if c:IsHasEffect(m) then
if c:IsLocation(LOCATION_EXTRA) and c:IsHasEffect(m) then
return
elseif c:GetOriginalCode()==m then
elseif c:IsLocation(LOCATION_EXTRA) and c:GetOriginalCode()==m then
if not cm.spcost(nil,nil,tp,c) then return end
cm.spcop(nil,tp,nil,nil,nil,nil,nil,nil,c)
end
return _MoveToField(c,tp,...)
end
function Duel.ReturnToField(c,...)
local tp=c:GetPreviousControler()
if c:IsHasEffect(m) then
return
elseif c:GetOriginalCode()==m then
if not cm.spcost(nil,nil,tp,c) then return end
cm.spcop(nil,tp,nil,nil,nil,nil,nil,nil,c)
end
return _ReturnToField(c,...)
end
function Duel.Equip(tp,c,mc,...)
if c:IsHasEffect(m) then
if c:IsLocation(LOCATION_EXTRA) and c:IsHasEffect(m) then
return
elseif c:GetOriginalCode()==m then
elseif c:IsLocation(LOCATION_EXTRA) and c:GetOriginalCode()==m then
if not cm.spcost(nil,nil,tp,c) then return end
cm.spcop(nil,tp,nil,nil,nil,nil,nil,nil,c)
end
......
......@@ -27,6 +27,7 @@ function cm.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(cm.eftg)
e3:SetLabelObject(e2)
......
......@@ -27,6 +27,7 @@ function cm.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(cm.eftg)
e3:SetLabelObject(e2)
......
......@@ -27,6 +27,7 @@ function cm.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(cm.eftg)
e3:SetLabelObject(e2)
......
......@@ -27,6 +27,7 @@ function cm.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(cm.eftg)
e3:SetLabelObject(e2)
......
......@@ -15,9 +15,17 @@ function cm.initial_effect(c)
cm.global_check=true
local _Equip=Duel.Equip
Duel.Equip=function(p,c,...)
c:RegisterFlagEffect(m,RESET_CHAIN,0,1)
if not c:IsOnField() then c:RegisterFlagEffect(m,RESET_CHAIN,0,1) end
local res=_Equip(p,c,...)
c:ResetFlagEffect(m)
return res
end
local _CRegisterEffect=Card.RegisterEffect
function Card.RegisterEffect(c,e,bool)
local res=_CRegisterEffect(c,e,bool)
if e:GetCode()==EFFECT_EQUIP_LIMIT and c:GetFlagEffect(m)>0 then
c:ResetFlagEffect(m)
Duel.RaiseEvent(Group.FromCards(c),EVENT_CUSTOM+m,e,0,0,0,0)
end
return res
end
local e1=Effect.CreateEffect(c)
......@@ -53,7 +61,7 @@ function cm.costchk(e,c,tp,st)
return false
end
function cm.filter(c,e)
if not (c:IsOnField() and (c:IsFacedown() or c:IsStatus(STATUS_EFFECT_ENABLED) or c:GetFlagEffect(m)>0)) then return false end
if not (c:IsOnField() and (c:IsFacedown() or c:IsStatus(STATUS_EFFECT_ENABLED))) or c:GetFlagEffect(m)>0 then return false end
if e:GetCode()==EVENT_MOVE then
local b1,g1=Duel.CheckEvent(EVENT_SUMMON_SUCCESS,true)
local b2,g2=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true)
......@@ -82,7 +90,24 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CUSTOM+m)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(cm.filter,nil,e) Duel.SendtoDeck(g,nil,2,REASON_RULE) end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
--[[if Duel.GetFlagEffect(0,m)>1 then return end
Duel.RegisterFlagEffect(0,m,RESET_CHAIN,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetOperation(function() Duel.ResetFlagEffect(0,m) end)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_BREAK_EFFECT)
Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EVENT_CHAIN_SOLVED)
Duel.RegisterEffect(e3,tp)--]]
local g=eg:Filter(cm.filter,nil,e)
Duel.SendtoDeck(g,nil,2,REASON_RULE)
end)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,0)
end
\ No newline at end of file
......@@ -38,7 +38,7 @@ function s.initial_effect(c)
end
function s.counterfilter(c)
return c:IsSetCard(0x605)
return c:IsRace(RACE_PSYCHO)
end
function s.filter(c)
return c:IsFaceup() and c:IsAbleToRemoveAsCost() and c:IsSetCard(0x603)
......
This diff is collapsed.
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