Commit 9219d844 authored by Tachibana's avatar Tachibana

rar

parent 56671d0e
Pipeline #3505 passed with stages
in 32 minutes and 54 seconds
No preview for this file type
......@@ -4,14 +4,6 @@
#1
00113217 1 --小红花
00114015 0 --后巴别塔·苏苏洛
00114501 0 --里械仪者·地仪斧
00114502 0 --里械仪者·天仪剑
00114503 0 --里械仪者·到来
00114504 0 --里械仪者·风仪弓
00114505 0 --里械仪者·炎斩
00114506 0 --里械仪者·天仪龙
00114507 0 --里械仪者·血仪者
00114508 0 --里械仪者·加速
00119002 0 --MS-06S 夏亚专用-扎古II
00119006 1 --海帕杰顿-完全体
#7
......@@ -378,19 +370,6 @@
16102011 1 --SCP-2000 机械降神
16104400 0 --与天界的链接
16104410 0 --天界的瓦尔基里
16104600 0 --异种 达摩不倒翁
16104602 0 --异种 白
16104604 0 --异种 罔魂
16104606 0 --异种 蝶
16104608 0 --异种 刽子手
16104610 0 --异种 番兵
16104612 0 --异种 吞食者
16104614 0 --异种 涂壁
16104616 0 --异种 八姐妹
16104618 0 --异种 泰坦
16104620 0 --异种 绝海的巨蛟
16104622 0 --异国的招待
16104624 0 --异种 兔子
16105016 1 --对Mystic的探究
16105036 0 --记录的神因子
16105110 1 --神秘学召唤
......@@ -1276,7 +1255,6 @@
#810
81000006 1 --甜花无敌
81007017 2 --白雪安娜·初恋
81008016 1 --不被吓个半死是不可能的
81010021 2 --高空坠落
81011003 1 --大轮之华·桑山千雪
81011004 0 --花色幸福论·大崎甘奈
......@@ -1301,16 +1279,6 @@
81058004 0 --原田秋叶·夏祭
81060008 1 --薇薇安·伊文捷琳 θ
#822
82204215 0 --堕世魔镜-始源
82204216 0 --堕世魔镜-极欲
82204217 0 --堕世魔镜-消亡
82204218 0 --堕世魔镜-焚尽
82204219 0 --堕世魔镜-寂灭
82204220 0 --堕世魔镜-虚无
82204221 0 --堕世魔镜-尘寂
82204222 0 --堕世魔镜-咒怨
82204223 0 --堕世魔镜-灾厄
82204224 0 --堕世魔镜领域-异度镜界
82204231 1 --孤独的时之行者
82204262 1 --灵魂锁链
82204263 0 --充能棒
......
--里械仪者·地仪斧
local m = 114501
local cm = _G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--position
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.postg)
e1:SetOperation(cm.posop)
c:RegisterEffect(e1)
--des
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetCountLimit(1,m+100)
e1:SetCost(cm.descost)
e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop)
c:RegisterEffect(e1)
end
function cm.pfilter(c)
return c:IsPosition(POS_FACEDOWN_DEFENSE) and c:IsCanChangePosition()
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_FLIP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function cm.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0xca1) and c:IsAbleToHand()
end
function cm.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1 = Duel.GetLocationCount(tp,LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
local b2 = Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.pfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.pfilter,tp,LOCATION_MZONE,0,1,nil) and (b1 or b2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,cm.pfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.posop(e,tp)
local tc = Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsPosition(POS_FACEDOWN_DEFENSE) and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) > 0 then
local b1 = Duel.GetLocationCount(tp,LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp)
local b2 = Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
if not b1 and not b2 then return end
Duel.BreakEffect()
local op = 2
if b1 and b2 then
op = Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3)) + 1
elseif b1 then op = 1
end
if op == 1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg = Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,sg)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg = Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
end
function cm.descost(e)
e:SetLabel(100)
return true
end
function cm.desfilter(c,rc)
return not rc:GetEquipGroup():IsContains(c)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
if chk == 0 then
if e:GetLabel() ~= 100 then
return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
else
e:SetLabel(0)
return c:IsReleasable() and Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c)
end
end
if e:GetLabel() == 100 then
Duel.Release(c,REASON_COST)
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,PLAYER_ALL,LOCATION_ONFIELD)
end
function cm.desop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg = Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil)
if #dg > 0 then
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
\ No newline at end of file
--里械仪者·天仪剑
local m = 114502
local cm = _G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--pos
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.poscon)
e1:SetCost(cm.poscost)
e1:SetTarget(cm.postg)
e1:SetOperation(cm.posop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.cfilter(c,tp)
return c:GetSummonLocation() & LOCATION_EXTRA ~= 0 and c:GetSummonPlayer() ~= tp
end
function cm.poscon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
return true
end
function cm.resfilter(g,rc,tp)
if g:IsContains(rc) and not rc:IsReleasable() then return false end
if not Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,g) then return false end
if rc:IsLocation(LOCATION_HAND) then return g:IsContains(rc) and #g == 2
else
return (#g == 1 and not g:IsContains(rc)) or (#g == 2 and g:IsContains(rc))
end
end
function cm.postg(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
local rg = Duel.GetReleaseGroup(tp,true):Filter(Card.IsType,nil,TYPE_FLIP)
rg:AddCard(c)
if chk == 0 then
if e:GetLabel() ~= 100 then
return Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
else
e:SetLabel(0)
return rg:CheckSubGroup(cm.resfilter,1,2,c,tp)
end
end
if e:GetLabel() == 100 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg2 = rg:SelectSubGroup(tp,cm.resfilter,false,1,2,c,tp)
Duel.Release(rg2,REASON_COST)
end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,PLAYER_ALL,LOCATION_MZONE)
end
function cm.posop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g = Duel.SelectMatchingCard(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if #g > 0 then
Duel.HintSelection(g)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
function cm.thfilter(c)
return c:IsType(TYPE_FLIP) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g = Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if #g > 0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--里械仪者·到来
local m = 114503
local cm = _G["c"..m]
function cm.initial_effect(c)
local e1=aux.AddRitualProcGreater2(c,aux.FilterBoolFunction(Card.IsSetCard,0xca1),LOCATION_HAND+LOCATION_DECK,nil,aux.FilterBoolFunction(Card.IsType,TYPE_FLIP))
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
end
--里械仪者·风仪弓
local m = 114504
local cm = _G["c"..m]
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_POSITION+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,m+100)
e2:SetTarget(cm.thtg)
e2:SetOperation(cm.thop)
c:RegisterEffect(e2)
end
function cm.pfilter(c)
return c:IsPosition(POS_FACEDOWN_DEFENSE) and c:IsCanChangePosition()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c = e:GetHandler()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.pfilter(chkc) end
if chk == 0 then return Duel.IsExistingTarget(cm.pfilter,tp,LOCATION_MZONE,0,1,nil) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)) and Duel.GetLocationCount(tp,LOCATION_MZONE) > 0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g = Duel.SelectTarget(tp,cm.pfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp)
local tc = Duel.GetFirstTarget()
local c = e:GetHandler()
if tc:IsRelateToEffect(e) and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE) > 0 and c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE) > 0 then
local spos=0
if c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
Duel.SpecialSummon(c,0,tp,tp,false,false,spos)
if c:IsFacedown() then
Duel.ConfirmCards(1-tp,c)
end
end
end
function cm.thfilter(c)
return c:IsSetCard(0xca1) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g = Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g > 0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--里械仪者·炎斩
if not pcall(function() require("expansions/script/c114500") end) then require("script/c114500") end
local m,cm = rscf.DefineCard(114505)
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1 = rsef.I(c,"sp",{1,m},"sp",nil,LOCATION_HAND,nil,rscost.cost(cm.cfilter,"cf",LOCATION_HAND,0,2,2,c),rsop.target(cm.spfilter,"sp"),cm.spop)
local e2 = rsef.QO(c,nil,"eq",{1,m+100},"pos,eq",nil,LOCATION_MZONE,nil,nil,rsop.target({Card.IsCanTurnSet,"pos"},{cm.eqfilter,"eq",LOCATION_ONFIELD,LOCATION_ONFIELD }),cm.eqop)
local e3 = rsef.QO(c,EVENT_CHAINING,"pos",{1,m+200},"atk","sa",LOCATION_MZONE,nil,rscost.cost(cm.tfilter,{"pos",cm.fun}),nil,cm.atkop)
end
function cm.tfilter(c)
return c:IsFacedown() and c:IsCanChangePosition()
end
function cm.fun(g,e,tp)
local pos = Duel.SelectPosition(tp,g:GetFirst(),POS_FACEUP)
Duel.ChangePosition(g,pos)
end
function cm.atkop(e,tp)
local c = rscf.GetFaceUpSelf(e)
if not c then return end
local e1 = rscf.QuickBuff(c,"atk+",1000)
end
function cm.cfilter(c)
return c:IsType(TYPE_FLIP) and not c:IsPublic()
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.spop(e,tp)
local c = rscf.GetSelf(e)
if c and Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) > 0 then
c:SetMaterial(Group.FromCards())
c:CompleteProcedure()
end
end
function cm.eqfilter2(c,ec)
return c:IsFaceup() and not c:GetEquipGroup():IsContains(ec)
end
function cm.eqfilter(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(cm.eqfilter2,tp,LOCATION_MZONE,0,1,Group.FromCards(c,e:GetHandler()),c)
end
function cm.eqop(e,tp)
local c = rscf.GetFaceUpSelf(e)
if not c or Duel.ChangePosition(c,POS_FACEDOWN_DEFENSE) <= 0 then return end
local ec = rsop.SelectSolve(HINTMSG_EQUIP,tp,cm.eqfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,{},e,tp):GetFirst()
if not ec then return end
local tc = rsop.SelectSolve(HINTMSG_SELF,tp,cm.eqfilter2,tp,LOCATION_MZONE,0,1,1,ec,{},ec):GetFirst()
if rsop.Equip(e,ec,tc) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e1)
end
end
\ No newline at end of file
--里械仪者·天仪龙
if not pcall(function() require("expansions/script/c114500") end) then require("script/c114500") end
local m,cm = rscf.DefineCard(114506)
function cm.initial_effect(c)
local e1 = rsef.I(c,"th",{1,m},"se,th",nil,LOCATION_HAND,nil,rscost.cost(Card.IsAbleToGraveAsCost,"tg"),rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e2 = rsef.I(c,"sp",{1,m},"sp",nil,LOCATION_HAND,nil,rscost.cost(cm.cfilter,"cf",LOCATION_HAND),cm.rittg,cm.ritop)
local e3 = rsef.STO_FLIP(c,"th",{1,m+100},"se,th","de",nil,nil,rsop.target({cm.thfilter,"th",LOCATION_DECK},{cm.thfilter2,"th",LOCATION_GRAVE}),cm.thop2)
end
function cm.thfilter(c)
return c:IsComplexType(TYPE_RITUAL+TYPE_MONSTER) and c:IsAbleToHand() and c:IsSetCard(0xca1)
end
function cm.thop(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.cfilter(c)
return not c:IsPublic() and c:IsComplexType(TYPE_RITUAL+TYPE_MONSTER)
end
function cm.rcheck(gc)
return function(tp,g,c)
return g:IsContains(gc)
end
end
function cm.ritfilter(c)
return c:IsSetCard(0xca1)
end
function cm.rittg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local mg=Duel.GetRitualMaterial(tp)
aux.RCheckAdditional=cm.rcheck(c)
local res=mg:IsContains(c) and Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,cm.ritfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
aux.RCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.ritop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetRitualMaterial(tp)
if c:GetControler()~=tp or not c:IsRelateToEffect(e) or not mg:IsContains(c) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
aux.RCheckAdditional=cm.rcheck(c)
local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,cm.ritfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
local tc=tg:GetFirst()
if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
if tc.mat_filter then
mg=mg:Filter(tc.mat_filter,tc,tp)
else
mg:RemoveCard(tc)
end
if not mg:IsContains(c) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
Duel.SetSelectedCard(c)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then
aux.RCheckAdditional=nil
return
end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
aux.RCheckAdditional=nil
end
function cm.thfilter2(c)
return c:IsComplexType(TYPE_RITUAL+TYPE_SPELL) and c:IsAbleToHand()
end
function cm.thop2(e,tp)
local ct,og,tc = rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
if tc and tc:IsLocation(LOCATION_HAND) then
rsop.SelectOC(nil,true)
rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE,0,1,1,nil,{})
end
end
\ No newline at end of file
--里械仪者·血仪者
if not pcall(function() require("expansions/script/c114500") end) then require("script/c114500") end
local m,cm = rscf.DefineCard(114507)
function cm.initial_effect(c)
local e1 = rsef.QO(c,EVENT_CHAINING,"dis",{1,m},"dis,des,pos,sp","dcal",LOCATION_HAND,rscon.discon(cm.disfilter,true),nil,cm.distg,cm.disop)
local e2 = rsef.STO_FLIP(c,"sp",{1,m+100},"sp","de",nil,nil,rsop.target(rscf.spfilter2(Card.IsType,TYPE_RITUAL),"sp",LOCATION_GRAVE),cm.spop)
end
function cm.disfilter(e,tp,re,rp)
local ev = Duel.GetCurrentChain()
if ev < 2 then return false end
local re2,rp2 = Duel.GetChainInfo(ev-1 , CHAININFO_TRIGGERING_EFFECT, CHAININFO_TRIGGERING_CONTROLER)
return ev >= 2 and rp2 == tp and re2:IsActiveType(TYPE_FLIP)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
if chk==0 then return (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(Card.IsCanTurnSet,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,tp,LOCATION_MZONE)
end
function cm.disop(e,tp,eg,ep,ev,re)
local c = rscf.GetSelf(e)
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 then
local tc = rsop.SelectSolve(HINTMSG_POSCHANGE,tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,0,1,1,nil,{}):GetFirst()
if tc and Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE) > 0 and c and Duel.GetLocationCount(tp,LOCATION_MZONE) > 0 then
local spos=0
if c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
Duel.SpecialSummon(c,0,tp,tp,false,false,spos)
if c:IsFacedown() then
Duel.ConfirmCards(1-tp,c)
end
end
end
end
function cm.spop(e,tp)
rsop.SelectSpecialSummon(tp,aux.NecroValleyFilter(rscf.spfilter2(Card.IsType,TYPE_RITUAL)),tp,LOCATION_GRAVE,0,1,1,nil,{})
end
\ No newline at end of file
--里械仪者·加速
if not pcall(function() require("expansions/script/c114500") end) then require("script/c114500") end
local m,cm = rscf.DefineCard(114508)
function cm.initial_effect(c)
local e2 = rsef.I(c,"pos",{1,nil,3},"pos",nil,LOCATION_SZONE,nil,nil,rsop.target(cm.posfilter,"pos",LOCATION_MZONE),cm.posop)
local e3 = rsef.I(c,"sp",{1,nil,3},"sp",nil,LOCATION_SZONE,nil,nil,rsop.target(cm.spfilter,"sp",LOCATION_GRAVE),cm.spop)
local e4 = rsef.FV_UPDATE(c,"atk",cm.val,aux.TargetBoolFunction(Card.IsType,TYPE_FLIP),{LOCATION_MZONE,0})
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xca1) and c:IsAbleToHand()
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and rsop.SelectYesNo(tp,"th") then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function cm.posfilter(c)
return c:IsFacedown() and c:IsCanChangePosition() and c:IsSetCard(0xca1)
end
function cm.posop(e,tp)
local tc = rsop.SelectSolve(HINTMSG_POSCHANGE,tp,cm.posfilter,tp,LOCATION_MZONE,0,1,1,nil,{}):GetFirst()
if tc then
local pos = Duel.SelectPosition(tp,tc,POS_FACEUP)
Duel.ChangePosition(tc,pos)
end
end
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_FLIP) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.spop(e,tp)
local ct,og = rsop.SelectSpecialSummon(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,{0,tp,tp,false,false,POS_FACEDOWN_DEFENSE },e,tp)
if #og > 0 then
Duel.ConfirmCards(1-tp,og)
end
end
function cm.val(e,c)
return Duel.GetMatchingGroupCount(rscf.fufilter(Card.IsType,TYPE_FLIP),0,rsloc.mg,rsloc.mg,nil)*300
end
\ No newline at end of file
This diff is collapsed.
--异种 白
local m=16104602
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c16104600") end,function() require("script/c16104600") end)
function cm.initial_effect(c)
local e1=gs.turnup(c,m,1,0,cm.turnrptg,cm.turnupop,CATEGORY_POSITION+CATEGORY_DRAW)
local e2=gs.hdspm1(c,m,1)
local e3=gs.flip(c,m,cm.filptg,cm.flipop,nil,CATEGORY_DESTROY+CATEGORY_DRAW,EFFECT_FLAG_DAMAGE_STEP)
end
function cm.filter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.turnrptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
Duel.HintSelection(tc)
if tc:GetFirst():IsImmuneToEffect(e) then return end
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
end
function cm.filptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.flipop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
end
end
\ No newline at end of file
--异种 罔魂
local m=16104604
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c16104600") end,function() require("script/c16104600") end)
function cm.initial_effect(c)
local e1=gs.turnup(c,m,1,2,cm.turnrptg,cm.turnupop,CATEGORY_POSITION+CATEGORY_CONTROL)
local e2=gs.hdspm1(c,m,1)
local e3=gs.flip(c,m,cm.filptg,cm.flipop,nil,CATEGORY_DESTROY+CATEGORY_CONTROL,EFFECT_FLAG_DAMAGE_STEP)
end
function cm.filter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.turnrptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
local tab={1,2,4,8,16,32,64,128,256,512}
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local tc=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(tc)
local ph=Duel.GetCurrentPhase()
local phnum=gs.idget(ph,tab)
local num=0
if Duel.GetLocationCount(tp,LOCATION_MZONE,0)<=0 then return end
if phnum>1 and phnum<7 then
num=Duel.GetControl(tc,tp,PHASE_MAIN2,1)
else
num=Duel.GetControl(tc,tp,PHASE_MAIN1,1)
end
if num>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local tc=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
Duel.HintSelection(tc)
tc=tc:GetFirst()
if tc:IsImmuneToEffect(e) then return end
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
end
function cm.filptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.flipop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local tc=Duel.SelectMatchingCard(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(tc)
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
end
\ No newline at end of file
--异种 蝶
local m=16104606
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c16104600") end,function() require("script/c16104600") end)
function cm.initial_effect(c)
local e1=gs.turnup(c,m,1,3,cm.turnuptg,cm.turnupop,CATEGORY_SEARCH+CATEGORY_TOHAND)
local e2=gs.hdspm2(c,m)
local e3=gs.flip(c,m,cm.filptg,cm.flipop,nil,CATEGORY_REMOVE,EFFECT_FLAG_DAMAGE_STEP)
end
function cm.filter(c)
return c:IsAbleToHand() and c:IsSetCard(0xcca)
end
function cm.turnuptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.filptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.flipop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
local ttc=Duel.GetOperatedGroup():GetFirst()
gs.Cntact(ttc)
if Duel.GetMatchingGroupCount(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)<=0 then return end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PUBLIC)
e2:SetReset(RESET_PHASE+PHASE_END,2)
e2:SetTargetRange(0,LOCATION_HAND)
Duel.RegisterEffect(e2,tp)
end
end
end
\ No newline at end of file
--异种 刽子手
local m=16104608
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c16104600") end,function() require("script/c16104600") end)
function cm.initial_effect(c)
local e1=gs.turnup(c,m,1,3,cm.turnuptg,cm.turnupop,CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SUMMON)
local e2=gs.hdspm2(c,m)
local e3=gs.flip(c,m,cm.filptg,cm.flipop,nil,CATEGORY_TOGRAVE+CATEGORY_TODECK,EFFECT_FLAG_DAMAGE_STEP)
end
function cm.filter(c)
return c:IsAbleToHand() and c:IsSetCard(0xcca)
end
function cm.sumfilter(c)
return (c:IsSummonable(true,nil) or c:IsMSetable(true,nil)) and c:IsSetCard(0xcca)
end
function cm.turnuptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoHand(g,nil,REASON_EFFECT)~0 then
Duel.ConfirmCards(1-tp,g)
if Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
local tc=g:GetFirst()
local b1=tc:IsSummonable(true,nil)
local b2=tc:IsMSetable(true,nil)
local op=2
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,3),aux.Stringid(m,4))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(m,3))
else
op=Duel.SelectOption(tp,aux.Stringid(m,4))+1
end
if op==0 and tc:IsSummonable(true,nil) then
Duel.Summon(tp,tc,true,nil)
end
if op==1 and tc:IsSummonable(true,nil) then
Duel.MSet(tp,tc,true,nil)
end
end
end
end
end
end
function cm.filptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
end
function cm.flipop(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local op=2
local b2=Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,6),aux.Stringid(m,7))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(m,6))
else
op=Duel.SelectOption(tp,aux.Stringid(m,7))+1
end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
local ttc=Duel.GetOperatedGroup():GetFirst()
gs.Cntact(ttc)
local dg=Duel.GetFieldGroup(tp,LOCATION_DECK,LOCATION_DECK)
if Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,8)) then
Duel.ConfirmCards(tp,dg)
end
end
end
else
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(1-tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.SendtoDeck(g,nil,2,REASON_RULE)~=0 then
local dg=Duel.GetFieldGroup(tp,LOCATION_DECK,LOCATION_DECK)
if Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,8)) then
Duel.ConfirmCards(tp,dg)
end
end
end
end
end
\ No newline at end of file
--异种 番兵
local m=16104610
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c16104600") end,function() require("script/c16104600") end)
function cm.initial_effect(c)
local e0=gs.nsp(c)
local e1=gs.turnup(c,m,1,1,cm.turnuptg,cm.turnupop,CATEGORY_SPECIAL_SUMMON)
local e2=gs.hdspm3(c,m)
local e3=gs.flip(c,m,cm.filptg,cm.flipop,nil,CATEGORY_TOGRAVE+CATEGORY_POSITION,EFFECT_FLAG_DAMAGE_STEP)
end
function cm.turnupfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and c:IsType(TYPE_MONSTER)
end
function cm.turnuptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.turnupfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.turnupfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
if sg:GetCount()>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
end
function cm.filptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0)
end
function cm.changefilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.flipop(e,tp)
if not Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) then return end
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #sg>0 then
if Duel.SendtoGrave(sg,REASON_EFFECT)~=0 then
local ttc=Duel.GetOperatedGroup():GetFirst()
gs.Cntact(ttc)
if Duel.IsExistingMatchingCard(cm.changefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
local sc=Duel.SelectMatchingCard(tp,cm.changefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()):GetFirst()
if not sc:IsImmuneToEffect(e) then
local evg=Group.CreateGroup()
if sc:IsType(TYPE_MONSTER) then
Duel.ChangePosition(sc,POS_FACEDOWN_DEFENSE)
else
sc:CancelToGrave()
if Duel.ChangePosition(sc,POS_FACEDOWN)>0 then
evg:AddCard(sc)
end
end
if #evg>0 then
Duel.RaiseEvent(evg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
end
end
end
end
\ No newline at end of file
--异种 吞食者
local m=16104612
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c16104600") end,function() require("script/c16104600") end)
function cm.initial_effect(c)
local e0=gs.nsp(c)
local e1=gs.turnup(c,m,1,0,cm.turnuptg,cm.turnupop,nil)
local e2=gs.hdspm3(c,m)
local e3=gs.flip(c,m,cm.filptg,cm.flipop,nil,CATEGORY_TOGRAVE+CATEGORY_POSITION,EFFECT_FLAG_DAMAGE_STEP)
end
function cm.turnupfilter(c)
return c:IsSSetable(false) and not c:IsType(TYPE_MONSTER)
end
function cm.ssfilter(c)
return c:IsFaceup() and c:IsSSetable(false) and not c:IsType(TYPE_MONSTER)
end
function cm.turnuptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(cm.ssfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil)
end
end
function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_REMOVED,LOCATION_REMOVED)
Duel.ConfirmCards(tp,g)
local sg=g:Filter(cm.turnupfilter,nil)
if sg:GetCount()<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
sg=sg:Select(tp,1,1,nil)
if sg:GetCount()>0 then
Duel.SSet(tp,sg)
end
end
function cm.filptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.changefilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.flipop(e,tp)
if not Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) then return end
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if #sg>0 then
if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then
local ttc=Duel.GetOperatedGroup():GetFirst()
gs.Cntact(ttc)
if Duel.IsExistingMatchingCard(cm.changefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
local sc=Duel.SelectMatchingCard(tp,cm.changefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()):GetFirst()
if not sc:IsImmuneToEffect(e) then
local evg=Group.CreateGroup()
if sc:IsType(TYPE_MONSTER) then
Duel.ChangePosition(sc,POS_FACEDOWN_DEFENSE)
else
sc:CancelToGrave()
if Duel.ChangePosition(sc,POS_FACEDOWN)>0 then
evg:AddCard(sc)
end
end
if #evg>0 then
Duel.RaiseEvent(evg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
end
end
end
end
\ No newline at end of file
--异种 涂壁
local m=16104614
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c16104600") end,function() require("script/c16104600") end)
function cm.initial_effect(c)
local e0=gs.nsp(c)
local e1=gs.turnup(c,m,1,3,cm.turnuptg,cm.turnupop,CATEGORY_SUMMON)
local e2=gs.hdspm4(c,m)
local e3=gs.flip(c,m,cm.filptg,cm.flipop,nil,CATEGORY_TOHAND+CATEGORY_POSITION,EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
end
function cm.turnupfilter(c)
return c:IsMSetable(true,nil) and c:IsType(TYPE_MONSTER)
end
function cm.setfilter(c)
return c:IsSSetable() and not c:IsType(TYPE_MONSTER)
end
function cm.turnuptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
local sg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.ConfirmCards(tp,sg)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac)
if g:GetCount()>0 then
if g:IsExists(cm.turnupfilter,1,nil) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SUMMON)
local sc=g:Select(1-tp,1,1,nil)
Duel.MSet(tp,sc:GetFirst(),true,nil)
end
if g:IsExists(cm.setfilter,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sc=g:Select(1-tp,1,1,nil)
Duel.SSet(1-tp,sc,tp)
Duel.ConfirmCards(1-tp,sc)
end
end
end
function cm.filptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function cm.changefilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.flipop(e,tp)
if not (Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)) then return end
local sg1=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local sg2=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
sg1:Merge(sg2)
if #sg1>0 then
if Duel.SendtoHand(sg1,nil,REASON_EFFECT)~=0 then
if Duel.IsExistingMatchingCard(cm.changefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
local sc=Duel.SelectMatchingCard(tp,cm.changefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.HintSelection(sc)
local sc=sc:GetFirst()
if not sc:IsImmuneToEffect(e) then
local evg=Group.CreateGroup()
if sc:IsType(TYPE_MONSTER) then
Duel.ChangePosition(sc,POS_FACEDOWN_DEFENSE)
else
sc:CancelToGrave()
if Duel.ChangePosition(sc,POS_FACEDOWN)>0 then
evg:AddCard(sc)
end
end
if #evg>0 then
Duel.RaiseEvent(evg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
return
end
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,6)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
end
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0xcca)
end
\ No newline at end of file
--异种 八姐妹
local m=16104616
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c16104600") end,function() require("script/c16104600") end)
function cm.initial_effect(c)
local e0=gs.nsp(c)
local e1=gs.turnup(c,m,nil,3,cm.turnuptg,cm.turnupop,CATEGORY_SPECIAL_SUMMON)
local e2=gs.hdspm4(c,m)
local e3=gs.flip(c,m,cm.filptg,cm.flipop,nil,CATEGORY_TOHAND+CATEGORY_POSITION,EFFECT_FLAG_DAMAGE_STEP)
end
function cm.turnupfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and c:IsType(TYPE_MONSTER)
end
function cm.setfilter(c)
return c:IsSSetable() and not c:IsType(TYPE_MONSTER)
end
function cm.turnuptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(cm.turnupfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
local op=2
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
local sg=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
Duel.ConfirmCards(tp,sg)
Duel.ShuffleHand(1-tp)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac)
if g:GetCount()>0 then
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,6),aux.Stringid(m,7))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(m,6))
else
op=Duel.SelectOption(tp,aux.Stringid(m,7))+1
end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,cm.turnupfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sc=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SSet(tp,sc)
Duel.ConfirmCards(1-tp,sc)
local tc=Duel.GetOperatedGroup():GetFirst()
if tc:IsType(TYPE_QUICKPLAY) or tc:IsType(TYPE_TRAP) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
end
function cm.filptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
end
function cm.changefilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.flipop(e,tp)
if not (Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)) then return end
local sg1=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local sg0=sg1
local sg2=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
sg1:Merge(sg2)
if #sg1>0 then
if Duel.SendtoHand(sg1,tp,REASON_EFFECT)~=2 or (sg0:GetFirst():IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)) or (sg2:GetFirst():IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)) then
if Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(m,5)) then
local sc=Duel.SelectMatchingCard(1-tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(sc)
Duel.SendtoDeck(sc,nil,2,REASON_RULE)
else
Duel.ChangePosition(e:GetHandler(),POS_FACEDOWN_DEFENSE)
end
end
end
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0xcca)
end
\ No newline at end of file
--异种 泰坦
local m=16104618
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c16104600") end,function() require("script/c16104600") end)
function cm.initial_effect(c)
local e00=Effect.CreateEffect(c)
e00:SetDescription(aux.Stringid(m,15))
e00:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e00:SetType(EFFECT_TYPE_SINGLE)
e00:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e00:SetCondition(cm.ttcon1)
e00:SetOperation(cm.ttop1)
e00:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e00)
local e01=Effect.CreateEffect(c)
e01:SetType(EFFECT_TYPE_SINGLE)
e01:SetCode(EFFECT_LIMIT_SET_PROC)
e01:SetCondition(cm.ttcon1)
e01:SetOperation(cm.ttop1)
e01:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e01)
local e0=gs.nsp(c)
local e1=gs.turnup(c,m,nil,3,cm.turnuptg,cm.turnupop,CATEGORY_SPECIAL_SUMMON)
local e2=gs.hdspm4(c,m)
local e3=gs.flip(c,m,cm.filptg,cm.flipop,nil,CATEGORY_TOHAND+CATEGORY_POSITION,EFFECT_FLAG_DAMAGE_STEP)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,14))
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetTarget(cm.changetg)
e4:SetOperation(cm.changeop)
c:RegisterEffect(e4)
end
function cm.changetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(cm.changefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,cm.changefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,2,0,0)
end
function cm.changeop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
local tc=tg:GetFirst()
while tc do
if tc:IsLocation(LOCATION_MZONE) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
else
Duel.ChangePosition(tc,POS_FACEDOWN_ATTACK)
end
tc=tg:GetNext()
end
end
end
function cm.ttcon1(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
return minc<=3 and Duel.CheckTribute(c,3,3,g,tp)
end
function cm.ttop1(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(Card.IsFacedown,c:GetControler(),LOCATION_MZONE,LOCATION_MZONE,nil)
local mg=Duel.SelectTribute(tp,c,3,3,g,tp)
c:SetMaterial(mg)
Duel.Release(mg,REASON_SUMMON+REASON_MATERIAL)
end
function cm.turnupfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP_ATTACK) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_FLIP)
end
function cm.setfilter(c)
return c:IsSSetable() and c:IsType(TYPE_CONTINUOUS)
end
function cm.turnuptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsChainDisablable(ev) and (Duel.IsExistingMatchingCard(cm.turnupfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA,0,1,nil,e,tp) or Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,1,nil))end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(cm.turnupfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,1,nil)
local op=2
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
local sg=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
Duel.ConfirmCards(tp,sg)
Duel.ShuffleHand(1-tp)
local g=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_DECK,nil,ac)
if g:GetCount()>0 then
if Duel.NegateEffect(ev) then
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,6),aux.Stringid(m,7))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(m,6))
else
op=Duel.SelectOption(tp,aux.Stringid(m,7))+1
end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,cm.turnupfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA,0,1,1,nil,e,tp)
Duel.SpecialSummon(sc,0,tp,tp,true,false,POS_FACEUP_ATTACK)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sc=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SSet(tp,sc)
Duel.ConfirmCards(1-tp,sc)
local tc=Duel.GetOperatedGroup():GetFirst()
if tc:IsType(TYPE_TRAP) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
end
end
end
function cm.filptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,0)
end
function cm.changefilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.flipop(e,tp)
if not Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) then return end
local sg1=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil)
if #sg1>0 then
if Duel.SendtoDeck(sg1,nil,2,REASON_EFFECT)~=0 then
if Duel.IsExistingMatchingCard(cm.changefilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,5)) then
local sc=Duel.SelectMatchingCard(tp,cm.changefilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(sc)
if sc:GetFirst():IsImmuneToEffect(e) then
Duel.SendtoDeck(sc,nil,2,REASON_RULE)
else
local sg=sc:GetFirst()
local evg=Group.CreateGroup()
if sg:IsType(TYPE_MONSTER) then
Duel.ChangePosition(sg,POS_FACEDOWN_DEFENSE)
else
sg:CancelToGrave()
if Duel.ChangePosition(sg,POS_FACEDOWN)>0 then
evg:AddCard(sg)
end
end
if #evg>0 then
Duel.RaiseEvent(evg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
end
end
end
end
\ No newline at end of file
--异种 绝海的巨蛟
local m=16104620
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c16104600") end,function() require("script/c16104600") end)
function cm.initial_effect(c)
local e1=gs.turnup(c,m,1,3,cm.turnrptg,cm.turnupop,CATEGORY_POSITION+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_NEGATE)
local e3=gs.flip(c,m,cm.filptg,cm.flipop,nil,CATEGORY_REMOVE,EFFECT_FLAG_DAMAGE_STEP)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetCategory(CATEGORY_POSITION)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,m)
e4:SetCost(cm.cost)
e4:SetTarget(cm.target)
e4:SetOperation(cm.activate)
c:RegisterEffect(e4)
end
--e1
function cm.thfilter(c)
return c:IsAbleToHand()
end
function cm.turnrptg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsChainNegatable(ev)
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,1,nil)
if chk==0 then return b1 or b2 end
end
function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=Duel.IsChainNegatable(ev)
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,1,nil)
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,4),aux.Stringid(m,5))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,4))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(m,5))+1
else return end
if op==0 then
Duel.NegateActivation(ev)
local typ=re:GetHandler():GetType()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(cm.cod)
e1:SetOperation(cm.disop)
e1:SetLabel(typ)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
else
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(m,6))--to you hand
local nx=Duel.GetMatchingGroupCount(cm.splimit,tp,0,LOCATION_ONFIELD,nil)
if nx<1 then nx=1 end
local thg=Duel.SelectMatchingCard(1-tp,cm.thfilter,1-tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,0,nx,nx,nil)
Duel.SendtoHand(thg,tp,REASON_EFFECT)
end
end
function cm.cod(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsType(e:GetLabel()) and re:GetHandler():GetControler()~=e:GetOwner():GetControler()
end
function cm.splimit(c)
return c:IsPosition(POS_FACEDOWN)
end
function cm.splimit0(c)
return c:IsCanTurnSet() and c:IsPosition(POS_FACEUP)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local tep=re:GetHandlerPlayer()
if not Duel.IsExistingMatchingCard(cm.splimit0,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) then return end
if Duel.SelectYesNo(tp,aux.Stringid(m,7)) then --CATEGORY_POSITION
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,cm.v,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
--e3
function cm.overfilter(c)
return c:IsCanOverlay()
end
function cm.changefilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.filptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.overfilter,tp,0,LOCATION_ONFIELD,1,nil) end
end
function cm.flipop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,cm.overfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 and not g:GetFirst():IsImmuneToEffect(e) then
Duel.Overlay(c,Group.FromCards(g:GetFirst()))
if Duel.IsExistingMatchingCard(cm.changefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,7))--ChangePosition
then
local tcg=Duel.SelectMatchingCard(tp,cm.changefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local sg=tcg:GetFirst()
local evg=Group.CreateGroup()
if sg:IsType(TYPE_MONSTER) then
Duel.ChangePosition(sg,POS_FACEDOWN_DEFENSE)
else
sg:CancelToGrave()
if Duel.ChangePosition(sg,POS_FACEDOWN)>0 then
evg:AddCard(sg)
end
end
if #evg>0 then
Duel.RaiseEvent(evg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
end
end
--e4
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL)
end
function cm.filter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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