Commit 53cdc751 authored by POLYMER's avatar POLYMER

fix

parent d95271ba
......@@ -7,7 +7,15 @@ function s.initial_effect(c)
local e2 = Scl.CreateIgnitionEffect(c, "Destroy", 1, "Destroy", "Target", "MonsterZone", s.descon,
{ "PlayerCost", "Discard", 1 },
{ "Target", "Destroy", aux.TRUE, 0, "OnField" }, s.desop)
local e4 = Scl.CreateSingleBuffEffect(c, "UnaffectedByOpponentsActivatedEffects", 1, "MonsterZone", s.uecon)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.uecon)
e3:SetValue(s.efilter)
c:RegisterEffect(e3)
end
function s.val(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_ONFIELD)*1000
......@@ -23,4 +31,7 @@ function s.desop(e,tp)
end
function s.uecon(e,tp)
return e:GetHandler():IsAttackAbove(4000)
end
function s.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
\ No newline at end of file
......@@ -44,7 +44,7 @@ function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
for i=1,7 do t[i]=i+2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NUMBER)
e:SetLabel(Duel.AnnounceNumber(tp,table.unpack(t)))
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0x56e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451911,0))
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0x56e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451011,2))
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),0,0,0)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -46,7 +46,7 @@ function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
for i=1,7 do t[i]=i+2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NUMBER)
e:SetLabel(Duel.AnnounceNumber(tp,table.unpack(t)))
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0x56e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451911,0))
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0x56e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451011,2))
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),0,0,0)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -46,7 +46,7 @@ function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
for i=1,7 do t[i]=i+2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NUMBER)
e:SetLabel(Duel.AnnounceNumber(tp,table.unpack(t)))
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0x56e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451911,0))
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0x56e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451011,2))
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),0,0,0)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -47,7 +47,7 @@ function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
for i=1,7 do t[i]=i+2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NUMBER)
e:SetLabel(Duel.AnnounceNumber(tp,table.unpack(t)))
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0x56e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451911,0))
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0x56e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451011,2))
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),0,0,0)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -47,7 +47,7 @@ function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
for i=1,7 do t[i]=i+2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_NUMBER)
e:SetLabel(Duel.AnnounceNumber(tp,table.unpack(t)))
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0x56e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451911,0))
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+0x56e0000+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451011,2))
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),0,0,0)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
......@@ -193,7 +193,7 @@ function cm.returntofield(tc,e)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
return
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
......@@ -212,12 +212,12 @@ function cm.retop3(e,tp,eg,ep,ev,re,r,rp)
e:Reset()
end
function Group.ForEach(group,func,...)
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
if aux.GetValueType(group)=="Group" and group:GetCount()>0 then
local d_group=group:Clone()
for tc in aux.Next(d_group) do
func(tc,...)
end
end
end
function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab)
local c=e:GetHandler()
......
......@@ -141,6 +141,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCost(cm.descost)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
......
......@@ -71,6 +71,7 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if chk==0 then
--if (e:IsHasType(EFFECT_TYPE_TRIGGER_O) and c:IsFaceup()) or (e:IsHasType(EFFECT_TYPE_QUICK_O) and c:IsFacedown()) then return false end
if Duel.GetCurrentChain()<1 then return false end
if c:GetFlagEffect(m+1)>0 then return false end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end
......@@ -296,7 +297,7 @@ function cm.returntofield(tc)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
return
return
end
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
......
......@@ -70,6 +70,7 @@ function cm.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local rpz=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if chk==0 then
if Duel.GetCurrentChain()<1 then return false end
if c:GetFlagEffect(m+1)>0 then return false end
local loc=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then loc=loc+LOCATION_HAND end
......
......@@ -48,6 +48,7 @@ end
function cm.pspcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
if Duel.GetCurrentChain()<1 then return false end
if c:GetFlagEffect(m+1)>0 then return false end
for i=1,Duel.GetCurrentChain() do
local te,tep,loc,pos=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_POSITION)
......
......@@ -24,8 +24,26 @@ local e3=Effect.CreateEffect(c)
e3:SetTarget(s.sptg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
if s.global==nil then --添加全局效果并注册给1个玩家
s.global=true
local e13=Effect.CreateEffect(c)
e13:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e13:SetCode(EVENT_CHANGE_POS)
e13:SetOperation(s.globals)
Duel.RegisterEffect(e13,0)
end
end
s.num=0
function s.globals(e,tp,eg,ep,ev,re,r,rp)--添加标识
local g=eg:Filter(s.cfilter2,nil,tp)--筛选自己盖放的卡
for tc in aux.Next(g) do
tc:RegisterFlagEffect(id+rp,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,0,1)
end
end
function s.cfilter2(c,tp)
return c:IsLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
and c:IsPosition(POS_FACEDOWN)
end
function s.AddLinkProcedure(c,f,min,max,gf)
if max==nil then max=c:GetLink() end
local e1=Effect.CreateEffect(c)
......@@ -58,7 +76,7 @@ function s.LinkCondition(f,minct,maxct,gf)
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
local mg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local mg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local mg3=Duel.GetMatchingGroup(s.filter,tp,LOCATION_SZONE,0,nil)
mg:Merge(mg2)
mg:Merge(mg3)
......@@ -70,7 +88,7 @@ function s.LinkCondition(f,minct,maxct,gf)
local fg=Duel.GetMustMaterial(tp,EFFECT_MUST_BE_LMATERIAL)
if fg:IsExists(Auxiliary.MustMaterialCounterFilter,1,nil,mg) then return false end
Duel.SetSelectedCard(fg)
return mg:CheckSubGroup(Auxiliary.LCheckGoal,minc,maxc,tp,c,gf,lmat)
return mg:CheckSubGroup(s.LCheckGoal,minc,maxc,tp,c,gf,lmat)
end
end
function s.LinkTarget(f,minct,maxct,gf)
......@@ -87,7 +105,7 @@ function s.LinkTarget(f,minct,maxct,gf)
mg=og:Filter(Auxiliary.LConditionFilter,nil,f,c,e)
else
mg=Auxiliary.GetLinkMaterials(tp,f,c,e)
local mg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local mg2=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local mg3=Duel.GetMatchingGroup(s.filter,tp,LOCATION_SZONE,0,nil)
mg:Merge(mg2)
mg:Merge(mg3)
......@@ -130,10 +148,10 @@ function s.chainlm(e,ep,tp)
return tp==ep
end
function s.filter(c)
return bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0
return bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0 and not c:IsFacedown()
end
function s.filter2(c,tp)
return c:IsFacedown()
return c:IsFacedown() and c:GetFlagEffect(id+tp)~=0
end
function s.mattg(e,c,tp)
return bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0
......
......@@ -30,7 +30,7 @@ end
function c65830005.cfilter(c,tp,se)
return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsFaceup()
return c:IsFaceup() and c:IsSummonPlayer(tp) and c:IsSetCard(0xa33)
end
function c65830005.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c65830005.cfilter,1,nil,tp)
......
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