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

2023/10/25 新增:鱼族新卡

parent a569b137
Pipeline #23844 passed with stages
in 6 minutes and 48 seconds
No preview for this file type
...@@ -134,6 +134,36 @@ function RushDuel.CanSelectGroupAndSpecialSummon(desc, filter, check, tp, s_rang ...@@ -134,6 +134,36 @@ function RushDuel.CanSelectGroupAndSpecialSummon(desc, filter, check, tp, s_rang
end end
return 0 return 0
end end
-- 操作: 选择怪兽加入手卡或者特殊召唤 (限定 1 只怪兽)
function RushDuel.SelectAndToHandOrSpecialSummon(hint, filter, tp, s_range, o_range, expect, e, pos, break_effect, target_player)
return RushDuel._private_action_select_match(hint, filter, tp, s_range, o_range, 1, 1, expect, false, false, function(g)
local tc = g:GetFirst()
local ft = RushDuel.GetMZoneCount(target_player or tp, 1)
if tc:IsAbleToHand() and (not RD.IsCanBeSpecialSummoned(tc, e, tp, pos) or ft <= 0 or Duel.SelectOption(tp, 1190, 1152) == 0) then
if break_effect then
Duel.BreakEffect()
end
return RushDuel.SendToHandAndExists(tc, 1 - tp)
else
return RushDuel._special_summon(tc, e, tp, pos, break_effect, target_player)
end
end, e, tp)
end
-- 可选操作: 选择怪兽加入手卡或者特殊召唤 (限定 1 只怪兽)
function RushDuel.CanSelectAndToHandOrSpecialSummon(desc, hint, filter, tp, s_range, o_range, expect, e, pos, break_effect, target_player)
return RushDuel._private_action_can_select_match(desc, hint, filter, tp, s_range, o_range, 1, 1, expect, false, false, function(g)
local tc = g:GetFirst()
local ft = RushDuel.GetMZoneCount(target_player or tp, 1)
if tc:IsAbleToHand() and (not RD.IsCanBeSpecialSummoned(tc, e, tp, pos) or ft <= 0 or Duel.SelectOption(tp, 1190, 1152) == 0) then
if break_effect then
Duel.BreakEffect()
end
return RushDuel.SendToHandAndExists(tc, 1 - tp)
else
return RushDuel._special_summon(tc, e, tp, pos, break_effect, target_player)
end
end, e, tp)
end
-- 操作: 选择魔法, 陷阱卡盖放 -- 操作: 选择魔法, 陷阱卡盖放
function RushDuel.SelectAndSet(filter, tp, s_range, o_range, min, max, expect, e, break_effect) function RushDuel.SelectAndSet(filter, tp, s_range, o_range, min, max, expect, e, break_effect)
local ct = RushDuel.GetSZoneCount(tp, max) local ct = RushDuel.GetSZoneCount(tp, max)
......
...@@ -49,6 +49,10 @@ end ...@@ -49,6 +49,10 @@ end
function RushDuel.IsCanBeSpecialSummoned(card, effect, player, position) function RushDuel.IsCanBeSpecialSummoned(card, effect, player, position)
return card:IsCanBeSpecialSummoned(effect, 0, player, false, false, position) return card:IsCanBeSpecialSummoned(effect, 0, player, false, false, position)
end end
-- 条件: 可否加入手卡或特殊召唤
function RushDuel.IsAbleToHandOrSpecialSummon(card, effect, player, position)
return card:IsAbleToHand() or (Duel.GetLocationCount(player, LOCATION_MZONE) > 0 and RushDuel.IsCanBeSpecialSummoned(card, effect, player, position))
end
-- 条件: 位置变化前的控制者 -- 条件: 位置变化前的控制者
function RushDuel.IsPreviousControler(card, player) function RushDuel.IsPreviousControler(card, player)
......
local m=120253016
local list={120196050,120253054}
local cm=_G["c"..m]
cm.name="波导刀 种子岛鱼"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--To Hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
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
--To Hand
function cm.thfilter(c)
return ((c:IsLevel(7) and c:IsRace(RACE_FISH)) or c:IsCode(list[1],list[2])) and c:IsAbleToHand()
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 Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
RD.SendToHandAndExists(g,1-tp)
end)
end
\ No newline at end of file
local m=120253017
local list={120130032}
local cm=_G["c"..m]
cm.name="波导铳 迷你金枪鱼"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
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
--Atk Up
function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_FISH) and c:IsLevelAbove(1)
end
function cm.exfilter(c,e,tp)
return c:IsCode(list[1]) and RD.IsAbleToHandOrSpecialSummon(c,e,tp,POS_FACEUP)
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
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 g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,0,nil)
local atk=g:GetSum(Card.GetLevel)*100
RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
RD.CanSelectAndToHandOrSpecialSummon(aux.Stringid(m,1),aux.Stringid(m,2),aux.NecroValleyFilter(cm.exfilter),tp,LOCATION_GRAVE,0,nil,e,POS_FACEUP,true)
end
end
\ No newline at end of file
local m=120253018
local list={120253062}
local cm=_G["c"..m]
cm.name="突击印鲨"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
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
--Set
function cm.costfilter(c)
return c:IsRace(RACE_FISH) and c:IsAbleToGraveAsCost()
end
function cm.setfilter(c)
return c:IsCode(list[1]) and c:IsSSetable()
end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSet(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,e)
end
\ No newline at end of file
local m=120253019
local list={120253018,120253062}
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_TOHAND+CATEGORY_GRAVE_ACTION)
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
--Discard Deck
function cm.thfilter(c)
return c:IsCode(list[1],list[2]) and c:IsAbleToHand()
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.IsPlayerCanDiscardDeck(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SendDeckTopToGraveAndExists(tp,2) then
local og=Duel.GetOperatedGroup():Filter(aux.NecroValleyFilter(cm.thfilter),nil)
if og:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=og:Select(tp,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
RD.SendToHandAndExists(g,1-tp)
end
end
end
end
\ No newline at end of file
local m=120253020
local cm=_G["c"..m]
cm.name="电子鱼"
function cm.initial_effect(c)
--Draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Draw
function cm.costfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_FISH) and c:IsAbleToGraveAsCost()
end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
RD.TargetDraw(tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.Draw()
end
\ No newline at end of file
local m=120253021
local cm=_G["c"..m]
cm.name="电子鲨"
function cm.initial_effect(c)
--Summon Procedure
RD.AddSummonProcedure(c,aux.Stringid(m,0),cm.sumcon)
end
--Summon Procedure
function cm.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.sumcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return minc==0 and c:IsLevelAbove(5)
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
\ No newline at end of file
local m=120253022
local cm=_G["c"..m]
cm.name="波导刀鬼丸国纲"
function cm.initial_effect(c)
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetValue(cm.indval)
c:RegisterEffect(e1)
--Continuous Effect
RushDuel.AddContinuousEffect(c,e1)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
function cm.target(e,c)
return c:IsFaceup() and c:IsRace(RACE_FISH)
end
\ No newline at end of file
...@@ -12,8 +12,13 @@ function cm.initial_effect(c) ...@@ -12,8 +12,13 @@ function cm.initial_effect(c)
e1:SetCode(EFFECT_ADD_FUSION_CODE) e1:SetCode(EFFECT_ADD_FUSION_CODE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetValue(list[1]) e1:SetValue(list[1])
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Continuous Effect --Continuous Effect
RushDuel.AddContinuousEffect(c,e1) RushDuel.AddContinuousEffect(c,e1)
end
--Fusion Code
function cm.condition(e)
return e:GetHandler():IsFaceup()
end end
\ No newline at end of file
local m=120253044
local list={120130032,120253016}
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])
--Direct Attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetCondition(cm.dircon)
c:RegisterEffect(e1)
--Activate Limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetCondition(cm.actcon)
e2:SetValue(cm.actlimit)
c:RegisterEffect(e2)
--Continuous Effect
RushDuel.AddContinuousEffect(c,e1,e2)
end
--Direct Attack
function cm.dirfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_FUSION)
end
function cm.dircon(e)
local tp=e:GetHandlerPlayer()
return not Duel.IsExistingMatchingCard(cm.dirfilter,tp,LOCATION_MZONE,0,1,nil)
end
--Activate Limit
function cm.actfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MAXIMUM)
end
function cm.actcon(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(cm.actfilter,tp,0,LOCATION_MZONE,1,nil)
end
function cm.actlimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
end
\ No newline at end of file
local m=120253045
local list={120253022,120253017}
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])
--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,LOCATION_MZONE)
e2:SetTarget(cm.target)
e2:SetValue(cm.indval)
c:RegisterEffect(e2)
--Continuous Effect
RushDuel.AddContinuousEffect(c,e1,e2)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
function cm.target(e,c)
return c:IsFaceup() and c:IsRace(RACE_FISH)
end
\ No newline at end of file
local m=120253054
local cm=_G["c"..m]
cm.name="波涛融合"
function cm.initial_effect(c)
--Activate
local e1=RD.CreateFusionEffect(c,cm.matfilter,cm.spfilter,cm.exfilter,LOCATION_GRAVE,0,nil,RD.FusionToDeck)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_FISH)
end
function cm.matfilter(c)
return c:IsFusionAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_FISH)
and c:IsOnField() and c:IsAbleToDeck()
end
function cm.spfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_FISH)
end
function cm.exfilter(c)
return c:IsFusionAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_FISH)
and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function cm.matcheck(tp,sg,fc)
return sg:FilterCount(Card.IsOnField,nil)==1
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_GRAVE,0,5,nil)
end
\ No newline at end of file
local m=120253056
local cm=_G["c"..m]
cm.name="海上打捞"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.filter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAttackBelow(1500) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,2,2,nil,function(g)
RD.SendToHandAndExists(g,1-tp)
end)
end
\ No newline at end of file
local m=120253062
local cm=_G["c"..m]
cm.name="鱼弹突击"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.condition1)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(cm.condition2)
e3:SetCost(cm.cost)
e3:SetTarget(cm.target)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
end
--Activate
function cm.confilter(c,tp)
return c:GetSummonPlayer()==tp
end
function cm.costfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FISH) and c:IsAbleToGraveAsCost()
end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter,1,nil,1-tp)
end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_SPELL)
end
cm.cost=RD.CostSendMZoneToGrave(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,nil,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
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