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

2026/1/5 卡名变更条件修改

parent 0f635230
Pipeline #42397 passed with stages
in 8 minutes and 50 seconds
...@@ -97,7 +97,11 @@ function RushDuel.IsCanChangePosition(card, effect, player, reason) ...@@ -97,7 +97,11 @@ function RushDuel.IsCanChangePosition(card, effect, player, reason)
end end
return true return true
end end
-- 条件:可以作为Cost回到手卡或者额外卡组 -- 条件: 可以改变卡名
function RushDuel.IsCanChangeCode(card, code)
return not card:IsCode(code)
end
-- 条件: 可以作为Cost回到手卡或者额外卡组
function RushDuel.IsAbleToHandOrExtraAsCost(card) function RushDuel.IsAbleToHandOrExtraAsCost(card)
return card:IsAbleToHandAsCost() or card:IsAbleToExtraAsCost() return card:IsAbleToHandAsCost() or card:IsAbleToExtraAsCost()
end end
......
...@@ -423,6 +423,12 @@ function RushDuel.CostSendHandToDeckBottom(filter, min, max, confirm, set_label_ ...@@ -423,6 +423,12 @@ function RushDuel.CostSendHandToDeckBottom(filter, min, max, confirm, set_label_
return RushDuel.CostSendMatchToDeckSort(filter, LOCATION_HAND, min, max, true, SEQ_DECKBOTTOM, false, confirm, return RushDuel.CostSendMatchToDeckSort(filter, LOCATION_HAND, min, max, true, SEQ_DECKBOTTOM, false, confirm,
set_label_before, set_object_before, set_label_after, set_object_after) set_label_before, set_object_before, set_label_after, set_object_after)
end end
-- 代价: 把手卡返回卡组上面或下面
function RushDuel.CostSendHandToDeckTopOrBottom(filter, min, max, top_desc, bottom_desc, confirm, set_label_before, set_object_before,
set_label_after, set_object_after)
return RushDuel.CostSendMatchToDeckTopOrBottom(filter, LOCATION_HAND, min, max, true, top_desc, bottom_desc,
false, confirm, set_label_before, set_object_before, set_label_after, set_object_after)
end
-- 代价: 让墓地的卡返回卡组 -- 代价: 让墓地的卡返回卡组
function RushDuel.CostSendGraveToDeck(filter, min, max, set_label_before, set_object_before, set_label_after, function RushDuel.CostSendGraveToDeck(filter, min, max, set_label_before, set_object_before, set_label_after,
set_object_after) set_object_after)
...@@ -522,22 +528,23 @@ function RushDuel.CostMerge(cost1, cost2) ...@@ -522,22 +528,23 @@ function RushDuel.CostMerge(cost1, cost2)
end end
end end
-- 代价: 从2个代价中选择1个(分开选) -- 代价: 从2个代价中选择1个(分开选)
function RushDuel.CostChoose(hit1, cost1, hit2, cost2) function RushDuel.CostChoose(hit1, cost1, hit2, cost2, set_label)
return function(e, tp, eg, ep, ev, re, r, rp, chk) return function(e, tp, eg, ep, ev, re, r, rp, chk)
local s1 = cost1(e, tp, eg, ep, ev, re, r, rp, 0) local s1 = cost1(e, tp, eg, ep, ev, re, r, rp, 0)
local s2 = cost2(e, tp, eg, ep, ev, re, r, rp, 0) local s2 = cost2(e, tp, eg, ep, ev, re, r, rp, 0)
if chk == 0 then if chk == 0 then
return s1 or s2 return s1 or s2
end end
local res = 0
if s1 and s2 then if s1 and s2 then
RushDuel.CostCancelable = true RushDuel.CostCancelable = true
::cancel:: ::cancel::
local op = aux.SelectFromOptions(tp, {s1, hit1}, {s2, hit2}) res = RushDuel.SelectOption(tp, {s1, hit1}, {s2, hit2})
if op == 1 then if res == 1 then
if not cost1(e, tp, eg, ep, ev, re, r, rp, 1) then if not cost1(e, tp, eg, ep, ev, re, r, rp, 1) then
goto cancel goto cancel
end end
elseif op == 2 then elseif res == 2 then
if not cost2(e, tp, eg, ep, ev, re, r, rp, 1) then if not cost2(e, tp, eg, ep, ev, re, r, rp, 1) then
goto cancel goto cancel
end end
...@@ -545,8 +552,13 @@ function RushDuel.CostChoose(hit1, cost1, hit2, cost2) ...@@ -545,8 +552,13 @@ function RushDuel.CostChoose(hit1, cost1, hit2, cost2)
RushDuel.CostCancelable = false RushDuel.CostCancelable = false
elseif s1 then elseif s1 then
cost1(e, tp, eg, ep, ev, re, r, rp, 1) cost1(e, tp, eg, ep, ev, re, r, rp, 1)
res = 1
elseif s2 then elseif s2 then
cost2(e, tp, eg, ep, ev, re, r, rp, 1) cost2(e, tp, eg, ep, ev, re, r, rp, 1)
res = 2
end
if res ~= 0 and set_label then
e:SetLabel(res)
end end
end end
end end
...@@ -55,6 +55,25 @@ function RushDuel.CanSelect(desc, hint, player, group, check, min, max, ...) ...@@ -55,6 +55,25 @@ function RushDuel.CanSelect(desc, hint, player, group, check, min, max, ...)
return nil return nil
end end
end end
-- 选择选项 (自动选择)
function RushDuel.SelectOption(player, ...)
local options = {...}
local ops = {}
local opvals = {}
for i = 1, #options do
if options[i][1] then
table.insert(ops, options[i][2])
table.insert(opvals, options[i][3] or i)
end
end
if #ops == 0 then return nil end
if #ops == 1 then
Duel.Hint(HINT_OPSELECTED, 1 - player, ops[1])
return opvals[1]
end
local select = Duel.SelectOption(player, table.unpack(ops))
return opvals[select + 1]
end
-- 对卡片组里的全部卡片作位或运算 -- 对卡片组里的全部卡片作位或运算
function RushDuel.GroupBor(g, func, ...) function RushDuel.GroupBor(g, func, ...)
......
...@@ -420,7 +420,7 @@ function RushDuel.ExecuteFusionSummon(e, tp, pos, list, chkf, gc, mat_move, canc ...@@ -420,7 +420,7 @@ function RushDuel.ExecuteFusionSummon(e, tp, pos, list, chkf, gc, mat_move, canc
end end
local data = options[1][3] local data = options[1][3]
if #options > 1 then if #options > 1 then
data = Auxiliary.SelectFromOptions(tp, table.unpack(options)) data = RushDuel.SelectOption(tp, table.unpack(options))
end end
local ce, mg = data[1], data[2] local ce, mg = data[1], data[2]
RushDuel.SetFusionEffectParameter(e) RushDuel.SetFusionEffectParameter(e)
......
...@@ -266,7 +266,7 @@ function RushDuel.ExecuteRitualSummon(e, tp, type, list, chkf, gc, mat_move, can ...@@ -266,7 +266,7 @@ function RushDuel.ExecuteRitualSummon(e, tp, type, list, chkf, gc, mat_move, can
end end
local data = options[1][3] local data = options[1][3]
if #options > 1 then if #options > 1 then
data = Auxiliary.SelectFromOptions(tp, table.unpack(options)) data = RushDuel.SelectOption(tp, table.unpack(options))
end end
local ce, mg = data[1], data[2] local ce, mg = data[1], data[2]
RushDuel.CurrentRitualEffect = e RushDuel.CurrentRitualEffect = e
......
...@@ -23,7 +23,7 @@ function cm.thfilter(c) ...@@ -23,7 +23,7 @@ function cm.thfilter(c)
return c:IsCode(list[2]) and c:IsAbleToHand() return c:IsCode(list[2]) and c:IsAbleToHand()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostShowHand(cm.costfilter,1,1) cm.cost=RD.CostShowHand(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -23,7 +23,7 @@ function cm.thfilter(c) ...@@ -23,7 +23,7 @@ function cm.thfilter(c)
return c:IsCode(list[2]) and c:IsLocation(LOCATION_GRAVE) and c:IsAbleToHand() return c:IsCode(list[2]) and c:IsLocation(LOCATION_GRAVE) and c:IsAbleToHand()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostShowHand(cm.costfilter,1,1) cm.cost=RD.CostShowHand(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -31,7 +31,7 @@ function cm.spfilter(c,e,tp) ...@@ -31,7 +31,7 @@ function cm.spfilter(c,e,tp)
return c:IsCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsCode(list[1]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendOnFieldToGrave(Card.IsAbleToGraveAsCost,1,1,true) cm.cost=RD.CostSendOnFieldToGrave(Card.IsAbleToGraveAsCost,1,1,true)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -16,7 +16,7 @@ function cm.initial_effect(c) ...@@ -16,7 +16,7 @@ function cm.initial_effect(c)
end end
--Change Code --Change Code
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,7 +19,7 @@ function cm.filter(c) ...@@ -19,7 +19,7 @@ function cm.filter(c)
return c:IsFaceup() and c:IsLevelBelow(8) and c:GetFlagEffect(FLAG_CANNOT_ATTACK_UNTIL_NEXT_TURN)==0 return c:IsFaceup() and c:IsLevelBelow(8) and c:GetFlagEffect(FLAG_CANNOT_ATTACK_UNTIL_NEXT_TURN)==0
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -30,7 +30,7 @@ function cm.exfilter(c) ...@@ -30,7 +30,7 @@ function cm.exfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,7 +28,7 @@ function cm.exfilter(c) ...@@ -28,7 +28,7 @@ function cm.exfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -24,7 +24,7 @@ function cm.desfilter(c) ...@@ -24,7 +24,7 @@ function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelBelow(8) return c:IsFaceup() and c:IsLevelBelow(8)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,7 +28,7 @@ function cm.spcon(e,c) ...@@ -28,7 +28,7 @@ function cm.spcon(e,c)
end end
--Change Code --Change Code
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -21,7 +21,7 @@ function cm.exfilter(c) ...@@ -21,7 +21,7 @@ function cm.exfilter(c)
return c:IsFaceup() and c:IsCode(list[1],list[2]) return c:IsFaceup() and c:IsCode(list[1],list[2])
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -21,7 +21,7 @@ function cm.spfilter(c,e,tp) ...@@ -21,7 +21,7 @@ function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(7) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(7) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1) cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -22,7 +22,7 @@ function cm.desfilter(c) ...@@ -22,7 +22,7 @@ function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelBelow(8) return c:IsFaceup() and c:IsLevelBelow(8)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,7 +19,7 @@ function cm.filter(c) ...@@ -19,7 +19,7 @@ function cm.filter(c)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -18,7 +18,7 @@ function cm.thfilter(c) ...@@ -18,7 +18,7 @@ function cm.thfilter(c)
return not c:IsLevel(8) and c:IsRace(RACE_CYBERSE) and RD.IsDefense(c,0) and c:IsAbleToHand() return not c:IsLevel(8) and c:IsRace(RACE_CYBERSE) and RD.IsDefense(c,0) and c:IsAbleToHand()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,7 +19,7 @@ function cm.matfilter(c) ...@@ -19,7 +19,7 @@ function cm.matfilter(c)
return c:IsRace(RACE_ROCK) return c:IsRace(RACE_ROCK)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,7 +19,7 @@ function cm.matfilter(c) ...@@ -19,7 +19,7 @@ function cm.matfilter(c)
return c:IsRace(RACE_ROCK) return c:IsRace(RACE_ROCK)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,7 +19,7 @@ function cm.matfilter(c) ...@@ -19,7 +19,7 @@ function cm.matfilter(c)
return c:IsRace(RACE_ROCK) return c:IsRace(RACE_ROCK)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,7 +19,7 @@ function cm.costfilter(c) ...@@ -19,7 +19,7 @@ function cm.costfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY) and RD.IsDefense(c,1300) and c:IsAbleToGraveAsCost() return c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY) and RD.IsDefense(c,1300) and c:IsAbleToGraveAsCost()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1) cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,7 +19,7 @@ function cm.thfilter(c) ...@@ -19,7 +19,7 @@ function cm.thfilter(c)
return c:IsCode(list[2]) and c:IsAbleToHand() return c:IsCode(list[2]) and c:IsAbleToHand()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostPayLP(500) cm.cost=RD.CostPayLP(500)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -27,7 +27,7 @@ function cm.spcon(e,c) ...@@ -27,7 +27,7 @@ function cm.spcon(e,c)
end end
--Change Code --Change Code
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY) and not c:IsCode(list[2]) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY) and RD.IsCanChangeCode(c,list[2])
end end
cm.cost=RD.CostPayLP(500) cm.cost=RD.CostPayLP(500)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -15,7 +15,7 @@ function cm.initial_effect(c) ...@@ -15,7 +15,7 @@ function cm.initial_effect(c)
end end
--Change Code --Change Code
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(2) cm.cost=RD.CostSendDeckTopToGrave(2)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -18,7 +18,7 @@ end ...@@ -18,7 +18,7 @@ end
--Change Code --Change Code
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 c:IsAttackPos() and not c:IsCode(list[3]) return c:IsAttackPos() and RD.IsCanChangeCode(c,list[3])
end end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1) cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,7 +19,7 @@ function cm.tdfilter(c) ...@@ -19,7 +19,7 @@ function cm.tdfilter(c)
return RD.IsLegendCode(c,list[2]) and c:IsAbleToDeck() return RD.IsLegendCode(c,list[2]) and c:IsAbleToDeck()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9 and not e:GetHandler():IsCode(list[1]) return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9 and RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(2) cm.cost=RD.CostSendDeckTopToGrave(2)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,7 +28,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +28,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst() local tc=g:GetFirst()
local b1=RD.IsCanChangeRace(tc,RACE_FIEND) local b1=RD.IsCanChangeRace(tc,RACE_FIEND)
local b2=RD.IsCanChangeRace(tc,race) local b2=RD.IsCanChangeRace(tc,race)
local op=aux.SelectFromOptions(tp,{b1,aux.Stringid(m,1)},{b2,aux.Stringid(m,2)}) local op=RD.SelectOption(tp,{b1,aux.Stringid(m,1)},{b2,aux.Stringid(m,2)})
if op==1 then if op==1 then
RD.ChangeRace(e,tc,RACE_FIEND,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.ChangeRace(e,tc,RACE_FIEND,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end end
......
...@@ -27,7 +27,7 @@ function cm.check(g) ...@@ -27,7 +27,7 @@ function cm.check(g)
or (tc2:IsType(TYPE_NORMAL) and tc1:IsCode(list[2])) or (tc2:IsType(TYPE_NORMAL) and tc1:IsCode(list[2]))
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(3) cm.cost=RD.CostSendDeckTopToGrave(3)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -18,7 +18,7 @@ function cm.spfilter(c,e,tp) ...@@ -18,7 +18,7 @@ function cm.spfilter(c,e,tp)
return c:IsCode(list[2]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_DEFENSE) return c:IsCode(list[2]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_DEFENSE)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -17,7 +17,7 @@ function cm.exfilter(c) ...@@ -17,7 +17,7 @@ function cm.exfilter(c)
return c:IsCode(list[1]) return c:IsCode(list[1])
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -25,7 +25,7 @@ function cm.filter(c) ...@@ -25,7 +25,7 @@ function cm.filter(c)
and c:IsControlerCanBeChanged() and c:IsControlerCanBeChanged()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1) cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -25,7 +25,7 @@ function cm.desfilter(c) ...@@ -25,7 +25,7 @@ function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -21,7 +21,7 @@ function cm.costfilter(c) ...@@ -21,7 +21,7 @@ function cm.costfilter(c)
return c:IsType(TYPE_SPELL) and not c:IsPublic() return c:IsType(TYPE_SPELL) and not c:IsPublic()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostShowHand(cm.costfilter,1,1) cm.cost=RD.CostShowHand(cm.costfilter,1,1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -24,7 +24,7 @@ function cm.spfilter(c,e,tp) ...@@ -24,7 +24,7 @@ function cm.spfilter(c,e,tp)
end end
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.ConditionSummonOrSpecialSummonMainPhase(e) and not c:IsCode(list[1]) return RD.ConditionSummonOrSpecialSummonMainPhase(e) and RD.IsCanChangeCode(c,list[1])
end end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1) cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -33,7 +33,7 @@ function cm.desfilter(c) ...@@ -33,7 +33,7 @@ function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -22,7 +22,7 @@ function cm.posfilter(c,e,tp) ...@@ -22,7 +22,7 @@ function cm.posfilter(c,e,tp)
return RD.IsCanChangePosition(c,e,tp,REASON_EFFECT) return RD.IsCanChangePosition(c,e,tp,REASON_EFFECT)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -20,7 +20,7 @@ function cm.thfilter(c) ...@@ -20,7 +20,7 @@ function cm.thfilter(c)
end end
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 not c:IsCode(list[1]) return RD.IsSummonTurn(c) and RD.IsCanChangeCode(c,list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,7 +19,7 @@ function cm.thfilter(c) ...@@ -19,7 +19,7 @@ function cm.thfilter(c)
return c:IsCode(list[1]) and c:IsAbleToHand() return c:IsCode(list[1]) and c:IsAbleToHand()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1) cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -22,7 +22,7 @@ function cm.thfilter(c) ...@@ -22,7 +22,7 @@ function cm.thfilter(c)
and c:IsAbleToHand() and c:IsAbleToHand()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(3) cm.cost=RD.CostSendDeckTopToGrave(3)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -24,7 +24,7 @@ function cm.matfilter(c) ...@@ -24,7 +24,7 @@ function cm.matfilter(c)
end end
--Change Code --Change Code
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[2]) return RD.IsCanChangeCode(e:GetHandler(),list[2])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -44,7 +44,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local mat1=mat:Filter(RD.IsLegendCode,nil,list[2]) local mat1=mat:Filter(RD.IsLegendCode,nil,list[2])
local mat2=mat:Filter(Card.IsCode,nil,list[3]) local mat2=mat:Filter(Card.IsCode,nil,list[3])
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local code=aux.SelectFromOptions(tp, local code=RD.SelectOption(tp,
{mat1:GetCount()>0,aux.Stringid(m,1),list[2]}, {mat1:GetCount()>0,aux.Stringid(m,1),list[2]},
{mat2:GetCount()>0,aux.Stringid(m,2),list[3]} {mat2:GetCount()>0,aux.Stringid(m,2),list[3]}
) )
......
...@@ -21,7 +21,7 @@ function cm.thfilter(c) ...@@ -21,7 +21,7 @@ function cm.thfilter(c)
return c:IsCode(list[2]) and c:IsAbleToHand() return c:IsCode(list[2]) and c:IsAbleToHand()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1) cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -21,7 +21,7 @@ function cm.thfilter(c) ...@@ -21,7 +21,7 @@ function cm.thfilter(c)
return (RD.IsLegendCode(c,list[2]) or c:IsCode(list[3])) and c:IsAbleToHand() return (RD.IsLegendCode(c,list[2]) or c:IsCode(list[3])) and c:IsAbleToHand()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1) cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -29,7 +29,7 @@ function cm.spfilter(c) ...@@ -29,7 +29,7 @@ function cm.spfilter(c)
end end
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 not c:IsCode(list[1]) return RD.IsSummonTurn(c) and RD.IsCanChangeCode(c,list[1])
end end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1) cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -24,7 +24,7 @@ function cm.posfilter(c,e,tp) ...@@ -24,7 +24,7 @@ function cm.posfilter(c,e,tp)
return RD.IsCanChangePosition(c,e,tp,REASON_EFFECT) return RD.IsCanChangePosition(c,e,tp,REASON_EFFECT)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -22,7 +22,7 @@ function cm.desfilter(c) ...@@ -22,7 +22,7 @@ function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendHandOrFieldToGrave(cm.costfilter,1,1,true) cm.cost=RD.CostSendHandOrFieldToGrave(cm.costfilter,1,1,true)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -22,7 +22,7 @@ function cm.spfilter(c,e,tp) ...@@ -22,7 +22,7 @@ function cm.spfilter(c,e,tp)
return c:IsCode(list[2]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_DEFENSE) return c:IsCode(list[2]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_DEFENSE)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostPayLP(100) cm.cost=RD.CostPayLP(100)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,7 +19,7 @@ function cm.spfilter(c,e,tp) ...@@ -19,7 +19,7 @@ function cm.spfilter(c,e,tp)
return c:IsCode(list[2]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsCode(list[2]) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,7 +28,7 @@ function cm.spfilter(c) ...@@ -28,7 +28,7 @@ function cm.spfilter(c)
return c:IsLevelBelow(8) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_INSECT) return c:IsLevelBelow(8) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_INSECT)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[2]) return RD.IsCanChangeCode(e:GetHandler(),list[2])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -24,7 +24,7 @@ function cm.exfilter(c) ...@@ -24,7 +24,7 @@ function cm.exfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,7 +19,7 @@ function cm.thfilter(c) ...@@ -19,7 +19,7 @@ function cm.thfilter(c)
return c:IsCode(list[1]) and c:IsAbleToHand() return c:IsCode(list[1]) and c:IsAbleToHand()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1]) return RD.IsCanChangeCode(e:GetHandler(),list[1])
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
......
local cm,m=GetID()
local list={120264001,120222025}
cm.name="虚空噬骸兵·家畜兵"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Change Code
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Change Code
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsCanChangeCode(e:GetHandler(),list[1])
end
cm.cost1=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
cm.cost2=RD.CostSendDeckTopToGrave(2)
cm.cost=RD.CostChoose(aux.Stringid(m,1),cm.cost1,aux.Stringid(m,2),cm.cost2,true)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local code=list[1]
if e:GetLabel()==1 and RD.IsCanChangeCode(c,list[2]) then
code=RD.SelectOption(tp,
{true,aux.Stringid(m,3),list[1]},
{true,aux.Stringid(m,4),list[2]})
end
RD.ChangeCode(e,c,code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
local cm,m=GetID()
local list={120264001}
cm.name="虚空噬骸兵·异域探测器"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],cm.matfilter)
--Contact Fusion
RD.EnableContactFusion(c,aux.Stringid(m,0))
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
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)
end
--Fusion Material
cm.unspecified_funsion=true
function cm.matfilter(c,fc,sub)
return c:IsLevelBelow(4) and c:IsFusionAttribute(ATTRIBUTE_DARK)
end
--Destroy
function cm.desfilter(c)
return c:IsFacedown() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:GetSequence()<5
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonMainPhase(e:GetHandler(),SUMMON_TYPE_FUSION)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_SZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_SZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_SZONE,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateAttackLimitEffect(e,cm.atktg,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END)
RD.CreateRaceCannotAttackEffect(e,aux.Stringid(m,2),RACE_ALL-RACE_GALAXY,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.atktg(e,c)
return not (c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY))
end
\ No newline at end of file
local cm,m=GetID()
local list={120222025}
cm.name="永恒虚空噬骸兵·镇魂鹰巨人"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedureRep(c,true,true,cm.matfilter,1,63,list[1])
--Cannot To Hand & Deck & Extra
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TO_HAND_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_TO_DECK_EFFECT)
c:RegisterEffect(e2)
--Indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.condition)
e3:SetValue(cm.indval)
c:RegisterEffect(e3)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2,e3)
end
--Fusion Material
cm.unspecified_funsion=true
function cm.matfilter(c,fc,sub)
return c:IsFusionAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY)
end
--Cannot To Hand & Deck & Extra
function cm.efilter(e,re,r,rp)
return re:IsActiveType(TYPE_MONSTER)
end
--Indes
function cm.condition(e)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and c:GetMaterialCount()>=3
end
cm.indval=RD.ValueEffectIndesType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,true)
\ No newline at end of file
local cm,m=GetID()
local list={120300042}
cm.name="暗影之力爆发"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.filter(c)
return c:IsLevelBelow(8) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_GALAXY) and c:IsAbleToHand()
end
function cm.check(g)
return g:GetClassCount(Card.GetCode)==g:GetCount()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsPlayerNoActivateInThisTurn(tp,list[1])
end
cm.cost=RD.CostSendHandToDeckTopOrBottom(Card.IsAbleToDeckAsCost,1,1,aux.Stringid(m,1),aux.Stringid(m,2),false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return g:CheckSubGroup(cm.check,2,2) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectGroupAndDoAction(HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.filter),cm.check,tp,LOCATION_GRAVE,0,2,2,nil,function(g)
RD.SendToHandAndExists(g,e,tp,REASON_EFFECT)
end)
end
\ No newline at end of file
local cm,m=GetID()
local list={120264001,120222025}
cm.name="蠕虫虚空洞"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=RD.CreateFusionEffect(c,nil,cm.spfilter)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
end
--Activate
function cm.spfilter(c)
return (aux.IsMaterialListCode(c,list[1]) or aux.IsMaterialListCode(c,list[2]))
and c:IsLevelBelow(9) and c:IsRace(RACE_GALAXY)
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