You need to sign in or sign up before continuing.
Commit db98454b authored by wind2009's avatar wind2009

Merge branch 'master' from upstream

parents 67372a05 a36b4d20
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c11039171.initial_effect(c) function c11039171.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFunRep(c,30068120,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa9),1,63,false,false) aux.AddFusionProcCodeFunRep(c,30068120,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa9),1,127,false,false)
--spsummon condition --spsummon condition
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -47,13 +47,8 @@ function s.initial_effect(c) ...@@ -47,13 +47,8 @@ function s.initial_effect(c)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function s.checkfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp) function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(s.checkfilter,1,nil) then Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1)
end
end end
function s.rmcon(e) function s.rmcon(e)
return Duel.GetFlagEffect(0,id)>0 return Duel.GetFlagEffect(0,id)>0
......
...@@ -39,6 +39,7 @@ function c13735899.cfilter(c,e) ...@@ -39,6 +39,7 @@ function c13735899.cfilter(c,e)
local typ,se=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE,SUMMON_INFO_REASON_EFFECT) local typ,se=c:GetSpecialSummonInfo(SUMMON_INFO_TYPE,SUMMON_INFO_REASON_EFFECT)
if not se then return false end if not se then return false end
local sc=se:GetHandler() local sc=se:GetHandler()
local tp=e:GetHandlerPlayer()
return typ&TYPE_MONSTER~=0 and se:IsActivated() return typ&TYPE_MONSTER~=0 and se:IsActivated()
and c:IsFaceup() and (c:GetOriginalRace()==sc:GetOriginalRace() or c==sc) and c:IsFaceup() and (c:GetOriginalRace()==sc:GetOriginalRace() or c==sc)
and c:IsCanBeEffectTarget(e) and Duel.IsExistingMatchingCard(c13735899.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c) and c:IsCanBeEffectTarget(e) and Duel.IsExistingMatchingCard(c13735899.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c)
......
...@@ -47,7 +47,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 return eg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0
end end
function s.relfilter1(c,tp) function s.relfilter1(c,tp)
return c:IsSetCard(0x196) and c:IsFaceup() and c:IsReleasableByEffect() return c:IsSetCard(0x196) and c:IsReleasableByEffect()
and Duel.IsExistingMatchingCard(s.relfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp,c) and Duel.IsExistingMatchingCard(s.relfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp,c)
end end
function s.relfilter2(c,tp,ec) function s.relfilter2(c,tp,ec)
......
...@@ -22,7 +22,7 @@ function c17078030.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,7 +22,7 @@ function c17078030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local t={} local t={}
local f=math.floor((lp)/1000) local f=math.floor((lp)/1000)
local l=1 local l=1
while l<=f and l<=20 do while l<=f and l<=255 do
t[l]=l*1000 t[l]=l*1000
l=l+1 l=l+1
end end
......
...@@ -26,7 +26,6 @@ end ...@@ -26,7 +26,6 @@ end
function c22610082.activate(e,tp,eg,ep,ev,re,r,rp) function c22610082.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
c:CancelToGrave() Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT,tp,true)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
end end
...@@ -3,7 +3,7 @@ local s,id,o=GetID() ...@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--material --material
aux.AddFusionProcCodeFunRep(c,99458769,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),2,63,true,true) aux.AddFusionProcCodeFunRep(c,99458769,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),2,127,true,true)
--des --des
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c24672164.initial_effect(c) function c24672164.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x109b),aux.FilterBoolFunction(Card.IsFusionSetCard,0x9b),1,63,true) aux.AddFusionProcFunFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x109b),aux.FilterBoolFunction(Card.IsFusionSetCard,0x9b),1,127,true)
--summon success --summon success
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -3,7 +3,7 @@ local s,id,o=GetID() ...@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep2(c,s.mfilter,2,63,true) aux.AddFusionProcFunRep2(c,s.mfilter,2,127,true)
--atk down --atk down
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -3,7 +3,7 @@ local s,id,o=GetID() ...@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--material --material
aux.AddFusionProcCodeFunRep(c,92003832,aux.FilterBoolFunction(Card.IsFusionSetCard,0x192),1,63,true,true) aux.AddFusionProcCodeFunRep(c,92003832,aux.FilterBoolFunction(Card.IsFusionSetCard,0x192),1,127,true,true)
--equip --equip
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
......
...@@ -85,7 +85,7 @@ function c31313405.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,7 +85,7 @@ function c31313405.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c31313405.cfilter(c,e,tp) function c31313405.cfilter(c,e,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsType(TYPE_LINK) and c:GetBaseAttack()>0 and c:IsCanBeEffectTarget(e) return c:IsFaceup() and c:IsControler(tp) and c:IsType(TYPE_LINK) and c:GetBaseAttack()>0 and c:IsCanBeEffectTarget(e) and c:IsLocation(LOCATION_MZONE)
end end
function c31313405.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c31313405.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c31313405.cfilter(chkc,e,1-tp) end if chkc then return eg:IsContains(chkc) and c31313405.cfilter(chkc,e,1-tp) end
......
...@@ -28,7 +28,7 @@ function s.initial_effect(c) ...@@ -28,7 +28,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.cfilter(c) function s.cfilter(c)
return not c:IsType(TYPE_TOKEN) and c:IsFaceup() and c:IsRace(RACE_FISH) return c:IsFaceup() and c:IsRace(RACE_FISH)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil) return eg:IsExists(s.cfilter,1,nil)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c32828466.initial_effect(c) function c32828466.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--fusion material --fusion material
aux.AddFusionProcFunFunRep(c,c32828466.mfilter1,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),1,63,true) aux.AddFusionProcFunFunRep(c,c32828466.mfilter1,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),1,127,true)
--spsummon condition --spsummon condition
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -6,6 +6,7 @@ function c33250142.initial_effect(c) ...@@ -6,6 +6,7 @@ function c33250142.initial_effect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION) e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c33250142.splimit)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--to hand (deck) --to hand (deck)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -32,6 +33,9 @@ function c33250142.initial_effect(c) ...@@ -32,6 +33,9 @@ function c33250142.initial_effect(c)
e2:SetOperation(c33250142.thop2) e2:SetOperation(c33250142.thop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c33250142.splimit(e,se,sp,st)
return se:GetHandler():IsCode(89771220)
end
function c33250142.cfilter1(c,tp) function c33250142.cfilter1(c,tp)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsControler(tp) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsControler(tp)
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c3410461.initial_effect(c) function c3410461.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFunRep(c,68468459,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),1,63,true,true) aux.AddFusionProcCodeFunRep(c,68468459,aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON),1,127,true,true)
aux.AddContactFusionProcedure(c,c3410461.cfilter,LOCATION_MZONE,LOCATION_MZONE,Duel.SendtoGrave,REASON_COST) aux.AddContactFusionProcedure(c,c3410461.cfilter,LOCATION_MZONE,LOCATION_MZONE,Duel.SendtoGrave,REASON_COST)
--spsummon condition --spsummon condition
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
......
...@@ -3,7 +3,7 @@ local s,id,o=GetID() ...@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--material --material
aux.AddFusionProcCodeFunRep(c,4796100,aux.FilterBoolFunction(Card.IsRace,RACE_ILLUSION),1,63,true,true) aux.AddFusionProcCodeFunRep(c,4796100,aux.FilterBoolFunction(Card.IsRace,RACE_ILLUSION),1,127,true,true)
--change name --change name
aux.EnableChangeCode(c,4796100,LOCATION_GRAVE+LOCATION_MZONE) aux.EnableChangeCode(c,4796100,LOCATION_GRAVE+LOCATION_MZONE)
--multi-attack --multi-attack
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c42717221.initial_effect(c) function c42717221.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFunRep(c,21830679,aux.FilterBoolFunction(Card.IsFusionType,TYPE_LINK),1,63,true,true) aux.AddFusionProcCodeFunRep(c,21830679,aux.FilterBoolFunction(Card.IsFusionType,TYPE_LINK),1,127,true,true)
--mill + atk --mill + atk
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(42717221,0)) e1:SetDescription(aux.Stringid(42717221,0))
......
...@@ -3,7 +3,7 @@ function c464362.initial_effect(c) ...@@ -3,7 +3,7 @@ function c464362.initial_effect(c)
c:SetUniqueOnField(1,0,464362) c:SetUniqueOnField(1,0,464362)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFunRep(c,30068120,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa9),1,63,true,true) aux.AddFusionProcCodeFunRep(c,30068120,aux.FilterBoolFunction(Card.IsFusionSetCard,0xa9),1,127,true,true)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
......
...@@ -20,7 +20,6 @@ function s.initial_effect(c) ...@@ -20,7 +20,6 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CUSTOM+id) e2:SetCode(EVENT_CUSTOM+id)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN) e2:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e2:SetCondition(s.mtcon)
e2:SetOperation(s.mtop) e2:SetOperation(s.mtop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
aux.RegisterMergedDelayedEvent(c,id,EVENT_REMOVE) aux.RegisterMergedDelayedEvent(c,id,EVENT_REMOVE)
...@@ -53,13 +52,6 @@ function s.xyzop(e,tp,chk) ...@@ -53,13 +52,6 @@ function s.xyzop(e,tp,chk)
or Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0) end or Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0) end
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function s.remfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function s.mtcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(s.remfilter,1,nil)
end
function s.mtop(e,tp,eg,ep,ev,re,r,rp) function s.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not (c:IsRelateToChain() and c:IsType(TYPE_XYZ)) then return end if not (c:IsRelateToChain() and c:IsType(TYPE_XYZ)) then return end
......
...@@ -44,13 +44,8 @@ function s.initial_effect(c) ...@@ -44,13 +44,8 @@ function s.initial_effect(c)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function s.checkfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp) function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(s.checkfilter,1,nil) then Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(0,id,RESET_PHASE+PHASE_END,0,1)
end
end end
function s.rmcon(e) function s.rmcon(e)
return Duel.GetFlagEffect(0,id)>0 return Duel.GetFlagEffect(0,id)>0
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c64599569.initial_effect(c) function c64599569.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--fusion material --fusion material
aux.AddFusionProcCodeFunRep(c,70095154,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),1,63,true,true) aux.AddFusionProcCodeFunRep(c,70095154,aux.FilterBoolFunction(Card.IsRace,RACE_MACHINE),1,127,true,true)
--spsummon condition --spsummon condition
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -36,7 +36,7 @@ function c67048711.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +36,7 @@ function c67048711.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,3,REASON_EFFECT)~=0 then if Duel.Draw(tp,3,REASON_EFFECT)~=0 then
Duel.BreakEffect() Duel.BreakEffect()
local g=Duel.GetMatchingGroup(c67048711.filter,tp,LOCATION_ONFIELD,0,nil) local g=Duel.GetMatchingGroup(c67048711.filter,tp,LOCATION_ONFIELD,0,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_RULE)
end end
end end
end end
......
...@@ -14,7 +14,7 @@ function c67196946.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -14,7 +14,7 @@ function c67196946.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lp=Duel.GetLP(tp) local lp=Duel.GetLP(tp)
local g=Duel.GetMatchingGroup(Card.IsLevelAbove,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,2) local g=Duel.GetMatchingGroup(Card.IsLevelAbove,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,2)
local tg=g:GetMaxGroup(Card.GetLevel) local tg=g:GetMaxGroup(Card.GetLevel)
local maxlv=tg:GetFirst():GetLevel() local maxlv=math.min(tg:GetFirst():GetLevel(),255)
local t={} local t={}
local l=1 local l=1
while l<maxlv and l*500<=lp do while l<maxlv and l*500<=lp do
......
...@@ -42,7 +42,9 @@ function c6733059.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -42,7 +42,9 @@ function c6733059.cost(e,tp,eg,ep,ev,re,r,rp,chk)
tc=tg:GetNext() tc=tg:GetNext()
end end
local pc=1 local pc=1
for i=1,12 do local _,lvmax=tg:GetMaxGroup(Card.GetLevel)
local max=math.min(lvmax,255)
for i=1,max do
if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end
end end
lvt[pc]=nil lvt[pc]=nil
......
...@@ -12,20 +12,13 @@ function c68073522.initial_effect(c) ...@@ -12,20 +12,13 @@ function c68073522.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c68073522.condition)
e2:SetTarget(c68073522.target) e2:SetTarget(c68073522.target)
e2:SetOperation(c68073522.operation) e2:SetOperation(c68073522.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c68073522.filter(c)
return not c:IsType(TYPE_TOKEN)
end
function c68073522.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c68073522.filter,1,nil)
end
function c68073522.target(e,tp,eg,ep,ev,re,r,rp,chk) function c68073522.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local ct=eg:FilterCount(c68073522.filter,nil) local ct=#eg
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct*500) Duel.SetTargetParam(ct*500)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,ct*500) Duel.SetOperationInfo(0,CATEGORY_RECOVER,0,0,tp,ct*500)
......
...@@ -39,7 +39,7 @@ function c68299524.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -39,7 +39,7 @@ function c68299524.cost(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(c68299524.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end and Duel.IsExistingMatchingCard(c68299524.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(c68299524.filter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) local g=Duel.GetMatchingGroup(c68299524.filter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
local tg,atk=g:GetMaxGroup(Card.GetAttack) local tg,atk=g:GetMaxGroup(Card.GetAttack)
local maxc=math.min(Duel.GetLP(tp),atk) local maxc=math.min(Duel.GetLP(tp),atk,25500)
local ct=math.floor(maxc/100) local ct=math.floor(maxc/100)
local t={} local t={}
for i=1,ct do for i=1,ct do
......
...@@ -24,8 +24,7 @@ function c7165085.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,8 +24,7 @@ function c7165085.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFaceup() then if not tc:IsRelateToEffect(e) or tc:IsFaceup() then
if c:IsRelateToEffect(e) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then if c:IsRelateToEffect(e) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
c:CancelToGrave() Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT,tp,true)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
return return
end end
...@@ -74,7 +73,6 @@ function c7165085.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +73,6 @@ function c7165085.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
if c:IsRelateToEffect(e) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then if c:IsRelateToEffect(e) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
c:CancelToGrave() Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT,tp,true)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
end end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c74506079.initial_effect(c) function c74506079.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep2(c,c74506079.ffilter,2,63,true) aux.AddFusionProcFunRep2(c,c74506079.ffilter,2,127,true)
--summon success --summon success
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -38,7 +38,7 @@ function c7602800.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function c7602800.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:FilterCount(c7602800.cfilter,nil,tp)>0 return eg:FilterCount(c7602800.cfilter,nil,tp)>0
end end
function c7602800.spfilter(c,e,tp,atk) function c7602800.spfilter(c,e,tp,atk)
return (c:IsSetCard(0x33) and c:GetAttack()<atk or c:IsCode(9012916)) return (c:IsSetCard(0x33) or c:IsCode(9012916)) and c:GetAttack()<atk
and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
......
...@@ -110,7 +110,6 @@ function c77565204.procop(e,tp,eg,ep,ev,re,r,rp) ...@@ -110,7 +110,6 @@ function c77565204.procop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c77565204.procfilter,tp,LOCATION_EXTRA,0,1,1,nil,code,e,tp) local g=Duel.SelectMatchingCard(tp,c77565204.procfilter,tp,LOCATION_EXTRA,0,1,1,nil,code,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if not tc then return end if not tc then return end
tc:SetStatus(STATUS_FUTURE_FUSION,true)
local mat=e:GetLabelObject():GetLabelObject() local mat=e:GetLabelObject():GetLabelObject()
for mc in aux.Next(mat) do for mc in aux.Next(mat) do
if mc:GetFlagEffect(77565204)>0 then if mc:GetFlagEffect(77565204)>0 then
...@@ -118,7 +117,7 @@ function c77565204.procop(e,tp,eg,ep,ev,re,r,rp) ...@@ -118,7 +117,7 @@ function c77565204.procop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_VALUE_FUTURE_FUSION,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
c:SetCardTarget(tc) c:SetCardTarget(tc)
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c79229522.initial_effect(c) function c79229522.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCodeFunRep(c,70095154,c79229522.mfilter,1,63,true,true) aux.AddFusionProcCodeFunRep(c,70095154,c79229522.mfilter,1,127,true,true)
aux.AddContactFusionProcedure(c,c79229522.cfilter,LOCATION_ONFIELD,LOCATION_ONFIELD,c79229522.sprop(c)) aux.AddContactFusionProcedure(c,c79229522.cfilter,LOCATION_ONFIELD,LOCATION_ONFIELD,c79229522.sprop(c))
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c80889750.initial_effect(c) function c80889750.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,c80889750.mfilter1,c80889750.mfilter2,1,63,true) aux.AddFusionProcFunFunRep(c,c80889750.mfilter1,c80889750.mfilter2,1,127,true)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
...@@ -21,8 +21,7 @@ end ...@@ -21,8 +21,7 @@ end
function c81171949.activate(e,tp,eg,ep,ev,re,r,rp) function c81171949.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
c:CancelToGrave() Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT,tp,true)
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
end end
function c81171949.rmcon(e,tp,eg,ep,ev,re,r,rp) function c81171949.rmcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c82734805.initial_effect(c) function c82734805.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcCode2FunRep(c,14799437,23440231,aux.FilterBoolFunction(Card.IsFusionSetCard,0xbb),1,63,true,true) aux.AddFusionProcCode2FunRep(c,14799437,23440231,aux.FilterBoolFunction(Card.IsFusionSetCard,0xbb),1,127,true,true)
--spsummon success --spsummon success
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(82734805,0)) e2:SetDescription(aux.Stringid(82734805,0))
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c84058253.initial_effect(c) function c84058253.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1093),2,63,false) aux.AddFusionProcFunRep2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1093),2,127,false)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
......
...@@ -36,7 +36,7 @@ function c84389640.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,7 +36,7 @@ function c84389640.cost(e,tp,eg,ep,ev,re,r,rp,chk)
and e:GetLabelObject():IsAttackAbove(100) end and e:GetLabelObject():IsAttackAbove(100) end
local lp=Duel.GetLP(tp) local lp=Duel.GetLP(tp)
local atk=e:GetLabelObject():GetAttack() local atk=e:GetLabelObject():GetAttack()
local maxc=lp>atk and atk or lp local maxc=math.min(atk,lp,25500)
maxc=math.floor(maxc/100)*100 maxc=math.floor(maxc/100)*100
local t={} local t={}
for i=1,maxc/100 do for i=1,maxc/100 do
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c87116928.initial_effect(c) function c87116928.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1093),c87116928.matfilter,1,63,true) aux.AddFusionProcFunFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1093),c87116928.matfilter,1,127,true)
aux.AddContactFusionProcedure(c,c87116928.cfilter,LOCATION_MZONE,LOCATION_MZONE,c87116928.sprop(c)) aux.AddContactFusionProcedure(c,c87116928.cfilter,LOCATION_MZONE,LOCATION_MZONE,c87116928.sprop(c))
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -44,7 +44,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0 return eg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>0
end end
function s.relfilter1(c,tp) function s.relfilter1(c,tp)
return c:IsSetCard(0x196) and c:IsFaceup() and c:IsReleasableByEffect() return c:IsSetCard(0x196) and c:IsReleasableByEffect()
and Duel.IsExistingMatchingCard(s.relfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp,c) and Duel.IsExistingMatchingCard(s.relfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,tp,c)
end end
function s.relfilter2(c,tp,ec) function s.relfilter2(c,tp,ec)
......
...@@ -34,7 +34,7 @@ function c89771220.fselect(g,e,tp) ...@@ -34,7 +34,7 @@ function c89771220.fselect(g,e,tp)
and Duel.IsExistingMatchingCard(c89771220.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g) and Duel.IsExistingMatchingCard(c89771220.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g)
end end
function c89771220.spfilter(c,e,tp,g) function c89771220.spfilter(c,e,tp,g)
return c:IsCode(33250142) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsCode(33250142) and c:IsCanBeSpecialSummoned(e,0,tp,false,true)
and Duel.GetLocationCountFromEx(tp,tp,g,c)>0 and Duel.GetLocationCountFromEx(tp,tp,g,c)>0
end end
function c89771220.target(e,tp,eg,ep,ev,re,r,rp,chk) function c89771220.target(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -55,7 +55,7 @@ function c89771220.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c89771220.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c89771220.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil) local sg=Duel.SelectMatchingCard(tp,c89771220.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
if #sg>0 then if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,true,POS_FACEUP)
sg:GetFirst():CompleteProcedure() sg:GetFirst():CompleteProcedure()
end end
end end
......
...@@ -9,6 +9,7 @@ function s.initial_effect(c) ...@@ -9,6 +9,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(aux.synlimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--banish --banish
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -69,7 +70,7 @@ function s.matchk(e,c) ...@@ -69,7 +70,7 @@ function s.matchk(e,c)
ef:SetCountLimit(ct) ef:SetCountLimit(ct)
end end
function s.sfilter(c,e,tp) function s.sfilter(c,e,tp)
return not c:IsType(TYPE_TOKEN) and c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanBeEffectTarget(e) return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:IsCanBeEffectTarget(e)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -42,7 +42,6 @@ function c96633955.initial_effect(c) ...@@ -42,7 +42,6 @@ function c96633955.initial_effect(c)
e6:SetRange(LOCATION_MZONE) e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_REMOVE) e6:SetCode(EVENT_REMOVE)
e6:SetCountLimit(1,96633955) e6:SetCountLimit(1,96633955)
e6:SetCondition(c96633955.remcon)
e6:SetTarget(c96633955.remtg) e6:SetTarget(c96633955.remtg)
e6:SetOperation(c96633955.remop) e6:SetOperation(c96633955.remop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
...@@ -64,12 +63,6 @@ function c96633955.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,12 +63,6 @@ function c96633955.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
return true return true
else return false end else return false end
end end
function c96633955.remfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function c96633955.remcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c96633955.remfilter,1,nil)
end
function c96633955.remtg(e,tp,eg,ep,ev,re,r,rp,chk) function c96633955.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) end
......
...@@ -14,7 +14,6 @@ function c99137266.initial_effect(c) ...@@ -14,7 +14,6 @@ function c99137266.initial_effect(c)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetCountLimit(1,99137266) e2:SetCountLimit(1,99137266)
e2:SetCondition(c99137266.remcon)
e2:SetTarget(c99137266.remtg) e2:SetTarget(c99137266.remtg)
e2:SetOperation(c99137266.remop) e2:SetOperation(c99137266.remop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -30,12 +29,6 @@ function c99137266.initial_effect(c) ...@@ -30,12 +29,6 @@ function c99137266.initial_effect(c)
e3:SetOperation(c99137266.spop) e3:SetOperation(c99137266.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c99137266.remfilter(c)
return not c:IsType(TYPE_TOKEN)
end
function c99137266.remcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c99137266.remfilter,1,nil)
end
function c99137266.rmfilter(c) function c99137266.rmfilter(c)
return (c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_WYRM) or c:IsSetCard(0x16b)) return (c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_WYRM) or c:IsSetCard(0x16b))
and c:IsAbleToRemove() and (c:IsFaceup() or not c:IsOnField()) and c:IsAbleToRemove() and (c:IsFaceup() or not c:IsOnField())
......
...@@ -158,6 +158,7 @@ SUMMON_VALUE_GLADIATOR =0x2000 --剑斗兽 ...@@ -158,6 +158,7 @@ SUMMON_VALUE_GLADIATOR =0x2000 --剑斗兽
SUMMON_VALUE_EVOLTILE =0x4000 --进化虫 SUMMON_VALUE_EVOLTILE =0x4000 --进化虫
SUMMON_VALUE_DARK_FUSION =SUMMON_TYPE_FUSION|0x16 -- SUMMON_VALUE_DARK_FUSION =SUMMON_TYPE_FUSION|0x16 --
SUMMON_VALUE_FOSSIL_FUSION =SUMMON_TYPE_FUSION|0x17 -- SUMMON_VALUE_FOSSIL_FUSION =SUMMON_TYPE_FUSION|0x17 --
SUMMON_VALUE_FUTURE_FUSION =SUMMON_TYPE_FUSION|0x18 --
--Status --卡片当前状态 --Status --卡片当前状态
STATUS_DISABLED =0x0001 --效果被无效 STATUS_DISABLED =0x0001 --效果被无效
STATUS_TO_ENABLE =0x0002 --将变成有效 STATUS_TO_ENABLE =0x0002 --将变成有效
......
...@@ -1555,6 +1555,9 @@ function Auxiliary.FusionEffectUltimateTarget(params) ...@@ -1555,6 +1555,9 @@ function Auxiliary.FusionEffectUltimateTarget(params)
end end
end end
end end
---
---@param params table
---@return function
function Auxiliary.FusionEffectUltimateOperation(params) function Auxiliary.FusionEffectUltimateOperation(params)
return function(e,tp,eg,ep,ev,re,r,rp) return function(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
...@@ -1592,7 +1595,7 @@ function Auxiliary.FusionEffectUltimateOperation(params) ...@@ -1592,7 +1595,7 @@ function Auxiliary.FusionEffectUltimateOperation(params)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
if ce~=nil then if ce then
local fgroup=ce:GetTarget() local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp):Filter(Auxiliary.FusionEffectUltimateMatFilter,nil,e,tp,params.mat_filter) mg2=fgroup(ce,e,tp):Filter(Auxiliary.FusionEffectUltimateMatFilter,nil,e,tp,params.mat_filter)
local mf=ce:GetValue() local mf=ce:GetValue()
...@@ -1642,7 +1645,7 @@ function Auxiliary.FusionEffectUltimateOperation(params) ...@@ -1642,7 +1645,7 @@ function Auxiliary.FusionEffectUltimateOperation(params)
params.mat_operation(mat1) params.mat_operation(mat1)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,params.spsummon_nocheck,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,params.spsummon_nocheck,false,POS_FACEUP)
elseif ce then elseif ce and mg2 then
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,gc,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,gc,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2) fop(ce,e,tp,tc,mat2)
...@@ -1708,6 +1711,10 @@ function Auxiliary.tdcfop(c) ...@@ -1708,6 +1711,10 @@ function Auxiliary.tdcfop(c)
if cg:GetCount()>0 then if cg:GetCount()>0 then
Duel.ConfirmCards(1-c:GetControler(),cg) Duel.ConfirmCards(1-c:GetControler(),cg)
end end
local hg=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE+LOCATION_REMOVED)
if hg:GetCount()>0 then
Duel.HintSelection(hg)
end
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end end
end 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