Commit fa9e6f26 authored by 未闻皂名's avatar 未闻皂名

2020/11/17 kp03转移到正式卡,尝试制作max召唤

parent ce96de7e
No preview for this file type
No preview for this file type
local m=120109005
local cm=_G["c"..m]
cm.name="机动砦的血管"
cm.name="机动城的开启桥人"
function cm.initial_effect(c)
--Position
local e1=Effect.CreateEffect(c)
......
......@@ -8,6 +8,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -20,6 +21,9 @@ end
function cm.filter(c)
return c:IsFaceup() and c:IsLevelBelow(7)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
local m=120150001
local cm=_G["c"..m]
cm.name="超魔机神 大霸道王[L]"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RushDuel.IsMaximumMode(e) and Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
local m=120150002
local list={120150001,120150003}
local cm=_G["c"..m]
cm.name="超魔机神 大霸道王"
function cm.initial_effect(c)
aux.AddCodeList(c,list[1],list[2])
--Maximum Summon
RushDuel.AddMaximumProcedure(c,3500,list[1],list[2])
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RushDuel.IsMaximumMode)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
end
--Indes
function cm.efilter(e,re)
return rp==1-e:GetHandlerPlayer() and re:GetOwner():IsType(TYPE_TRAP)
end
\ No newline at end of file
local m=120150003
local cm=_G["c"..m]
cm.name="超魔机神 大霸道王[R]"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RushDuel.IsMaximumMode)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
function cm.filter(c)
return c:IsFaceup() and c:IsLevelAbove(1)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,1) end
Duel.DiscardDeck(tp,1,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(tc:GetLevel()*200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
end
\ No newline at end of file
local m=120150010
local cm=_G["c"..m]
cm.name="天帝龙树 世界树龙[L]"
function cm.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RushDuel.IsMaximumMode)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Destroy
function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelBelow(8)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,3) end
Duel.DiscardDeck(tp,3,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
local m=120150011
local list={120150010,120150012}
local cm=_G["c"..m]
cm.name="天帝龙树 世界树龙"
function cm.initial_effect(c)
aux.AddCodeList(c,list[1],list[2])
--Maximum Summon
RushDuel.AddMaximumProcedure(c,4000,list[1],list[2])
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RushDuel.IsMaximumMode)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
end
--Indes
function cm.efilter(e,re)
return rp==1-e:GetHandlerPlayer() and re:GetOwner():IsType(TYPE_TRAP)
end
\ No newline at end of file
local m=120150012
local cm=_G["c"..m]
cm.name="天帝龙树 世界树龙[R]"
function cm.initial_effect(c)
--Position
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RushDuel.IsMaximumMode)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Position
function cm.posfilter(c)
return c:IsDefensePos() and c:IsCanChangePosition()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,3) end
Duel.DiscardDeck(tp,3,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.posfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.GetMatchingGroup(cm.posfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DEFENSE)
local g=Duel.SelectMatchingCard(tp,cm.posfilter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.ChangePosition(g,POS_FACEUP_ATTACK)
end
end
\ No newline at end of file
local m=120150015
local list={120150014}
local cm=_G["c"..m]
cm.name="原子粒子机"
cm.name="阿米粒子机"
function cm.initial_effect(c)
aux.AddCodeList(c,list[1])
--Draw
......
local m=120150016
local list={120150014,120150015}
local cm=_G["c"..m]
cm.name="仄粒子机"
cm.name="仄粒子机"
function cm.initial_effect(c)
aux.AddCodeList(c,list[1],list[2])
--Draw
......
local m=120150017
local list={120150014,120150015,120150016}
local cm=_G["c"..m]
cm.name="幺粒子机"
cm.name="幺粒子机"
function cm.initial_effect(c)
aux.AddCodeList(c,list[1],list[2],list[3])
--Draw
......
--Constant
SUMMON_TYPE_MAXIMUM = 0x45000000
RushDuel={}
......@@ -14,7 +16,7 @@ function Auxiliary.PreloadUds()
--Legend Card
local g=Duel.GetMatchingGroup(Card.IsCode,0,0xff,0xff,nil,120000000)
local legend=g:GetFirst()
while legend do
while legend do
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_CODE)
......@@ -22,8 +24,8 @@ function Auxiliary.PreloadUds()
e1:SetRange(0xff)
e1:SetValue(legend:GetOriginalCode())
legend:RegisterEffect(e1)
legend=g:GetNext()
end
legend=g:GetNext()
end
e:Reset()
end)
Duel.RegisterEffect(e1,0)
......@@ -71,21 +73,18 @@ function Auxiliary.PreloadUds()
e7:SetOperation(RushDuel.TrapChainLimitOperation)
Duel.RegisterEffect(e7,0)
--Once Per Turn
local e5=Effect.GlobalEffect()
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_ACTIVATE_COST)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(1,0)
e5:SetTarget(RushDuel.OncePerTurnTarget)
e5:SetCost(RushDuel.OncePerTurnCost)
e5:SetOperation(RushDuel.OncePerTurnOperation)
local e6=Effect.GlobalEffect()
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e6:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e6:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
e6:SetLabelObject(e5)
Duel.RegisterEffect(e6,0)
local e8=Effect.GlobalEffect()
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_CANNOT_ACTIVATE)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e8:SetTargetRange(1,1)
e8:SetValue(RushDuel.ActivateLimit)
Duel.RegisterEffect(e8,0)
local e9=Effect.GlobalEffect()
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e9:SetCode(EVENT_CHAIN_SOLVING)
e9:SetOperation(RushDuel.ActivateCount)
Duel.RegisterEffect(e9,0)
end
function RushDuel.DrawCount(e)
local p=Duel.GetTurnPlayer()
......@@ -105,19 +104,112 @@ function RushDuel.TrapChainLimitOperation(e,tp,eg,ep,ev,re,r,rp)
end
end
function RushDuel.chaintime(e,rp,tp)
return not (e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:IsActiveType(TYPE_TRAP))
return not (e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:IsActiveType(TYPE_TRAP))
end
--Once Per Turn
function RushDuel.OncePerTurnTarget(e,te,tp)
return te:GetHandler()==e:GetHandler()
end
function RushDuel.OncePerTurnCost(e,te,tp)
return e:GetHandler():GetFlagEffect(10001)==0
function RushDuel.ActivateLimit(e,re,tp)
local code=re:GetOwner():GetCode()
return re:GetHandler():GetFlagEffect(code)~=0
end
function RushDuel.OncePerTurnOperation(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(10001,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
function RushDuel.ActivateCount(e,tp,eg,ep,ev,re,r,rp)
local te=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_EFFECT)
local code=te:GetOwner():GetCode()
te:GetHandler():RegisterFlagEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
--Legend
function RushDuel.IsLegendCode(c,code)
return (c:GetOriginalCode()==code and c:IsCode(120000000)) or c:IsCode(code)
end
--Maximum Summon
function RushDuel.AddMaximumProcedure(c,max_atk,left_code,right_code)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(120000000,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC_G)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(RushDuel.MaximumSummonCondition(left_code,right_code))
e1:SetOperation(RushDuel.MaximumSummonOperation(left_code,right_code))
e1:SetValue(SUMMON_TYPE_MAXIMUM)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(RushDuel.IsMaximumMode)
e2:SetOperation(RushDuel.MaximumMaterial)
c:RegisterEffect(e2)
--Maximun Atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_BASE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(RushDuel.IsMaximumMode)
e3:SetValue(max_atk)
c:RegisterEffect(e3)
--Position
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_POSITION)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(POS_FACEUP_ATTACK)
e4:SetCondition(RushDuel.IsMaximumMode)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(RushDuel.IsMaximumMode)
c:RegisterEffect(e5)
--Use 3 MZone
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_MAX_MZONE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(1,0)
e6:SetCondition(RushDuel.IsMaximumMode)
e6:SetValue(1)
c:RegisterEffect(e6)
end
function RushDuel.MaximumSummonFilter(c,e,tp,left_code,right_code)
return c:IsCode(left_code,right_code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function RushDuel.MaximumSummonCheck(g)
return g:GetClassCount(Card.GetCode)==g:GetCount()
end
function RushDuel.MaximumSummonCondition(left_code,right_code)
return function(e,c,og)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(RushDuel.MaximumSummonFilter,tp,LOCATION_HAND,0,nil,e,tp,left_code,right_code)
local fg=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
return Duel.GetMZoneCount(tp,fg)>0 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and mg:CheckSubGroup(RushDuel.MaximumSummonCheck,2,2)
end
end
function RushDuel.MaximumSummonOperation(left_code,right_code)
return function(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
local mg=Duel.GetMatchingGroup(RushDuel.MaximumSummonFilter,tp,LOCATION_HAND,0,nil,e,tp,left_code,right_code)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(120000000,1))
local cancel=Duel.GetCurrentChain()==0
local g=mg:SelectSubGroup(tp,RushDuel.MaximumSummonCheck,cancel,2,2)
if not g then return end
local fg=Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
Duel.SendtoGrave(fg,REASON_RULE)
c:SetMaterial(g)
sg:AddCard(c)
sg:Merge(g)
end
end
function RushDuel.IsMaximumMode(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_MAXIMUM)
end
function RushDuel.MaximumMaterial(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=c:GetMaterial()
Duel.Overlay(c,mg)
Duel.MoveSequence(c,2)
end
\ No newline at end of file
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