Commit 03df2783 authored by Tachibana's avatar Tachibana

eme

parent d7d860a5
#created by ...
#main
1184011
9310019
9310057
9390011
10050001
10050021
10050081
10050091
11451611
11451612
11451613
11451614
11451615
11451616
11451617
11451618
12300713
12301007
12301125
15000929
15000930
16140000
16140001
16140002
16140018
16150033
17030830
17030840
17030850
17030870
17030880
17030890
17030900
17030950
17030970
17030990
17031110
17031120
17031170
17031180
17031190
17060810
17061320
17061321
#extra
9310058
9310059
10050031
10050041
10050051
10050061
12800000
16110037
16140003
16150032
!side
17030860
17030910
17030960
17030980
#created by ...
#main
23000320
23003001
23003002
23003003
23003004
23003005
23003006
23003007
23003008
23003009
23003010
25810001
25810011
25810021
25810031
25810101
25810111
25810121
25810131
25810141
25810151
25810171
25810181
25810201
26801018
28308009
28308010
28308096
28308097
28308098
30005030
30005055
33200112
33200503
33200505
33200511
33200522
33200525
#extra
23003011
23003012
23003013
23003014
23003015
23003016
26807005
26809091
28318013
33200057
33200076
!side
25810041
25810051
25810061
25810071
25810081
25810091
25810191
25810211
25810221
30003045
30005016
30005035
30005060
#created by ...
#main
33701350
33701351
33701354
33701355
33701356
33701358
33701364
33701366
33701380
33701381
33701396
33701409
64837004
75646630
81011115
81012036
81015072
81022014
81023025
81045014
81048004
81058011
81062020
81901005
81901008
#extra
33701346
33701347
33701352
33701353
33701357
33701382
33701418
52520019
64800111
!side
81003037
81007008
81007010
81011131
81012017
81013010
81015073
81023026
81045013
81062021
No preview for this file type
......@@ -1194,7 +1194,6 @@
44000019 0 --骰娘之主 多多
44000101 1 --日冕:苍烟落
44000103 0 --游天知
44001017 1 --血祭魇的虚伪解脱
#465
46564044 0 --半分虚幻的庭师
#475
......
--妮娜与莉昂的学园生活
function c4210108.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4210108,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,4210108)
e1:SetCondition(c4210108.condition)
e1:SetTarget(c4210108.target)
e1:SetOperation(c4210108.operation)
c:RegisterEffect(e1)
--return tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4210108,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c4210108.tg)
e2:SetOperation(c4210108.op)
c:RegisterEffect(e2)
end
function c4210108.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c4210108.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c4210108.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c4210108.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c4210108.operation(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c4210108.cfilter,tp,LOCATION_MZONE,0,1,nil) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x47e0000)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
function c4210108.filter(c,g)
return g:IsContains(c) and c:IsAbleToHand()
end
function c4210108.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local cg=e:GetHandler():GetColumnGroup()
if chkc then return chkc:IsOnField() and c4210108.filter(chkc,cg) end
if chk==0 then return Duel.IsExistingTarget(c4210108.filter,tp,0,LOCATION_ONFIELD,1,nil,cg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c4210108.filter,tp,0,LOCATION_MZONE,1,1,nil,cg)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c4210108.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--沐浴梦幻般温泉的莉昂
function c4210109.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4210109,1))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c4210109.tg)
e1:SetOperation(c4210109.op)
c:RegisterEffect(e1)
--get effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c4210109.regcon)
e2:SetOperation(c4210109.regop)
c:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(4210109,2))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_CUSTOM+4210109)
e3:SetTarget(c4210109.rectg)
e3:SetOperation(c4210109.recop)
c:RegisterEffect(e3)
end
function c4210109.filter(c)
return c:IsSetCard(0xa2c)
end
function c4210109.tg(e,tp,eg,ep,ev,re,r,rp,chk)
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)
end
function c4210109.op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
Duel.ShuffleHand(p)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(p,Card.IsSetCard,p,LOCATION_HAND,0,1,1,nil,0xa2c)
local tg=g:GetFirst()
if tg then
if Duel.SendtoGrave(tg,REASON_EFFECT)==0 then
Duel.ConfirmCards(1-p,tg)
Duel.ShuffleHand(p)
end
else
Duel.Damage(tp,1000,REASON_EFFECT)
end
end
function c4210109.regcon(e,tp,eg,ep,ev,re,r,rp)
local d1=false
local d2=false
local tc=eg:GetFirst()
while tc do
if tc:IsReason(REASON_COST) and tc:IsPreviousLocation(LOCATION_OVERLAY) then
if tc:GetControler()==0 then d1=true
else d2=true end
end
tc=eg:GetNext()
end
local evt_p=PLAYER_NONE
if d1 and d2 then evt_p=PLAYER_ALL
elseif d1 then evt_p=0
elseif d2 then evt_p=1 end
e:SetLabel(evt_p)
return evt_p~=PLAYER_NONE and e:GetHandler():IsType(TYPE_XYZ)
end
function c4210109.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+4210109,e,0,tp,e:GetLabel(),0)
end
function c4210109.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(300)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,300)
end
function c4210109.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
--血祭魇的军团
if not pcall(function() require("expansions/script/c44000000") end) then require("script/c44000000") end
local m,cm=rscf.DefineCard(44001001,"XueJiMo")
if rsxjm then return end
rsxjm = cm
rscf.DefineSet(rsxjm,"XueJiMo")
function rsxjm.mctcon(e)
return Duel.GetFieldGroupCount(0,LOCATION_MZONE,LOCATION_MZONE) >= 4
end
function rsxjm.GetRct(islist, iscard)
local rct = Duel.GetCurrentPhase() <= PHASE_BATTLE and 2 or 1
if not islist then
return rct
else
return { (iscard and rsrst.std or 0 ) + rsrst.bp , rct }
end
end
-----------------------------------
function cm.initial_effect(c)
rscf.AddTokenList(c,44001020)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,cm.mfilter,cm.xyzcheck,2,2,cm.ovfilter,aux.Stringid(m,0),cm.xyzop)
--disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY+CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_SPSUMMON)
e1:SetCountLimit(1)
e1:SetCost(rscost.rmxmat(1))
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetCondition(cm.pcon)
c:RegisterEffect(e2)
--extra attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCondition(cm.atcon)
e3:SetCost(rscost.rmxmat(1))
e3:SetOperation(cm.atop)
c:RegisterEffect(e3)
end
function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function cm.pcon(e)
return e:GetHandler():GetOverlayCount() > 0
end
function cm.atcon(e,tp,eg,ep,ev,re,r,rp)
local bc = Duel.GetAttackTarget()
return Duel.GetAttacker()==e:GetHandler() and aux.bdcon(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():IsChainAttackable(0) and bc and bc:IsPreviousControler(1-tp) and bc:IsAttackAbove(1)
end
function cm.atop(e,tp,eg,ep,ev,re,r,rp)
local bc = Duel.GetAttackTarget()
local atk = bc:GetAttack()/2
local e1 = rscf.QuickBuff(e:GetHandler(),"atk+",atk,"rst",rsrst.std_dis + rsrst.bp)
Duel.ChainAttack()
end
function cm.mfilter(c,xyzc)
return rsxjm.IsSetM(c)
end
function cm.xyzcheck(g)
return g:GetClassCount(Card.GetLevel)==1
end
function cm.ovfilter(c)
return c:IsFaceup() and rsxjm.IsSetM(c) and c:IsType(TYPE_SYNCHRO+TYPE_XYZ)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return rstg.token(44001020,1,POS_FACEUP_DEFENSE,1)(e,tp,eg,ep,ev,re,r,rp,chk) end
rstg.token(44001020,1,POS_FACEUP_DEFENSE,1)(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
Duel.NegateSummon(eg)
if Duel.Destroy(eg,REASON_EFFECT) > 0 then
local ct,og,tc = rssf.SpecialSummonToken(e,tp,44001020,1,1,POS_FACEUP_DEFENSE,1-tp)
if not tc then return end
local e1,e2,e3,e4 = rscf.QuickBuff({c,tc},"batk",eg:GetFirst():GetTextAttack(),"atkan~,smat~,lmat~")
end
end
--血祭魇的门徒
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001002,"XueJiMo")
function cm.initial_effect(c)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.sprcon)
e2:SetOperation(cm.sprop)
c:RegisterEffect(e2)
local e3 = rsef.STO(c,EVENT_SPSUMMON_SUCCESS,"eq",{1,m},"eq","de",
nil,nil,rsop.target(cm.eqfilter,"eq",0,LOCATION_MZONE),cm.eqop)
end
function cm.rmcon(e,tp)
local c = e:GetHandler()
local tc = e:GetLabelObject()
return tc and c:IsReason(REASON_LOST_TARGET) and not tc:IsLocation(LOCATION_OVERLAY) and tc:GetFlagEffect(m) > 0 and c:GetPreviousEquipTarget() and c:GetPreviousEquipTarget() == tc
end
function cm.rmop(e,tp)
local tc = e:GetLabelObject()
rshint.Card(m)
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
function cm.atkval(e,c)
return Duel.GetFieldGroupCount(0,LOCATION_MZONE,LOCATION_MZONE) * (-400)
end
function cm.eqfilter(c,e,tp)
return c:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE) > 0
end
function cm.eqop(e,tp)
local c = rscf.GetFaceUpSelf(e)
if not c then return end
local g, tc = rsop.SelectCards("eq",tp,cm.eqfilter,tp,0,LOCATION_MZONE,1,1,nil,e,tp)
if tc then
if rsop.Equip(e,c,tc,true,false,{ "atk+",cm.atkval,"dis,dise" }) then
tc:RegisterFlagEffect(m, rsrst.std - RESET_LEAVE - RESET_TOGRAVE,0,1)
local e1 = rsef.SC_Easy(c,EVENT_TO_GRAVE,nil,cm.rmcon,cm.rmop,rsrst.std - RESET_LEAVE - RESET_TOGRAVE)
e1:SetLabelObject(tc)
end
end
end
function cm.tgrfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1) and c:IsAbleToGraveAsCost()
end
function cm.mnfilter(c,g)
return g:IsExists(cm.mnfilter2,1,c,c)
end
function cm.mnfilter2(c,mc)
return c:GetLevel()-mc:GetLevel()==1
end
function cm.fselect(g,tp,sc)
return g:GetCount()==2
and g:IsExists(Card.IsType,1,nil,TYPE_TUNER) and g:IsExists(aux.NOT(Card.IsType),1,nil,TYPE_TUNER)
and g:IsExists(cm.mnfilter,1,nil,g)
and Duel.GetLocationCountFromEx(tp,tp,g,sc)>0
end
function cm.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(cm.tgrfilter,tp,LOCATION_MZONE,0,nil)
return g:CheckSubGroup(cm.fselect,2,2,tp,c)
end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.tgrfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:SelectSubGroup(tp,cm.fselect,false,2,2,tp,c)
Duel.SendtoGrave(tg,REASON_COST)
end
\ No newline at end of file
--血祭魇的狩夹 埃文
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001003,"XueJiMo")
function cm.initial_effect(c)
local e1 = rsef.QO_NegateActivation(c,nil,{1,m},LOCATION_HAND,
rscon.neg("ta",1),rscost.cost(0,"dh"),nil,nil,nil,cm.exop)
local e2 = rsef.STO_Flip(c,{m,1},{1,m + 100}, nil, "de",
nil, nil, cm.ztg, cm.zop)
local e3 = rsef.I(c,"des",{1,m + 200},"des",nil,LOCATION_MZONE,rsxjm.mctcon,
nil,rsop.target(aux.TRUE,"des",0,LOCATION_MZONE), cm.desop)
end
function cm.desop(e,tp)
rsop.SelectOperate("des",tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil,{})
end
function cm.exop(e,tp,eg,ep,ev,re,r,rp,chk)
if chk ~= 1 then return end
local rc = re:GetHandler()
if rc:IsRelateToEffect(re) and rc:IsCanTurnSet() and rc:IsAbleToChangeControler() and Duel.GetLocationCount(tp,LOCATION_SZONE) > 0 then
rc:CancelToGrave()
if Duel.MoveToField(rc,tp,tp,LOCATION_SZONE,POS_FACEDOWN_DEFENSE,true) then
Duel.RaiseEvent(rc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
end
function cm.ztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE) > 0 end
end
function cm.zop(e,tp)
local zone=Duel.SelectDisableField(tp,1,0,LOCATION_MZONE,0)
if tp==1 then
zone=((zone&0xffff)<<16)|((zone>>16)&0xffff)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetValue(zone)
e1:SetReset(RESET_PHASE+PHASE_BATTLE,rsxjm.GetRct())
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--血祭魇的锯手 汤普森
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001004,"XueJiMo")
function cm.initial_effect(c)
--local e1 = rsef.SC_Easy(c,EVENT_FLIP,"cd",nil,cm.regop)
--local e2 = rsef.SV_Card(c,"indct",rsval.indbae,
--"sr",LOCATION_MZONE,nil,nil,nil,1)
local e1 = rsef.I(c,"sp",{1,m+200},"sp",nil,LOCATION_HAND,cm.spcon,nil,rsop.target(cm.spfilter,"sp"),cm.spop)
local e3 = rsef.STO_Flip(c,"tg",{1,m},"tg","de",nil,nil,
rsop.target(cm.tgfilter,"tg",LOCATION_ONFIELD,LOCATION_ONFIELD),cm.tgop)
local e4 = rsef.I(c,"th",{1,m+100},"th",nil,LOCATION_MZONE,rsxjm.mctcon,
nil,rsop.target(cm.thfilter,"th",LOCATION_GRAVE),cm.thop)
end
function cm.thfilter(c)
return rsxjm.IsSetST(c) and c:IsAbleToHand()
end
function cm.thop(e,tp)
rsop.SelectOperate("th",tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,{})
end
function cm.regop(e,tp)
e:GetHandler():RegisterFlagEffect(m,rsrst.std,0,1)
end
function cm.tgfilter(c,e,tp)
return e:GetHandler():GetColumnGroup():IsContains(c)
end
function cm.tgop(e,tp)
local c = rscf.GetFaceUpSelf(e)
if not c then return end
rsop.SelectOperate("tg",tp,cm.tgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,{},e,tp)
end
function cm.spcon(e,tp)
return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE) > 0
end
function cm.spop(e,tp)
local c = rscf.GetSelf(e)
if c and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) > 0 then
Duel.ConfirmCards(1-tp, c)
end
end
\ No newline at end of file
--血祭魇的护士 莎莉
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001005,"XueJiMo")
function cm.initial_effect(c)
local e1 = rsef.STO(c,EVENT_LEAVE_FIELD,"tg",{1,m},"tg,th","de",nil,
nil, rsop.target({cm.tgfilter,"tg",rsloc.hd},
{Card.IsAbleToHand,"th"}),cm.tgop)
local e2 = rsef.STO_Flip(c,"sp",{1,m+100},"sp","tg",nil,nil,
rstg.target(cm.spfilter,"sp",LOCATION_GRAVE),cm.spop)
local e3 = rsef.I(c,"sp",{1,m+200},"sp",nil,LOCATION_MZONE,
rsxjm.mctcon,rscost.cost(cm.rmfilter,"rm"),
rsop.target(cm.spfilter2,"sp",LOCATION_REMOVED),cm.spop2)
end
function cm.tgfilter(c)
return rsxjm.IsSet(c) and c:IsAbleToGrave()
end
function cm.tgop(e,tp)
local c = rscf.GetSelf(e)
if rsop.SelectOperate("tg",tp,cm.tgfilter,tp,rsloc.hd,0,1,1,nil,{}) > 0 and rsop.CheckOperateCorrectly(LOCATION_GRAVE) and c and Duel.SendtoHand(c,nil,REASON_EFFECT) > 0 then
Duel.ConfirmCards(1-tp,c)
end
end
function cm.spfilter(c,e,tp)
return rsxjm.IsSet(c) 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 tc = rscf.GetTargetCard()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) > 0 then
Duel.ConfirmCards(1-tp,tc)
end
end
function cm.rmfilter(c,e,tp)
return c:IsAbleToRemoveAsCost() and Duel.GetMZoneCount(tp,c,tp) > 0
end
function cm.spfilter2(c,e,tp)
if not rsxjm.IsSet(c) or c:IsFacedown() or c:IsCode(m) then return false end
return (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function cm.spop2(e,tp)
local g,tc = rsop.SelectCards("sp",tp,cm.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if not tc then return end
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 and Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)>0 and tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
--血祭魇的月光 迈克尔
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001006,"XueJiMo")
function cm.initial_effect(c)
local e1 = rsef.SV_Card(c,"att+",ATTRIBUTE_LIGHT,"sr",LOCATION_MZONE)
local e2 = rsef.STO_Flip(c,{m,0},{1,m},nil,"tg",
nil,nil,rstg.target(aux.TRUE,"dum",0,LOCATION_MZONE), cm.tgop)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_DESTROY + CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_BATTLE_START)
e3:SetCondition(cm.descon)
e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
end
function cm.tgop(e,tp)
local c, tc = e:GetHandler(), rscf.GetTargetCard()
if not tc then return end
local e1 = rsef.FV_Card({c,tp},"tge~",aux.tgoval,
cm.tg,{0xff,0xff},"sa,ii",nil,nil,rsxjm.GetRct(true))
e1:SetLabelObject(tc)
end
function cm.tg(e,c)
return c ~= e:GetLabelObject()
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
if d==e:GetHandler() then d=Duel.GetAttacker() end
e:SetLabelObject(d)
return d and rsxjm.mctcon(e,tp)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetLabelObject(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,e:GetLabelObject(),1,0,0)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if aux.disfilter1(tc) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--血祭魇的猎手 安娜
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001007,"XueJiMo")
function cm.initial_effect(c)
local e1 = rsef.FTO(c,EVENT_DESTROYED,"sp",{1,m},"sp","dsp",
rsloc.hg,cm.spcon,nil,
rsop.target(cm.spfilter,"sp"),cm.spop)
local e2 = rsef.STO_Flip(c,{m,1},{1,m + 100},nil,nil,
nil,nil,nil,cm.zop)
local e3 = rsef.FV_Card(c,"tge~",1,aux.TargetBoolFunction(rsxjm.IsSetST),{0xff,0},
nil,LOCATION_MZONE,rsxjm.mctcon)
end
function cm.cfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT+REASON_BATTLE)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE) > 0
end
function cm.spcon(e,tp,eg)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.spop(e,tp)
local c = rscf.GetSelf(e)
if not c or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) <= 0 then return end
Duel.ConfirmCards(1-tp,c)
end
function cm.zop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local flag=Duel.SelectField(tp,1,0,LOCATION_SZONE,0x20000000) / 0x1000000
local seq=math.log(flag,2)
local e1 = rsef.FV_Player({e:GetHandler(),tp},"act~",cm.tg(seq,1-tp),nil,{1,1},nil,nil,nil,rsxjm.GetRct(true))
end
function cm.tg(seq,tp)
return function(e,re)
local c = re:GetHandler()
return c:GetSequence() == seq and c:IsLocation(LOCATION_SZONE) and c:IsControler(tp)
end
end
\ No newline at end of file
--血祭魇的医生 赫曼杨
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001008,"XueJiMo")
function cm.initial_effect(c)
local e1 = rsef.I(c,"th",{1,m},"th",nil,LOCATION_MZONE,nil,nil,
rsop.target({aux.TRUE,"dum",LOCATION_DECK },
{Card.IsAbleToHand,"th",0,LOCATION_ONFIELD }),cm.thop)
local e2 = rsef.STO_Flip(c,"dis",{1,m+100},"dis","tg",nil,nil,
rstg.target(aux.disfilter1,"dis",0,LOCATION_MZONE),cm.disop)
local e3 = rsef.FTO(c,EVENT_DESTROYED,"tg",{1,m+200},"tg",nil,LOCATION_MZONE,cm.tgcon,nil,
rsop.target(Card.IsAbleToGrave,"tg",0,LOCATION_ONFIELD),cm.tgop)
end
function cm.thop(e,tp)
local tc = Duel.GetDecktopGroup(tp,1):GetFirst()
if not tc then return end
local ctype = Duel.AnnounceType(1-tp)
Duel.ConfirmDecktop(tp,1)
local reslist = { [0] = TYPE_MONSTER , [1] = TYPE_SPELL , [2] = TYPE_TRAP }
local res = reslist[ctype]
if not tc:IsType(res) then
rsop.SelectOperate("th",tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil,{})
end
end
function cm.disop(e,tp)
local c,tc = e:GetHandler(), rscf.GetTargetCard(aux.disfilter1)
if not tc then return end
local e1,e2 = rscf.QuickBuff({c,tc},"dis,dise","rst",rsxjm.GetRct(true,true))
end
function cm.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp)
end
function cm.tgcon(e,tp,eg)
local ft = eg:FilterCount(Card.IsPreviousLocation,nil,LOCATION_MZONE)
return eg:IsExists(cm.cfilter,1,nil,tp) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE) + ft >= 4
end
function cm.tgop(e,tp)
rsop.SelectOperate("tg",1-tp,Card.IsAbleToGrave,1-tp,LOCATION_ONFIELD,0,1,1,nil,{})
end
\ No newline at end of file
--血祭魇的幽魂 山岡
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001009,"XueJiMo")
function cm.initial_effect(c)
local e1 = rsef.FTO(c,EVENT_SPSUMMON_SUCCESS,"sp",{1,m},"sp",nil,
LOCATION_GRAVE,cm.spcon,nil,
rsop.target(cm.spfilter,"sp"),cm.spop)
local e3 = rsef.STO_Flip(c,"dis",{1,m+100},"dis","de",
nil,nil,nil,cm.disop)
local e4 = rsef.QO_NegateActivation(c,"des",{1,m+200},
LOCATION_MZONE,aux.AND(rsxjm.mctcon,rscon.neg("sa",1)))
end
function cm.disop(e,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(cm.discon2)
e2:SetOperation(cm.disop2)
e2:SetReset(RESET_PHASE+PHASE_BATTLE,rsxjm.GetRct())
Duel.RegisterEffect(e2,tp)
end
function cm.discon2(e,tp,eg,ep,ev,re,r,rp)
local loc = Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return loc and loc & LOCATION_GRAVE ~= 0 and re:IsActiveType(TYPE_MONSTER) and rp ~= tp
end
function cm.disop2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function cm.spcon(e,tp,eg)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.cfilter(c,tp)
return c:IsSummonPlayer(tp) and c:IsFacedown()
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE) > 0
end
function cm.spop(e,tp)
local c = rscf.GetSelf(e)
if c and rssf.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) > 0 then
Duel.ConfirmCards(1-tp,c)
end
end
\ No newline at end of file
--血祭魇的祭司 里丝
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001010,"XueJiMo")
function cm.initial_effect(c)
local e1 = rsef.STO(c,EVENT_TO_GRAVE,"se",{1,m},"se,th","de",
nil,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
local e3 = rsef.STO_Flip(c,"dis",{1,m+100},"dis","de",nil,nil,
cm.ztg,cm.zop)
local e4 = rsef.I(c,"cf",{1,m+200},nil,nil,LOCATION_MZONE,rsxjm.mctcon,nil,rsop.target(aux.TRUE,"dum",0,LOCATION_HAND),cm.lop)
end
function cm.lop(e,tp)
local c = e:GetHandler()
local g = Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if #g <= 0 then return end
local tc = g:RandomSelect(tp,1):GetFirst()
Duel.ConfirmCards(tp,tc)
if tc:IsType(TYPE_MONSTER) then
local e1,e2 = rsef.FV_Player({c,tp},"sum~,sp~",1,cm.stg(tc),{1,1},nil,nil,nil,rsrst.ep)
local e3 = rsef.FV_Player({c,tp},"act~",cm.atg(tc),nil,{1,1},nil,nil,nil,rsrst.ep)
end
Duel.ShuffleHand(tp)
end
function cm.stg(tc)
return function(e,c)
return c:IsCode(tc:GetCode())
end
end
function cm.atg(tc)
return function(e,re)
return re:GetHandler():IsCode(tc:GetCode())
end
end
function cm.thfilter(c)
return c:IsAbleToHand() and rsxjm.IsSet(c) and not c:IsCode(m)
end
function cm.thop(e,tp)
rsop.SelectOperate("th",tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.disfilter(c)
return (not c:IsLocation(LOCATION_SZONE) or c:GetSequence()<5 ) and aux.disfilter1(c)
end
function cm.seqfilter(c,seq)
if not aux.disfilter1(c) then return false end
local loc=LOCATION_MZONE
if seq>8 then
loc=LOCATION_SZONE
seq=seq-8
end
if seq>=5 and seq<=7 then return false end
local cseq=c:GetSequence()
local cloc=c:GetLocation()
if cloc==LOCATION_SZONE and cseq>=5 then return false end
if cloc==LOCATION_MZONE and cseq>=5 and loc==LOCATION_MZONE
and (seq==1 and cseq==5 or seq==3 and cseq==6) then return true end
return cseq==seq or cloc==loc and math.abs(cseq-seq)==1
end
function cm.ztg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cm.disfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local filter=0
for i=0,16 do
if not Duel.IsExistingMatchingCard(cm.seqfilter,tp,0,LOCATION_ONFIELD,1,nil,i) then
filter=filter|1<<(i+16)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local flag=Duel.SelectField(tp,1,0,LOCATION_ONFIELD,filter)
local seq=math.log(flag>>16,2)
e:SetLabel(seq)
local g=Duel.GetMatchingGroup(cm.seqfilter,tp,0,LOCATION_ONFIELD,nil,seq)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function cm.zop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local seq=e:GetLabel()
local og ,tc = rsop.SelectCards("dis",tp,cm.seqfilter,tp,0,LOCATION_ONFIELD,1,1,nil,seq)
if not tc then return end
local e1,e2 = rscf.QuickBuff({c,tc},"dis,dise",rsxjm.GetRct(true,true))
end
\ No newline at end of file
--血祭魇的处刑人
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001011,"XueJiMo")
function cm.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(rsxjm.IsSet),aux.NonTuner(nil),1)
c:EnableReviveLimit()
local e1 = rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},{1,m},nil,"de",
rscon.sumtyps("syn"),nil,cm.ztg,cm.zop)
local e2 = rsef.I(c,"atk",1,"atk,def,dis","tg",LOCATION_MZONE,nil,nil,
rstg.target(Card.IsFaceup,"dis",0,LOCATION_MZONE),cm.disop)
local e3 = rsef.STO(c,EVENT_DESTROYED,"sp",nil,"sp,gsp","de,tg",cm.spcon,nil,
rstg.target(cm.tfilter,"dum",LOCATION_MZONE),cm.spop)
end
function cm.tfilter(c,e,tp)
local race = c:GetRace()
local lv = c:GetLevel()
return c:IsFaceup() and rsxjm.IsSet(c) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,race,lv)
end
function cm.spfilter(c,e,tp,race,lv)
return rscf.spfilter2(rsxjm.IsSet)(c,e,tp) and ((race > 0 and c:IsRace(race)) or (lv > 0 and c:IsLevel(lv)))
end
function cm.spop(e,tp)
local c, tc = e:GetHandler(), rscf.GetTargetCard(Card.IsFaceup)
if not tc then return end
rsop.SelectOperate("sp",tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,{},e,tp,tc:GetRace(),tc:GetLevel())
end
function cm.spcon(e,tp)
return e:GetHandler():IsReason(REASON_EFFECT+REASON_BATTLE)
end
function cm.disop(e,tp)
local c, tc = e:GetHandler(), rscf.GetTargetCard(Card.IsFaceup)
if not tc then return end
local e1,e2 = rscf.QuickBuff({c,tc},"dis,dise","fatk",tc:GetAttack()/2,"fdef",tc:GetDefense()/2)
end
function cm.ztg(e,tp,eg,ep,ev,re,r,rp,chk)
local c = e:GetHandler()
--local zone = c:GetColumnZone(LOCATION_ONFIELD,1-tp)
local seq = 4 - aux.GetColumn(c, tp)
local zone1 = (2^seq)
local zone2 = (2^seq)
if chk == 0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,1-tp,LOCATION_REASON_CONTROL,zone1) > 0
or Duel.GetLocationCount(1-tp,LOCATION_SZONE,1-tp,LOCATION_REASON_CONTROL,zone2) > 0 end
end
function cm.zop(e,tp)
local c = rscf.GetFaceUpSelf(e)
if not c then return end
local seq
if c:IsControler(tp) then
seq = 4 - aux.GetColumn(c, tp)
else
seq = aux.GetColumn(c, tp)
end
if not seq then return end
local val=aux.SequenceToGlobal(1-tp,LOCATION_MZONE,seq)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetValue(val | (val * 0x100))
e1:SetReset(rsrst.ep,rsxjm.GetRct())
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--血祭魇的羁绊
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001012,"XueJiMo")
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,7,2,cm.ovfilter,aux.Stringid(m,0),2)
c:EnableReviveLimit()
c:SetSPSummonOnce(m)
local e1 = rsef.I(c,"ctrl",1,"ctrl",nil,LOCATION_MZONE,nil,
aux.AND(cm.ctcost, rscost.rmxmat(1)),
rsop.target(Card.IsControlerCanBeChanged,"ctrl",0,LOCATION_MZONE),cm.ctop)
local e2 = rsef.FTO(c,EVENT_PHASE+PHASE_BATTLE,"xmat",1,nil,nil,
LOCATION_MZONE,nil,nil,
rsop.target(cm.matfilter,"xmat",LOCATION_GRAVE,LOCATION_GRAVE),cm.matop)
local e3 = rsef.FTO(c,EVENT_DESTROY,"td",nil,"td,des","de",
LOCATION_MZONE,nil,rscost.rmxmat(2),
rsop.target({cm.tdfilter,"td",true},
{aux.TRUE,"des",LOCATION_ONFIELD,LOCATION_ONFIELD }),cm.tdop)
end
function cm.tdop(e,tp,eg)
local tg = eg:Filter(Card.IsRelateToEffect,nil,e):Filter(cm.tdfilter,nil,e,tp)
if #tg <= 0 or Duel.SendtoDeck(tg,nil,2,REASON_EFFECT) <= 0 or not rsop.CheckOperateSuccess(rsloc.de) then return end
rsop.SelectOperate("des",tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,{})
end
function cm.tdfilter(c,e,tp)
return c:IsAbleToDeck() and c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.matfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanOverlay() and e:GetHandler():IsType(TYPE_XYZ)
end
function cm.matop(e,tp)
local c = rscf.GetFaceUpSelf(e)
if not c then return end
local g,tc = rsop.SelectCards("xmat",tp,aux.NecroValleyFilter(cm.matfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e)
if tc then
rsop.Overlay(e,c,tc)
end
end
function cm.ovfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) and rsxjm.IsSet(c) and c:IsLevel(7)
end
function cm.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1,true)
end
function cm.ctop(e,tp)
local g,tc = rsop.SelectCards("ctrl",tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
if not tc then return end
Duel.GetControl(tc,tp,PHASE_END,1)
end
\ No newline at end of file
--黑雾中的血祭魇祭祀场
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001013,"XueJiMo")
function cm.initial_effect(c)
local e1 = rsef.A(c)
local e2 = rsef.FV_Card(c,"tge~",aux.tgoval,cm.imtg,{LOCATION_MZONE,0},
nil,LOCATION_FZONE)
local e3 = rsef.FV_Card(c,"indb",1,cm.imtg,{LOCATION_MZONE,0},
nil,LOCATION_FZONE)
local e4 = rsef.QO(c,nil,"td",1,"td",nil,LOCATION_FZONE,
aux.AND(rscon.phbp,rscon.turno),nil,
rsop.target(Card.IsAbleToDeck,"td",0,LOCATION_MZONE),cm.tdop)
local e5 = rsef.STO(c,EVENT_DESTROYED,"sp",nil,"sp",nil,cm.spcon,
nil,rsop.target(cm.spfilter,"sp",LOCATION_REMOVED),cm.spop)
end
function cm.imtg(e,c)
return c:IsType(TYPE_XYZ+TYPE_SYNCHRO) and rsxjm.IsSet(c)
end
function cm.tdop(e,tp)
rsop.SelectOperate("td",tp,Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,1,nil,{})
end
function cm.spcon(e,tp)
local c = e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function cm.spfilter(c,e,tp)
if c:IsFacedown() or not rsxjm.IsSet(c) then return false end
return (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
function cm.spop(e,tp)
local g,tc = rsop.SelectCards("sp",tp,cm.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if not tc then return end
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,spos) end
end
\ No newline at end of file
--血祭魇的绝命终局
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001014,"XueJiMo")
function cm.initial_effect(c)
local e1 = rsef.A(c,nil,nil,{1,m},"dis,rm,th",nil,rsxjm.mctcon,nil,
rsop.target(cm.rmfilter,"rm",LOCATION_MZONE,LOCATION_MZONE,4),cm.rmop)
local e2 = rsef.QO(c,nil,"th",nil,"se,th",nil,LOCATION_GRAVE,
cm.thcon,aux.bfgcost,
rsop.target(cm.thfilter,"th",rsloc.dgr),cm.thop)
end
function cm.cfilter(c)
return c:IsFaceup() and rsxjm.IsSet(c) and c:IsLevelBelow(4)
end
function cm.thcon(e,tp)
local ct = Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) > 0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0) == ct and ct > 0
end
function cm.thfilter(c)
return c:IsAbleToHand() and rsxjm.IsSet(c)
end
function cm.thop(e,tp)
rsop.SelectOperate("th",tp,aux.NecroValleyFilter(cm.thfilter),tp,rsloc.dgr,0,1,1,nil,{})
end
function cm.rmop(e,tp)
local c = e:GetHandler()
local e0 = rsef.FV_Player({c,tp},"sp~",1,cm.limit,{1,0},nil,nil,nil,rsrst.ep)
local og = rsop.SelectCards("rm",tp,cm.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,4,4,nil)
if #og ~= 4 then return end
local dg = Group.CreateGroup()
for tc in aux.Next(og) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
Duel.AdjustInstantly()
if tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
dg:AddCard(tc)
end
end
if #dg <= 0 then return end
Duel.Remove(dg,POS_FACEUP,REASON_EFFECT)
local _,_,sg = rsop.CheckOperateSuccess(LOCATION_REMOVED)
og:Sub(sg)
if #og > 0 then
local e1 = rsef.FC_PhaseOpearte({c,tp},og,nil,nil,PHASE_END,nil,"th")
end
end
function cm.limit(e,c)
return not rsxjm.IsSet(c)
end
function cm.rmfilter(c)
return aux.disfilter1(c) and c:IsAbleToRemove()
end
\ No newline at end of file
--血祭魇的厄咒
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001015,"XueJiMo")
function cm.initial_effect(c)
local e1 = rsef.A(c,nil,nil,{1,m,"o"},nil,nil,nil,nil,cm.tg,cm.act)
local e2 = rsef.FTO(c,EVENT_DESTROYED,"sset",nil,nil,"de",
LOCATION_GRAVE,cm.setcon,nil,
rsop.target(Card.IsSSetable,"sset"),cm.setop)
end
function cm.dcfilter(c,tp)
return c:IsPreviousControler(tp) and c:GetPreviousTypeOnField() & (TYPE_SPELL + TYPE_TRAP) ~= 0
end
function cm.setop(e,tp)
local c = rscf.GetSelf(e)
if c then
Duel.SSet(tp,c)
end
end
function cm.setcon(e,tp,eg)
return aux.exccon(e,tp) and eg:IsExists(cm.dcfilter,1,nil,tp)
end
function cm.cfilter(c)
return rsxjm.IsSet(c) and c:IsFaceup()
end
function cm.cfilter2(c,tp)
return c:IsSummonPlayer(1-tp)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.cfilter(chkc) end
local b1 = Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
local res,eg = Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true)
local b2 = res and eg:IsExists(cm.cfilter2,1,nil,tp)
local b3 = Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
if chk == 0 then return b1 or b2 or b3 end
local op = rshint.SelectOption(tp,b1,{m,0},b2,{m,1},b3,{m,2})
if op == 1 then
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
rshint.Select(tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
elseif op == 2 then
e:SetProperty(EFFECT_FLAG_DELAY)
elseif op == 3 then
e:SetProperty(0)
end
e:SetLabel(op)
end
function cm.act(e,tp)
local c = e:GetHandler()
local op = e:GetLabel()
if op == 1 then
local tc = rscf.GetTargetCard()
if not tc then return end
local e1 = rscf.QuickBuff({c,tc},"tgb~",1,"rst",rsxjm.GetRct(true,true))
elseif op == 2 then
local g = Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local race = 0
for tc in aux.Next(g) do
race = race | tc:GetRace()
end
if race == 0 then return end
local race2 = Duel.AnnounceRace(tp,1,race)
local e2 = rsef.FV_Player({c,tp},"sp~",nil,cm.limit(race2),{0,1},nil,nil,nil,rsrst.ep)
elseif op == 3 then
local og,tc = rsop.SelectCards("dum",tp,cm.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
if not tc then return end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_INACTIVATE)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(rsrst.ep)
e3:SetValue(cm.effectfilter)
tc:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_DISEFFECT)
tc:RegisterEffect(e4)
end
end
function cm.effectfilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
return e:GetHandler()==te:GetHandler()
end
function cm.limit(race)
return function(e,c)
return not c:IsAttribute(race)
end
end
\ No newline at end of file
--压迫血祭魇的饥渴
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001016,"XueJiMo")
function cm.initial_effect(c)
local e1 = rsef.A(c,nil,nil,nil,"pos,rm",nil,nil,nil,
rsop.target({cm.rmfilter,"rm",LOCATION_GRAVE },
{cm.cpfilter,"pos",LOCATION_MZONE }),cm.act)
local e2 = rsef.QO(c,nil,{m,1},{1,m},nil,nil,LOCATION_GRAVE,nil,
aux.bfgcost,rsop.target(cm.cfilter,"dum",LOCATION_MZONE),cm.aop)
end
function cm.cfilter(c)
return c:IsType(TYPE_XYZ+TYPE_SYNCHRO) and rsxjm.IsSet(c)
end
function cm.aop(e,tp)
local c = e:GetHandler()
local og, tc = rsop.SelectCards("dum",tp,cm.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
if not tc then return end
local e0 = rscf.QuickBuff({c,tc},"atka",1,"rst",rsxjm.GetRct(true,true))
--damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetReset(rsrst.std+rsrst.ep,rsxjm.GetRct())
e1:SetCondition(cm.damcon)
e1:SetOperation(cm.damop)
tc:RegisterEffect(e1)
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsType(TYPE_MONSTER) and bc:IsControler(1-tp) and bc:GetBaseAttack() > 0
end
function cm.damop(e,tp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
rshint.Card(m)
Duel.Damage(1-tp,bc:GetBaseAttack()/2,REASON_EFFECT)
end
function cm.rmfilter(c)
return c:IsAbleToRemove() and rsxjm.IsSetM(c)
end
function cm.cpfilter(c)
return c:IsFacedown() and rsxjm.IsSet(c) and c:IsCanChangePosition()
end
function cm.act(e,tp)
if rsop.SelectOperate("rm",tp,aux.NecroValleyFilter(cm.rmfilter),tp,LOCATION_GRAVE,0,1,1,nil,{}) > 0 and rsop.CheckOperateSuccess(LOCATION_REMOVED) then
rsop.SelectOC(nil,true)
local g = rsop.SelectCards("pos",tp,cm.cpfilter,tp,LOCATION_MZONE,0,1,99,nil)
if #g > 0 then
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
end
end
end
\ No newline at end of file
--血祭魇的虚伪解脱
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001017,"XueJiMo")
function cm.initial_effect(c)
local e1 = rsef.A(c,nil,nil,{1,m,"o"},"sp,gsp",nil,nil,nil,nil,
cm.act)
local e2 = rsef.FTO(c,EVENT_TO_GRAVE,"sp",{1,nil,"s"},"sp","de",
LOCATION_SZONE,nil,nil,
rsop.target(cm.spfilter2,"sp",true),cm.spop)
--local e3 = rsef.QO_NegateActivation(c,"des",1,LOCATION_SZONE,
--rscon.neg("a,m",1),nil,"rtg",nil,
--rsop.target(cm.tgfilter,"rtg",LOCATION_REMOVED),cm.exop)
end
function cm.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function cm.exop(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 1 then
rsop.SelectOC(nil,true)
rsop.SelectOperate("rtg",tp,cm.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil,{})
end
end
function cm.spfilter2(c,e,p,eg)
local tp = c:GetOwner()
local rc = c:GetReasonCard()
return c:IsComplexReason(REASON_MATERIAL,true,REASON_FUSION,REASON_LINK,REASON_SYNCHRO) and (not rc:IsType(TYPE_FUSION) or rc:IsSummonType(SUMMON_TYPE_FUSION)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE ) > 0 and c:RemovePosCheck()
end
function cm.spop(e,p,eg)
local sg = eg:Filter(Card.IsRelateToEffect,nil,e):Filter(cm.spfilter2,nil,e,p)
if #sg <= 0 then return end
local sg2
local sct = 0
local rg = Group.CreateGroup()
for p = 0 , 1 do
sg2 = sg:Filter(aux.FilterEqualFunction(Card.GetOwner,p),nil)
local ft = Duel.GetLocationCount(p,LOCATION_MZONE)
if #sg2 > 0 and ft > 0 then
sct = math.min(#sg2,ft)
end
if sct > 0 then
if rssf.CheckBlueEyesSpiritDragon(p) then
sct = 1
end
sg2 = sg:Select(p,sct,sct,nil)
for tc in aux.Next(sg2) do
if Duel.SpecialSummonStep(tc,0,p,p,false,false,POS_FACEDOWN_DEFENSE) then
rg:AddCard(tc)
end
end
end
end
Duel.SpecialSummonComplete()
if #rg > 0 then
Duel.ConfirmCards(tp,rg)
local e1 = rsef.FC_PhaseOpearte({e:GetHandler(),tp},rg,0,nil,PHASE_BATTLE,nil,"rm")
end
end
function cm.act(e,tp)
rsop.SelectOC("sp")
local g,tc = rsop.SelectCards("sp",tp,aux.NecroValleyFilter(cm.spfilter),tp,rsloc.gr,0,1,1,nil,e,tp)
if not tc then return end
local spos=0
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 and Duel.SpecialSummon(tc,0,tp,tp,false,false,spos)>0 and tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
end
end
function cm.spfilter(c,e,tp)
if not c:RemovePosCheck() or not rsxjm.IsSet(c) then return false end
return (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end
--血祭魇的完美谢幕
if not pcall(function() require("expansions/script/c44001001") end) then require("script/c44001001") end
local m,cm=rscf.DefineCard(44001018,"XueJiMo")
function cm.initial_effect(c)
local e1 = rsef.A(c,EVENT_ATTACK_ANNOUNCE,nil,nil,"sp",nil,
rscon.turno,nil,rsop.target(cm.spfilter,"sp",rsloc.hg),cm.act)
local e2 = rsef.FTO(c,EVENT_BATTLE_DESTROYED,"sp",{1,m},
"sp,td,rm","de",LOCATION_GRAVE,cm.spcon,nil,
rsop.target({cm.tdfilter,"td",LOCATION_MZONE },
{{cm.rmfilter,cm.gcheck},"rm",LOCATION_GRAVE,0,2,99}),
cm.spop)
end
function cm.cfilter(c,tp)
local rc=c:GetReasonCard()
return c:IsReason(REASON_BATTLE)
and rc:IsControler(tp) and rc:IsRelateToBattle() and c:IsPreviousControler(1-tp)
end
function cm.spcon(e,tp,eg)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.rmfilter(c)
return c:IsAbleToRemove() and c:IsLevelAbove(1)
end
function cm.tdfilter(c,e,tp)
return c:IsAbleToDeck() and Duel.GetLocationCountFromEx(tp,tp,c,TYPE_SYNCHRO) > 0
end
function cm.gcheck(g,e,tp)
local lv = g:GetSum(Card.GetLevel)
return g:FilterCount(Card.IsType,nil,TYPE_TUNER) == 1 and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) and Duel.IsExistingMatchingCard(cm.spfilterex,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv)
end
function cm.spfilterex(c,e,tp,lv)
return rsxjm.IsSet(c) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and c:IsLevel(lv)
end
function cm.spop(e,tp)
if rsop.SelectOperate("td",tp,cm.tdfilter,tp,LOCATION_MZONE,0,1,1,nil,{},e,tp) > 0 and rsop.CheckOperateSuccess(rsloc.de)
and rsop.SelectOperate("rm",tp,{aux.NecroValleyFilter(cm.rmfilter),cm.gcheck},tp,LOCATION_GRAVE,0,2,2,nil,{},e,tp) <= 0
then return end
local res,ct,og = rsop.CheckOperateSuccess(LOCATION_REMOVED)
local lv = og:GetSum(Card.GetLevel)
if lv <= 0 then return end
rsop.SelectOperate("sp",tp,cm.spfilterex,tp,LOCATION_EXTRA,0,1,1,nil,{SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP,nil,{"cp","mat",Group.CreateGroup()}},e,tp,lv)
end
function cm.spfilter(c,e,tp)
return rsxjm.IsSet(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE) > 0
end
function cm.act(e,tp)
Duel.DisableSelfDestroyCheck()
local ct,og,tc = rsop.SelectOperate("sp",tp,aux.NecroValleyFilter(cm.spfilter),tp,rsloc.hg,0,1,1,nil,{0,tp,tp,false,false,POS_FACEDOWN_DEFENSE },e,tp)
if tc then
local a=Duel.GetAttacker()
if a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,tc)
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
end
Duel.DisableSelfDestroyCheck(false)
end
\ No newline at end of file
--能量补充·拉蒂
local m=81022002
local cm=_G["c"..m]
function cm.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
c:EnableReviveLimit()
--to grave
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,m+900)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
--change level
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.lvcost)
e2:SetOperation(cm.lvop)
c:RegisterEffect(e2)
--redirect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCondition(cm.recon)
e3:SetValue(LOCATION_DECKBOT)
c:RegisterEffect(e3)
end
function cm.cfilter(c,tp)
local lv=c:GetLevel()
return lv>0 and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(cm.lvfilter,tp,LOCATION_MZONE,0,1,nil,lv)
end
function cm.lvfilter(c,lv)
return c:IsFaceup() and c:IsLevelAbove(0) and not c:IsLevel(lv)
end
function cm.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(g:GetFirst():GetLevel())
end
function cm.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lv=e:GetLabel()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(cm.lvfilter,tp,LOCATION_MZONE,0,nil,0)
local lc=g:GetFirst()
while lc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
lc:RegisterEffect(e1)
lc=g:GetNext()
end
end
function cm.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_PYRO) and c:IsAbleToGrave()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.recon(e)
return e:GetHandler():IsFaceup()
end
--静谧苍龙 明斯默尔
local m=81044001
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,3,true)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.negcon)
e2:SetTarget(cm.negtg)
e2:SetOperation(cm.negop)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e3:SetCountLimit(1,m+900+EFFECT_COUNT_CODE_DUEL)
e3:SetCondition(cm.condition)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
end
function cm.ffilter(c)
return c:IsFusionType(TYPE_EFFECT) and c:IsLevelBelow(4)
end
function cm.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER) and not te:GetOwner():IsLevelBelow(4)
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsLevelBelow(4)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if re:GetHandler():IsRelateToEffect(re) and re:GetHandler():IsDestructable() then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,re:GetHandler(),1,0,0)
end
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function cm.afilter(c)
return c:IsFaceup() and c:IsLevelBelow(4) and c:IsAbleToHand()
end
function cm.bfilter(c)
return not (c:IsFaceup() and c:IsLevelBelow(4))
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.afilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) or Duel.IsExistingMatchingCard(cm.bfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(cm.afilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local rg=Duel.GetMatchingGroup(cm.bfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if sg:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
if rg:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,rg,rg:GetCount(),0,0)
end
end
function cm.sgfilter(c,p)
return c:IsLocation(LOCATION_HAND) and c:IsControler(p)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(cm.afilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local rg=Duel.GetMatchingGroup(cm.bfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
Duel.Destroy(rg,REASON_EFFECT)
Duel.BreakEffect()
local ag=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
local bg=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
if ag>0 then
local ct=og:FilterCount(cm.sgfilter,nil,1-tp)
if ct>0 then
Duel.BreakEffect()
Duel.Damage(tp,ct*2000,REASON_EFFECT)
end
end
if bg>0 then
local dt=og:FilterCount(cm.sgfilter,nil,tp)
if dt>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,dt*2000,REASON_EFFECT)
end
end
end
--不运赤龙 费尔卡特
local m=81044005
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_EFFECT),1,3,nil,nil,99)
c:EnableReviveLimit()
--Negate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.negcon)
e1:SetCost(cm.negcost)
e1:SetTarget(cm.negtg)
e1:SetOperation(cm.negop)
c:RegisterEffect(e1)
--draw
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e3:SetCountLimit(1,m+900+EFFECT_COUNT_CODE_DUEL)
e3:SetCondition(cm.condition)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
end
function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
local level=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LEVEL)
return re:IsActiveType(TYPE_MONSTER) and level>=5 and Duel.IsChainNegatable(ev)
end
function cm.negcost(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.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
--苏醒天使 丽斯莉娜
local m=81044012
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--summon with 3 tribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e1:SetCondition(cm.ttcon)
e1:SetOperation(cm.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LIMIT_SET_PROC)
e2:SetCondition(cm.setcon)
c:RegisterEffect(e2)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetCondition(cm.spcon)
e4:SetTarget(cm.sptg)
e4:SetOperation(cm.spop)
c:RegisterEffect(e4)
end
function cm.otfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsReleasable()
end
function cm.ttcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(cm.otfilter,tp,LOCATION_SZONE,LOCATION_SZONE,nil)
return minc<=3 and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=3
or Duel.CheckTribute(c,1) and mg:GetCount()>=2
or Duel.CheckTribute(c,2) and mg:GetCount()>=1
or Duel.CheckTribute(c,3))
end
function cm.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(cm.otfilter,tp,LOCATION_SZONE,LOCATION_SZONE,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Group.CreateGroup()
local ct=3
while mg:GetCount()>0 and (ct>2 and Duel.CheckTribute(c,ct-2) or ct>1 and Duel.CheckTribute(c,ct-1) or ct>0 and ft>0)
and (not Duel.CheckTribute(c,ct) or Duel.SelectYesNo(tp,aux.Stringid(m,0))) do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=mg:Select(tp,1,1,nil)
g:Merge(g1)
mg:Sub(g1)
ct=ct-1
end
if g:GetCount()<3 then
local g2=Duel.SelectTribute(tp,c,3-g:GetCount(),3-g:GetCount())
g:Merge(g2)
end
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function cm.setcon(e,c,minc)
if not c then return true end
return false
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_ADVANCE)
and (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousPosition(POS_FACEUP)
end
function cm.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
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