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