Commit 5861bfe7 authored by POLYMER's avatar POLYMER

fix

parent d7e0ac93
...@@ -38,7 +38,7 @@ function cm.spfilter(c,e,tp) ...@@ -38,7 +38,7 @@ function cm.spfilter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsLevel(10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_MACHINE) and c:IsLevel(10) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.fselect(g,tp) function cm.fselect(g,tp)
return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,g,tp) return aux.dabcheck(g) and Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,g,tp)
end end
function cm.xyzfilter(c,g,tp) function cm.xyzfilter(c,g,tp)
return c:IsRace(RACE_MACHINE) and c:IsXyzSummonable(g,#g,#g) --and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 return c:IsRace(RACE_MACHINE) and c:IsXyzSummonable(g,#g,#g) --and Duel.GetLocationCountFromEx(tp,tp,g,c)>0
......
...@@ -161,7 +161,7 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab) ...@@ -161,7 +161,7 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE) e1:SetReset(RESET_PHASE+PHASE_DAMAGE+RESET_EVENT+RESETS_STANDARD)
e1:SetValue(lab*500) e1:SetValue(lab*500)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
...@@ -183,6 +183,12 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab) ...@@ -183,6 +183,12 @@ function cm.mvop(e,tp,eg,ep,ev,re,r,rp,opt,lab)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACKTARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTACKTARGET)
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then if tc then
--[[local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_INVOLVING_BATTLE_DAMAGE)
e2:SetValue(HALF_DAMAGE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e2)--]]
Duel.CalculateDamage(c,tc) Duel.CalculateDamage(c,tc)
end end
if fid~=0 then Duel.RaiseEvent(c,11451718,e,fid,0,0,0) end if fid~=0 then Duel.RaiseEvent(c,11451718,e,fid,0,0,0) end
......
...@@ -12,10 +12,10 @@ function cm.initial_effect(c) ...@@ -12,10 +12,10 @@ function cm.initial_effect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_DESTROYED) e0:SetCode(EVENT_DESTROYED)
e0:SetRange(LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED) e0:SetRange(LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_ONFIELD+LOCATION_REMOVED)
e0:SetCondition(cm.calcon) --e0:SetCondition(cm.calcon)
e0:SetOperation(cm.calop) e0:SetOperation(cm.calop)
e0:SetLabel(0) e0:SetLabel(0)
e0:SetReset(EVENT_PHASE+PHASE_END) --e0:SetReset(EVENT_PHASE+PHASE_END)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -49,8 +49,7 @@ function cm.calop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,8 +49,7 @@ function cm.calop(e,tp,eg,ep,ev,re,r,rp)
tc=eg:GetNext() tc=eg:GetNext()
end end
if g:GetCount()~=0 then if g:GetCount()~=0 then
local temp=e:GetLabel() Duel.RegisterFlagEffect(1-rp,m,RESET_PHASE+PHASE_END,0,1)
e:SetLabel(temp+1)
end end
end end
...@@ -63,7 +62,7 @@ function cm.splimit(e) ...@@ -63,7 +62,7 @@ function cm.splimit(e)
end end
function cm.sprcon(e,tp,eg,ep,ev,re,r,rp) function cm.sprcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetLabel()~=0 and Duel.GetTurnPlayer()==tp return Duel.GetFlagEffect(tp,m)>0
end end
function cm.rem(g) function cm.rem(g)
return g:GetClassCount(Card.GetCode)==1 and g:GetCount()==3 return g:GetClassCount(Card.GetCode)==1 and g:GetCount()==3
...@@ -85,12 +84,12 @@ function cm.sprop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,12 +84,12 @@ function cm.sprop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(e:GetLabelObject():GetLabel()*2000) e1:SetValue(Duel.GetFlagEffect(tp,m)*2000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e:GetHandler():RegisterEffect(e1) e:GetHandler():RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE) e2:SetCode(EFFECT_SET_DEFENSE)
e2:SetValue(e:GetLabelObject():GetLabel()*2000) e2:SetValue(Duel.GetFlagEffect(tp,m)*2000)
e:GetHandler():RegisterEffect(e2) e:GetHandler():RegisterEffect(e2)
end end
end end
...@@ -102,4 +101,4 @@ function cm.sprop(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,4 +101,4 @@ function cm.sprop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.spfilter(c) function cm.spfilter(c)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER)
end end
...@@ -36,7 +36,7 @@ function s.initial_effect(c) ...@@ -36,7 +36,7 @@ function s.initial_effect(c)
ge22:SetOperation(s.stodop) ge22:SetOperation(s.stodop)
Duel.RegisterEffect(ge22,0) Duel.RegisterEffect(ge22,0)
_ConfirmCards=Duel.ConfirmCards local _ConfirmCards=Duel.ConfirmCards
function Duel.ConfirmCards(player,targets) function Duel.ConfirmCards(player,targets)
_ConfirmCards(player,targets) _ConfirmCards(player,targets)
if aux.GetValueType(targets)=="Card" then if aux.GetValueType(targets)=="Card" then
...@@ -58,7 +58,30 @@ function s.initial_effect(c) ...@@ -58,7 +58,30 @@ function s.initial_effect(c)
end end
end end
end end
_SortDecktop=Duel.SortDecktop local _SSet=Duel.SSet
function Duel.SSet(player,targets,tplayer,bool)
local count=_SSet(player,targets,tplayer,bool)
if bool and bool==true and aux.GetValueType(targets)=="Card" then
local tc=targets
if tc:GetOriginalCode()==id then
Duel.Hint(HINT_CARD,0,86541496)
Duel.Win(tc:GetOwner(),0x0)
end
end
if bool and bool==true and aux.GetValueType(targets)=="Group" then
local sg=targets
local tc=sg:GetFirst()
while tc do
if tc:GetOriginalCode()==id then
Duel.Hint(HINT_CARD,0,86541496)
Duel.Win(tc:GetOwner(),0x0)
end
tc=sg:GetNext()
end
end
return count
end
local _SortDecktop=Duel.SortDecktop
function Duel.SortDecktop(sort_player,target_player,count) function Duel.SortDecktop(sort_player,target_player,count)
_SortDecktop(sort_player,target_player,count) _SortDecktop(sort_player,target_player,count)
local sg=Duel.GetDecktopGroup(target_player,count) local sg=Duel.GetDecktopGroup(target_player,count)
......
...@@ -53,7 +53,7 @@ function s.ngcfilter(c) ...@@ -53,7 +53,7 @@ function s.ngcfilter(c)
end end
function s.handcon(e) function s.handcon(e)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
and not Duel.IsExistingMatchingCard(s.thcfilter,tp,LOCATION_MZONE,0,1,nil) and not Duel.IsExistingMatchingCard(s.thcfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function s.atkop(e,tp,eg,ep,ev,re,r,rp) function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(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