Commit 3b3bfa46 authored by 未闻皂名's avatar 未闻皂名

2025/1/1 极大类型修改为0x8000,同名异画卡改为读取原卡片的Lua,添加特殊提示

parent 62c4e82d
Pipeline #32263 passed with stages
in 12 minutes and 23 seconds
No preview for this file type
No preview for this file type
......@@ -36,6 +36,21 @@ HINTMSG_MAXMATERIAL = Auxiliary.Stringid(120000000, 1) -- 请选择要极大召
HINTMSG_RMATERIAL = HINTMSG_FMATERIAL -- 请选择要作为仪式素材的卡
HINTMSG_ANNOUNCE_MONSTER = Auxiliary.Stringid(120000001, 0) -- 宣言常规怪兽
HINTMSG_ANNOUNCE_LEGEND = Auxiliary.Stringid(120000001, 1) -- 宣言传说怪兽
HINTMSG_SUMMON_TURN = Auxiliary.Stringid(120000002, 0) -- 在这个回合召唤
HINTMSG_SPSUMMON_TURN = Auxiliary.Stringid(120000002, 1) -- 在这个回合特殊召唤
HINTMSG_EFFECT_USED = Auxiliary.Stringid(120000002, 2) -- 已使用过效果
-- 同名卡: 复制Lua代码
function RushDuel.SameCard(code, same)
if code == same then
Debug.Message("异画卡" .. code .. "加载出错, 请汇报此BUG")
return
end
local temp = _G["c" .. same]
_G["c" .. same] = _G["c" .. code]
Duel.LoadScript("c" .. same .. ".lua")
_G["c" .. same] = temp
end
-- 创建效果: 这张卡不能特殊召唤
function RushDuel.CannotSpecialSummon(card, range)
......
-- Rush Duel 极大
RushDuel = RushDuel or {}
TYPE_MAXIMUM = 0x400 -- 极大怪兽
TYPE_MAXIMUM = 0x8000 -- 极大怪兽
SUMMON_TYPE_MAXIMUM = 0x45000000 -- 极大召唤
-- 初始化极大怪兽规则
......
......@@ -46,7 +46,7 @@ function RushDuel.InitRule()
RushDuel.CreateFieldGlobalEffect(true, EVENT_CHAIN_SOLVING, function(e, tp, eg, ep, ev, re, r, rp)
local te = Duel.GetChainInfo(ev, CHAININFO_TRIGGERING_EFFECT)
local code = get_effect_owner_code(te)
te:GetHandler():RegisterFlagEffect(code, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, 0, 1)
te:GetHandler():RegisterFlagEffect(code, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, EFFECT_FLAG_CLIENT_HINT, 1, 0, HINTMSG_EFFECT_USED)
end)
-- 同一时点只能发动一张陷阱卡
local function is_trap(e)
......@@ -71,14 +71,19 @@ end
function RushDuel.InitFlag()
local reg_summon = function(e, tp, eg, ep, ev, re, r, rp)
eg:ForEach(function(tc)
tc:RegisterFlagEffect(FLAG_SUMMON_TURN, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, 0, 1)
tc:RegisterFlagEffect(FLAG_SUMMON_TURN, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, EFFECT_FLAG_CLIENT_HINT, 1, 0, HINTMSG_SUMMON_TURN)
end)
end
local reg_spsummon = function(e, tp, eg, ep, ev, re, r, rp)
eg:ForEach(function(tc)
tc:RegisterFlagEffect(FLAG_SUMMON_TURN, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, EFFECT_FLAG_CLIENT_HINT, 1, 0, HINTMSG_SPSUMMON_TURN)
end)
end
local reg_attack = function(e, tp, eg, ep, ev, re, r, rp)
Duel.RegisterFlagEffect(tp, FLAG_ATTACK_ANNOUNCED, RESET_PHASE + PHASE_DAMAGE, 0, 1)
end
RushDuel.CreateFieldGlobalEffect(true, EVENT_SUMMON_SUCCESS, reg_summon)
RushDuel.CreateFieldGlobalEffect(true, EVENT_SPSUMMON_SUCCESS, reg_summon)
RushDuel.CreateFieldGlobalEffect(true, EVENT_SPSUMMON_SUCCESS, reg_spsummon)
RushDuel.CreateFieldGlobalEffect(true, EVENT_ATTACK_ANNOUNCE, reg_attack)
end
-- 重载函数
......@@ -102,4 +107,4 @@ function RushDuel.OverrideFunction()
end
return IsAbleToDeck(c)
end
end
\ No newline at end of file
end
local m=120111001
local list={120150046}
local cm=_G["c"..m]
cm.name="宇宙弦之面条女德鲁伊"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Destroy
function cm.confilter(c)
return c:IsFaceup() and c:IsCode(list[1])
end
function cm.costfilter(c)
return c:IsRace(RACE_PYRO) and c:IsAbleToGraveAsCost()
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelBelow(7)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,2,2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
RD.SameCard(120111001,120150042)
\ No newline at end of file
local m=120116001
local cm=_G["c"..m]
cm.name="幻刃龙 建造龙"
function cm.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_WYRM) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end
\ No newline at end of file
RD.SameCard(120116001,120155024)
\ No newline at end of file
local m=120121001
local cm=_G["c"..m]
cm.name="七星道魔术师"
function cm.initial_effect(c)
--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:IsType(TYPE_MONSTER)
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_GRAVE,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_GRAVE,0,nil)
local atk=g:GetClassCount(Card.GetAttribute)*300
RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
RD.SameCard(120121001,120105001)
\ No newline at end of file
local m=120122001
local cm=_G["c"..m]
cm.name="连击龙 齿车戒龙"
function cm.initial_effect(c)
--Attack Twice
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
--Atk Twice
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),1)
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
--Extra Attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(aux.bdcon)
e1:SetOperation(cm.chop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=RD.AttachExtraAttack(e,c,1,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetCondition(cm.atkcon)
end
end
function cm.chop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(20110001,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
end
function cm.atkcon(e)
return e:GetHandler():GetFlagEffect(20110001)~=0
end
\ No newline at end of file
RD.SameCard(120122001,120110001)
\ No newline at end of file
local m=120123001
local list={120105001}
local cm=_G["c"..m]
cm.name="七星道魔女"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+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
--Special Summon
function cm.costfilter(c,e,tp)
return c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,c,e,tp)
end
function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.exfilter(c)
return c:IsCode(list[1])
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.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)~=0
and RD.IsOperatedGroupExists(cm.exfilter,1,nil)
and c:IsFaceup()
and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,400,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
RD.SameCard(120123001,120115001)
\ No newline at end of file
local m=120124001
local cm=_G["c"..m]
cm.name="幻击龙 齿车戒幻龙"
function cm.initial_effect(c)
--Atk Down
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:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Down
function cm.costfilter(c)
return c:IsLevelAbove(7) and c:IsRace(RACE_DRAGON) and c:IsAbleToGraveAsCost()
end
function cm.filter(c)
return c:IsFaceup() and c:IsLevelBelow(7)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
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.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,0,LOCATION_MZONE,1,2,nil,function(g)
g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,-1500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
--Extra Attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(aux.bdcon)
e1:SetOperation(cm.chop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=RD.AttachExtraAttackMonster(e,c,1,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetCondition(cm.atkcon)
end
end)
end
function cm.chop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(20145025,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
end
function cm.atkcon(e)
return e:GetHandler():GetFlagEffect(20145025)~=0
end
\ No newline at end of file
RD.SameCard(120124001,120145025)
\ No newline at end of file
local m=120195001
local cm=_G["c"..m]
cm.name="月魔将 岂灭鲁娜"
function cm.initial_effect(c)
--Position
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Position
function cm.filter(c)
return RD.IsCanChangePosition(c)
end
function cm.posfilter(c)
return c:IsFaceup() and RD.IsCanChangePosition(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,cm.filter,tp,0,LOCATION_MZONE,1,2,nil,function(g)
if RD.ChangePosition(g)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_POSCHANGE,cm.posfilter,tp,LOCATION_MZONE,0,1,1,nil,function(sg)
RD.ChangePosition(sg)
end)
end
end)
end
\ No newline at end of file
RD.SameCard(120195001,120199017)
\ No newline at end of file
local m=120195004
local cm=_G["c"..m]
cm.name="死者苏生"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
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,e,tp)
return RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,POS_FACEUP)
end
\ No newline at end of file
RD.SameCard(120195004,120194004)
\ No newline at end of file
local m=120195005
local cm=_G["c"..m]
cm.name="天使的施舍"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
RD.TargetDraw(tp,3)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.Draw()~=0 then
RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_HAND,0,2,2,nil,function(g)
Duel.BreakEffect()
RD.SendToGraveAndExists(g)
end)
end
end
\ No newline at end of file
RD.SameCard(120195005,120196049)
\ No newline at end of file
local m=120197001
local cm=_G["c"..m]
cm.name="七星道魔术师"
function cm.initial_effect(c)
--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:IsType(TYPE_MONSTER)
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_GRAVE,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_GRAVE,0,nil)
local atk=g:GetClassCount(Card.GetAttribute)*300
RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
RD.SameCard(120197001,120105001)
\ No newline at end of file
local m=120197002
local list={120105001}
local cm=_G["c"..m]
cm.name="七星道魔女"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+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
--Special Summon
function cm.costfilter(c,e,tp)
return c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,c,e,tp)
end
function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.exfilter(c)
return c:IsCode(list[1])
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.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)~=0
and RD.IsOperatedGroupExists(cm.exfilter,1,nil)
and c:IsFaceup()
and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,400,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
RD.SameCard(120197002,120115001)
\ No newline at end of file
local m=120197003
local list={120105001}
local cm=_G["c"..m]
cm.name="七星道法师"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Atk Down
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 Down
function cm.filter(c)
return c:IsFaceup() and c:IsLevelAbove(7)
end
function cm.exfilter(c)
return c:IsFaceup() and c:IsCode(list[1])
end
function cm.atkfilter(c)
return c:IsRace(RACE_SPELLCASTER)
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,0,LOCATION_MZONE,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.AttachAtkDef(e,g:GetFirst(),-400,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
local atk=Duel.GetMatchingGroupCount(cm.atkfilter,tp,LOCATION_GRAVE,0,nil)*100
RD.AttachAtkDef(e,g:GetFirst(),-atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end)
end
\ No newline at end of file
RD.SameCard(120197003,120130016)
\ No newline at end of file
local m=120197004
local list={120105001}
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.costfilter(c)
return c:IsType(TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function cm.filter(c)
return c:IsLevelAbove(7) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
end
function cm.exfilter(c)
return c:IsCode(list[1]) and c:IsLocation(LOCATION_HAND)
end
function cm.thfilter(c)
return c:IsLevelAbove(6) and c:IsRace(RACE_SPELLCASTER) and c:IsAbleToHand()
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.IsExistingMatchingCard(cm.filter,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.filter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
if RD.SendToHandAndExists(g,1-tp,cm.exfilter,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
RD.SendToHandAndExists(sg,1-tp)
end)
end
end)
end
\ No newline at end of file
RD.SameCard(120197004,120175001)
\ No newline at end of file
local m=120217009
local cm=_G["c"..m]
cm.name="七星道魔术师"
function cm.initial_effect(c)
--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:IsType(TYPE_MONSTER)
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_GRAVE,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_GRAVE,0,nil)
local atk=g:GetClassCount(Card.GetAttribute)*300
RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
RD.SameCard(120217009,120105001)
\ No newline at end of file
local m=120217010
local list={120105001}
local cm=_G["c"..m]
cm.name="七星道魔女"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+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
--Special Summon
function cm.costfilter(c,e,tp)
return c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,c,e,tp)
end
function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.exfilter(c)
return c:IsCode(list[1])
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.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)~=0
and RD.IsOperatedGroupExists(cm.exfilter,1,nil)
and c:IsFaceup()
and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,400,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
RD.SameCard(120217010,120115001)
\ No newline at end of file
local m=120218001
local list={120170002,120199014}
local cm=_G["c"..m]
cm.name="可能甜心:D 驱动现场演奏"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Multi-Choose Effect
local e1,e2=RD.CreateMultiChooseEffect(c,cm.condition,nil,aux.Stringid(m,1),cm.target1,cm.operation1,aux.Stringid(m,2),cm.target2,cm.operation2)
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCategory(CATEGORY_RECOVER+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
end
--Multi-Choose Effect
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
--Damage
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
RD.TargetDamage(tp,2000)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
if RD.Damage()~=0 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect()
g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,-3000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end
end
--Recover
function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsRace(RACE_PSYCHO) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
RD.TargetRecover(tp,1000)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
if RD.Recover()~=0 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,4),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP,true)
end
end
\ No newline at end of file
RD.SameCard(120218001,120199035)
\ No newline at end of file
local m=120218002
local list={120105001}
local cm=_G["c"..m]
cm.name="七星道魔女"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+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
--Special Summon
function cm.costfilter(c,e,tp)
return c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,c,e,tp)
end
function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.exfilter(c)
return c:IsCode(list[1])
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.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)~=0
and RD.IsOperatedGroupExists(cm.exfilter,1,nil)
and c:IsFaceup()
and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,400,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
RD.SameCard(120218002,120115001)
\ No newline at end of file
local m=120218004
local cm=_G["c"..m]
cm.name="风彩之预言乐句盗贼"
function cm.initial_effect(c)
--To Grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
function cm.confilter1(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_PSYCHO)
end
function cm.confilter2(c)
return c:IsFaceup() and not (c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_PSYCHO))
end
function cm.filter(c)
return c:IsLocation(LOCATION_GRAVE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter1,tp,LOCATION_MZONE,0,1,nil)
and not Duel.IsExistingMatchingCard(cm.confilter2,tp,LOCATION_MZONE,0,1,nil)
end
cm.cost=RD.CostPayLP(1000)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,LOCATION_HAND)>0 end
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
local dam=og:FilterCount(cm.filter,nil)*200
if dam==0 then return end
Duel.BreakEffect()
local atk=Duel.Damage(1-tp,dam,REASON_EFFECT)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if atk~=0 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,-atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end
end
\ No newline at end of file
RD.SameCard(120218004,120228024)
\ No newline at end of file
local m=120218005
local list={120196050}
local cm=_G["c"..m]
cm.name="猫爪少女"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_BEAST) and RD.IsDefense(c,200) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.exfilter(c)
return c:IsType(TYPE_NORMAL)
end
function cm.setfilter(c)
return c:IsCode(list[1]) and c:IsSSetable()
end
cm.cost=RD.CostSendHandToDeckBottom(Card.IsAbleToDeckAsCost,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)~=0
and RD.IsOperatedGroupExists(cm.exfilter,1,nil) then
RD.CanSelectAndSet(aux.Stringid(m,1),aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,e)
end
end
\ No newline at end of file
RD.SameCard(120218005,120235016)
\ No newline at end of file
local m=120218006
local cm=_G["c"..m]
cm.name="极奏之小提琴马赫毗奥"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
--Atk Up
function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL)
end
function cm.atkval(e,c)
local ct1=c:GetEquipCount()
local ct2=Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),0,LOCATION_MZONE,nil)
return (ct1+ct2)*500
end
\ No newline at end of file
RD.SameCard(120218006,120235010)
\ No newline at end of file
local m=120218007
local cm=_G["c"..m]
cm.name="名蔷薇魔术师"
function cm.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+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
--Destroy
function cm.costfilter(c)
return c:IsFaceup() and c:GetType()==TYPE_EQUIP+TYPE_SPELL and c:IsAbleToGraveAsCost()
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelBelow(8)
end
function cm.exfilter(c)
return c:IsType(TYPE_SPELL)
end
cm.cost=RD.CostSendOnFieldToGrave(cm.costfilter,1,1,false)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,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_MZONE,1,1,nil,function(g)
local c=e:GetHandler()
if Duel.Destroy(g,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,3,nil)
and c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.BreakEffect()
RD.AttachAtkDef(e,c,700,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end)
end
\ No newline at end of file
RD.SameCard(120218007,120244012)
\ No newline at end of file
local m=120218008
local list={120244012}
local cm=_G["c"..m]
cm.name="名蔷薇魔女"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.confilter(c)
return c:IsCode(list[1])
end
function cm.costfilter(c)
return ((c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_SPELLCASTER)) or c:IsType(TYPE_SPELL))
and c:IsAbleToGraveAsCost()
end
function cm.spfilter(c,e,tp)
return (c:IsCode(list[1]) or (c:IsLevelBelow(9) and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_FUSION)))
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_GRAVE,0,1,nil)
end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end
\ No newline at end of file
RD.SameCard(120218008,120244011)
\ No newline at end of file
local m=120218009
local cm=_G["c"..m]
cm.name="精英秘密搜查官 神秘小姐"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
function cm.costfilter(c)
if c:IsLocation(LOCATION_HAND) then
return c:IsAbleToDeckAsCost()
else
return c:IsFaceup() and c:IsRace(RACE_REPTILE) and c:IsAbleToDeckOrExtraAsCost()
end
end
function cm.costcheck(g)
return g:FilterCount(Card.IsLocation,nil,LOCATION_HAND)==1
end
function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsRace(RACE_REPTILE) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
cm.cost=RD.CostSendGroupToDeckSort(cm.costfilter,cm.costcheck,LOCATION_HAND+LOCATION_MZONE,3,3,true,SEQ_DECKSHUFFLE,true,false)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,300,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,2,nil,e,POS_FACEUP,true)
end
end
\ No newline at end of file
RD.SameCard(120218009,120249022)
\ No newline at end of file
local m=120218010
local list={120105001}
local cm=_G["c"..m]
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:SetCategory(CATEGORY_ATKCHANGE)
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.filter(c)
return c:IsType(TYPE_MONSTER)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsCode(list[1])
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.ChangeCode(e,c,list[1],RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil)
local atk=g:GetClassCount(Card.GetAttribute)*300
if atk==0 then return end
RD.CanSelectAndDoAction(aux.Stringid(m,1),aux.Stringid(m,2),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(g)
Duel.BreakEffect()
RD.AttachAtkDef(e,g:GetFirst(),-atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end
\ No newline at end of file
RD.SameCard(120218010,120257024)
\ No newline at end of file
local m=120218011
local list={120264005}
local cm=_G["c"..m]
cm.name="暗物质谜团机偶"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[1])
-- Fusion Flag
RD.CreateFusionSummonFlag(c,20261048)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--Material Check
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetLabelObject(e1)
e2:SetValue(cm.check)
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.indcon)
e3:SetValue(cm.indval)
c:RegisterEffect(e3)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e3)
end
--Material Check
function cm.check(e,c)
local atk=0
local g=c:GetMaterial()
g:ForEach(function(tc)
atk=atk+RD.GetBaseAttackOnTribute(tc)
end)
if atk>0 then
e:GetLabelObject():SetLabel(atk)
else
e:GetLabelObject():SetLabel(0)
end
end
--Atk Up
function cm.atkval(e,c)
if c:GetFlagEffect(20261048)~=0 then return e:GetLabel() else return 0 end
end
--Indes
function cm.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsFacedown,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
\ No newline at end of file
RD.SameCard(120218011,120261048)
\ No newline at end of file
local m=120218012
local list={120209001,120109024}
local cm=_G["c"..m]
cm.name="穿越侍·强袭线性海牛侍"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],cm.matfilter)
--Level Down
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
--Fusion Material
cm.unspecified_funsion=true
function cm.matfilter(c)
return c:IsFusionType(TYPE_EFFECT) and not c:IsLevel(7) and c:IsRace(RACE_GALAXY)
end
--Level Down
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.exfilter(c)
return c:IsCode(list[2])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLevelAbove(4)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2,nil,nil,function(g)
if g:IsExists(cm.exfilter,1,nil) then
return 20272035
else
return 0
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 reset=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END
RD.AttachLevel(e,c,-3,reset)
if e:GetLabel()==20272035 then
local e1=RD.AttachPierce(e,c,aux.Stringid(m,1),reset)
e1:SetValue(DOUBLE_DAMAGE)
end
end
end
\ No newline at end of file
RD.SameCard(120218012,120272035)
\ No newline at end of file
local m=120231003
local cm=_G["c"..m]
cm.name="七星道魔术师"
function cm.initial_effect(c)
--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:IsType(TYPE_MONSTER)
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_GRAVE,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_GRAVE,0,nil)
local atk=g:GetClassCount(Card.GetAttribute)*300
RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
RD.SameCard(120231003,120105001)
\ No newline at end of file
local m=120231004
local cm=_G["c"..m]
cm.name="超魔机神 大霸道王[L]"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetLabel(m)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.MaximumMode(e) and RD.IsLPBelowOpponent(tp,1)
end
cm.cost=RD.CostSendHandToGrave(Card.IsAbleToGraveAsCost,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
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 atk=math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))
RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
RD.SameCard(120231004,120150001)
\ No newline at end of file
local m=120231005
local list={120150001,120150003}
local cm=_G["c"..m]
cm.name="超魔机神 大霸道王"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Maximum Summon
RD.AddMaximumProcedure(c,3500,list[1],list[2])
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.indval)
c:RegisterEffect(e1)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
\ No newline at end of file
RD.SameCard(120231005,120150002)
\ No newline at end of file
local m=120231006
local cm=_G["c"..m]
cm.name="超魔机神 大霸道王[R]"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetLabel(m)
e1:SetCondition(RD.MaximumMode)
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:IsLevelAbove(1)
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,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.SelectAndDoAction(aux.Stringid(m,1),cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.AttachAtkDef(e,c,g:GetFirst():GetLevel()*200,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end
\ No newline at end of file
RD.SameCard(120231006,120150003)
\ No newline at end of file
local m=120235066
local cm=_G["c"..m]
cm.name="连击龙 齿车戒龙"
function cm.initial_effect(c)
--Attack Twice
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
--Atk Twice
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),1)
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
--Extra Attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(aux.bdcon)
e1:SetOperation(cm.chop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=RD.AttachExtraAttack(e,c,1,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetCondition(cm.atkcon)
end
end
function cm.chop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(20110001,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
end
function cm.atkcon(e)
return e:GetHandler():GetFlagEffect(20110001)~=0
end
\ No newline at end of file
RD.SameCard(120235066,120110001)
\ No newline at end of file
local m=120239004
local cm=_G["c"..m]
cm.name="超魔辉兽 大霸道王[L]"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_XMATERIAL)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--Pierce
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_XMATERIAL)
e2:SetCode(EFFECT_PIERCE)
e2:SetCondition(cm.prccon)
c:RegisterEffect(e2)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
--Atk Up
function cm.atkval(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*500
end
--Pierce
function cm.prccon(e)
return RD.MaximumMode(e)
and Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,10,nil,TYPE_MONSTER)
end
\ No newline at end of file
RD.SameCard(120239004,120217001)
\ No newline at end of file
local m=120239005
local list={120217001,120217003}
local cm=_G["c"..m]
cm.name="超魔辉兽 大霸道王"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Maximum Summon
RD.AddMaximumProcedure(c,3500,list[1],list[2])
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.indval)
c:RegisterEffect(e1)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
\ No newline at end of file
RD.SameCard(120239005,120217002)
\ No newline at end of file
local m=120239006
local cm=_G["c"..m]
cm.name="超魔辉兽 大霸道王[R]"
function cm.initial_effect(c)
--Activate Limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,1)
e1:SetCondition(cm.actcon)
e1:SetValue(cm.actlimit)
c:RegisterEffect(e1)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
--Special Summon Check
if not cm.global_check then
cm.global_check=true
local ge=Effect.CreateEffect(c)
ge:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge:SetCode(EVENT_SPSUMMON_SUCCESS)
ge:SetOperation(cm.spcheckop)
Duel.RegisterEffect(ge,0)
end
end
--Activate Limit
function cm.actcon(e)
return RD.MaximumMode(e) and Duel.GetFlagEffect(1-e:GetHandlerPlayer(),m)~=0
end
function cm.actlimit(e,re,tp)
local tc=re:GetHandler()
return tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() and tc:IsLevelBelow(10) and re:IsActiveType(TYPE_MONSTER)
end
--Special Summon Check
function cm.spfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsFaceup() and c:IsLevelAbove(5)
end
function cm.spcheckop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(0,m)==0 and eg:IsExists(cm.spfilter,1,nil,0) then
Duel.RegisterFlagEffect(0,m,RESET_PHASE+PHASE_END,0,1)
end
if Duel.GetFlagEffect(1,m)==0 and eg:IsExists(cm.spfilter,1,nil,1) then
Duel.RegisterFlagEffect(1,m,RESET_PHASE+PHASE_END,0,1)
end
end
\ No newline at end of file
RD.SameCard(120239006,120217003)
\ No newline at end of file
local m=120239007
local cm=_G["c"..m]
cm.name="超魔旗舰 大霸道王[L]"
function cm.initial_effect(c)
--Damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetLabel(m)
e1:SetCondition(RD.MaximumMode)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Damage
function cm.costfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,c)
end
function cm.filter(c)
return c:IsLevelAbove(1)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,1,1)
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,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,100)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,1,1,nil,function(g)
local tc=g:GetFirst()
if Duel.Damage(1-tp,tc:GetLevel()*100,REASON_EFFECT)~=0
and tc:IsAbleToHand()
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
RD.SendToHandAndExists(tc,1-tp)
end
end)
end
\ No newline at end of file
RD.SameCard(120239007,120151001)
\ No newline at end of file
local m=120239008
local list={120151001,120151003}
local cm=_G["c"..m]
cm.name="超魔旗舰 大霸道王"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Maximum Summon
RD.AddMaximumProcedure(c,3500,list[1],list[2])
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.MaximumMode)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.spfilter(c,e,tp)
return RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
cm.cost=RD.CostSendSelfToGrave()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,2,nil,e,POS_FACEUP)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
Duel.BreakEffect()
Duel.Destroy(g,REASON_EFFECT)
end)
end
end
\ No newline at end of file
RD.SameCard(120239008,120151002)
\ No newline at end of file
local m=120239009
local cm=_G["c"..m]
cm.name="超魔旗舰 大霸道王[R]"
function cm.initial_effect(c)
--Multiple Attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetLabel(m)
e1:SetCondition(RD.MaximumMode)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Multiple Attack
cm.cost=RD.CostSendDeckTopToGrave(2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
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 reset=RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END
RD.AttachAtkDef(e,c,-1000,0,reset)
RD.AttachCannotDirectAttack(e,c,aux.Stringid(m,1),reset)
RD.AttachAttackAll(e,c,1,aux.Stringid(m,2),reset)
RD.AttachPierce(e,c,aux.Stringid(m,3),reset)
end
end
\ No newline at end of file
RD.SameCard(120239009,120151003)
\ No newline at end of file
local m=120244000
local list={120105001}
local cm=_G["c"..m]
cm.name="七星道魔女"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+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
--Special Summon
function cm.costfilter(c,e,tp)
return c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,c,e,tp)
end
function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsRace(RACE_SPELLCASTER)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.exfilter(c)
return c:IsCode(list[1])
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.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if RD.SelectAndSpecialSummon(cm.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,POS_FACEUP)~=0
and RD.IsOperatedGroupExists(cm.exfilter,1,nil)
and c:IsFaceup()
and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,400,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
RD.SameCard(120244000,120115001)
\ No newline at end of file
local m=120244122
local cm=_G["c"..m]
cm.name="替星龙"
function cm.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsLevelBelow(4) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEDOWN_DEFENSE)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1
end
cm.cost=RD.CostSendSelfToHand()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEDOWN_DEFENSE)
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateCannotSpecialSummonEffect(e,aux.Stringid(m,1),cm.sumlimit,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.sumlimit(e,c)
return c:IsControler(e:GetHandlerPlayer()) and c:IsLocation(LOCATION_HAND+LOCATION_GRAVE)
end
\ No newline at end of file
RD.SameCard(120244122,120244022)
\ No newline at end of file
local m=120244130
local cm=_G["c"..m]
cm.name="疯狂犯罪者·空鹰女"
function cm.initial_effect(c)
--Attack Twice
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
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
--Attack Twice
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsLevel(6)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>1
and Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),1)
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachExtraAttack(e,c,1,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CanSelectAndDoAction(aux.Stringid(m,2),HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then
RD.AttachAtkDef(e,c,600,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end)
end
end
\ No newline at end of file
RD.SameCard(120244130,120244030)
\ No newline at end of file
local m=120244157
local cm=_G["c"..m]
cm.name="雅耳典娜的加护"
function cm.initial_effect(c)
--Activate
RD.RegisterEquipEffect(c,nil,cm.cost,cm.target)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCondition(cm.atkcon)
e1:SetValue(300)
c:RegisterEffect(e1)
--Indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(cm.indval)
c:RegisterEffect(e2)
end
--Activate
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,1,1)
function cm.target(c,e,tp)
return c:IsControler(tp) and c:IsFaceup()
end
--Atk Up
function cm.atkcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,1,nil,TYPE_EQUIP)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,true)
\ No newline at end of file
RD.SameCard(120244157,120244057)
\ No newline at end of file
local m=120244166
local cm=_G["c"..m]
cm.name="水稻梯田危机"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c,tp)
return c:GetSummonPlayer()==tp and c:IsSummonLocation(LOCATION_HAND+LOCATION_GRAVE)
end
function cm.filter(c)
return c:IsFaceup() and c:IsLevelBelow(12) and RD.IsCanChangePosition(c) and c:IsCanTurnSet()
end
function cm.check(g,atk)
return g:GetSum(Card.GetLevel)<=12
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter,1,nil,1-tp)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectGroupAndDoAction(HINTMSG_SET,cm.filter,cm.check,tp,0,LOCATION_MZONE,1,2,nil,function(g)
RD.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end)
end
\ No newline at end of file
RD.SameCard(120244166,120244066)
\ No newline at end of file
local m=120246025
local cm=_G["c"..m]
cm.name="连击龙 齿车戒龙"
function cm.initial_effect(c)
--Attack Twice
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
--Atk Twice
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() and RD.IsCanAttachExtraAttack(e:GetHandler(),1)
end
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
--Extra Attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(aux.bdcon)
e1:SetOperation(cm.chop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=RD.AttachExtraAttack(e,c,1,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetCondition(cm.atkcon)
end
end
function cm.chop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(20110001,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
end
function cm.atkcon(e)
return e:GetHandler():GetFlagEffect(20110001)~=0
end
\ No newline at end of file
RD.SameCard(120246025,120110001)
\ No newline at end of file
local m=120246043
local cm=_G["c"..m]
cm.name="魔将 雅灭鲁拉"
function cm.initial_effect(c)
--Cannot Summon
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
--Cannot Summon
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostChangeSelfPosition()
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(1,1)
e1:SetTarget(cm.sumlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(m,2))
e2:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e2)
--Limit Tribute
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_DOUBLE_TRIBUTE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(1,1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e3)
end
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLevelAbove(7) and sumtype&SUMMON_TYPE_ADVANCE==SUMMON_TYPE_ADVANCE
end
\ No newline at end of file
RD.SameCard(120246043,120120029)
\ No newline at end of file
local m=120246060
local cm=_G["c"..m]
cm.name="彩光之首席女吉他手"
function cm.initial_effect(c)
--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
cm.cost=RD.CostPayLP(1000)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local atk=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)*300
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
\ No newline at end of file
RD.SameCard(120246060,120120028)
\ No newline at end of file
local m=120246132
local cm=_G["c"..m]
cm.name="齿车戒×齿车戒"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function cm.exfilter(c,tc)
return c:IsFaceup() and c:IsLevel(tc:GetLevel()) and c:IsRace(tc:GetRace()) and RD.IsCanAttachExtraAttack(c,1)
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.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local tc=g:GetFirst()
RD.AttachAtkDef(e,tc,-1500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
local filter=RD.Filter(cm.exfilter,tc)
RD.CanSelectAndDoAction(aux.Stringid(m,2),aux.Stringid(m,3),filter,tp,LOCATION_MZONE,0,1,1,nil,function(sg)
Duel.BreakEffect()
RD.AttachExtraAttack(e,sg:GetFirst(),1,aux.Stringid(m,4),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end)
end
\ No newline at end of file
RD.SameCard(120246132,120246032)
\ No newline at end of file
local m=120247044
local cm=_G["c"..m]
cm.name="幻刃龙 建造龙"
function cm.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_WYRM) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)
end
\ No newline at end of file
RD.SameCard(120247044,120155024)
\ No newline at end of file
local m=120249135
local list={120217092}
local cm=_G["c"..m]
cm.name="天始之怪依"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsAttack(1200) and RD.IsDefense(c,0)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP_DEFENSE)
end
function cm.exfilter(c)
return c:IsCode(list[1])
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP_DEFENSE)~=0
and RD.IsOperatedGroupExists(cm.exfilter,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_TODECK,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,1,2,nil,function(sg)
RD.SendToDeckAndExists(sg)
end)
end
end
\ No newline at end of file
RD.SameCard(120249135,120249035)
\ No newline at end of file
local m=120249136
local cm=_G["c"..m]
cm.name="钢铁兵 鞅论倍赌兵"
function cm.initial_effect(c)
--Coin
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_COIN+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
cm.toss_coin=true
--Coin
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local res=Duel.TossCoin(tp,1)
if res==1 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
g:ForEach(function(tc)
RD.AttachAtkDef(e,tc,500,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
else
RD.CanSelectAndDoAction(aux.Stringid(m,1),aux.Stringid(m,2),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.AttachAtkDef(e,g:GetFirst(),-800,-800,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end
\ No newline at end of file
RD.SameCard(120249136,120249036)
\ No newline at end of file
local m=120249137
local cm=_G["c"..m]
cm.name="昂光天使 埃塞尔"
function cm.initial_effect(c)
--Special Summon Counter
Duel.AddCustomActivityCounter(m,ACTIVITY_SPSUMMON,aux.FALSE)
--Discard Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Discard Deck
function cm.spfilter(c,e,tp)
return RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
RD.TargetDiscardDeck(tp,2)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.DiscardDeck()~=0 and Duel.GetTurnCount()==2 then
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,POS_FACEUP)
end
end
\ No newline at end of file
RD.SameCard(120249137,120249037)
\ No newline at end of file
local m=120249163
local cm=_G["c"..m]
cm.name="音痴噪声烦恼"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CUSTOM+m)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--Event
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(cm.event)
Duel.RegisterEffect(ge1,0)
end
end
--Activate
function cm.filter(c,tp)
return c:GetOwner()==tp
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
and eg:IsExists(cm.filter,1,nil,1-tp)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if chk==0 then return ct>0 end
RD.TargetDamage(1-tp,ct*300)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if RD.Damage(nil,ct*300)~=0 and ev>0 then
RD.SendOpponentHandToGrave(tp,aux.Stringid(m,1),1,1)
end
end
--Event
function cm.event(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsPreviousLocation,nil,LOCATION_DECK)
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,g:GetCount())
end
\ No newline at end of file
RD.SameCard(120249163,120249063)
\ No newline at end of file
local m=120253121
local cm=_G["c"..m]
cm.name="电子鲨"
function cm.initial_effect(c)
--Summon Procedure
RD.AddSummonProcedureZero(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(c,e,tp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
RD.SameCard(120253121,120253021)
\ No newline at end of file
local m=120253130
local cm=_G["c"..m]
cm.name="纯爱之天使"
function cm.initial_effect(c)
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(cm.indes)
c:RegisterEffect(e1)
--No Damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetValue(cm.battle)
c:RegisterEffect(e2)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
--Indes
function cm.indes(e,c)
return c:IsAttackAbove(2500)
end
--No Damage
function cm.battle(e,c)
return c and c:IsLevelBelow(9)
end
\ No newline at end of file
RD.SameCard(120253130,120253030)
\ No newline at end of file
local m=120253160
local cm=_G["c"..m]
cm.name="女仆的恶作剧"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_GRAVE_ACTION+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function cm.exfilter(c)
return c:IsType(TYPE_EFFECT) and c:IsLevel(7)
end
cm.cost=RD.CostSendDeckTopToGrave(2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,2,nil,function(g)
if RD.SendToDeckAndExists(g) then
local ct=Duel.GetOperatedGroup():FilterCount(cm.exfilter,nil)
if ct>0 then
RD.CanDraw(aux.Stringid(m,1),tp,ct,true)
end
end
end)
end
\ No newline at end of file
RD.SameCard(120253160,120253060)
\ No newline at end of file
local m=120253166
local cm=_G["c"..m]
cm.name="融合术解除"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_FUSION) and c:IsAbleToExtra()
end
function cm.spfilter(c,e,tp,fc)
return aux.IsMaterialListCode(fc,c:GetCode()) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.check(g,fc)
return fc:CheckFusionMaterial(g,nil,PLAYER_NONE,true)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g)
local tc=g:GetFirst()
local min,max=aux.GetMaterialListCount(tc)
local sump=tc:GetControler()
local sumtype=tc:GetSummonType()
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.spfilter),sump,LOCATION_GRAVE,0,nil,e,sump,tc)
if RD.SendToDeckAndExists(tc) and sumtype&SUMMON_TYPE_FUSION==SUMMON_TYPE_FUSION
and not tc.unspecified_funsion
and min>0 and min==max and min<=Duel.GetLocationCount(sump,LOCATION_MZONE)
and mg:CheckSubGroup(cm.check,min,min,tc)
and not Duel.IsPlayerAffectedByEffect(sump,59822133)
and Duel.SelectYesNo(sump,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,sump,HINTMSG_SPSUMMON)
local g=mg:SelectSubGroup(sump,cm.check,false,min,min,tc)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end)
end
\ No newline at end of file
RD.SameCard(120253166,120253066)
\ No newline at end of file
local m=120254002
local cm=_G["c"..m]
cm.name="王家魔族·重金属歌手"
function cm.initial_effect(c)
--Tribute
RD.CreateAdvanceCheck(c,cm.tricheck,1,20130031)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+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
--Tribute
function cm.tricheck(c)
return c:IsLevelAbove(5)
end
--Destroy
function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelBelow(8)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return RD.IsSummonTurn(c) and c:GetFlagEffect(20130031)~=0
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_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
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.desfilter,tp,0,LOCATION_MZONE,nil)
local sg=g:GetMinGroup(Card.GetLevel)
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=sg:Select(tp,1,1,nil)
Duel.HintSelection(dg)
local tc=dg:GetFirst()
RD.AttachAtkDef(e,c,tc:GetAttack(),0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
\ No newline at end of file
RD.SameCard(120254002,120130031)
\ No newline at end of file
local m=120255005
local cm=_G["c"..m]
cm.name="潜入开始"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsLevel(7) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)~=0 then
local tc=Duel.GetOperatedGroup():GetFirst()
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)
end
end
\ No newline at end of file
RD.SameCard(120255005,120203024)
\ No newline at end of file
local m=120255006
local cm=_G["c"..m]
cm.name="七宝船"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
cm.cost=RD.CostSendHandToGrave(cm.costfilter,1,1,nil,nil,function(g)
return g:GetFirst():GetLevel()
end)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
RD.TargetDraw(tp,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.Draw()~=0 and e:GetLabel()==7 then
RD.CanDraw(aux.Stringid(m,1),tp,1)
end
end
\ No newline at end of file
RD.SameCard(120255006,120199052)
\ No newline at end of file
local m=120257116
local cm=_G["c"..m]
cm.name="骰子炸药少女·小掷"
function cm.initial_effect(c)
--Dice
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DICE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
cm.toss_dice=true
--Dice
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.TossDice(tp,1)
local atk=0
if d==1 or d==2 then
atk=-1000
elseif d==3 or d==4 then
atk=600
elseif d==5 or d==6 then
RD.SelectAndDoAction(aux.Stringid(m,1),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(g)
atk=g:GetFirst():GetBaseAttack()
end)
end
local c=e:GetHandler()
if atk~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
\ No newline at end of file
RD.SameCard(120257116,120257016)
\ No newline at end of file
local m=120257131
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+CATEGORY_TODECK)
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:IsType(TYPE_EFFECT) and c:IsLevel(7,8) and c:IsAttribute(ATTRIBUTE_LIGHT)
end
function cm.costcheck(g,e,tp)
return Duel.IsPlayerCanDraw(tp,g:GetCount())
end
cm.cost=RD.CostShowGroupHand(cm.costfilter,cm.costcheck,1,2,Group.GetCount)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
RD.TargetDraw(tp,e:GetLabel())
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=RD.Draw()
if ct==0 then return end
RD.SelectAndDoAction(HINTMSG_TODECK,Card.IsAbleToDeck,p,LOCATION_HAND,0,ct,ct,nil,function(g)
Duel.BreakEffect()
RD.SendToDeckAndExists(g)
end)
end
\ No newline at end of file
RD.SameCard(120257131,120257031)
\ No newline at end of file
local m=120257158
local cm=_G["c"..m]
cm.name="接合科技接合"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.filter(c)
return RD.IsCanChangePosition(c) and (not c:IsPosition(POS_FACEUP_ATTACK) or c:IsCanTurnSet())
end
function cm.spfilter(c)
return c:IsLevelBelow(9) and c:IsAttribute(ATTRIBUTE_EARTH+ATTRIBUTE_DARK) and c:IsRace(RACE_MACHINE)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local tc=g:GetFirst()
local pos=POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE
if tc:IsPosition(POS_FACEUP_ATTACK) then
pos=POS_FACEDOWN_DEFENSE
elseif tc:IsFacedown() or not tc:IsCanTurnSet() then
pos=POS_FACEUP_ATTACK
end
pos=Duel.SelectPosition(tp,tc,pos)
if RD.ChangePosition(tc,pos)~=0 then
RD.CanFusionSummon(aux.Stringid(m,1),nil,cm.spfilter,nil,0,0,nil,RD.FusionToGrave,e,tp,true)
end
end)
end
\ No newline at end of file
RD.SameCard(120257158,120257058)
\ No newline at end of file
local m=120257159
local cm=_G["c"..m]
cm.name="宇宙的威胁"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
cm.cost=RD.CostPayLP(1000)
function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardDeck(tp,1,REASON_EFFECT)~=0 then
local tc=Duel.GetOperatedGroup():GetFirst()
if not aux.NecroValleyFilter()(tc) then return end
local set=RD.CanSetCard(tp,aux.Stringid(m,1),tc,e,true)
if set and tc:IsLevel(2) and tc:IsSummonLocation(LOCATION_GRAVE) then
RD.CanSelectAndDoAction(aux.Stringid(m,2),HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
end
end
end
\ No newline at end of file
RD.SameCard(120257159,120257059)
\ No newline at end of file
local m=120260004
local cm=_G["c"..m]
cm.name="天帝龙树 世界树龙[L]"
function cm.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetLabel(m)
e1:SetCondition(RD.MaximumMode)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Destroy
function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelBelow(8)
end
cm.cost=RD.CostSendDeckTopToGrave(3)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.GetMatchingGroup(cm.desfilter,tp,0,LOCATION_MZONE,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_MZONE,1,1,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
end
\ No newline at end of file
RD.SameCard(120260004,120150010)
\ No newline at end of file
local m=120260005
local list={120150010,120150012}
local cm=_G["c"..m]
cm.name="天帝龙树 世界树龙"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Maximum Summon
RD.AddMaximumProcedure(c,4000,list[1],list[2])
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(RD.MaximumMode)
e1:SetValue(cm.indval)
c:RegisterEffect(e1)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
\ No newline at end of file
RD.SameCard(120260005,120150011)
\ No newline at end of file
local m=120260006
local cm=_G["c"..m]
cm.name="天帝龙树 世界树龙[R]"
function cm.initial_effect(c)
--Position
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetLabel(m)
e1:SetCondition(RD.MaximumMode)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Position
function cm.posfilter(c)
return c:IsDefensePos() and RD.IsCanChangePosition(c)
end
cm.cost=RD.CostSendDeckTopToGrave(3)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.posfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.GetMatchingGroup(cm.posfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,cm.posfilter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.ChangePosition(g,POS_FACEUP_ATTACK)
end)
end
\ No newline at end of file
RD.SameCard(120260006,120150012)
\ No newline at end of file
local m=120261118
local cm=_G["c"..m]
cm.name="电子界香料忍·肉豆蔻"
function cm.initial_effect(c)
--Summon Procedure
RD.AddSummonProcedureOne(c,aux.Stringid(m,0),nil,cm.sumfilter)
--Discard Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DECKDES+CATEGORY_TODECK+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Summon Procedure
function cm.sumfilter(c,e,tp)
return c:IsRace(RACE_CYBERSE)
end
--Discard Deck
function cm.filter(c,g)
return g:IsContains(c) and c:IsAbleToDeck()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1)
and Duel.IsPlayerCanDiscardDeck(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,PLAYER_ALL,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetDecktopGroup(tp,1)
local g2=Duel.GetDecktopGroup(1-tp,1)
g1:Merge(g2)
Duel.DisableShuffleCheck()
if Duel.SendtoGrave(g1,REASON_EFFECT)==0 then return end
local filter=aux.NecroValleyFilter(RD.Filter(cm.filter,g1))
RD.CanSelectAndDoAction(aux.Stringid(m,2),HINTMSG_TODECK,filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,function(g)
Duel.BreakEffect()
RD.SendToDeckTopOrBottom(g,tp,aux.Stringid(m,3),aux.Stringid(m,4))
end)
end
\ No newline at end of file
RD.SameCard(120261118,120261018)
\ No newline at end of file
local m=120261145
local list={120115001}
local cm=_G["c"..m]
cm.name="七星道终极咒魔女"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],cm.matfilter)
--To Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Fusion Material
cm.unspecified_funsion=true
function cm.matfilter(c)
return c:IsType(TYPE_FUSION) and (c:IsRace(RACE_SPELLCASTER) or c:IsRace(RACE_MAGICALKNIGHT))
end
--To Deck
function cm.filter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToDeck()
end
function cm.thfilter(c)
return c:IsType(TYPE_SPELL) 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,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.filter),tp,0,LOCATION_GRAVE,1,1,nil,function(g)
if RD.SendToDeckAndExists(g,cm.exfilter,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
Duel.BreakEffect()
if RD.SendToHandAndExists(sg,1-tp) and Duel.GetFlagEffect(tp,m)==0 then
RD.CreateActivateCountLimitEffect(e,aux.Stringid(m,2),cm.aclimit,1,tp,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
end)
end
end)
end
function cm.aclimit(e,re,tp,chk)
return re:GetHandler():GetType()==TYPE_SPELL and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
end
\ No newline at end of file
RD.SameCard(120261145,120261045)
\ No newline at end of file
local m=120261152
local cm=_G["c"..m]
cm.name="混合驱动回归融合"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.costfilter(c)
return c:IsRace(RACE_DRAGON+RACE_MACHINE) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.filter(c,e,tp)
return RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEDOWN_DEFENSE)
end
function cm.exfilter(c)
return c:IsRace(RACE_DRAGON+RACE_MACHINE) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function cm.matcheck(tp,sg,fc)
return sg:GetClassCount(Card.GetRace)==sg:GetCount()
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,4,4)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(1-tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_GRAVE,1,nil,e,1-tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_GRAVE)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(cm.filter,1-tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEDOWN_DEFENSE)~=0 then
RD.CanFusionSummon(aux.Stringid(m,1),aux.FALSE,nil,cm.exfilter,LOCATION_GRAVE,0,cm.matcheck,RD.FusionToDeck,e,tp,true)
end
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateHintEffect(e,aux.Stringid(m,2),tp,1,0,RESET_PHASE+PHASE_END)
RD.CreateAttackLimitEffect(e,cm.atktg,tp,LOCATION_MZONE,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.atktg(e,c)
return not c:IsType(TYPE_FUSION)
end
\ No newline at end of file
RD.SameCard(120261152,120261052)
\ No newline at end of file
local m=120261163
local cm=_G["c"..m]
cm.name="即兴果酱音跃:P抓取!"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.costfilter(c)
return c:IsRace(RACE_PSYCHO) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.exfilter(c)
return c:IsType(TYPE_NORMAL) and c:IsRace(RACE_PSYCHO)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,4)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttacker()
if chk==0 then return tc:IsAttackPos() and RD.IsCanChangePosition(tc) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,tc,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsRelateToBattle() and tc:IsAttackPos()
and RD.ChangePosition(tc,POS_FACEUP_DEFENSE)~=0
and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,1,nil) then
local ct=6-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if ct>0 then
RD.CanDraw(aux.Stringid(m,1),tp,ct)
end
end
end
\ No newline at end of file
RD.SameCard(120261163,120261063)
\ No newline at end of file
local m=120261164
local cm=_G["c"..m]
cm.name="龙威支配"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
--Activate
function cm.confilter(c,tp)
return c:GetSummonPlayer()==tp
end
function cm.exfilter(c)
return c:IsFaceup() and c:IsLevelAbove(7) and c:IsRace(RACE_DRAGON)
end
function cm.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT) and c:IsLevelBelow(8)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter,1,nil,1-tp)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
RD.TargetDamage(1-tp,400)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.Damage()~=0 and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_MZONE,0,1,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_DESTROY,cm.desfilter,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
Duel.Destroy(sg,REASON_EFFECT)
end)
end
end
\ No newline at end of file
RD.SameCard(120261164,120261064)
\ No newline at end of file
local m=120264127
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:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Draw
function cm.exfilter(c)
return c:GetBaseAttack()==100 and c:IsRace(RACE_AQUA)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler()) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9
end
cm.cost=RD.CostSendHandOrFieldToGrave(Card.IsAbleToGraveAsCost,2,2,true,nil,nil,function(g)
if g:IsExists(cm.exfilter,1,nil) then
return 120264027
else
return 0
end
end)
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)
if RD.Draw()~=0 and e:GetLabel()==120264027 then
RD.CanDraw(aux.Stringid(m,1),tp,1)
end
end
\ No newline at end of file
RD.SameCard(120264127,120264027)
\ No newline at end of file
local m=120264130
local list={120264031}
local cm=_G["c"..m]
cm.name="叛骨之苏芙蕾思"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Position
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_POSITION)
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
--Position
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function cm.exfilter(c)
return c:IsType(TYPE_MONSTER)
end
function cm.thfilter(c)
return c:IsCode(list[1]) and c:IsAbleToHand()
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.IsExistingMatchingCard(RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(RD.IsCanChangePosition,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,RD.IsCanChangePosition,tp,0,LOCATION_MZONE,1,1,nil,function(g)
if RD.ChangePosition(g)~=0 and Duel.IsExistingMatchingCard(cm.exfilter,tp,LOCATION_GRAVE,0,5,nil) then
RD.CanSelectAndDoAction(aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,function(sg)
RD.SendToHandAndExists(sg,1-tp)
end)
end
end)
end
\ No newline at end of file
RD.SameCard(120264130,120264030)
\ No newline at end of file
local m=120264137
local cm=_G["c"..m]
cm.name="突发爆裂兔"
function cm.initial_effect(c)
--Atk Down
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 Down
cm.cost=RD.CostSendDeckTopToGrave(1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(aux.Stringid(m,1),Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,function(g)
local tc=g:GetFirst()
RD.AttachAtkDef(e,tc,-600,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if tc==e:GetHandler() and tc:IsRelateToEffect(e) then
RD.AttachDirectAttack(e,tc,aux.Stringid(m,2),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end)
end
\ No newline at end of file
RD.SameCard(120264137,120264037)
\ No newline at end of file
local m=120264148
local list={120231031,120231034}
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])
--Contact Fusion
RD.EnableContactFusion(c,aux.Stringid(m,0))
--To Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TODECK)
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
--To Deck
function cm.filter(c)
return c:IsFaceup() and c:IsAbleToDeck()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
RD.SendToDeckAndExists(g)
end)
end
\ No newline at end of file
RD.SameCard(120264148,120264048)
\ No newline at end of file
local m=120264149
local list={120249035,120217092}
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])
--Contact Fusion
RD.EnableContactFusion(c,aux.Stringid(m,0))
--Direct Attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e1)
--No Damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e2:SetValue(1)
c:RegisterEffect(e2)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
\ No newline at end of file
RD.SameCard(120264149,120264049)
\ No newline at end of file
local m=120271001
local cm=_G["c"..m]
cm.name="天使的施舍"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
RD.TargetDraw(tp,3)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.Draw()~=0 then
RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_HAND,0,2,2,nil,function(g)
Duel.BreakEffect()
RD.SendToGraveAndExists(g)
end)
end
end
\ No newline at end of file
RD.SameCard(120271001,120196049)
\ No newline at end of file
local m=120271072
local cm=_G["c"..m]
cm.name="傲慢之壶"
function cm.initial_effect(c)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.chainfilter(re,tp,cid)
return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL))
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
RD.TargetDraw(tp,2)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.Draw()
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateCannotActivateEffect(e,aux.Stringid(m,1),cm.aclimit,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL)
end
\ No newline at end of file
RD.SameCard(120271072,120238006)
\ No newline at end of file
local m=120272122
local cm=_G["c"..m]
cm.name="兽医 莉莉"
function cm.initial_effect(c)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon
function cm.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsAttack(400) and RD.IsDefense(c,1500)
and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler())
end
cm.cost=RD.CostPayLP(500)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if RD.SelectAndSpecialSummon(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,POS_FACEUP)~=0 then
RD.CanSelectAndDoAction(aux.Stringid(m,1),aux.Stringid(m,2),Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil,function(g)
RD.AttachAtkDef(e,g:GetFirst(),1000,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
end)
end
end
\ No newline at end of file
RD.SameCard(120272122,120272022)
\ No newline at end of file
local m=120272140
local list={120257016,120272007}
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])
--Dice
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DICE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
cm.toss_dice=true
--Dice
function cm.spfilter(c,e,tp,lv)
return c:IsLevelBelow(lv) and c:IsAttribute(ATTRIBUTE_LIGHT) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSpecialSummonTurn(e:GetHandler())
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local d1,d2=Duel.TossDice(tp,2)
local lv=d1+d2
local filter=aux.NecroValleyFilter(RD.Filter(cm.spfilter,e,tp,lv))
if RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,POS_FACEUP)~=0 then
local c=e:GetHandler()
local tc=Duel.GetOperatedGroup():GetFirst()
local atk=tc:GetBaseAttack()
if atk>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.BreakEffect()
RD.AttachAtkDef(e,c,atk,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end
end
end
\ No newline at end of file
RD.SameCard(120272140,120272040)
\ No newline at end of file
local m=120272141
local list={120244012,120244011}
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])
--Contact Fusion
RD.EnableContactFusion(c,aux.Stringid(m,0))
--To Grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE)
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
--To Grave
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION) and RD.IsSpecialSummonTurn(c)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,nil) end
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,1,nil,function(g)
local tc=g:GetFirst()
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
RD.CanSelectAndDoAction(aux.Stringid(m,2),aux.Stringid(m,3),Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil,function(sg)
Duel.BreakEffect()
RD.AttachAtkDef(e,sg:GetFirst(),-tc:GetBaseAttack(),0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
end)
end
end)
end
\ No newline at end of file
RD.SameCard(120272141,120272041)
\ No newline at end of file
local m=120272154
local cm=_G["c"..m]
cm.name="传述的英雄谭"
function cm.initial_effect(c)
--Fake Legend
RD.EnableFakeLegend(c,LOCATION_HAND+LOCATION_GRAVE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES+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.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.thfilter(c)
return RD.IsLegendCard(c) and c:IsType(TYPE_MONSTER+TYPE_TRAP) and c:IsAbleToHand()
end
function cm.check(g)
return not (g:IsExists(Card.IsType,2,nil,TYPE_MONSTER) or g:IsExists(Card.IsType,2,nil,TYPE_TRAP))
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,2,2)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,4) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,4)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local sg,og=RD.SendDeckTopToGraveAndCanSelectGroup(tp,4,aux.Stringid(m,1),HINTMSG_ATOHAND,aux.NecroValleyFilter(cm.thfilter),cm.check,1,2)
if sg:GetCount()>0 then
Duel.BreakEffect()
RD.SendToHandAndExists(sg,1-tp)
end
end
\ No newline at end of file
RD.SameCard(120272154,120272054)
\ No newline at end of file
local m=120272156
local cm=_G["c"..m]
cm.name="昂光的咒缚"
function cm.initial_effect(c)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.chainfilter(re,tp,cid)
return not (re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_TRAP))
end
function cm.filter(c)
return RD.IsCanChangePosition(c) and (not c:IsPosition(POS_FACEUP_ATTACK) or c:IsCanTurnSet())
end
function cm.excon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(m,1-tp,ACTIVITY_CHAIN)~=0 or Duel.GetTurnCount()==2
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)<=1
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ex=cm.excon(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil)
and (not ex or (Duel.IsPlayerCanDraw(tp,2) and Duel.IsPlayerCanDraw(1-tp,2))) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
if ex then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,2)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_POSCHANGE,cm.filter,tp,0,LOCATION_MZONE,1,1,nil,function(g)
local tc=g:GetFirst()
local pos=POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE
if tc:IsPosition(POS_FACEUP_ATTACK) then
pos=POS_FACEDOWN_DEFENSE
elseif tc:IsFacedown() or not tc:IsCanTurnSet() then
pos=POS_FACEUP_ATTACK
end
pos=Duel.SelectPosition(tp,tc,pos)
if RD.ChangePosition(tc,pos)~=0 and cm.excon(e,tp,eg,ep,ev,re,r,rp) then
Duel.Draw(tp,2,REASON_EFFECT)
Duel.Draw(1-tp,2,REASON_EFFECT)
end
end)
end
\ No newline at end of file
RD.SameCard(120272156,120272056)
\ No newline at end of file
local m=120274032
local list={120151005,120151007}
local cm=_G["c"..m]
cm.name="大恐龙驾 联力恐龙车"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Maximum Summon
RD.AddMaximumProcedure(c,3400,list[1],list[2])
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Destroy
function cm.confilter(c)
return c:IsFaceup() and c:IsLevelAbove(9)
end
function cm.costfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.MaximumMode(e) and not Duel.IsExistingMatchingCard(cm.confilter,tp,0,LOCATION_MZONE,1,nil)
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.IsExistingMatchingCard(nil,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,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,nil,tp,0,LOCATION_MZONE,1,2,nil,function(g)
Duel.Destroy(g,REASON_EFFECT)
end)
end
\ No newline at end of file
RD.SameCard(120274032,120151006)
\ No newline at end of file
local m=120277061
local list={120203024}
local cm=_G["c"..m]
cm.name="任务完了"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c,tp)
return c:GetSummonPlayer()==tp
end
function cm.costfilter(c)
return (c:IsLevel(7) or c:IsCode(list[1])) and c:IsAbleToDeckAsCost()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.confilter,1,nil,1-tp)
end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,1,1)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local tc=eg:GetFirst()
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
local ct=5-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if ct>0 then
RD.CanDraw(aux.Stringid(m,1),tp,ct,true)
end
end
end
\ No newline at end of file
local m=120281001
local list={120263001,120263005}
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])
--Only Fusion Summon
RD.OnlyFusionSummon(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--Damage
local e2=RD.ContinuousBattleDestroyingDamage(c)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
--Atk Up
function cm.filter(c)
return c:IsRace(RACE_WARRIOR)
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),LOCATION_GRAVE,0,nil)*300
end
--Damage
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc then
local dam=RD.GetBaseAttackOnDestroy(tc)
Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end
\ No newline at end of file
RD.SameCard(120281001,120264000)
\ No newline at end of file
local m=120282001
local cm=_G["c"..m]
cm.name="耳语妖精"
function cm.initial_effect(c)
--To Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TODECK+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 Deck
function cm.tdfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
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.tdfilter,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(cm.tdfilter),tp,0,LOCATION_GRAVE,1,2,nil,function(g)
RD.SendToDeckAndExists(g)
end)
end
\ No newline at end of file
RD.SameCard(120282001,120120018)
\ No newline at end of file
local m=120282002
local list={120199052}
local cm=_G["c"..m]
cm.name="七宝神-良财"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Special Summon Procedure
RD.AddHandSpecialSummonProcedure(c,aux.Stringid(m,0),cm.spcon)
--Indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(cm.target)
e1:SetValue(cm.indval)
c:RegisterEffect(e1)
--Continuous Effect
RD.AddContinuousEffect(c,e1)
end
--Special Summon Procedure
function cm.spconfilter(c)
return RD.IsDefense(c,2700) or c:IsCode(list[1])
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spconfilter,tp,LOCATION_GRAVE,0,1,nil)
end
--Indes
cm.indval=RD.ValueEffectIndesType(0,TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP,true)
function cm.target(e,c)
if c:IsLocation(LOCATION_MZONE) then
return c:IsFaceup() and c:IsLevel(7)
else
return c:IsFacedown()
end
end
\ No newline at end of file
RD.SameCard(120282002,120257036)
\ No newline at end of file
local m=120282005
local cm=_G["c"..m]
cm.name="元素循环"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.costfilter(c)
if c:IsLocation(LOCATION_EXTRA) then
return c:IsType(TYPE_FUSION) and c:IsLevel(6,7) and c:IsRace(RACE_WARRIOR)
else
return c:IsRace(RACE_WARRIOR) and c:IsAbleToGraveAsCost()
end
end
function cm.check(g)
if g:GetClassCount(Card.GetLocation)==1 then return false end
local mc,fc=g:GetFirst(),g:GetNext()
if mc:IsLocation(LOCATION_EXTRA) then mc,fc=fc,mc end
return aux.IsMaterialListCode(fc,mc:GetCode())
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.costfilter,tp,LOCATION_EXTRA+LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(cm.check,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local sg=g:SelectSubGroup(tp,cm.check,false,2,2)
local mc,fc=sg:GetFirst(),sg:GetNext()
if mc:IsLocation(LOCATION_EXTRA) then mc,fc=fc,mc end
Duel.ConfirmCards(1-tp,fc)
Duel.SendtoGrave(mc,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
RD.TargetDraw(tp,3)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.Draw()~=0 then
RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil,function(g)
Duel.BreakEffect()
Duel.SendtoGrave(g,REASON_EFFECT)
end)
end
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateCannotActivateEffect(e,aux.Stringid(m,2),cm.aclimit,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.aclimit(e,re,tp)
local tc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and not tc:IsRace(RACE_WARRIOR)
end
\ No newline at end of file
RD.SameCard(120282005,120263030)
\ No newline at end of file
local m=120282005
local cm=_G["c"..m]
cm.name="元素循环"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.costfilter(c)
if c:IsLocation(LOCATION_EXTRA) then
return c:IsType(TYPE_FUSION) and c:IsLevel(6,7) and c:IsRace(RACE_WARRIOR)
else
return c:IsRace(RACE_WARRIOR) and c:IsAbleToGraveAsCost()
end
end
function cm.check(g)
if g:GetClassCount(Card.GetLocation)==1 then return false end
local mc,fc=g:GetFirst(),g:GetNext()
if mc:IsLocation(LOCATION_EXTRA) then mc,fc=fc,mc end
return aux.IsMaterialListCode(fc,mc:GetCode())
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.costfilter,tp,LOCATION_EXTRA+LOCATION_HAND,0,nil)
if chk==0 then return g:CheckSubGroup(cm.check,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local sg=g:SelectSubGroup(tp,cm.check,false,2,2)
local mc,fc=sg:GetFirst(),sg:GetNext()
if mc:IsLocation(LOCATION_EXTRA) then mc,fc=fc,mc end
Duel.ConfirmCards(1-tp,fc)
Duel.SendtoGrave(mc,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
RD.TargetDraw(tp,3)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if RD.Draw()~=0 then
RD.SelectAndDoAction(HINTMSG_TOGRAVE,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil,function(g)
Duel.BreakEffect()
Duel.SendtoGrave(g,REASON_EFFECT)
end)
end
if Duel.GetFlagEffect(tp,m)~=0 then return end
RD.CreateCannotActivateEffect(e,aux.Stringid(m,2),cm.aclimit,tp,1,0,RESET_PHASE+PHASE_END)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end
function cm.aclimit(e,re,tp)
local tc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and not tc:IsRace(RACE_WARRIOR)
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