Commit 68d058c8 authored by 未闻皂名's avatar 未闻皂名

2023/3/4 更新调整,修复传说怪兽作为融合素材的bug

parent 790f21cc
......@@ -366,6 +366,26 @@ function RushDuel.AdvanceCheckOperation(e, tp, eg, ep, ev, re, r, rp)
e:GetHandler():RegisterFlagEffect(e:GetLabelObject():GetLabel(), RESET_EVENT + RESETS_STANDARD, 0, 1)
end
-- 记录召唤的解放数量
function RushDuel.CreateAdvanceCount(card, self_value)
local e1 = Effect.CreateEffect(card)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(function(e, c)
if c:IsSummonType(SUMMON_VALUE_SELF) then
e:SetLabel(self_value)
elseif c:IsLevelBelow(4) then
e:SetLabel(0)
elseif c:IsLevelBelow(6) then
e:SetLabel(1)
else
e:SetLabel(2)
end
end)
card:RegisterEffect(e1)
return e1
end
-- 获取效果值列表
function RushDuel.GetEffectValues(card, code)
local effects = {card:IsHasEffect(code)}
......
......@@ -71,11 +71,14 @@ function RushDuel.InitRule()
end
-- 初始化传说卡
function RushDuel.InitLegend(c)
local e = Effect.CreateEffect(c)
e:SetType(EFFECT_TYPE_SINGLE)
e:SetCode(EFFECT_LEGEND_CARD)
e:SetProperty(EFFECT_FLAG_SINGLE_RANGE + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE + EFFECT_FLAG_SET_AVAILABLE)
e:SetRange(0xff)
e:SetValue(c:GetOriginalCode())
c:RegisterEffect(e, true)
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEGEND_CARD)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE + EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(0xff)
e1:SetValue(c:GetOriginalCode())
c:RegisterEffect(e1, true)
local e2 = e1:Clone()
e2:SetCode(EFFECT_ADD_FUSION_CODE)
c:RegisterEffect(e2, true)
end
......@@ -25,7 +25,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.Damage()~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
RD.Damage()
Duel.Draw(tp,1,REASON_EFFECT)
end
\ No newline at end of file
......@@ -4,24 +4,17 @@ cm.name="闪电之战士 吉尔福德"
function cm.initial_effect(c)
--Summon Procedure
RD.AddSummonProcedure(c,aux.Stringid(m,0),cm.sumcon,cm.sumop,SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
--Check Material
local mat=RD.CreateAdvanceCount(c,3)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(cm.regcon)
e1:SetOperation(cm.regop)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
--Summon Procedure
function cm.sumcon(e,c,minc)
......@@ -34,17 +27,10 @@ function cm.sumop(e,tp,eg,ep,ev,re,r,rp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
--Check Material
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp,c)
e:GetHandler():RegisterFlagEffect(20235000,RESET_EVENT+RESETS_STANDARD,0,1)
end
--Destroy
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) and c:GetFlagEffect(20235000)~=0
return RD.IsSummonTurn(c) and e:GetLabelObject():GetLabel()==3
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -5,5 +5,5 @@ cm.name="流星黑龙"
function cm.initial_effect(c)
RD.AddCodeList(c,LEGEND_RED_EYES_BLACK_DRAGON,list)
--Fusion Material
RD.AddFusionProcedure(c,LEGEND_RED_EYES_BLACK_DRAGON,list[2])
RD.AddFusionProcedure(c,LEGEND_RED_EYES_BLACK_DRAGON,list[1])
end
\ No newline at end of file
......@@ -4,12 +4,14 @@ cm.name="百兽王 贝希摩斯"
function cm.initial_effect(c)
--Summon Procedure
RD.AddSummonProcedure(c,aux.Stringid(m,0),cm.sumcon,cm.sumop,SUMMON_TYPE_ADVANCE+SUMMON_VALUE_SELF)
local mat=RD.CreateAdvanceCount(c,1)
--To Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetLabelObject(mat)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
......@@ -42,7 +44,7 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetMaterialCount()
local ct=e:GetLabelObject():GetLabel()
if chk==0 then return ct>0 and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,ct,nil) end
e:SetLabel(ct)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
......
......@@ -18,18 +18,22 @@ function cm.initial_effect(c)
end
--Atk Up
function cm.check(e,c)
local g=c:GetMaterial()
local tc=g:GetFirst()
local atk=0
while tc do
atk=atk+tc:GetBaseAttack()
tc=g:GetNext()
local g=c:GetMaterial()
if g:GetCount()==1 then
atk=cm.getatk(g:GetFirst())
elseif g:GetCount()==2 then
atk=cm.getatk(g:GetFirst())+cm.getatk(g:GetNext())
end
if atk>0 and e:GetLabel()==1 then
e:SetLabel(0)
RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+0xff0000)
end
end
function cm.getatk(c)
local atk=c:GetTextAttack()
if atk>0 then return atk else return 0 end
end
--Summon Only
function cm.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1)
......
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