Commit 7f1a0075 authored by POLYMER's avatar POLYMER

fix

parent be96358d
No preview for this file type
......@@ -3,8 +3,10 @@ function c19012.initial_effect(c)
c:EnableReviveLimit()
--Draw
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c19012.target)
......
......@@ -2,20 +2,6 @@
--This is a library of mtc's cards.
--You can add QQ1252425371 to feedback bugs.
--The following functions are available.
--MTC.LHini(c,tp)
--MTC.LHnum(tp)
--MTC.LHSpS(c,num)
--MTC.filterEffectSetCode(c,tablename)
--MTC.CheckEffectSetCode(tablename,ccode,excode,...)
--MTC.GetGroupEffectSetcode(tp,tablename,fil,loc1,loc2,ex,...)
--MTC.ApplyEffectSetCode(e,tp,c,tablename,...)
--MTC.ActivateEffect(e,tp,oe)
--MTC.CycleApplyOp(g,op,...)
--You can view detailed usages below or in mtc's card.
--A few annotations in Chinese are noted below.
......@@ -27,9 +13,10 @@ MTC.loaded_metatable_list={}
-------------------------------------------------------------------------------------------------------------------------------------
--系列「传说天」相关函数
--「传说天」次数检定初始化函数
function MTC.LHini(c,tp)
function MTC.LHini(c)
if not LHini==true then
LHini=true
local tp=c:GetOwner()
--spsm
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -92,6 +79,7 @@ function MTC.LHSpS(c,num)
c:RegisterEffect(e1)
end
function MTC.LHcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c==nil then return true end
local tp=c:GetControler()
local num=e:GetLabel()
......@@ -99,6 +87,7 @@ function MTC.LHcon2(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,num,c)
end
function MTC.LHop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local num=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,num,num,c)
......@@ -106,6 +95,11 @@ function MTC.LHop2(e,tp,eg,ep,ev,re,r,rp)
end
-------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------
--「马纳历亚」次数检定初始化函数
--已废弃
-------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------
--!!暂时无法正常使用!!
--塔隆·血魔类效果初始化
--MTC.CheckEffectSetCode(所使用的表名称,所使用的识别名,不予记录的code,...) ...中记录所需记录效果的event
function MTC.CheckEffectSetCode(tablename,ccode,excode,...)
......@@ -152,6 +146,7 @@ function MTC.filterEffectSetCode(c,tablename)
local tablename=_G[tablename]
return tablename[c:GetCode()][1]~=nil
end
--获取区域内有某个event的组(必须先使用MTC.CheckEffectSetCode进行记录)
--MTC.GetGroupEffectSetcode(tp,所使用的表名称,fil,loc1,loc2,除了xxx之外,...)
function MTC.GetGroupEffectSetcode(tp,tablename,fil,loc1,loc2,ex,...) --获取符合条件的卡
......@@ -225,4 +220,58 @@ function MTC.CycleApplyOp(g,op,...)
if op then op(...) end
ac=g:GetNext()
end
end
--快速单张卡处理
--MTC.SEffect(c,id记述/code==0时无id效果,诱发事件,执行事件,区域,筛选,最小数量,最大数量)
--目前执行事件仅支持 加入手卡&送去墓地(加入手卡==1 送去墓地==2)
function MTC.SEffect(c,code,event,doing,loc,fil,minnum,maxnum)
local e1=Effect.CreateEffect(c)
if doing==1 then
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
else if doing==2 then
e1:SetCategory(CATEGORY_TOGRAVE)
end
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(event)
if code~=0 then
e1:SetCountLimit(1,code)
end
if doing==1 then
e1:SetTarget(MTC.sitg1)
e1:SetOperation(MTC.sitg1)
elseif doing==2 then
e1:SetTarget(MTC.sitg2)
e1:SetOperation(MTC.sitg2)
end
e1:SetLabel(loc,fil,minnum,maxnum)
c:RegisterEffect(e1)
end
function MTC.sitg1(e,tp,eg,ep,ev,re,r,rp,chk)
local loc,fil,minnum,maxnum=e:GetLabel()
if chk==0 then return Duel.IsExistingMatchingCard(fil,tp,loc,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,loc)
end
function MTC.sitg1(e,tp,eg,ep,ev,re,r,rp)
local loc,fil,minnum,maxnum=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,fil,tp,loc,0,minnum,maxnum,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function MTC.sitg2(e,tp,eg,ep,ev,re,r,rp,chk)
local loc,fil,minnum,maxnum=e:GetLabel()
if chk==0 then return Duel.IsExistingMatchingCard(fil,tp,loc,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,loc)
end
function MTC.sitg2(e,tp,eg,ep,ev,re,r,rp)
local loc,fil,minnum,maxnum=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,fil,tp,loc,0,minnum,maxnum,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -2,7 +2,7 @@
Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
MTC.LHini(c,tp)
MTC.LHini(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......
......@@ -2,7 +2,7 @@
Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
MTC.LHini(c,tp)
MTC.LHini(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
......@@ -2,7 +2,7 @@
Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
MTC.LHini(c,tp)
MTC.LHini(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
......
......@@ -2,6 +2,7 @@
Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
MTC.LHini(c)
MTC.LHSpS(c,2)
--search
local e3=Effect.CreateEffect(c)
......
......@@ -2,6 +2,7 @@
Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
MTC.LHini(c)
MTC.LHSpS(c,2)
--search
local e3=Effect.CreateEffect(c)
......@@ -19,13 +20,13 @@ function cm.thfil(c)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_ONFIELD)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,nil):RandomSelect(tp,1)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil):RandomSelect(tp,1)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -2,6 +2,7 @@
Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
MTC.LHini(c)
MTC.LHSpS(c,2)
--search
local e3=Effect.CreateEffect(c)
......
......@@ -2,6 +2,7 @@
Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
MTC.LHini(c)
MTC.LHSpS(c,3)
--to hand
local e1=Effect.CreateEffect(c)
......
......@@ -2,6 +2,7 @@
Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
MTC.LHini(c)
MTC.LHSpS(c,3)
--to hand
local e1=Effect.CreateEffect(c)
......
......@@ -2,6 +2,7 @@
Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
MTC.LHini(c)
MTC.LHSpS(c,3)
--battle indes
local e1=Effect.CreateEffect(c)
......
--归终遗忘之海
--Duel.LoadScript("c60010000.lua")
local cm,m,o=GetID()
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SUMMON+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_FZONE)
e3:SetCost(cm.spcost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
--to hand(self)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.thcon2)
e3:SetTarget(cm.thtg2)
e3:SetOperation(cm.thop2)
c:RegisterEffect(e3)
end
function cm.dfil(c)
return c:IsSetCard(0x631) and c:IsType(TYPE_MONSTER)
end
function cm.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsRace(RACE_FAIRY)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.dfil,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,cm.dfil,1,1,REASON_COST+REASON_DISCARD)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
function cm.thcon2(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
return ec:IsControler(tp) and ec:IsRace(RACE_FAIRY)
end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cm.thop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
\ No newline at end of file
--
Duel.LoadScript("c60010000.lua")
if not cm.t then
cm.t=true
local cm._summon=Duel.Summon
Duel.Summon=function(tp,ca,num,numm,...)
if Duel.GetFlagEffect(ca:GetOwner(),m)==0 ca:IsSetCard(0x631) and ca:IsLevelBelow(4) and Duel.IsExistingMatchingCard(Card.IsCode,ca:GetOwner(),LOCATION_EXTRA,0,1,nil,m) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local g=Duel.SelectMatchingCard(ca:GetOwner(),Card.IsCode,ca:GetOwner(),LOCATION_EXTRA,0,1,1,nil,m)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.RegisterFlagEffect(ca:GetOwner(),m,RESET_PHASE+PHASE_END,0,1)
else
cm._summon(tp,ca,num,numm,...)
end
end
end
local cm,m,o=GetID()
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,2,true)
end
function cm.ffilter(c)
return c:IsSetCard(0x631)
end
\ No newline at end of file
--了不起的杰弗里斯
local cm,m,o=GetID()
function cm.initial_effect(c)
end
--手坑
a1=14558127--灰流丽
a2=23434538--增殖的G
a3=10045474--无限泡影
a4=97268402--效果遮蒙者
a5=59438930--幽鬼兔
a6=73642296--屋敷童
a7=27204311--原始生命态 尼比鲁
--红坑
b1=61740673--王宫的敕命
b2=82732705--技能抽取
b3=41420027--神之宣告
b4=30241314--大宇宙
b5=24207889--千查万别
--先手
d1=24224830--墓穴的指名者
d2=65681983--抹杀之指名者
--后手对策
f1=12580477--雷击
f2=54693926--冥王结界波
f3=55063751--海龟坏兽 加美西耶勒
f4=14532163--闪电风暴
f5=4031928--心变
f6=18144506--鹰身女妖的羽毛扫
--我咋知道你要啥
h1=32909498--俱舍怒威族·芬里尔狼
h2=68304193--俱舍怒威族·独角兽
h3=15397015--冲浪检察官
--我要展开了
i1=50588353--水晶机巧-继承玻纤
i2=61665245--召唤女巫
i3=34945480--外神 阿撒托斯
i4=85243784--连接十字(暂不可用)
i5=84815190--鲜花女男爵(暂不可用)
--风中残烛
j1=55144522--强欲之壶
j2=67169062--贪欲之壶
--胜利的方程式
k1=19523799--昼夜的大火灾
--杂七杂八
z1=36584821--红莲魔兽 塔·伊沙
z2=3679218--梦幻崩影·人鱼
function cm.PerfectCards(e)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
local rtab={}
if Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0xb6) then
for i=1,30 do
table.insert(rtab,i3)
end
end
if Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_MZONE,0,1,nil,TYPE_TUNER) then
for i=1,3 do
table.insert(rtab,i1)
end
end
local kg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,0,nil,TYPE_MONSTER)
if kg:GetCount()~=kg:GetClassCount(Card.GetRace) then
for i=1,3 do
table.insert(rtab,i2)
end
end
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 then
for i=1,5 do
table.insert(rtab,j1)
end
if Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,5,nil,TYPE_MONSTER) then
for i=1,5 do
table.insert(rtab,j2)
end
end
end
if Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)==0 then
table.insert(rtab,b1)
table.insert(rtab,b2)
table.insert(rtab,b3)
table.insert(rtab,b4)
table.insert(rtab,b5)
for i=1,2 do
table.insert(rtab,h1)
table.insert(rtab,h2)
table.insert(rtab,h3)
end
if Duel.GetTurnCount(tp)==1 then
for i=1,8 do
table.insert(rtab,d1)
table.insert(rtab,d2)
end
end
end
if Duel.GetLP(1-tp)<=800 then
for i=1,30 do
table.insert(rtab,k1)
end
end
if Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x112) and Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK,0,1,nil,0x112) then
for i=1,3 do
table.insert(rtab,z2)
end
end
if Duel.GetFieldGroupCount(tp,LOCATION_REMOVED,0)*400>=Duel.GetLP(1-tp) then
for i=1,10 do
table.insert(rtab,z1)
end
end
if Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_ONFIELD,nil)>=3 then
fi=1
if Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_ONFIELD,nil)>=5 then
fi=3
elseif Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_ONFIELD,nil)>=8 then
fi=8
end
if Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_MZONE,nil)>=Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_SZONE,nil) then
for i=1,fi do
table.insert(rtab,f1)
table.insert(rtab,f2)
table.insert(rtab,f3)
table.insert(rtab,f4)
table.insert(rtab,f5)
end
else
for i=1,fi do
table.insert(rtab,f4)
table.insert(rtab,f4)
table.insert(rtab,f6)
table.insert(rtab,f6)
table.insert(rtab,f6)
table.insert(rtab,f6)
end
end
else
table.insert(rtab,a1)
table.insert(rtab,a2)
table.insert(rtab,a3)
table.insert(rtab,a4)
table.insert(rtab,a5)
table.insert(rtab,a6)
table.insert(rtab,a7)
end
end
\ No newline at end of file
......@@ -56,7 +56,7 @@ function c72412570.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6727)
end
function c72412570.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c72412490.cfilter,tp,LOCATION_MZONE,0,2,nil)
return Duel.IsExistingMatchingCard(c72412570.cfilter,tp,LOCATION_MZONE,0,2,nil)
end
function c72412570.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end
......
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