Commit 5e501f01 authored by 未闻皂名's avatar 未闻皂名

2024/11/3 新增:骰子新卡

parent 0baefff7
Pipeline #30932 passed with stages
in 15 minutes and 36 seconds
No preview for this file type
......@@ -361,6 +361,21 @@ function RushDuel.FusionOperation(matfilter, spfilter, exfilter, s_range, o_rang
end
end
-- 强制进行融合术召唤
function RushDuel.FusionSummon(matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, e, tp, break_effect, including_self)
Auxiliary.FGoalCheckAdditional = mat_check
local fusionable, list, chkf, gc = RushDuel.GetFusionSummonData(e, tp, matfilter, spfilter, exfilter, s_range, o_range, including_self, nil, e)
local fc = nil
if fusionable then
if break_effect then
Duel.BreakEffect()
end
fc = RushDuel.ExecuteFusionSummon(e, tp, list, chkf, gc, mat_move)
end
aux.FGoalCheckAdditional = nil
return fc
end
-- 可以进行融合术召唤
function RushDuel.CanFusionSummon(desc, matfilter, spfilter, exfilter, s_range, o_range, mat_check, mat_move, e, tp, break_effect, including_self)
Auxiliary.FGoalCheckAdditional = mat_check
......
local m=120272005
local list={120272006}
local cm=_G["c"..m]
cm.name="骰子小钥心·小一"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Discard Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_DAMAGE+CATEGORY_DESTROY)
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)
c:RegisterEffect(e1)
end
--Discard Deck
function cm.confilter(c)
return c:IsFaceup() and c:IsCode(list[1])
end
function cm.exfilter(c)
return c.toss_dice and c:IsLevel(7) and c:IsLocation(LOCATION_GRAVE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9
and Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
Duel.ShuffleDeck(tp)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SendDeckTopToGraveAndExists(tp,1,cm.exfilter,1,nil)
and Duel.Damage(1-tp,100,REASON_EFFECT)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,7,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
end
end
\ No newline at end of file
local m=120272006
local list={120272005}
local cm=_G["c"..m]
cm.name="骰子小钥心·小八"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Cannot Release
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.target)
e1:SetValue(1)
c:RegisterEffect(e1)
--Indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.indcon)
e2:SetValue(1)
c:RegisterEffect(e2)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
--Cannot Release
function cm.target(e,c)
return c:IsFaceup() and (c==e:GetHandler() or c:IsCode(list[1]))
end
--Indes
function cm.indcon(e)
return e:GetHandler():IsAttackPos()
end
\ No newline at end of file
local m=120272007
local cm=_G["c"..m]
cm.name="骰子小钥心·小合"
function cm.initial_effect(c)
--Dice
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DICE+CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
cm.toss_dice=true
--Dice
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
function cm.matfilter(c)
return c:IsOnField() and c:IsRace(RACE_FAIRY)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.TossDice(tp,1)
if d==1 then
RD.SelectAndDoAction(HINTMSG_DESTROY,nil,tp,LOCATION_ONFIELD,0,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
elseif d>=3 and d<=6 then
local fc=RD.FusionSummon(cm.matfilter,nil,nil,0,0,nil,RD.FusionToGrave,e,tp)
if fc and fc:IsFaceup() and d==5 or d==6 then
RD.AttachEffectIndes(e,fc,cm.indval,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
end
\ No newline at end of file
local m=120272009
local cm=_G["c"..m]
cm.name="骰子小钥心·莉莉丝"
function cm.initial_effect(c)
--Dice
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DICE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
cm.toss_dice=true
--Dice
cm.trival=RD.ValueDoubleTributeAttrRace(nil,RACE_FAIRY)
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_FAIRY) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.TossDice(tp,1)
if d>=1 and d<=3 then
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachDoubleTribute(e,c,cm.trival,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
elseif d>=4 and d<=6 then
RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)
end
end
\ No newline at end of file
local m=120272038
local list={120235001,120254065}
local cm=_G["c"..m]
cm.name="超级谱气斗士·等离子剑士"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--Cannot Special Summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,1)
e2:SetCondition(cm.sumcon)
e2:SetTarget(cm.sumlimit)
c:RegisterEffect(e2)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
--Atk Up
function cm.atkfilter(c)
return c:IsFaceup() and c:IsLevelAbove(7)
end
function cm.atkval(e,c)
local g=Duel.GetMatchingGroup(cm.atkfilter,e:GetHandlerPlayer(),0,LOCATION_MZONE,nil)
return g:GetSum(Card.GetLevel)*200
end
--Cannot Special Summon
function cm.sumfilter(c)
return c:IsType(TYPE_MAXIMUM) and c:IsRace(RACE_PYRO+RACE_AQUA+RACE_THUNDER)
end
function cm.sumcon(e)
return Duel.IsExistingMatchingCard(cm.sumfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,3,nil)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_HAND) and c:GetAttribute()~=ATTRIBUTE_FIRE
end
\ No newline at end of file
local m=120272040
local list={120257016,120272007}
local cm=_G["c"..m]
cm.name="骰子炸药游戏·双up小掷"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Dice
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DICE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
cm.toss_dice=true
--Dice
function cm.spfilter(c,e,tp,lv)
return c:IsLevelBelow(lv) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local d1,d2=Duel.TossDice(tp,2)
local lv=d1+d2
local filter=aux.NecroValleyFilter(RD.Filter(cm.spfilter,e,tp,lv))
if RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,POS_FACEUP)~=0 then
local c=e:GetHandler()
local tc=Duel.GetOperatedGroup():GetFirst()
local atk=tc:GetBaseAttack()
if atk>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.BreakEffect()
RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
end
\ No newline at end of file
local m=120272064
local cm=_G["c"..m]
cm.name="第六感"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DICE+CATEGORY_DRAW+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
cm.toss_dice=true
--Activate
function cm.confilter(c,tp)
return c:GetSummonPlayer()==tp
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>5
and eg:IsExists(cm.confilter,1,nil,1-tp)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,1-tp,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local t={}
local i=1
local p=1
for i=1,6 do t[i]=i end
local a1=Duel.AnnounceNumber(tp,table.unpack(t))
for i=1,6 do
if a1~=i then t[p]=i p=p+1 end
end
t[p]=nil
local a2=Duel.AnnounceNumber(tp,table.unpack(t))
local dc=Duel.TossDice(1-tp,1)
if dc==a1 or dc==a2 then
Duel.Draw(tp,dc,REASON_EFFECT)
else
Duel.DiscardDeck(tp,dc,REASON_EFFECT)
end
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