Commit 6fc57f9b authored by 未闻皂名's avatar 未闻皂名

2022/4/23 根据Buff类效果叠加的调整,增加了新的检测机制

parent 2b2f2476
...@@ -9,6 +9,8 @@ RACE_OMEGAPSYCHO = 0x10000000 -- 欧米茄念动力 ...@@ -9,6 +9,8 @@ RACE_OMEGAPSYCHO = 0x10000000 -- 欧米茄念动力
RACE_CELESTIALKNIGHT = 0x20000000 -- 天界骑士 RACE_CELESTIALKNIGHT = 0x20000000 -- 天界骑士
RACE_GALAXY = 0x40000000 -- 银河 RACE_GALAXY = 0x40000000 -- 银河
RACE_ALL = 0x7fffffff
-- 创建效果: 玩家对象的全局效果 -- 创建效果: 玩家对象的全局效果
function RushDuel.CreatePlayerTargetGlobalEffect(code, value) function RushDuel.CreatePlayerTargetGlobalEffect(code, value)
local e1 = Effect.GlobalEffect() local e1 = Effect.GlobalEffect()
...@@ -165,8 +167,7 @@ end ...@@ -165,8 +167,7 @@ end
function RushDuel.MultiChooseTarget(condition1, condition2, target) function RushDuel.MultiChooseTarget(condition1, condition2, target)
return function(e, tp, eg, ep, ev, re, r, rp, chk) return function(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then if chk == 0 then
return (condition1 == nil or condition1(e, tp, eg, ep, ev, re, r, rp, false)) return (condition1 == nil or condition1(e, tp, eg, ep, ev, re, r, rp, false)) or (condition2 == nil or condition2(e, tp, eg, ep, ev, re, r, rp, false))
or (condition2 == nil or condition2(e, tp, eg, ep, ev, re, r, rp, false))
end end
if target ~= nil then if target ~= nil then
target(e, tp, eg, ep, ev, re, r, rp) target(e, tp, eg, ep, ev, re, r, rp)
...@@ -227,3 +228,13 @@ function RushDuel.AdvanceCheckOperation(e, tp, eg, ep, ev, re, r, rp) ...@@ -227,3 +228,13 @@ function RushDuel.AdvanceCheckOperation(e, tp, eg, ep, ev, re, r, rp)
e:GetHandler():RegisterFlagEffect(label, RESET_EVENT + RESETS_STANDARD, 0, 1) e:GetHandler():RegisterFlagEffect(label, RESET_EVENT + RESETS_STANDARD, 0, 1)
end end
end end
-- 获取效果值列表
function RushDuel.GetEffectValues(card, code)
local effects = {card:IsHasEffect(code)}
local values = {}
for i, effect in ipairs(effects) do
values[i] = effect:GetValue()
end
return values
end
-- Rush Duel 条件 -- Rush Duel 条件
RushDuel = RushDuel or {} RushDuel = RushDuel or {}
-- 内部方法: 检测效果范围是否覆盖
function RushDuel._private_check_effect_values(value, values, decode)
local attach, attachs = {decode(value)}, {}
local count = #attach
for i = 1, count do
attach[i] = attach[i] or 0
attachs[i] = 0
end
for _, val in ipairs(values) do
local _attach = {decode(val)}
for i = 1, count do
attachs[i] = attachs[i] | (_attach[i] or 0)
end
end
for i = 1, count do
if (attachs[i] | attach[i]) ~= attachs[i] then
return true
end
end
return false
end
-- 条件: 是否为传说卡 -- 条件: 是否为传说卡
function RushDuel.IsLegendCode(card, ...) function RushDuel.IsLegendCode(card, ...)
for _, code in ipairs {...} do for _, code in ipairs {...} do
...@@ -62,6 +84,7 @@ end ...@@ -62,6 +84,7 @@ 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.IsPreviousControler(card, player) function RushDuel.IsPreviousControler(card, player)
return card:GetPreviousControler() == player return card:GetPreviousControler() == player
...@@ -78,17 +101,55 @@ end ...@@ -78,17 +101,55 @@ end
function RushDuel.IsPreviousRace(card, race) function RushDuel.IsPreviousRace(card, race)
return (card:GetPreviousRaceOnField() & race) ~= 0 return (card:GetPreviousRaceOnField() & race) ~= 0
end end
-- 条件: 可否赋予效果 - 直接攻击 -- 条件: 可否赋予效果 - 直接攻击
function RushDuel.IsCanAttachDirectAttack(card) function RushDuel.IsCanAttachDirectAttack(card)
return not card:IsHasEffect(EFFECT_DIRECT_ATTACK) and not card:IsHasEffect(EFFECT_CANNOT_ATTACK) and not card:IsHasEffect(EFFECT_CANNOT_DIRECT_ATTACK) return not card:IsHasEffect(EFFECT_DIRECT_ATTACK) and not card:IsHasEffect(EFFECT_CANNOT_ATTACK) and not card:IsHasEffect(EFFECT_CANNOT_DIRECT_ATTACK)
end end
-- 条件: 可否赋予效果 - 贯通 -- 条件: 可否赋予效果 - 贯通
function RushDuel.IsCanAttachPierce(card) function RushDuel.IsCanAttachPierce(card)
return not card:IsHasEffect(EFFECT_CANNOT_ATTACK) return not card:IsHasEffect(EFFECT_PIERCE) and not card:IsHasEffect(EFFECT_CANNOT_ATTACK)
end
-- 条件: 可否赋予效果 - 多次攻击
function RushDuel.IsCanAttachExtraAttack(card, value)
return true
end
-- 条件: 可否赋予效果 - 多次攻击 (怪兽限定)
function RushDuel.IsCanAttachExtraAttackMonster(card, value)
return true
end
-- 条件: 可否赋予效果 - 全体攻击
function RushDuel.IsCanAttachAttackAll(card, value)
return true
end end
-- 条件: 可否赋予效果 - 双重解放 -- 条件: 可否赋予效果 - 双重解放
function RushDuel.IsCanAttachDoubleTribute(card) function RushDuel.IsCanAttachDoubleTribute(card, value)
return not card:IsHasEffect(EFFECT_UNRELEASABLE_SUM) if card:IsHasEffect(EFFECT_UNRELEASABLE_SUM) then
return false
end
local values = RushDuel.GetEffectValues(card, EFFECT_DOUBLE_TRIBUTE)
return RushDuel._private_check_effect_values(value, values, function(val)
if val == 1 then
return {RACE_ALL, ATTRIBUTE_ALL}
else
return val(nil)
end
end)
end
-- 条件: 可否赋予效果 - 战斗破坏抗性
function RushDuel.IsCanAttachBattleIndes(card, value)
return true
end
-- 条件: 可否赋予效果 - 效果破坏抗性
function RushDuel.IsCanAttachEffectIndes(card, value)
local values = RushDuel.GetEffectValues(card, EFFECT_INDESTRUCTABLE_EFFECT)
return RushDuel._private_check_effect_values(value, values, function(val)
if val == 1 then
return {TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP, TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP}
else
return val(nil)
end
end)
end end
-- 额外条件: 最后的操作是否包含某种卡 -- 额外条件: 最后的操作是否包含某种卡
......
-- Rush Duel 效果值
RushDuel = RushDuel or {}
-- 效果值: 双重解放 属性/种族
function RushDuel.ValueDoubleTribute(attribute, race)
return function(e, c)
if e == nil then
return attribute, race
end
return (attribute == nil or c:IsAttribute(attribute)) and (race == nil or c:IsRace(race))
end
end
-- 效果值: 效果破坏抗性 抵抗类型
function RushDuel.ValueEffectIndesType(self_type, opponent_type)
local s_type = self_type or 0
local o_type = opponent_type or 0
return function(e, re, rp)
if e == nil then
return s_type, o_type
end
local tp = e:GetHandlerPlayer()
if rp == tp then
return s_type ~= 0 and re:IsActiveType(s_type)
else
return o_type ~= 0 and re:IsActiveType(o_type)
end
end
end
...@@ -14,7 +14,7 @@ function cm.initial_effect(c) ...@@ -14,7 +14,7 @@ function cm.initial_effect(c)
end end
--Atk Twice --Atk Twice
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),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)
......
...@@ -14,7 +14,7 @@ function cm.initial_effect(c) ...@@ -14,7 +14,7 @@ function cm.initial_effect(c)
end end
--Attack Twice --Attack Twice
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),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)
......
...@@ -13,15 +13,19 @@ function cm.initial_effect(c) ...@@ -13,15 +13,19 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Indes Effect --Indes Effect
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
function cm.filter(c)
return RD.IsCanAttachEffectIndes(c,cm.indval)
end
function cm.costfilter(c) function cm.costfilter(c)
return c:IsRace(RACE_SPELLCASTER+RACE_DRAGON) and c:IsAbleToGraveAsCost() return c:IsRace(RACE_SPELLCASTER+RACE_DRAGON) and c:IsAbleToGraveAsCost()
end end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1) cm.cost=RD.CostSendHandToGrave(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)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),nil,tp,LOCATION_MZONE,0,1,1,nil,function(g) RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
RD.AttachEffectIndes(e,g:GetFirst(),aux.indoval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachEffectIndes(e,g:GetFirst(),cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end) end)
end end
\ No newline at end of file
...@@ -14,7 +14,7 @@ function cm.initial_effect(c) ...@@ -14,7 +14,7 @@ function cm.initial_effect(c)
end end
--Atk Twice --Atk Twice
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),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)
......
...@@ -13,11 +13,12 @@ function cm.initial_effect(c) ...@@ -13,11 +13,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Extra Tribute --Extra Tribute
cm.trival=RD.ValueDoubleTribute(nil,RACE_DRAGON)
function cm.costfilter(c) function cm.costfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAbleToDeckOrExtraAsCost() return c:IsRace(RACE_DRAGON) and c:IsAbleToDeckOrExtraAsCost()
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 RD.IsCanAttachDoubleTribute(e:GetHandler()) return RD.IsCanAttachDoubleTribute(e:GetHandler(),cm.trival)
end end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2) cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
...@@ -25,7 +26,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +26,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachDoubleTribute(e,c,cm.trival,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) RD.AttachDoubleTribute(e,c,cm.trival,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
end end
end
function cm.trival(e,c)
return c:IsRace(RACE_DRAGON)
end end
\ No newline at end of file
...@@ -14,6 +14,7 @@ function cm.initial_effect(c) ...@@ -14,6 +14,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Atk Up --Atk Up
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and RD.IsDefenseAbove(c,2000) return c:IsFaceup() and c:IsType(TYPE_NORMAL) and RD.IsDefenseAbove(c,2000)
end end
...@@ -29,9 +30,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,9 +30,6 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g) RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
local tc=g:GetFirst() local tc=g:GetFirst()
RD.AttachAtkDef(e,tc,500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.AttachEffectIndes(e,tc,cm.indes,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachEffectIndes(e,tc,cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end) end)
end
function cm.indes(e,re,rp)
return rp==1-e:GetHandlerPlayer() and re:GetOwner():IsType(TYPE_TRAP)
end end
\ No newline at end of file
...@@ -13,10 +13,8 @@ function cm.initial_effect(c) ...@@ -13,10 +13,8 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.MaximumMode) e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.efilter) e1:SetValue(cm.indval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Indes --Indes
function cm.efilter(e,re,rp) cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP) \ No newline at end of file
end
\ No newline at end of file
...@@ -13,10 +13,8 @@ function cm.initial_effect(c) ...@@ -13,10 +13,8 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.MaximumMode) e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.efilter) e1:SetValue(cm.indval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Indes --Indes
function cm.efilter(e,re,rp) cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP) \ No newline at end of file
end
\ No newline at end of file
...@@ -9,10 +9,8 @@ function cm.initial_effect(c) ...@@ -9,10 +9,8 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.MaximumMode) e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.efilter) e1:SetValue(cm.indval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Indes --Indes
function cm.efilter(e,re,rp) cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP) \ No newline at end of file
end
\ No newline at end of file
...@@ -13,6 +13,7 @@ function cm.initial_effect(c) ...@@ -13,6 +13,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Activate --Activate
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
function cm.confilter(c,tp) function cm.confilter(c,tp)
return c:GetSummonPlayer()==tp and c:IsLevelAbove(7) return c:GetSummonPlayer()==tp and c:IsLevelAbove(7)
end end
...@@ -29,6 +30,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,6 +30,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g) RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
local tc=g:GetFirst() local tc=g:GetFirst()
RD.AttachAtkDef(e,tc,1500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,1500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.AttachEffectIndes(e,tc,aux.indoval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachEffectIndes(e,tc,cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end) end)
end end
\ No newline at end of file
...@@ -14,7 +14,7 @@ function cm.initial_effect(c) ...@@ -14,7 +14,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.filter(c) function cm.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsRace(RACE_FAIRY) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsRace(RACE_FAIRY) and RD.IsCanAttachBattleIndes(c, 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 Duel.GetAttacker():IsControler(1-tp) return Duel.GetAttacker():IsControler(1-tp)
......
...@@ -13,10 +13,8 @@ function cm.initial_effect(c) ...@@ -13,10 +13,8 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.MaximumMode) e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.efilter) e1:SetValue(cm.indval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Indes --Indes
function cm.efilter(e,re,rp) cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP) \ No newline at end of file
end
\ No newline at end of file
...@@ -12,6 +12,7 @@ function cm.initial_effect(c) ...@@ -12,6 +12,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Activate --Activate
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.costfilter(c) function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost() return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end end
...@@ -19,7 +20,7 @@ function cm.costcheck(g) ...@@ -19,7 +20,7 @@ function cm.costcheck(g)
return g:GetClassCount(Card.GetRace)==1 return g:GetClassCount(Card.GetRace)==1
end end
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsLevelBelow(8) return c:IsFaceup() and c:IsLevelBelow(8) and RD.IsCanAttachEffectIndes(c,cm.indval)
end end
cm.cost=RD.CostSendGraveSubToDeck(cm.costfilter,cm.costcheck,2,2) cm.cost=RD.CostSendGraveSubToDeck(cm.costfilter,cm.costcheck,2,2)
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 +32,4 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +32,4 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.AttachEffectIndes(e,tc,cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachEffectIndes(e,tc,cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end) end)
end) end)
end
function cm.indval(e,re,rp)
return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP)
end end
\ No newline at end of file
...@@ -13,10 +13,8 @@ function cm.initial_effect(c) ...@@ -13,10 +13,8 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.MaximumMode) e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.efilter) e1:SetValue(cm.indval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Indes --Indes
function cm.efilter(e,re,rp) cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP) \ No newline at end of file
end
\ No newline at end of file
...@@ -15,7 +15,7 @@ function cm.initial_effect(c) ...@@ -15,7 +15,7 @@ function cm.initial_effect(c)
end end
--Attack Twice --Attack Twice
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsLevel(8) and c:IsAttribute(ATTRIBUTE_DARK) return c:IsFaceup() and c:IsLevel(8) and c:IsAttribute(ATTRIBUTE_DARK) and RD.IsCanAttachExtraAttack(c,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 Duel.IsAbleToEnterBP() return Duel.IsAbleToEnterBP()
......
...@@ -13,11 +13,12 @@ function cm.initial_effect(c) ...@@ -13,11 +13,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Extra Tribute --Extra Tribute
cm.trival=RD.ValueDoubleTribute(nil,RACE_WINDBEAST)
function cm.costfilter(c) function cm.costfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsPublic() return c:IsType(TYPE_SPELL+TYPE_TRAP) 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 RD.IsCanAttachDoubleTribute(e:GetHandler()) return RD.IsCanAttachDoubleTribute(e:GetHandler(),cm.trival)
end end
cm.cost=RD.CostShowHand(cm.costfilter,2,2) cm.cost=RD.CostShowHand(cm.costfilter,2,2)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
...@@ -25,7 +26,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +26,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachDoubleTribute(e,c,cm.trival,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) RD.AttachDoubleTribute(e,c,cm.trival,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
end end
end
function cm.trival(e,c)
return c:IsRace(RACE_WINDBEAST)
end end
\ No newline at end of file
...@@ -15,7 +15,7 @@ function cm.initial_effect(c) ...@@ -15,7 +15,7 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(cm.target) e2:SetTarget(cm.target)
e2:SetValue(cm.efilter) e2:SetValue(cm.indval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
--Activate --Activate
...@@ -26,6 +26,4 @@ end ...@@ -26,6 +26,4 @@ end
function cm.target(e,c) function cm.target(e,c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FIEND) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FIEND)
end end
function cm.efilter(e,re,rp) cm.indval=RD.ValueEffectIndesType(TYPE_TRAP,TYPE_TRAP)
return re:IsActiveType(TYPE_TRAP) \ No newline at end of file
end
\ No newline at end of file
...@@ -13,11 +13,12 @@ function cm.initial_effect(c) ...@@ -13,11 +13,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Extra Tribute --Extra Tribute
cm.trival=RD.ValueDoubleTribute(ATTRIBUTE_LIGHT,RACE_MACHINE)
function cm.costfilter(c) function cm.costfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAbleToDeckOrExtraAsCost() return c:IsRace(RACE_MACHINE) and c:IsAbleToDeckOrExtraAsCost()
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 RD.IsCanAttachDoubleTribute(e:GetHandler()) return RD.IsCanAttachDoubleTribute(e:GetHandler(),cm.trival)
end end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,3,3) cm.cost=RD.CostSendGraveToDeck(cm.costfilter,3,3)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
...@@ -25,7 +26,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +26,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachDoubleTribute(e,c,cm.trival,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) RD.AttachDoubleTribute(e,c,cm.trival,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
end end
end
function cm.trival(e,c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_MACHINE)
end end
\ No newline at end of file
...@@ -14,6 +14,7 @@ function cm.initial_effect(c) ...@@ -14,6 +14,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Atk Up --Atk Up
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.confilter(c) function cm.confilter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsLevelBelow(9) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsLevelBelow(9)
end end
...@@ -29,10 +30,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,10 +30,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,2000,0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,c,2000,0,RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
if Duel.IsExistingMatchingCard(cm.exfilter,tp,0,LOCATION_GRAVE,8,nil) then if Duel.IsExistingMatchingCard(cm.exfilter,tp,0,LOCATION_GRAVE,8,nil) then
RD.AttachEffectIndes(e,c,cm.efilter,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) RD.AttachEffectIndes(e,c,cm.indval,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
end end
end end
end
function cm.efilter(e,re,rp)
return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP)
end end
\ No newline at end of file
...@@ -24,7 +24,7 @@ function cm.initial_effect(c) ...@@ -24,7 +24,7 @@ function cm.initial_effect(c)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(cm.target) e3:SetTarget(cm.target)
e3:SetValue(cm.efilter) e3:SetValue(cm.indval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
--Activate --Activate
...@@ -42,6 +42,4 @@ end ...@@ -42,6 +42,4 @@ end
function cm.target(e,c) function cm.target(e,c)
return c:IsFaceup() and c:IsLevel(9) and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsFaceup() and c:IsLevel(9) and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
function cm.efilter(e,re,rp) cm.indval=RD.ValueEffectIndesType(TYPE_TRAP,TYPE_TRAP)
return re:IsActiveType(TYPE_TRAP) \ No newline at end of file
end
\ No newline at end of file
...@@ -36,7 +36,7 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +36,7 @@ function cm.eff1op(e,tp,eg,ep,ev,re,r,rp)
end end
--Pierce --Pierce
function cm.eff2con(e,tp,eg,ep,ev,re,r,rp) function cm.eff2con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),1)
end end
function cm.eff2op(e,tp,eg,ep,ev,re,r,rp) function cm.eff2op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -11,18 +11,20 @@ function cm.initial_effect(c) ...@@ -11,18 +11,20 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Indes --Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsCanAttachEffectIndes(e:GetHandler(),cm.indval)
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 c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachEffectIndes(e,c,cm.efilter,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) RD.AttachEffectIndes(e,c,cm.indval,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
end end
end
function cm.efilter(e,re,rp)
return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP)
end end
\ No newline at end of file
...@@ -13,7 +13,7 @@ function cm.initial_effect(c) ...@@ -13,7 +13,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION) return c:IsFaceup() and c:IsType(TYPE_FUSION) and RD.IsCanAttachBattleIndes(c, 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 Duel.GetAttacker():IsControler(1-tp) return Duel.GetAttacker():IsControler(1-tp)
......
...@@ -15,11 +15,12 @@ function cm.initial_effect(c) ...@@ -15,11 +15,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Extra Tribute --Extra Tribute
cm.trival=RD.ValueDoubleTribute(ATTRIBUTE_FIRE,nil)
function cm.confilter(c) function cm.confilter(c)
return c:IsFaceup() and c:IsCode(list[1]) return c:IsFaceup() and 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 RD.IsCanAttachDoubleTribute(e:GetHandler()) return RD.IsCanAttachDoubleTribute(e:GetHandler(),cm.trival)
and Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end end
cm.cost=RD.CostPayLP(500) cm.cost=RD.CostPayLP(500)
...@@ -28,7 +29,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,7 +29,4 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachDoubleTribute(e,c,cm.trival,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) RD.AttachDoubleTribute(e,c,cm.trival,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
end end
end
function cm.trival(e,c)
return c:IsAttribute(ATTRIBUTE_FIRE)
end end
\ No newline at end of file
...@@ -24,7 +24,7 @@ function cm.initial_effect(c) ...@@ -24,7 +24,7 @@ function cm.initial_effect(c)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(cm.target) e3:SetTarget(cm.target)
e3:SetValue(cm.efilter) e3:SetValue(cm.indval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
--Activate --Activate
...@@ -39,6 +39,4 @@ end ...@@ -39,6 +39,4 @@ end
function cm.target(e,c) function cm.target(e,c)
return c:IsFaceup() and c:IsLevel(10) and c:IsRace(RACE_MACHINE) return c:IsFaceup() and c:IsLevel(10) and c:IsRace(RACE_MACHINE)
end end
function cm.efilter(e,re,rp) cm.indval=RD.ValueEffectIndesType(TYPE_SPELL+TYPE_TRAP,TYPE_SPELL+TYPE_TRAP)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) \ No newline at end of file
end
\ No newline at end of file
...@@ -12,22 +12,23 @@ function cm.initial_effect(c) ...@@ -12,22 +12,23 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Activate --Activate
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.confilter(c) function cm.confilter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR+RACE_FAIRY+RACE_BEAST+RACE_WINDBEAST+RACE_REPTILE) return c:IsFaceup() and c:IsRace(RACE_WARRIOR+RACE_FAIRY+RACE_BEAST+RACE_WINDBEAST+RACE_REPTILE)
end end
function cm.filter(c)
return c:IsFaceup() and RD.IsCanAttachEffectIndes(c,cm.indval)
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.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
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(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),Card.IsFaceup,tp,LOCATION_MZONE,0,1,2,nil,function(g) RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,0,1,2,nil,function(g)
g:ForEach(function(tc) g:ForEach(function(tc)
RD.AttachEffectIndes(e,tc,cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachEffectIndes(e,tc,cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end) end)
end) end)
end
function cm.indval(e,re,rp)
return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP)
end end
\ No newline at end of file
...@@ -12,6 +12,7 @@ function cm.initial_effect(c) ...@@ -12,6 +12,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Activate --Activate
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsLevel(7) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsType(TYPE_NORMAL) and c:IsLevel(7) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
...@@ -26,7 +27,4 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,7 +27,4 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.AttachAtkDef(e,tc,700,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachAtkDef(e,tc,700,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.AttachEffectIndes(e,tc,cm.indval,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachEffectIndes(e,tc,cm.indval,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end end
end
function cm.indval(e,re,rp)
return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP)
end end
\ No newline at end of file
...@@ -16,7 +16,7 @@ function cm.initial_effect(c) ...@@ -16,7 +16,7 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(cm.target) e2:SetTarget(cm.target)
e2:SetValue(cm.efilter) e2:SetValue(cm.indval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
--Activate --Activate
...@@ -31,6 +31,4 @@ cm.cost=RD.CostSendDeckTopToGrave(2) ...@@ -31,6 +31,4 @@ cm.cost=RD.CostSendDeckTopToGrave(2)
function cm.target(e,c) function cm.target(e,c)
return c:IsFaceup() and c:IsRace(RACE_DINOSAUR) return c:IsFaceup() and c:IsRace(RACE_DINOSAUR)
end end
function cm.efilter(e,re,rp) cm.indval=RD.ValueEffectIndesType(TYPE_MONSTER,TYPE_MONSTER)
return re:IsActiveType(TYPE_MONSTER) \ No newline at end of file
end
\ No newline at end of file
...@@ -2,7 +2,7 @@ local m=120208015 ...@@ -2,7 +2,7 @@ local m=120208015
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="臭氧层人" cm.name="臭氧层人"
function cm.initial_effect(c) function cm.initial_effect(c)
--Indes Trap --Indes
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
...@@ -12,9 +12,10 @@ function cm.initial_effect(c) ...@@ -12,9 +12,10 @@ function cm.initial_effect(c)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Indes Trap --Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsRace(RACE_GALAXY) return c:IsFaceup() and c:IsRace(RACE_GALAXY) and RD.IsCanAttachEffectIndes(c,cm.indval)
end end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1) cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,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)
...@@ -22,9 +23,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,9 +23,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g) RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,LOCATION_MZONE,0,1,1,nil,function(g)
RD.AttachEffectIndes(e,g:GetFirst(),cm.indes,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachEffectIndes(e,g:GetFirst(),cm.indval,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end) end)
end
function cm.indes(e,re,rp)
return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP)
end end
\ No newline at end of file
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
end end
--Activate --Activate
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_BEAST) return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsRace(RACE_BEAST) and RD.IsCanAttachExtraAttackMonster(c,2)
end end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsFaceup() and c:IsCode(list[1]) return c:IsFaceup() and c:IsCode(list[1])
......
...@@ -11,8 +11,9 @@ function cm.initial_effect(c) ...@@ -11,8 +11,9 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Activate --Activate
cm.trival=RD.ValueDoubleTribute(ATTRIBUTE_ALL,RACE_ALL)
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and RD.IsCanAttachDoubleTribute(c) and c:GetFlagEffect(m)==0 return c:IsFaceup() and RD.IsCanAttachDoubleTribute(c,cm.trival)
end end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsFaceup() and c:IsLevel(6) and c:IsDefense(500) return c:IsFaceup() and c:IsLevel(6) and c:IsDefense(500)
...@@ -27,8 +28,7 @@ end ...@@ -27,8 +28,7 @@ end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectGroupAndDoAction(aux.Stringid(m,1),cm.filter,cm.check,tp,LOCATION_MZONE,0,2,2,nil,function(g) RD.SelectGroupAndDoAction(aux.Stringid(m,1),cm.filter,cm.check,tp,LOCATION_MZONE,0,2,2,nil,function(g)
g:ForEach(function(tc) g:ForEach(function(tc)
RD.AttachDoubleTribute(e,tc,aux.TRUE,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) RD.AttachDoubleTribute(e,tc,cm.trival,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end) end)
if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.Damage(1-tp,800,REASON_EFFECT) Duel.Damage(1-tp,800,REASON_EFFECT)
......
...@@ -16,7 +16,7 @@ function cm.initial_effect(c) ...@@ -16,7 +16,7 @@ function cm.initial_effect(c)
end end
--Multiple Attack --Multiple Attack
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.MaximumMode(e) and Duel.IsAbleToEnterBP() return RD.MaximumMode(e) and Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttackMonster(e:GetHandler(),2)
end end
cm.cost=RD.CostSendDeckTopToGrave(1) cm.cost=RD.CostSendDeckTopToGrave(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)
......
...@@ -13,10 +13,8 @@ function cm.initial_effect(c) ...@@ -13,10 +13,8 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.MaximumMode) e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.efilter) e1:SetValue(cm.indval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Indes --Indes
function cm.efilter(e,re,rp) cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
return rp==1-e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP) \ No newline at end of file
end
\ No newline at end of file
...@@ -17,7 +17,7 @@ function cm.confilter(c) ...@@ -17,7 +17,7 @@ function cm.confilter(c)
return c:IsRace(RACE_SPELLCASTER) return c:IsRace(RACE_SPELLCASTER)
end end
function cm.filter(c) function cm.filter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsRace(RACE_SPELLCASTER) return c:IsPosition(POS_FACEUP_ATTACK) and c:IsRace(RACE_SPELLCASTER) and RD.IsCanAttachBattleIndes(c, 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)
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
......
...@@ -6,6 +6,7 @@ Duel.LoadScript("RDFunction.lua") ...@@ -6,6 +6,7 @@ Duel.LoadScript("RDFunction.lua")
Duel.LoadScript("RDCondition.lua") Duel.LoadScript("RDCondition.lua")
Duel.LoadScript("RDCost.lua") Duel.LoadScript("RDCost.lua")
Duel.LoadScript("RDTarget.lua") Duel.LoadScript("RDTarget.lua")
Duel.LoadScript("RDValue.lua")
Duel.LoadScript("RDAttach.lua") Duel.LoadScript("RDAttach.lua")
Duel.LoadScript("RDAction.lua") Duel.LoadScript("RDAction.lua")
RD = RushDuel RD = RushDuel
......
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