Commit 47927f94 authored by 未闻皂名's avatar 未闻皂名

2024/8/4 新增:KP18新卡

parent be1b8c8b
Pipeline #28886 passed with stages
in 5 minutes and 49 seconds
No preview for this file type
...@@ -477,3 +477,13 @@ function RushDuel.CanDiscardDeck(desc, player, count, break_effect) ...@@ -477,3 +477,13 @@ function RushDuel.CanDiscardDeck(desc, player, count, break_effect)
end end
return 0 return 0
end end
-- 可选操作: 伤害
function RushDuel.CanDamage(desc, player, damage, break_effect)
if damage > 0 and Duel.SelectYesNo(player, desc) then
if break_effect then
Duel.BreakEffect()
end
return Duel.Damage(1 - player, damage, REASON_EFFECT)
end
return 0
end
...@@ -38,10 +38,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,10 +38,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=mg:GetMaxGroup(Card.GetLevel) local sg=mg:GetMaxGroup(Card.GetLevel)
if sg:GetCount()>0 and Duel.Destroy(sg,REASON_EFFECT)~=0 then if sg:GetCount()>0 and Duel.Destroy(sg,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local atk=g:GetSum(Card.GetAttack) local dam=g:GetSum(Card.GetAttack)
if atk>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then RD.CanDamage(aux.Stringid(m,2),tp,dam,true)
Duel.BreakEffect()
Duel.Damage(1-tp,atk,REASON_EFFECT)
end
end end
end end
\ No newline at end of file
...@@ -23,8 +23,6 @@ end ...@@ -23,8 +23,6 @@ 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.SendDeckTopToGraveAndExists(tp,2) then if RD.SendDeckTopToGraveAndExists(tp,2) then
local dam=Duel.GetOperatedGroup():FilterCount(cm.exfilter,nil)*300 local dam=Duel.GetOperatedGroup():FilterCount(cm.exfilter,nil)*300
if dam~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then RD.CanDamage(aux.Stringid(m,1),tp,dam,true)
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end end
end end
\ No newline at end of file
local m=120264007
local cm=_G["c"..m]
cm.name="混合驱动球星龙"
function cm.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
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
--Special Summon
function cm.confilter(c)
return c:IsRace(RACE_MACHINE)
end
function cm.costfilter(c)
return c:IsLevel(7,8) and c:IsRace(RACE_DRAGON) and not c:IsPublic()
end
function cm.spfilter(c,e,tp,lv)
return c:IsLevel(lv) and Duel.GetMZoneCount(tp)>0 and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_GRAVE,0,1,nil)
end
cm.cost=RD.CostShowHand(cm.costfilter,1,1,function(g)
return g:GetFirst():GetLevel()
end)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>2 end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end
local lv=e:GetLabel()
local sg,g=RD.RevealDeckTopAndCanSelect(tp,3,aux.Stringid(m,1),HINTMSG_SPSUMMON,cm.spfilter,1,1,e,tp,lv)
if sg:GetCount()>0 then
Duel.DisableShuffleCheck()
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
local ct=g:GetCount()
if ct>0 then
Duel.SortDecktop(tp,tp,ct)
RD.SendDeckTopToBottom(tp,ct)
end
end
\ No newline at end of file
local m=120264008
local list={120261006}
local cm=_G["c"..m]
cm.name="混合驱动屏障之尾"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Summon Procedure
RD.AddSummonProcedureZero(c,aux.Stringid(m,0),cm.sumcon)
--Pierce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e1)
--Indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetValue(cm.indval)
c:RegisterEffect(e2)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
--Summon Procedure
function cm.filter(c)
return c:IsFaceup() and c:IsCode(list[1])
end
function cm.sumcon(c,e,tp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_ONFIELD,0,1,nil)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
function cm.confilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON)
end
function cm.condition(e)
return Duel.IsExistingMatchingCard(cm.confilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function cm.target(e,c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON+RACE_MACHINE)
end
\ No newline at end of file
local m=120264016
local cm=_G["c"..m]
cm.name="交叉装载员"
function cm.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
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
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsLevel(7) and c:IsRace(RACE_WARRIOR) and c:IsAttack(2500) and RD.IsDefense(c,2000)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
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)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateRaceCannotAttackEffect(e,aux.Stringid(m,1),RACE_ALL-RACE_WARRIOR,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
local m=120264035
local cm=_G["c"..m]
cm.name="寄星体 死星碰撞"
function cm.initial_effect(c)
--Discard Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--Damage
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DAMAGE)
ge1:SetOperation(cm.regop)
Duel.RegisterEffect(ge1,0)
end
end
--Damage
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
if r&REASON_EFFECT>0 then
Duel.RegisterFlagEffect(ep,m,RESET_PHASE+PHASE_END,0,1)
end
end
--Discard Deck
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)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,3)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SendDeckTopToGraveAndExists(tp,3) and Duel.GetFlagEffect(1-tp,m)==0 then
RD.CanDamage(aux.Stringid(m,1),tp,700)
end
end
\ No newline at end of file
local m=120264060
local cm=_G["c"..m]
cm.name="绊脚石"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c,tp)
return c:GetSummonPlayer()==tp
end
function cm.filter(c)
return c:IsAttackPos() and RD.IsCanChangePosition(c)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter,1,nil,1-tp) and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>=2
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
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,cm.filter,tp,0,LOCATION_MZONE,1,3,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_DEFENSE)
g:ForEach(function(tc)
local e1=RD.AttachCannotTribute(e,tc,cm.sumlimit,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetLabel(tp)
end)
end)
end
function cm.sumlimit(e,c)
return e:GetHandlerPlayer()~=e:GetLabel()
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