Commit 416f343d authored by HidarimeYume's avatar HidarimeYume Committed by GitHub

Add files via upload

parent 1f024f1c
--梦见 --梦见
yume=yume or {} yume=yume or {}
yume.temp_card_field=yume.temp_card_field or {} yume.temp_card_field=yume.temp_card_field or {}
if c71400001 then if c71400001 then
function c71400001.initial_effect(c) function c71400001.initial_effect(c)
--Activate(nofield) --Activate(nofield)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400001,1)) e1:SetDescription(aux.Stringid(71400001,1))
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(yume.nonYumeCon) e1:SetCondition(yume.nonYumeCon)
e1:SetTarget(yume.YumeFieldCheckTarget(0,1)) e1:SetTarget(yume.YumeFieldCheckTarget(0,1))
e1:SetCost(c71400001.cost) e1:SetCost(c71400001.cost)
e1:SetOperation(c71400001.activate1) e1:SetOperation(c71400001.activate1)
e1:SetCountLimit(1,71400001+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,71400001+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Activate(field) --Activate(field)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400001,2)) e2:SetDescription(aux.Stringid(71400001,2))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(yume.YumeCon) e2:SetCondition(yume.YumeCon)
e2:SetTarget(c71400001.target2) e2:SetTarget(c71400001.target2)
e2:SetCost(c71400001.cost) e2:SetCost(c71400001.cost)
e2:SetOperation(c71400001.activate2) e2:SetOperation(c71400001.activate2)
e2:SetCountLimit(1,71400001+EFFECT_COUNT_CODE_OATH) e2:SetCountLimit(1,71400001+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400001.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500) Duel.PayLPCost(tp,500)
end end
function c71400001.activate1(e,tp,eg,ep,ev,re,r,rp) function c71400001.activate1(e,tp,eg,ep,ev,re,r,rp)
yume.FieldActivation(tp,nil,1) yume.FieldActivation(tp,nil,1)
end end
function c71400001.activate2(e,tp,eg,ep,ev,re,r,rp) function c71400001.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400001.filter2,tp,LOCATION_DECK,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,c71400001.filter2,tp,LOCATION_DECK,0,1,1,nil,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c71400001.filter1(c,tp) function c71400001.filter1(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true) and c:IsSetCard(0xb714) return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true) and c:IsSetCard(0xb714)
end end
function c71400001.filter2(c,tp) function c71400001.filter2(c,tp)
return c:IsSetCard(0x714) and c:IsAbleToHand() and not c:IsCode(71400001) return c:IsSetCard(0x714) and c:IsAbleToHand() and not c:IsCode(71400001)
end end
function c71400001.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400001.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400001.filter2,tp,LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c71400001.filter2,tp,LOCATION_DECK,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
end end
--global part --global part
table=require("table") table=require("table")
function yume.AddYumeSummonLimit(c,ssm) yume.RustFlag=false
--1=special summon monster, 0=non special summon monster function yume.AddYumeSummonLimit(c,ssm)
ssm=ssm or 0 --1=special summon monster, 0=non special summon monster
local el1=Effect.CreateEffect(c) ssm=ssm or 0
el1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) local el1=Effect.CreateEffect(c)
el1:SetType(EFFECT_TYPE_SINGLE) el1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
el1:SetCode(EFFECT_SPSUMMON_CONDITION) el1:SetType(EFFECT_TYPE_SINGLE)
el1:SetValue(yume.YumeCheck) el1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(el1) el1:SetValue(yume.YumeCheck)
if ssm==0 then c:RegisterEffect(el1)
local el2=Effect.CreateEffect(c) if ssm==0 then
el2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) local el2=Effect.CreateEffect(c)
el2:SetType(EFFECT_TYPE_SINGLE) el2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
el2:SetCode(EFFECT_CANNOT_MSET) el2:SetType(EFFECT_TYPE_SINGLE)
el2:SetCondition(yume.YumeCheck2) el2:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(el2) el2:SetCondition(yume.YumeCheck2)
local el3=el2:Clone() c:RegisterEffect(el2)
el3:SetCode(EFFECT_CANNOT_SUMMON) local el3=el2:Clone()
c:RegisterEffect(el3) el3:SetCode(EFFECT_CANNOT_SUMMON)
end c:RegisterEffect(el3)
end end
function yume.GetValueType(v) end
local t=type(v) function yume.GetValueType(v)
if t=="userdata" then local t=type(v)
local mt=getmetatable(v) if t=="userdata" then
if mt==Group then return "Group" local mt=getmetatable(v)
elseif mt==Effect then return "Effect" if mt==Group then return "G"
else return "Card" end elseif mt==Effect then return "E"
else return t end else return "C" end
end else return t end
function yume.YumeCheckFilter(c) end
return c:IsFaceup() and c:IsSetCard(0x3714) function yume.YumeCheckFilter(c)
end return c:IsFaceup() and c:IsSetCard(0x3714)
function yume.IsYumeFieldOnField(tp) end
return Duel.IsExistingMatchingCard(yume.YumeCheckFilter,tp,LOCATION_FZONE,0,1,nil) function yume.IsYumeFieldOnField(tp)
end local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
--[[ return fc and yume.YumeCheckFilter(fc)
Yume SpSummon Check end
v in effect = spsummon condition value(return true = can summon) --[[
v in card = material filter gen(return true = can summon) Yume SpSummon Check
--]] v in effect = spsummon condition value(return true = can summon)
function yume.YumeCheck(v,se,sp) v in card = material filter gen(return true = can summon)
local t=yume.GetValueType(v) --]]
if t=="Effect" then function yume.YumeCheck(v,se,sp)
return yume.IsYumeFieldOnField(sp) local t=yume.GetValueType(v)
elseif t=="Card" then if t=="E" then
return function(c) return yume.IsYumeFieldOnField(v:GetControler()) end return yume.IsYumeFieldOnField(sp)
end elseif t=="C" then
end return function(c) return yume.IsYumeFieldOnField(v:GetControler()) end
--[[ end
Yume Summon/Set Check end
return true = cannot summon --[[
--]] Yume Summon/Set Check
function yume.YumeCheck2(e) return true = cannot summon
return not yume.IsYumeFieldOnField(e:GetHandler():GetControler()) --]]
end function yume.YumeCheck2(e)
--Yume Condition return not yume.IsYumeFieldOnField(e:GetHandler():GetControler())
function yume.YumeCon(e,tp,eg,ep,ev,re,r,rp) end
if not tp then tp=e:GetHandlerPlayer() end --Yume Condition
return yume.IsYumeFieldOnField(tp) function yume.YumeCon(e,tp,eg,ep,ev,re,r,rp)
end if not tp then tp=e:GetHandlerPlayer() end
--Yume Condition for lethal weapons return yume.IsYumeFieldOnField(tp)
function yume.YumeLethalCon(e,tp,eg,ep,ev,re,r,rp) end
return Duel.GetTurnPlayer()==tp and yume.YumeCon(e,tp,eg,ep,ev,re,r,rp) --Yume Condition for lethal weapons
end function yume.YumeLethalCon(e,tp,eg,ep,ev,re,r,rp)
function yume.nonYumeCon(e,tp,eg,ep,ev,re,r,rp) return Duel.GetTurnPlayer()==tp and yume.YumeCon(e,tp,eg,ep,ev,re,r,rp)
if not tp then tp=e:GetHandlerPlayer() end end
return not yume.IsYumeFieldOnField(tp) function yume.nonYumeCon(e,tp,eg,ep,ev,re,r,rp)
end if not tp then tp=e:GetHandlerPlayer() end
--ft=field type, 0-All Yume 1-Visionary Yume 2-Erosive Yume return not yume.IsYumeFieldOnField(tp)
--loc=location end
function yume.AddYumeFieldGlobal(c,id,ft) --ft=field type, 0-All Yume 1-Visionary Yume 2-Erosive Yume
ft=ft or 0 --loc=location
if not id then return end function yume.AddYumeFieldGlobal(c,id,ft)
yume.temp_card_field[c]=yume.temp_card_field[c] or {} ft=ft or 0
yume.temp_card_field[c].id=id if not id then return end
yume.temp_card_field[c].ft=ft yume.temp_card_field[c]=yume.temp_card_field[c] or {}
--Activate yume.temp_card_field[c].id=id
local eac=Effect.CreateEffect(c) yume.temp_card_field[c].ft=ft
eac:SetType(EFFECT_TYPE_ACTIVATE) --Activate
eac:SetCode(EVENT_FREE_CHAIN) local eac=Effect.CreateEffect(c)
eac:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) eac:SetType(EFFECT_TYPE_ACTIVATE)
c:RegisterEffect(eac) eac:SetCode(EVENT_FREE_CHAIN)
--self limitation eac:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
local esl=Effect.CreateEffect(c) c:RegisterEffect(eac)
esl:SetDescription(aux.Stringid(71400001,1)) --[[--old self limitation
esl:SetType(EFFECT_TYPE_QUICK_F) local esl=Effect.CreateEffect(c)
esl:SetCode(EVENT_CHAINING) esl:SetDescription(aux.Stringid(71400001,1))
esl:SetRange(LOCATION_FZONE) esl:SetType(EFFECT_TYPE_QUICK_F)
esl:SetCondition(yume.YumeFieldLimitCon) esl:SetCode(EVENT_CHAINING)
esl:SetOperation(yume.YumeFieldLimitOp) esl:SetRange(LOCATION_FZONE)
c:RegisterEffect(esl) esl:SetCondition(yume.YumeFieldLimitCon)
--field activation esl:SetOperation(yume.YumeFieldLimitOp)
local efa=Effect.CreateEffect(c) c:RegisterEffect(esl)
efa:SetDescription(aux.Stringid(71400001,2)) --]]
efa:SetCategory(EFFECT_TYPE_ACTIVATE) --self to deck
efa:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) local esd1=Effect.CreateEffect(c)
efa:SetCode(EVENT_LEAVE_FIELD) esd1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
efa:SetRange(LOCATION_FZONE) esd1:SetCode(EVENT_CHAINING)
efa:SetProperty(EFFECT_FLAG_DAMAGE_STEP) esd1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
efa:SetCondition(yume.FieldActivationCon) esd1:SetRange(LOCATION_FZONE)
efa:SetOperation(yume.FieldActivationOp) esd1:SetOperation(aux.chainreg)
c:RegisterEffect(efa) c:RegisterEffect(esd1)
end local esd2=Effect.CreateEffect(c)
--Against Yume esd2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
function yume.YumeFieldLimitCon(e,tp,eg,ep,ev,re,r,rp) esd2:SetCode(EVENT_CHAIN_SOLVED)
local ec=re:GetHandler() esd2:SetRange(LOCATION_FZONE)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) esd2:SetOperation(yume.SelfToDeckOp)
return re:IsActiveType(TYPE_MONSTER) and rp==tp and (not ec:IsSetCard(0x714) and (ec:IsLocation(loc) or loc&LOCATION_ONFIELD==0) or not (ec:IsPreviousSetCard(0x714) or ec:IsLocation(loc)) and loc&LOCATION_ONFIELD~=0) c:RegisterEffect(esd2)
end --field activation
function yume.YumeFieldLimitOp(e,tp,eg,ep,ev,re,r,rp) local efa=Effect.CreateEffect(c)
local c=e:GetHandler() efa:SetDescription(aux.Stringid(71400001,2))
if not c:IsRelateToEffect(e) then return end efa:SetCategory(EFFECT_TYPE_ACTIVATE)
local e1=Effect.CreateEffect(c) efa:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetType(EFFECT_TYPE_FIELD) efa:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) efa:SetRange(LOCATION_FZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) efa:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetReset(RESET_PHASE+PHASE_END) efa:SetCondition(yume.FieldActivationCon)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x714)) efa:SetOperation(yume.FieldActivationOp)
e1:SetTargetRange(1,0) c:RegisterEffect(efa)
Duel.RegisterEffect(e1,tp) end
local e2=Effect.CreateEffect(c) --[[--old Against Yume
e2:SetType(EFFECT_TYPE_FIELD) function yume.YumeFieldLimitCon(e,tp,eg,ep,ev,re,r,rp)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) local ec=re:GetHandler()
e2:SetCode(EFFECT_CANNOT_SUMMON) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
e2:SetReset(RESET_PHASE+PHASE_END) return re:IsActiveType(TYPE_MONSTER) and rp==tp and (not ec:IsSetCard(0x714) and (ec:IsLocation(loc) or loc&LOCATION_ONFIELD==0) or not (ec:IsPreviousSetCard(0x714) or ec:IsLocation(loc)) and loc&LOCATION_ONFIELD~=0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x714)) end
e2:SetTargetRange(1,0) function yume.YumeFieldLimitOp(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp) local c=e:GetHandler()
local e3=Effect.CreateEffect(c) if not c:IsRelateToEffect(e) then return end
e3:SetType(EFFECT_TYPE_FIELD) local e1=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_MSET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetReset(RESET_PHASE+PHASE_END) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x714)) e1:SetReset(RESET_PHASE+PHASE_END)
e3:SetTargetRange(1,0) e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x714))
Duel.RegisterEffect(e3,tp) e1:SetTargetRange(1,0)
local e4=Effect.CreateEffect(c) Duel.RegisterEffect(e1,tp)
e4:SetType(EFFECT_TYPE_FIELD) local e2=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetReset(RESET_PHASE+PHASE_END) e2:SetCode(EFFECT_CANNOT_SUMMON)
e4:SetValue(yume.YumeFieldActivationLimit) e2:SetReset(RESET_PHASE+PHASE_END)
e4:SetTargetRange(1,0) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x714))
Duel.RegisterEffect(e4,tp) e2:SetTargetRange(1,0)
end Duel.RegisterEffect(e2,tp)
function yume.YumeFieldActivationLimit(e,re,tp) local e3=Effect.CreateEffect(c)
local c=re:GetHandler() e3:SetType(EFFECT_TYPE_FIELD)
return c:IsSetCard(0x714) and not c:IsImmuneToEffect(e) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
end e3:SetCode(EFFECT_CANNOT_MSET)
--Field Activation e3:SetReset(RESET_PHASE+PHASE_END)
function yume.YumeFieldCheck(tp,num,ft,loc) e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x714))
ft=ft or 0 e3:SetTargetRange(1,0)
num=num or 0 Duel.RegisterEffect(e3,tp)
loc=loc or LOCATION_DECK local e4=Effect.CreateEffect(c)
return Duel.IsExistingMatchingCard(yume.FieldActivationFilter,tp,loc,0,1,nil,tp,num,ft) e4:SetType(EFFECT_TYPE_FIELD)
end e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
function yume.YumeFieldCheckTarget(num,ft,loc) e4:SetCode(EFFECT_CANNOT_ACTIVATE)
return function(e,tp,eg,ep,ev,re,r,rp,chk) e4:SetReset(RESET_PHASE+PHASE_END)
if chk==0 then return yume.YumeFieldCheck(tp,num,ft,loc) end e4:SetValue(yume.YumeFieldActivationLimit)
end e4:SetTargetRange(1,0)
end Duel.RegisterEffect(e4,tp)
function yume.FieldActivation(tp,num,ft,loc) end
ft=ft or 0 function yume.YumeFieldActivationLimit(e,re,tp)
num=num or 0 local c=re:GetHandler()
loc=loc or LOCATION_DECK return c:IsSetCard(0x714)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71400001,3)) end
local tc=Duel.SelectMatchingCard(tp,yume.FieldActivationFilter,tp,loc,0,1,1,nil,tp,num,ft):GetFirst() --]]
if tc then --Self To Deck
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) function yume.SelfToDeckOp(e,tp,eg,ep,ev,re,r,rp)
if fc then local c=e:GetHandler()
Duel.SendtoGrave(fc,REASON_RULE) if not re:GetHandler():IsSetCard(0x714) and c:GetFlagEffect(1)>0 then
Duel.BreakEffect() Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) end
local te=tc:GetActivateEffect() --Field Activation
te:UseCountLimit(tp,1,true) function yume.YumeFieldCheck(tp,num,ft,loc)
local tep=tc:GetControler() ft=ft or 0
local cost=te:GetCost() num=num or 0
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end loc=loc or LOCATION_DECK
local id=yume.temp_card_field[tc].id or 0 return Duel.IsExistingMatchingCard(yume.FieldActivationFilter,tp,loc,0,1,nil,tp,num,ft)
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain()) end
return tc function yume.YumeFieldCheckTarget(num,ft,loc)
end return function(e,tp,eg,ep,ev,re,r,rp,chk)
end if chk==0 then return yume.YumeFieldCheck(tp,num,ft,loc) end
function yume.FieldActivationFilter(c,tp,num,ft) end
local flag=c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true) and not c:IsCode(num) end
if ft==0 then return flag and c:IsSetCard(0x3714) function yume.FieldActivation(tp,num,ft,loc)
elseif ft==1 then return flag and c:IsSetCard(0xb714) ft=ft or 0
elseif ft==2 then return flag and c:IsSetCard(0x7714) num=num or 0
end loc=loc or LOCATION_DECK
end Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71400001,3))
function yume.FieldActivationCon(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.SelectMatchingCard(tp,yume.FieldActivationFilter,tp,loc,0,1,1,nil,tp,num,ft):GetFirst()
local c=e:GetHandler() if tc then
return c:IsReason(REASON_EFFECT) and not c:IsLocation(LOCATION_DECK) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
and c:IsPreviousPosition(POS_FACEUP) if fc then
end Duel.SendtoGrave(fc,REASON_RULE)
function yume.FieldActivationOp(e,tp,eg,ep,ev,re,r,rp) Duel.BreakEffect()
local c=e:GetHandler() end
local num=yume.temp_card_field[c].id Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local ft=yume.temp_card_field[c].ft local te=tc:GetActivateEffect()
yume.FieldActivation(tp,num,ft,LOCATION_DECK+LOCATION_HAND) te:UseCountLimit(tp,1,true)
end local tep=tc:GetControler()
--uniquify the same name local cost=te:GetCost()
function yume.UniquifyCardName(g) if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
local tc=g:GetFirst() local id=yume.temp_card_field[tc].id or 0
while tc do Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
g:Remove(Card.IsCode,tc,tc:GetCode()) return tc
tc=g:GetNext() end
end end
function yume.FieldActivationFilter(c,tp,num,ft)
local flag=c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true) and not c:IsCode(num)
if ft==0 then return flag and c:IsSetCard(0x3714)
elseif ft==1 then return flag and c:IsSetCard(0xb714)
elseif ft==2 then return flag and c:IsSetCard(0x7714)
end
end
function yume.FieldActivationCon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and not c:IsLocation(LOCATION_DECK)
and c:IsPreviousPosition(POS_FACEUP)
end
function yume.FieldActivationOp(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local num=yume.temp_card_field[c].id
local ft=yume.temp_card_field[c].ft
yume.FieldActivation(tp,num,ft,LOCATION_DECK+LOCATION_HAND)
end
--uniquify the same name
function yume.UniquifyCardName(g)
local tc=g:GetFirst()
while tc do
g:Remove(Card.IsCode,tc,tc:GetCode())
tc=g:GetNext()
end
end end
\ No newline at end of file
--冰雪中的梦之旅者 --异梦旅者-冰冻子
function c71400002.initial_effect(c) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
--special summon function c71400002.initial_effect(c)
local e1=Effect.CreateEffect(c) --special summon
e1:SetType(EFFECT_TYPE_FIELD) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetCountLimit(1,71400002) e1:SetRange(LOCATION_HAND)
e1:SetCondition(c71400002.condition1) e1:SetCountLimit(1,71400002)
c:RegisterEffect(e1) e1:SetCondition(c71400002.condition1)
--attribute c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) --attribute
e2:SetType(EFFECT_TYPE_FIELD) local e2=Effect.CreateEffect(c)
e2:SetRange(LOCATION_MZONE) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetTargetRange(LOCATION_GRAVE+LOCATION_MZONE,0) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) e2:SetTargetRange(LOCATION_GRAVE+LOCATION_MZONE,0)
e2:SetValue(ATTRIBUTE_WATER) e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
c:RegisterEffect(e2) e2:SetValue(ATTRIBUTE_WATER)
--to deck e2:SetCondition(yume.YumeCon)
local e3=Effect.CreateEffect(c) c:RegisterEffect(e2)
e3:SetDescription(aux.Stringid(71400002,0)) --to deck
e3:SetCategory(CATEGORY_TODECK) local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e3:SetDescription(aux.Stringid(71400002,0))
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetCategory(CATEGORY_TODECK)
e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_TOGRAVE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE) e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_TOGRAVE)
e3:SetTarget(c71400002.target3) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetOperation(c71400002.operation3) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1) e3:SetTarget(c71400002.target3)
c:RegisterEffect(e3) e3:SetOperation(c71400002.operation3)
end e3:SetCountLimit(1)
function c71400002.filter1(c) c:RegisterEffect(e3)
return c:IsSetCard(0x714) and c:IsFaceup() end
end function c71400002.filter1(c)
function c71400002.filter3(c) return c:IsSetCard(0x714) and c:IsFaceup()
return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER) end
end function c71400002.filter3(c)
function c71400002.condition1(e,c) return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER)
if c==nil then return true end end
local tp=c:GetControler() function c71400002.condition1(e,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if c==nil then return true end
and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c71400002.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0
function c71400002.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingMatchingCard(c71400002.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local c=e:GetHandler() end
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c71400002.filter3(chkc) and chkc~=c end function c71400002.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c71400002.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,c) end local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c71400002.filter3(chkc) and chkc~=c end
local g=Duel.SelectTarget(tp,c71400002.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,c) if chk==0 then return Duel.IsExistingTarget(c71400002.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,c) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,LOCATION_MZONE+LOCATION_GRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
end local g=Duel.SelectTarget(tp,c71400002.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,c)
function c71400002.operation3(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,LOCATION_MZONE+LOCATION_GRAVE)
local tc=Duel.GetFirstTarget() end
local c=e:GetHandler() function c71400002.operation3(e,tp,eg,ep,ev,re,r,rp,chk)
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then local tc=Duel.GetFirstTarget()
local e1=Effect.CreateEffect(c) local c=e:GetHandler()
e1:SetType(EFFECT_TYPE_SINGLE) if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then
e1:SetCode(EFFECT_UPDATE_ATTACK) local e1=Effect.CreateEffect(c)
e1:SetReset(RESET_EVENT+0x1ff0000) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetValue(500) e1:SetCode(EFFECT_UPDATE_ATTACK)
c:RegisterEffect(e1) e1:SetReset(RESET_EVENT+0x1ff0000)
end e1:SetValue(500)
c:RegisterEffect(e1)
end
end end
\ No newline at end of file
--梦之公寓的圆盘人 --梦之公寓的圆盘人
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400004.initial_effect(c) function c71400004.initial_effect(c)
--summon limit --summon limit
yume.AddYumeSummonLimit(c) yume.AddYumeSummonLimit(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(c71400004.condition1) e1:SetCondition(c71400004.condition1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400004,0)) e2:SetDescription(aux.Stringid(71400004,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL) e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,71400004) e2:SetCountLimit(1,71400004)
e2:SetCondition(c71400004.condition2) e2:SetCondition(c71400004.condition2)
e2:SetTarget(c71400004.target2) e2:SetTarget(c71400004.target2)
e2:SetOperation(c71400004.operation2) e2:SetOperation(c71400004.operation2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400004.filter1(c) function c71400004.filter1(c)
return c:IsSetCard(0x714) and c:IsFaceup() and c:IsType(TYPE_TUNER) return c:IsSetCard(0x714) and c:IsFaceup() and c:IsType(TYPE_TUNER)
end end
function c71400004.condition1(e,c) function c71400004.condition1(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
and Duel.IsExistingMatchingCard(c71400004.filter1,tp,LOCATION_MZONE,0,1,nil) and yume.YumeCheck(c) and Duel.IsExistingMatchingCard(c71400004.filter1,tp,LOCATION_MZONE,0,1,nil) and yume.YumeCheck(c)
end end
function c71400004.filter2(c) function c71400004.filter2(c)
return c:IsSetCard(0xe714) and c:IsAbleToHand() return c:IsSetCard(0xe714) and c:IsAbleToHand()
end end
function c71400004.condition2(e,tp,eg,ep,ev,re,r,rp) function c71400004.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end end
function c71400004.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400004.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400004.filter2,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400004.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c71400004.operation2(e,tp,eg,ep,ev,re,r,rp) function c71400004.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400004.filter2,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c71400004.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
--梦之钢琴师 --梦之钢琴师
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400005.initial_effect(c) function c71400005.initial_effect(c)
--summon limit --summon limit
yume.AddYumeSummonLimit(c) yume.AddYumeSummonLimit(c)
--summon success --summon success
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400005,0)) e1:SetDescription(aux.Stringid(71400005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c71400005.target1) e1:SetTarget(c71400005.target1)
e1:SetCountLimit(1,71400005) e1:SetCountLimit(1,71400005)
e1:SetOperation(c71400005.operation1) e1:SetOperation(c71400005.operation1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--synchro effect --synchro effect
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400005,1)) e1:SetDescription(aux.Stringid(71400005,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END) e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c71400005.condition2) e2:SetCondition(c71400005.condition2)
e2:SetTarget(c71400005.target2) e2:SetTarget(c71400005.target2)
e2:SetOperation(c71400005.operation2) e2:SetOperation(c71400005.operation2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400005.filter1(c,e,sp) function c71400005.filter1(c,e,sp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,sp,false,false) return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end end
function c71400005.target1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400005.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400005.filter1,tp,LOCATION_DECK,0,1,nil,e,tp) if chk==0 then return Duel.IsExistingMatchingCard(c71400005.filter1,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c71400005.operation1(e,tp,eg,ep,ev,re,r,rp) function c71400005.operation1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71400005.filter1,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c71400005.filter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
end end
function c71400005.condition2(e,tp,eg,ep,ev,re,r,rp) function c71400005.condition2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return false end if Duel.GetTurnPlayer()==tp then return false end
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2
end end
function c71400005.filter2(c) function c71400005.filter2(c)
return c:IsSetCard(0x714) return c:IsSetCard(0x714)
end end
function c71400005.synfilter(c,mg) function c71400005.synfilter(c,mg)
return c:IsSetCard(0x714) and c:IsSynchroSummonable(nil,mg) return c:IsSetCard(0x714) and c:IsSynchroSummonable(nil,mg)
end end
function c71400005.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400005.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetMatchingGroup(c71400005.filter2,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(c71400005.filter2,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(c71400005.synfilter,tp,LOCATION_EXTRA,0,1,nil,mg) return Duel.IsExistingMatchingCard(c71400005.synfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c71400005.operation2(e,tp,eg,ep,ev,re,r,rp) function c71400005.operation2(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(c71400005.filter2,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(c71400005.filter2,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(c71400005.synfilter,tp,LOCATION_EXTRA,0,nil,mg) local g=Duel.GetMatchingGroup(c71400005.synfilter,tp,LOCATION_EXTRA,0,nil,mg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg) Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end end
end end
\ No newline at end of file
--梦医院的梦之患者 --异梦医院的病人-青汁君
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400006.initial_effect(c) function c71400006.initial_effect(c)
--summon limit --summon limit
yume.AddYumeSummonLimit(c) yume.AddYumeSummonLimit(c)
--summon success --summon success
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400006,0)) e1:SetDescription(aux.Stringid(71400006,0))
e1:SetCountLimit(1,71400006) e1:SetCountLimit(1,71400006)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c71400006.target1) e1:SetTarget(c71400006.target1)
e1:SetOperation(c71400006.operation1) e1:SetOperation(c71400006.operation1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e1a=e1:Clone() local e1a=e1:Clone()
e1a:SetCode(EVENT_SPSUMMON_SUCCESS) e1a:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1a) c:RegisterEffect(e1a)
--self des --self des
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400006,1)) e2:SetDescription(aux.Stringid(71400006,1))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_F) e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_BECOME_TARGET) e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c71400006.con2) e2:SetCondition(c71400006.con2)
e2:SetTarget(c71400006.target2) e2:SetTarget(c71400006.target2)
e2:SetOperation(c71400006.operation2) e2:SetOperation(c71400006.operation2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e2a=e2:Clone() local e2a=e2:Clone()
e2a:SetDescription(aux.Stringid(71400006,1)) e2a:SetDescription(aux.Stringid(71400006,1))
e2a:SetCode(EVENT_BE_BATTLE_TARGET) e2a:SetCode(EVENT_BE_BATTLE_TARGET)
c:RegisterEffect(e2a) c:RegisterEffect(e2a)
end end
function c71400006.filter1(c,e,tp) function c71400006.filter1(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c71400006.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400006.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400006.filter1(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400006.filter1(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c71400006.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return Duel.IsExistingTarget(c71400006.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c71400006.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c71400006.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,LOCATION_MZONE)
end end
function c71400006.operation1(e,tp,eg,ep,ev,re,r,rp) function c71400006.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
local dg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local dg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if dg:GetCount()>0 then if dg:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Remove(g:GetFirst(),POS_FACEUP,REASON_EFFECT) Duel.Remove(g:GetFirst(),POS_FACEUP,REASON_EFFECT)
end end
end end
end end
function c71400006.con2(e,tp,eg,ep,ev,re,r,rp) function c71400006.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler()) return eg:IsContains(e:GetHandler())
end end
function c71400006.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400006.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end end
function c71400006.operation2(e,tp,eg,ep,ev,re,r,rp) function c71400006.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT) Duel.Destroy(c,REASON_EFFECT)
end end
end end
\ No newline at end of file
--梦之镇的路标 --异梦胡同的路标
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400007.initial_effect(c) function c71400007.initial_effect(c)
--summon limit --summon limit
yume.AddYumeSummonLimit(c) yume.AddYumeSummonLimit(c)
--summon success --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetDescription(aux.Stringid(71400007,0))
e1:SetDescription(aux.Stringid(71400007,0)) e1:SetCategory(CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCountLimit(1,71400007) e1:SetCountLimit(1,71400007)
e1:SetTarget(c71400007.tg1) e1:SetCondition(c71400007.con1)
e1:SetOperation(c71400007.op1) e1:SetTarget(c71400007.tg1)
c:RegisterEffect(e1) e1:SetOperation(c71400007.op1)
local e1a=e1:Clone() c:RegisterEffect(e1)
e1a:SetCode(EVENT_SPSUMMON_SUCCESS) --gy banish
c:RegisterEffect(e1a) local e2=Effect.CreateEffect(c)
--gy banish e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
local e2=Effect.CreateEffect(c) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetDescription(aux.Stringid(71400007,1))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetDescription(aux.Stringid(71400007,1)) e2:SetRange(LOCATION_GRAVE)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCountLimit(1,71500007)
e2:SetRange(LOCATION_GRAVE) e2:SetCost(c71400007.cost)
e2:SetCountLimit(1,71500007) e2:SetTarget(c71400007.target)
e2:SetCost(c71400007.cost) e2:SetOperation(c71400007.operation)
e2:SetTarget(c71400007.target) c:RegisterEffect(e2)
e2:SetOperation(c71400007.operation) end
c:RegisterEffect(e2)
end function c71400007.con1(e,tp,eg,ep,ev,re,r,rp)
function c71400007.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK
local c=e:GetHandler() end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and Card.IsLinkState(chkc) and chkc~=c end function c71400007.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsLinkState,tp,LOCATION_MZONE,0,1,c) and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_CONTROL)>0 end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71400007,2)) Duel.SetTargetPlayer(tp)
Duel.SelectTarget(tp,Card.IsLinkState,tp,LOCATION_MZONE,0,1,1,c) Duel.SetTargetParam(1)
end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
function c71400007.op1(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function c71400007.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end Duel.Draw(p,d,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) end
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0) function c71400007.filter(c,e,tp,zone)
local nseq=math.log(s,2) return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
Duel.MoveSequence(tc,nseq) end
end function c71400007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function c71400007.filter(c,e,tp,zone) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c71400007.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end local zone=Duel.GetLinkedZone(tp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c71400007.filter(chkc,e,tp,zone) end
end if chk==0 then return zone~=0
function c71400007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) and Duel.IsExistingTarget(c71400007.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp,zone) end
local zone=Duel.GetLinkedZone(tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c71400007.filter(chkc,e,tp,zone) end local tg=Duel.SelectTarget(tp,c71400007.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp,zone)
if chk==0 then return zone~=0 Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0)
and Duel.IsExistingTarget(c71400007.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp,zone) end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) function c71400007.operation(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.SelectTarget(tp,c71400007.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp,zone) local zone=Duel.GetLinkedZone(tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0) local tc=Duel.GetFirstTarget()
end if tc:IsRelateToEffect(e) and zone~=0 then
function c71400007.operation(e,tp,eg,ep,ev,re,r,rp) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
local zone=Duel.GetLinkedZone(tp) end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and zone~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end end
\ No newline at end of file
--梦之书中的三足怪物 --异梦书中的三足怪物
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400008.initial_effect(c) function c71400008.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,yume.YumeCheck(c),4,3) aux.AddXyzProcedure(c,yume.YumeCheck(c),4,3)
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--nuke --nuke
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400008,0)) e1:SetDescription(aux.Stringid(71400008,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_F) e1:SetType(EFFECT_TYPE_QUICK_F)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c71400008.condition) e1:SetCondition(c71400008.condition)
e1:SetCost(c71400008.cost) e1:SetCost(c71400008.cost)
e1:SetTarget(c71400008.target) e1:SetTarget(c71400008.target)
e1:SetOperation(c71400008.operation) e1:SetOperation(c71400008.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c71400008.condition(e,tp,eg,ep,ev,re,r,rp) function c71400008.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp return rp~=tp and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_ONFIELD,nil)>2
end end
function c71400008.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400008.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c71400008.target(e,tp,eg,ep,ev,re,r,rp,chk) function c71400008.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),1-tp,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),1-tp,0)
end end
function c71400008.operation(e,tp,eg,ep,ev,re,r,rp) function c71400008.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,e:GetHandler())
if Duel.Destroy(g,REASON_EFFECT)>0 then if Duel.Destroy(g,REASON_EFFECT)>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-1500) Duel.SetLP(tp,Duel.GetLP(tp)-1500)
end end
end end
\ No newline at end of file
--梦之书中的公式证明图表 --异梦书中的公式证明图表
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400009.initial_effect(c) function c71400009.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,yume.YumeCheck(c),4,2) aux.AddXyzProcedure(c,yume.YumeCheck(c),4,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_LEAVE_FIELD) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetDescription(aux.Stringid(71400009,0)) e1:SetDescription(aux.Stringid(71400009,0))
e1:SetCondition(c71400009.condition) e1:SetCountLimit(1,71400009)
e1:SetTarget(c71400009.target) e1:SetTarget(c71400009.tg1)
e1:SetOperation(c71400009.operation) e1:SetOperation(c71400009.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end --multi attack
function c71400009.condition(e,tp,eg,ep,ev,re,r,rp) local e2=Effect.CreateEffect(c)
local c=e:GetHandler() e2:SetType(EFFECT_TYPE_SINGLE)
local ct=c:GetOverlayCount() e2:SetCode(EFFECT_EXTRA_ATTACK)
e:SetLabel(ct) e2:SetValue(c71400009.raval)
return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) c:RegisterEffect(e2)
end end
function c71400009.target(e,tp,eg,ep,ev,re,r,rp,chk) function c71400009.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,1-tp,LOCATION_ONFIELD+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,0,0)
end end
function c71400009.operation(e,tp,eg,ep,ev,re,r,rp) function c71400009.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local mcount=c:GetOverlayCount()
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil) if mcount<=0 or not Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,mcount,nil) then return end
if g:GetCount()==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
if Duel.Destroy(g,REASON_EFFECT)~=0 then local sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,mcount,nil)
local mcount=e:GetLabel() Duel.HintSelection(sg)
if not mcount or mcount<=0 or not Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,mcount,nil) then return end if Duel.Destroy(sg,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.BreakEffect()
local sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,mcount,mcount,nil) Duel.SetLP(tp,Duel.GetLP(tp)-1000)
Duel.HintSelection(sg) end
if Duel.Destroy(sg,REASON_EFFECT)>0 then end
Duel.BreakEffect() function c71400009.raval(e,c)
Duel.SetLP(tp,Duel.GetLP(tp)-1000) local oc=e:GetHandler():GetOverlayCount()
end return math.max(0,oc-1)
end
end end
\ No newline at end of file
--梦之书中的脑女 --异梦书中的脑女
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400010.initial_effect(c) function c71400010.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,yume.YumeCheck(c),4,2) aux.AddXyzProcedure(c,yume.YumeCheck(c),4,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--get all --get all
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL) e1:SetCategory(CATEGORY_CONTROL)
e1:SetDescription(aux.Stringid(71400010,0)) e1:SetDescription(aux.Stringid(71400010,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,71400010) e1:SetCountLimit(1,71400010)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCost(c71400010.cost) e1:SetCost(c71400010.cost)
e1:SetTarget(c71400010.target1) e1:SetTarget(c71400010.target1)
e1:SetOperation(c71400010.operation1) e1:SetOperation(c71400010.operation1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--lose one --lose one
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_CONTROL) e2:SetCategory(CATEGORY_CONTROL)
e2:SetDescription(aux.Stringid(71400010,1)) e2:SetDescription(aux.Stringid(71400010,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c71400010.target2) e2:SetTarget(c71400010.target2)
e2:SetOperation(c71400010.operation2) e2:SetOperation(c71400010.operation2)
e2:SetCondition(c71400010.condition2) e2:SetCondition(c71400010.condition2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400010.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.GetCurrentPhase()~=PHASE_MAIN2 end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) and Duel.GetCurrentPhase()~=PHASE_MAIN2 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP) e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c71400010.filter1(c) function c71400010.filter1(c)
return c:IsFaceup() and c:IsAbleToChangeControler() return c:IsFaceup() and c:IsAbleToChangeControler()
end end
function c71400010.target1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400010.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,1-tp,LOCATION_REASON_CONTROL) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,1-tp,LOCATION_REASON_CONTROL)
if chk==0 then return Duel.IsExistingMatchingCard(c71400010.filter1,tp,0,LOCATION_MZONE,1,nil) and ft>0 end if chk==0 then return Duel.IsExistingMatchingCard(c71400010.filter1,tp,0,LOCATION_MZONE,1,nil) and ft>0 end
local g=Duel.GetMatchingGroup(c71400010.filter1,tp,0,LOCATION_MZONE,c) local g=Duel.GetMatchingGroup(c71400010.filter1,tp,0,LOCATION_MZONE,c)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),1-tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),1-tp,LOCATION_MZONE)
end end
function c71400010.operation1(e,tp,eg,ep,ev,re,r,rp) function c71400010.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,1-tp,LOCATION_REASON_CONTROL) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,1-tp,LOCATION_REASON_CONTROL)
local g=Duel.GetMatchingGroup(c71400010.filter1,tp,0,LOCATION_MZONE,c) local g=Duel.GetMatchingGroup(c71400010.filter1,tp,0,LOCATION_MZONE,c)
local ct=g:GetCount() local ct=g:GetCount()
if ct>ft then ct=ft end if ct>ft then ct=ft end
if ct<1 then return end if ct<1 then return end
if ct<g:GetCount() then if ct<g:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
g=g:Select(tp,ct,ct,nil) g=g:Select(tp,ct,ct,nil)
end end
Duel.GetControl(g,tp) Duel.GetControl(g,tp)
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
if og:GetCount()<1 then return end if og:GetCount()<1 then return end
local tc=og:GetFirst() local tc=og:GetFirst()
local atk=0 local atk=0
while tc do while tc do
local tatk=tc:GetAttack() local tatk=tc:GetAttack()
if tatk>0 then atk=atk+tatk end if tatk>0 then atk=atk+tatk end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE) e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(0x714) e1:SetValue(0x714)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetValue(1) e2:SetValue(1)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2,true) tc:RegisterEffect(e2,true)
tc=og:GetNext() tc=og:GetNext()
end end
Duel.BreakEffect() Duel.SetLP(tp,Duel.GetLP(tp)-atk/2)
Duel.SetLP(tp,Duel.GetLP(tp)-atk/2) end
end function c71400010.condition2(e,tp,eg,ep,ev,re,r,rp)
function c71400010.condition2(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler()
local c=e:GetHandler() return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK)
return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK) end
end function c71400010.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c71400010.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()==tp and chkc:IsControlerCanBeChanged() end
if chkc then return chkc:GetLocation()==LOCATION_MZONE and chkc:GetControler()==tp and chkc:IsControlerCanBeChanged() end if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,LOCATION_MZONE) end
end function c71400010.operation2(e,tp,eg,ep,ev,re,r,rp)
function c71400010.operation2(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget()
local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then Duel.GetControl(tc,1-tp)
Duel.GetControl(tc,1-tp) end
end
end end
\ No newline at end of file
--梦之书的管理员 --异梦书使-馆长女儿
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400011.initial_effect(c) function c71400011.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,yume.YumeCheck(c),4,2) aux.AddXyzProcedure(c,yume.YumeCheck(c),4,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--special summon --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400011,0)) e1:SetDescription(aux.Stringid(71400011,0))
e1:SetCountLimit(1,71400011) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,71400011+EFFECT_COUNT_CODE_DUEL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCondition(c71400011.con1)
e1:SetCost(c71400011.cost) e1:SetTarget(c71400011.tg1)
e1:SetTarget(c71400011.target1) e1:SetOperation(c71400011.op1)
e1:SetOperation(c71400011.operation1) c:RegisterEffect(e1)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) --special summon
c:RegisterEffect(e1) local e2=Effect.CreateEffect(c)
--fly away e2:SetDescription(aux.Stringid(71400011,1))
local e2a=Effect.CreateEffect(c) e2:SetCountLimit(1,71500011)
e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetType(EFFECT_TYPE_QUICK_O)
e2a:SetCode(EVENT_CHAINING) e2:SetRange(LOCATION_MZONE)
e2a:SetRange(LOCATION_MZONE+LOCATION_GRAVE) e2:SetCode(EVENT_FREE_CHAIN)
e2a:SetOperation(aux.chainreg) e2:SetCost(c71400011.cost)
c:RegisterEffect(e2a) e2:SetTarget(c71400011.tg2)
local e2=Effect.CreateEffect(c) e2:SetOperation(c71400011.op2)
e2:SetDescription(aux.Stringid(71400011,1)) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) c:RegisterEffect(e2)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) --fly away
e2:SetCode(EVENT_CHAIN_SOLVED) local e3a=Effect.CreateEffect(c)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) e3a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCondition(c71400011.condition2) e3a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetTarget(c71400011.target2) e3a:SetCode(EVENT_CHAINING)
e2:SetOperation(c71400011.operation2) e3a:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
c:RegisterEffect(e2) e3a:SetOperation(aux.chainreg)
end c:RegisterEffect(e3a)
function c71400011.cost(e,tp,eg,ep,ev,re,r,rp,chk) local e3=Effect.CreateEffect(c)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end e3:SetDescription(aux.Stringid(71400011,2))
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
end e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
function c71400011.filter1(c) e3:SetCode(EVENT_CHAIN_SOLVED)
return c:IsSetCard(0x714) e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
end e3:SetCondition(c71400011.con3)
function c71400011.xyzfilter(c,e,tp) e3:SetTarget(c71400011.tg3)
return c:IsSetCard(0x3715) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 e3:SetOperation(c71400011.op3)
end c:RegisterEffect(e3)
function c71400011.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chk==0 then return Duel.IsExistingTarget(c71400011.filter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(c71400011.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end function c71400011.con1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
local g1=Duel.SelectTarget(tp,c71400011.filter1,tp,LOCATION_GRAVE,0,1,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,g1:GetCount(),tp,LOCATION_GRAVE) function c71400011.filter1(c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) return c:IsSetCard(0xe714) and c:IsAbleToHand()
end end
function c71400011.operation1(e,tp,eg,ep,ev,re,r,rp) function c71400011.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c71400011.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp) if chk==0 then return Duel.IsExistingMatchingCard(c71400011.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
local sg=g:Select(tp,1,1,nil) end
local sc=sg:GetFirst() function c71400011.op1(e,tp,eg,ep,ev,re,r,rp)
if sc then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) local g=Duel.SelectMatchingCard(tp,c71400011.filter1,tp,LOCATION_DECK,0,1,1,nil)
local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) if g:GetCount()>0 then
if mg:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.Overlay(sc,mg) Duel.ConfirmCards(1-tp,g)
end end
end end
end function c71400011.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function c71400011.filter2(c) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
return c:IsSetCard(0xb714) and c:IsType(TYPE_FIELD) and c:IsAbleToHand() e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c71400011.condition2(e,tp,eg,ep,ev,re,r,rp) function c71400011.filter2(c)
local c=e:GetHandler() return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER)
local rc=re:GetHandler() end
return rc:IsCode(71400026) and c:GetFlagEffect(1)>0 and re:IsHasType(EFFECT_TYPE_ACTIVATE) function c71400011.xyzfilter(c,e,tp)
end return c:IsSetCard(0x3715) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
function c71400011.target2(e,tp,eg,ep,ev,re,r,rp,chk) end
if chk==0 then return true end function c71400011.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) if chk==0 then return Duel.IsExistingMatchingCard(c71400011.filter2,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(c71400011.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
function c71400011.operation2(e,tp,eg,ep,ev,re,r,rp) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,0,tp,LOCATION_GRAVE)
local c=e:GetHandler() Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
if c:IsRelateToEffect(e) and bit.band(c:GetOriginalType(),0x802040)~=0 and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA) then end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) function c71400011.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c71400011.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.GetMatchingGroup(c71400011.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if g:GetCount()>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.SendtoHand(g,nil,REASON_EFFECT) local sg=g:Select(tp,1,1,nil)
Duel.ConfirmCards(1-tp,g) local sc=sg:GetFirst()
end if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
end local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECK)
sc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
local mg=Duel.GetMatchingGroup(c71400011.filter2,tp,LOCATION_GRAVE,0,nil)
if mg:GetCount()>0 then
local smg=mg:Select(tp,1,3,nil)
Duel.Overlay(sc,smg)
end
end
end
function c71400011.filter3(c)
return c:IsSetCard(0xb714) and c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c71400011.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return rc:IsCode(71400026) and c:GetFlagEffect(1)>0
end
function c71400011.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c71400011.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and bit.band(c:GetOriginalType(),0x802040)~=0 and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400011.filter3,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end end
\ No newline at end of file
--梦之迷宫的剧面人 --异梦迷宫的狐面武士-师傅
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400012.initial_effect(c) function c71400012.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,yume.YumeCheck(c),aux.NonTuner(yume.YumeCheck(c)),1) aux.AddSynchroProcedure(c,yume.YumeCheck(c),aux.NonTuner(yume.YumeCheck(c)),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--cannot be target --immune
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE)
e1:SetRange(LOCATION_MZONE) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(aux.tgoval) e1:SetValue(c71400012.filter1)
c:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
--banish c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) --banish
e2:SetDescription(aux.Stringid(71400012,0)) local e2a=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) e2a:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_BATTLE_START) e2a:SetCode(EVENT_CHAINING)
e2:SetTarget(c71400012.target) e2a:SetRange(LOCATION_MZONE)
e2:SetOperation(c71400012.operation) e2a:SetOperation(aux.chainreg)
c:RegisterEffect(e2) c:RegisterEffect(e2a)
end local e2=Effect.CreateEffect(c)
function c71400012.target(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
local tc=e:GetHandler():GetBattleTarget() e2:SetRange(LOCATION_MZONE)
if chk==0 then return tc and tc:IsControler(1-tp) and tc:IsAbleToRemove() and not tc:IsType(TYPE_TOKEN) end e2:SetCode(EVENT_CHAIN_SOLVING)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0) e2:SetOperation(c71400012.op2)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000) c:RegisterEffect(e2)
end --banish
function c71400012.operation(e,tp,eg,ep,ev,re,r,rp) local e3=Effect.CreateEffect(c)
if Duel.Damage(1-tp,2000,REASON_EFFECT)~=0 then e3:SetDescription(aux.Stringid(71400012,0))
local tc=e:GetHandler():GetBattleTarget() e3:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE+CATEGORY_DESTROY)
if tc:IsRelateToBattle() then e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) e3:SetCode(EVENT_BATTLE_START)
end e3:SetTarget(c71400012.tg3)
end e3:SetOperation(c71400012.op3)
c:RegisterEffect(e3)
end
function c71400012.filter1(e,te)
local c=e:GetHandler()
local ec=te:GetHandler()
if ec:IsHasCardTarget(c) then return true end
return te:IsHasType(EFFECT_TYPE_ACTIONS) and te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and c:IsRelateToEffect(te)
end
function c71400012.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(1)==0 then return end
if not re:IsActiveType(TYPE_EFFECT) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if g and g:IsContains(c) then
local rp=re:GetHandler()
local mg=Duel.GetMatchingGroup(Card.IsAbleToRemove,rp,LOCATION_MZONE,0,c,tp)
if mg:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=mg:Select(tp,1,1,nil)
if Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED)>0 then
Duel.Damage(rp,2000,REASON_EFFECT)
end
end
end
function c71400012.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc and tc:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tc:GetControler(),2000)
end
function c71400012.op3(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc then
local bp=tc:GetControler()
if tc:IsRelateToBattle() and Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED)>0 then
Duel.Damage(bp,2000,REASON_EFFECT)
end
end
end end
\ No newline at end of file
--梦坠 --梦坠
function c71400013.initial_effect(c) function c71400013.initial_effect(c)
--Activate(nofield) --Activate(nofield)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400013,1)) e1:SetDescription(aux.Stringid(71400013,1))
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetCondition(c71400013.condition1) e1:SetCondition(c71400013.condition1)
e1:SetTarget(c71400013.target1) e1:SetTarget(c71400013.target1)
e1:SetCost(c71400013.cost) e1:SetCost(c71400013.cost)
e1:SetOperation(c71400013.operation1) e1:SetOperation(c71400013.operation1)
e1:SetCountLimit(1,71400013+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,71400013+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Activate(field) --Activate(field)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400013,2)) e2:SetDescription(aux.Stringid(71400013,2))
e2:SetCategory(CATEGORY_TOGRAVE) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c71400013.condition2) e2:SetCondition(c71400013.condition2)
e2:SetTarget(c71400013.target2) e2:SetTarget(c71400013.target2)
e2:SetCost(c71400013.cost) e2:SetCost(c71400013.cost)
e2:SetOperation(c71400013.operation2) e2:SetOperation(c71400013.operation2)
e2:SetCountLimit(1,71400013+EFFECT_COUNT_CODE_OATH) e2:SetCountLimit(1,71400013+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400013.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400013.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500) Duel.PayLPCost(tp,500)
end end
function c71400013.condition1(e,tp,eg,ep,ev,re,r,rp) function c71400013.condition1(e,tp,eg,ep,ev,re,r,rp)
tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
return tc==nil or tc:IsFacedown() or not tc:IsSetCard(0x3714) return tc==nil or tc:IsFacedown() or not tc:IsSetCard(0x3714)
end end
function c71400013.condition2(e,tp,eg,ep,ev,re,r,rp) function c71400013.condition2(e,tp,eg,ep,ev,re,r,rp)
tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
return tc and tc:IsFaceup() and tc:IsSetCard(0x3714) return tc and tc:IsFaceup() and tc:IsSetCard(0x3714)
end end
function c71400013.filter1(c,tp) function c71400013.filter1(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true) and c:IsSetCard(0xb714) return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true) and c:IsSetCard(0xb714)
end end
function c71400013.filter1a(c) function c71400013.filter1a(c)
return c:IsFaceup() and c:IsAbleToGrave() return c:IsFaceup() and c:IsAbleToGrave()
end end
function c71400013.filter2(c) function c71400013.filter2(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end end
function c71400013.operation1(e,tp,eg,ep,ev,re,r,rp) function c71400013.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=yume.FieldActivation(tp,nil,1) local tc=yume.FieldActivation(tp,nil,1)
local dg=Duel.GetMatchingGroup(c71400013.filter1a,tp,0,LOCATION_ONFIELD,nil) local dg=Duel.GetMatchingGroup(c71400013.filter1a,tp,0,LOCATION_ONFIELD,nil)
if tc and dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400013,3)) then if tc and dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400013,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local des=dg:Select(tp,1,1,nil) local des=dg:Select(tp,1,1,nil)
Duel.HintSelection(des) Duel.HintSelection(des)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SendtoGrave(des,REASON_EFFECT) Duel.SendtoGrave(des,REASON_EFFECT)
end end
local el1=Effect.CreateEffect(c) local el1=Effect.CreateEffect(c)
el1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) el1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
el1:SetType(EFFECT_TYPE_FIELD) el1:SetType(EFFECT_TYPE_FIELD)
el1:SetCode(EFFECT_CANNOT_SUMMON) el1:SetCode(EFFECT_CANNOT_SUMMON)
el1:SetTarget(c71400013.sumlimit) el1:SetTarget(c71400013.sumlimit)
el1:SetTargetRange(1,0) el1:SetTargetRange(1,0)
el1:SetReset(RESET_PHASE+PHASE_END,2) el1:SetReset(RESET_PHASE+PHASE_END,2)
c:RegisterEffect(el1,tp) c:RegisterEffect(el1,tp)
local el2=el1:Clone() local el2=el1:Clone()
el2:SetCode(EFFECT_CANNOT_MSET) el2:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(el2) c:RegisterEffect(el2)
local el3=el1:Clone() local el3=el1:Clone()
el3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) el3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(el3) c:RegisterEffect(el3)
end end
function c71400013.operation2(e,tp,eg,ep,ev,re,r,rp) function c71400013.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c71400013.filter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,2,nil) local g=Duel.SelectMatchingCard(tp,c71400013.filter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,2,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,nil,REASON_EFFECT) Duel.SendtoGrave(g,nil,REASON_EFFECT)
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
if og:GetCount()==2 then if og:GetCount()==2 then
Duel.BreakEffect() Duel.BreakEffect()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(c71400013.discon) e1:SetCondition(c71400013.discon)
e1:SetOperation(c71400013.disop) e1:SetOperation(c71400013.disop)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
end end
local el1=Effect.CreateEffect(c) local el1=Effect.CreateEffect(c)
el1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) el1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
el1:SetType(EFFECT_TYPE_FIELD) el1:SetType(EFFECT_TYPE_FIELD)
el1:SetCode(EFFECT_CANNOT_SUMMON) el1:SetCode(EFFECT_CANNOT_SUMMON)
el1:SetTarget(c71400013.sumlimit) el1:SetTarget(c71400013.sumlimit)
el1:SetTargetRange(1,0) el1:SetTargetRange(1,0)
el1:SetReset(RESET_PHASE+PHASE_END,2) el1:SetReset(RESET_PHASE+PHASE_END,2)
c:RegisterEffect(el1,tp) c:RegisterEffect(el1,tp)
local el2=el1:Clone() local el2=el1:Clone()
el2:SetCode(EFFECT_CANNOT_MSET) el2:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(el2) c:RegisterEffect(el2)
local el3=el1:Clone() local el3=el1:Clone()
el3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) el3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(el3) c:RegisterEffect(el3)
end end
function c71400013.discon(e,tp,eg,ep,ev,re,r,rp) function c71400013.discon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and rp==1-tp return re:IsActiveType(TYPE_MONSTER) and rp==1-tp
end end
function c71400013.disop(e,tp,eg,ep,ev,re,r,rp) function c71400013.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
function c71400013.sumlimit(e,c) function c71400013.sumlimit(e,c)
return not c:IsSetCard(0x714) return not c:IsSetCard(0x714)
end end
function c71400013.target1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400013.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return yume.YumeFieldCheck(tp,0,1) end if chk==0 then return yume.YumeFieldCheck(tp,0,1) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_ONFIELD)
end end
function c71400013.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400013.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400013.filter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400013.filter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_HAND+LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_HAND+LOCATION_ONFIELD)
end end
\ No newline at end of file
--妄想梦境-梦幻图书馆 --幻异梦境-梦幻图书馆
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400014.initial_effect(c) function c71400014.initial_effect(c)
--Activate --Activate
--See AddYumeFieldGlobal --See AddYumeFieldGlobal
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400014,0)) e2:SetDescription(aux.Stringid(71400014,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c71400014.condition2) e2:SetCondition(c71400014.condition2)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetTarget(c71400014.target2) e2:SetTarget(c71400014.target2)
e2:SetOperation(c71400014.operation2) e2:SetOperation(c71400014.operation2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--draw --draw
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400014,1)) e3:SetDescription(aux.Stringid(71400014,1))
e3:SetCategory(CATEGORY_TOGRAVE) e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(c71400014.condition3) e3:SetCondition(c71400014.condition3)
e3:SetTarget(c71400014.target3) e3:SetTarget(c71400014.target3)
e3:SetOperation(c71400014.operation3) e3:SetOperation(c71400014.operation3)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--self limitation & field activation --self limitation & field activation
yume.AddYumeFieldGlobal(c,71400014,1) yume.AddYumeFieldGlobal(c,71400014,1)
end end
function c71400014.operation2(e,tp,eg,ep,ev,re,r,rp) function c71400014.operation2(e,tp,eg,ep,ev,re,r,rp)
local cnt=Duel.GetLocationCount(tp,LOCATION_MZONE) local cnt=Duel.GetLocationCount(tp,LOCATION_MZONE)
if cnt<=0 or not e:GetHandler():IsRelateToEffect(e) then return end if cnt<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then cnt=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then cnt=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71400014.filter2,tp,LOCATION_HAND,0,1,cnt,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c71400014.filter2,tp,LOCATION_HAND,0,1,cnt,nil,e,tp)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local xyzg=Duel.GetMatchingGroup(c71400014.xyzfilter,tp,LOCATION_EXTRA,0,nil) local xyzg=Duel.GetMatchingGroup(c71400014.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if xyzg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400014,2)) then if xyzg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400014,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst() local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.BreakEffect() Duel.BreakEffect()
Duel.XyzSummon(tp,xyz,nil) Duel.XyzSummon(tp,xyz,nil)
end end
end end
function c71400014.filter2(c,e,tp) function c71400014.filter2(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c71400014.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400014.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c71400014.filter2,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c71400014.filter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND)
end end
function c71400014.condition2(e,tp,eg,ep,ev,re,r,rp) function c71400014.condition2(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function c71400014.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) function c71400014.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetMatchingGroup(c71400014.xyzfilter,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(c71400014.xyzfilter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(c71400014.xyz2filter,tp,LOCATION_EXTRA,0,1,nil,mg) return Duel.IsExistingMatchingCard(c71400014.xyz2filter,tp,LOCATION_EXTRA,0,1,nil,mg)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
--Select Xyz Monsters --Select Xyz Monsters
function c71400014.xyzfilter(c) function c71400014.xyzfilter(c)
return c:IsSetCard(0x715) and c:IsXyzSummonable(nil) return c:IsSetCard(0x715) and c:IsXyzSummonable(nil)
end end
function c71400014.filter3(c) function c71400014.filter3(c)
return c:IsSetCard(0x714) and c:IsSummonType(SUMMON_TYPE_XYZ) return c:IsSetCard(0x714) and c:IsSummonType(SUMMON_TYPE_XYZ)
end end
function c71400014.condition3(e,tp,eg,ep,ev,re,r,rp) function c71400014.condition3(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c71400014.filter3,1,nil) return eg:IsExists(c71400014.filter3,1,nil)
end end
function c71400014.target3(e,tp,eg,ep,ev,re,r,rp,chk) function c71400014.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
--[[ --[[
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1)
--]] --]]
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
end end
function c71400014.operation3(e,tp,eg,ep,ev,re,r,rp) function c71400014.operation3(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
--local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) --local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
--Duel.Draw(p,d,REASON_EFFECT) --Duel.Draw(p,d,REASON_EFFECT)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=g:Select(tp,1,1,nil) g=g:Select(tp,1,1,nil)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoGrave(g:GetFirst(),REASON_EFFECT) Duel.SendtoGrave(g:GetFirst(),REASON_EFFECT)
end end
end end
\ No newline at end of file
--妄想梦境-梦湖回廊 --幻异梦境-梦湖回廊
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400015.initial_effect(c) function c71400015.initial_effect(c)
--Activate --Activate
--See AddYumeFieldGlobal --See AddYumeFieldGlobal
--spsummon --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400015,0)) e1:SetDescription(aux.Stringid(71400015,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c71400015.cost) e1:SetTarget(c71400015.target1)
e1:SetTarget(c71400015.target1) e1:SetOperation(c71400015.operation1)
e1:SetOperation(c71400015.operation1) c:RegisterEffect(e1)
c:RegisterEffect(e1) --Recover
--Recover local e2=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(71400015,1))
e2:SetDescription(aux.Stringid(71400015,1)) e2:SetCategory(CATEGORY_RECOVER)
e2:SetCategory(CATEGORY_RECOVER) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_FZONE)
e2:SetRange(LOCATION_FZONE) e2:SetCountLimit(1)
e2:SetCountLimit(1) e2:SetTarget(c71400015.target2)
e2:SetTarget(c71400015.target2) e2:SetOperation(c71400015.operation2)
e2:SetOperation(c71400015.operation2) c:RegisterEffect(e2)
c:RegisterEffect(e2) --self limitation & field activation
--self limitation & field activation yume.AddYumeFieldGlobal(c,71400015,1)
yume.AddYumeFieldGlobal(c,71400015,1) end
end function c71400015.filter1(c)
function c71400015.cost(e,tp,eg,ep,ev,re,r,rp,chk) return c:IsSetCard(0xe714) and c:IsAbleToHand()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD+REASON_COST,nil) function c71400015.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400015.filter1(chkc) end
function c71400015.filter1(c,e,tp) if chk==0 then Duel.IsExistingTarget(c71400015.filter1,tp,LOCATION_GRAVE,0,1,nil) end
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
end local g=Duel.SelectTarget(tp,c71400015.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
function c71400015.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400015.filter1(chkc,e,tp) end end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 function c71400015.operation1(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingTarget(c71400015.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.GetFirstTarget()
local g=Duel.SelectTarget(tp,c71400015.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) if tc:IsRelateToEffect(e) then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
function c71400015.operation1(e,tp,eg,ep,ev,re,r,rp) end
if not e:GetHandler():IsRelateToEffect(e) then return end function c71400015.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget() local mcount=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_GRAVE,nil,TYPE_MONSTER)
if tc:IsRelateToEffect(e) then if chk==0 then return mcount>0 end
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,mcount*500)
local e1=Effect.CreateEffect(e:GetHandler()) end
e1:SetType(EFFECT_TYPE_SINGLE) function c71400015.operation2(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_CANNOT_ATTACK) if not e:GetHandler():IsRelateToEffect(e) then return end
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) local mcount=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_GRAVE,nil,TYPE_MONSTER)
tc:RegisterEffect(e1) if mcount>0 then
Duel.SpecialSummonComplete() local val=Duel.Recover(tp,mcount*500,REASON_EFFECT)
end end
end
end
function c71400015.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local mcount=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_GRAVE,nil,TYPE_MONSTER)
if chk==0 then return mcount>0 end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,mcount*500)
end
function c71400015.operation2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local mcount=Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_GRAVE,nil,TYPE_MONSTER)
if mcount>0 then
local val=Duel.Recover(tp,mcount*500,REASON_EFFECT)
end
end end
\ No newline at end of file
--妄想梦境-空中庭园 --幻异梦境-空中庭园
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400016.initial_effect(c) function c71400016.initial_effect(c)
--Activate --Activate
--See AddYumeFieldGlobal --See AddYumeFieldGlobal
--to hand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400016,0)) e1:SetDescription(aux.Stringid(71400016,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c71400016.target) e1:SetTarget(c71400016.target)
e1:SetOperation(c71400016.operation) e1:SetOperation(c71400016.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--self limitation & field activation --self limitation & field activation
yume.AddYumeFieldGlobal(c,71400016,1) yume.AddYumeFieldGlobal(c,71400016,1)
end end
function c71400016.filter(c) function c71400016.filter(c)
return c:IsSetCard(0x714) and c:IsAbleToHand() return c:IsSetCard(0x714) and c:IsAbleToHand()
end end
function c71400016.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400016.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400016.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400016.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c71400016.filter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(c71400016.filter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c71400016.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c71400016.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local mg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,e:GetHandler()) local mg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,mg,1,tp,LOCATION_ONFIELD) Duel.SetOperationInfo(0,CATEGORY_DESTROY,mg,1,tp,LOCATION_ONFIELD)
end end
function c71400016.operation(e,tp,eg,ep,ev,re,r,rp) function c71400016.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,c) local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,0,1,1,c)
if g:GetCount()>0 and tc:IsRelateToEffect(e) and Duel.Destroy(g,REASON_EFFECT)~=0 and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then if g:GetCount()>0 and tc:IsRelateToEffect(e) and Duel.Destroy(g,REASON_EFFECT)~=0 and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetValue(c71400016.aclimit) e1:SetValue(c71400016.aclimit)
e1:SetLabelObject(tc) e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
end end
function c71400016.aclimit(e,re,tp) function c71400016.aclimit(e,re,tp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e) return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e)
end end
\ No newline at end of file
--妄想梦境-门的世界 --幻异梦境-门扉房间
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400017.initial_effect(c) function c71400017.initial_effect(c)
--Activate --Activate
--See AddYumeFieldGlobal --See AddYumeFieldGlobal
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400017,0)) e1:SetDescription(aux.Stringid(71400017,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetTarget(c71400017.tg1) e1:SetTarget(c71400017.tg1)
e1:SetOperation(c71400017.op1) e1:SetOperation(c71400017.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--banish --banish
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400017,1)) e2:SetDescription(aux.Stringid(71400017,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetCountLimit(1,71400017+EFFECT_COUNT_CODE_DUEL) e2:SetCountLimit(1,71400017+EFFECT_COUNT_CODE_DUEL)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c71400017.tg2) e2:SetTarget(c71400017.tg2)
e2:SetCost(c71400017.cost) e2:SetCost(c71400017.cost)
e2:SetOperation(c71400017.op2) e2:SetOperation(c71400017.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--self limitation & field activation --self limitation & field activation
yume.AddYumeFieldGlobal(c,71400017,1) yume.AddYumeFieldGlobal(c,71400017,1)
end end
function c71400017.filter1(c) function c71400017.filter1(c)
return c:IsSetCard(0xa714) and c:IsType(TYPE_FIELD) and not c:IsCode(71400017) and c:IsAbleToHand() return c:IsSetCard(0xa714) and c:IsType(TYPE_FIELD) and not c:IsCode(71400017) and c:IsAbleToHand()
end end
function c71400017.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400017.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400017.filter1,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400017.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end end
function c71400017.op1(e,tp,eg,ep,ev,re,r,rp) function c71400017.op1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c71400017.filter1,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c71400017.filter1,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g:Select(tp,1,1,nil) local sg1=g:Select(tp,1,1,nil)
--[[ --[[
g:Remove(Card.IsCode,nil,sg1:GetFirst():GetCode()) g:Remove(Card.IsCode,nil,sg1:GetFirst():GetCode())
if g:GetCount()>0 and Duel.SelectYesNo(tp,210) then if g:GetCount()>0 and Duel.SelectYesNo(tp,210) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g:Select(tp,1,1,nil) local sg2=g:Select(tp,1,1,nil)
sg1:Merge(sg2) sg1:Merge(sg2)
end end
--]] --]]
Duel.SendtoHand(sg1,nil,REASON_EFFECT) Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1) Duel.ConfirmCards(1-tp,sg1)
end end
function c71400017.filter2(c) function c71400017.filter2(c)
return c:IsCode(71400020) and c:IsAbleToHand() return c:IsCode(71400020) and c:IsAbleToHand()
end end
function c71400017.filter2c(c) function c71400017.filter2c(c)
return c:IsSetCard(0xe714) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xe714) and c:IsAbleToRemoveAsCost()
end end
function c71400017.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400017.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400017.filter2,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400017.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c71400017.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400017.cost(e,tp,eg,ep,ev,re,r,rp,chk)
c=e:GetHandler() c=e:GetHandler()
local g=Duel.GetMatchingGroup(c71400017.filter2c,tp,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(c71400017.filter2c,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return c:IsAbleToRemoveAsCost() and g:GetClassCount(Card.GetCode)>4 end if chk==0 then return c:IsAbleToRemoveAsCost() and g:GetClassCount(Card.GetCode)>4 end
local rg=Group.CreateGroup() local rg=Group.CreateGroup()
for i=1,5 do for i=1,5 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sc=g:Select(tp,1,1,nil):GetFirst() local sc=g:Select(tp,1,1,nil):GetFirst()
rg:AddCard(sc) rg:AddCard(sc)
g:Remove(Card.IsCode,nil,sc:GetCode()) g:Remove(Card.IsCode,nil,sc:GetCode())
end end
rg:AddCard(c) rg:AddCard(c)
Duel.Remove(rg,POS_FACEUP,REASON_COST) Duel.Remove(rg,POS_FACEUP,REASON_COST)
end end
function c71400017.op2(e,tp,eg,ep,ev,re,r,rp) function c71400017.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400017.filter2,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c71400017.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
--妄想梦物-电锯 --幻异梦物-电锯
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400018.initial_effect(c) function c71400018.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMING_EQUIP,0) e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMING_EQUIP,0)
e1:SetCountLimit(1,71400018+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,71400018+EFFECT_COUNT_CODE_OATH)
e1:SetDescription(aux.Stringid(71400018,0)) e1:SetDescription(aux.Stringid(71400018,0))
e1:SetTarget(c71400018.target) e1:SetTarget(c71400018.target)
e1:SetCost(c71400018.cost) e1:SetCost(c71400018.cost)
e1:SetCondition(yume.YumeLethalCon) e1:SetCondition(yume.YumeLethalCon)
e1:SetOperation(c71400018.operation) e1:SetOperation(c71400018.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c71400018.filter(c) function c71400018.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c71400018.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400018.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500) Duel.PayLPCost(tp,500)
end end
function c71400018.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400018.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c71400018.filter(chkc) and chkc~=e:GetHandler() end if chkc then return chkc:IsOnField() and c71400018.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c71400018.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(c71400018.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c71400018.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) local g=Duel.SelectTarget(tp,c71400018.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c71400018.limit(g:GetFirst())) Duel.SetChainLimit(c71400018.limit(g:GetFirst()))
end end
end end
function c71400018.operation(e,tp,eg,ep,ev,re,r,rp) function c71400018.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect() Duel.BreakEffect()
c:CancelToGrave() c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN) Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end end
end end
function c71400018.limit(c) function c71400018.limit(c)
return function (e,lp,tp) return function (e,lp,tp)
return e:GetHandler()~=c return e:GetHandler()~=c
end end
end end
\ No newline at end of file
--妄想梦物-魔女 --幻异梦物-魔女
function c71400019.initial_effect(c) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
--Activate function c71400019.initial_effect(c)
local e1=Effect.CreateEffect(c) --Activate
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetDescription(aux.Stringid(71400019,0))
e1:SetCountLimit(1,71400019+EFFECT_COUNT_CODE_OATH) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetTarget(c71400019.target) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c71400019.condition) e1:SetCountLimit(1,71400019+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c71400019.operation) e1:SetTarget(c71400019.target)
c:RegisterEffect(e1) e1:SetCondition(yume.YumeCon)
end e1:SetOperation(c71400019.operation)
function c71400019.filter(c,e,tp) c:RegisterEffect(e1)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) --draw
end local e2=Effect.CreateEffect(c)
function c71400019.target(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetDescription(aux.Stringid(71400019,1))
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 e2:SetCategory(CATEGORY_DRAW+CATEGORY_DAMAGE)
and Duel.IsExistingMatchingCard(c71400019.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) e2:SetCode(EFFECT_TYPE_IGNITION)
end e1:SetCountLimit(1,71500019)
function c71400019.condition(e,tp,eg,ep,ev,re,r,rp) e2:SetRange(LOCATION_GRAVE)
tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5) e2:SetCost(c71400019.cost2)
return tc and tc:IsFaceup() and tc:IsSetCard(0x3714) e2:SetTarget(c71400019.tg2)
end e2:SetOperation(c71400019.op2)
function c71400019.operation(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) function c71400019.filter(c,e,tp)
local g=Duel.SelectMatchingCard(tp,c71400019.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
if g:GetCount()>0 then end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) function c71400019.target(e,tp,eg,ep,ev,re,r,rp,chk)
end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c71400019.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c71400019.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71400019.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c71400019.filter2(c)
return c:IsSetCard(0xb714) and c:IsFaceup() and c:IsAbleToDeckAsCost()
end
function c71400019.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() and Duel.IsExistingMatchingCard(c71400019.filter2,tp,LOCATION_FZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(c71400019.filter2,tp,LOCATION_FZONE,0,nil)
g:AddCard(e:GetHandler())
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c71400019.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,50)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c71400019.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.Damage(tp,50,REASON_EFFECT)>0 then
Duel.Draw(tp,2,REASON_EFFECT)
end
end end
\ No newline at end of file
--梦终 --梦终
function c71400020.initial_effect(c) function c71400020.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetCondition(c71400020.condition) e1:SetCondition(c71400020.condition)
e1:SetTarget(c71400020.target) e1:SetTarget(c71400020.target)
e1:SetOperation(c71400020.operation) e1:SetOperation(c71400020.operation)
e1:SetCountLimit(1,71400020+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,71400020+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c71400020.filter1(c) function c71400020.filter1(c)
return c:IsSetCard(0x714) return c:IsSetCard(0x714)
end end
function c71400020.filter2(c,tp) function c71400020.filter2(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true) return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true)
end end
function c71400020.filter3(c,e,tp) function c71400020.filter3(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c71400020.condition(e,tp,eg,ep,ev,re,r,rp) function c71400020.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71400020.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil) local g=Duel.GetMatchingGroup(c71400020.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local ct=g:GetClassCount(Card.GetCode) local ct=g:GetClassCount(Card.GetCode)
return ct>12 return ct>12
end end
function c71400020.target(e,tp,eg,ep,ev,re,r,rp,chk) function c71400020.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),tp) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),tp)
if chk==0 then return Duel.IsExistingMatchingCard(c71400020.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil,tp) and g:GetCount()>0 end if chk==0 then return Duel.IsExistingMatchingCard(c71400020.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil,tp) and g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,g:GetCount(),0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE) Duel.SetChainLimit(aux.FALSE)
end end
end end
function c71400020.operation(e,tp,eg,ep,ev,re,r,rp) function c71400020.operation(e,tp,eg,ep,ev,re,r,rp)
local fg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),tp) local fg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler(),tp)
if Duel.Remove(fg,POS_FACEUP,REASON_EFFECT)<=0 then return end if Duel.Remove(fg,POS_FACEUP,REASON_EFFECT)<=0 then return end
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71400020,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71400020,1))
local tc=Duel.SelectMatchingCard(tp,c71400020.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c71400020.filter2,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
end end
local flag=Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) local flag=Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain()) Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if tc:IsSetCard(0x3714) and flag and Duel.IsExistingMatchingCard(c71400020.filter3,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(71400020,0)) then if tc:IsSetCard(0x3714) and flag and Duel.IsExistingMatchingCard(c71400020.filter3,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(71400020,0)) then
Duel.BreakEffect() Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c71400020.filter3,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,ft,ft,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c71400020.filter3,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,ft,ft,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
end end
\ No newline at end of file
--妄想梦物-菜刀 --幻异梦物-菜刀
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400021.initial_effect(c) function c71400021.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMING_SPSUMMON+TIMING_SUMMON,0) e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMING_SPSUMMON+TIMING_SUMMON,0)
e1:SetCountLimit(1,71400021+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,71400021+EFFECT_COUNT_CODE_OATH)
e1:SetDescription(aux.Stringid(71400021,0)) e1:SetDescription(aux.Stringid(71400021,0))
e1:SetTarget(c71400021.target) e1:SetTarget(c71400021.target)
e1:SetCost(c71400021.cost) e1:SetCost(c71400021.cost)
e1:SetCondition(yume.YumeLethalCon) e1:SetCondition(yume.YumeLethalCon)
e1:SetOperation(c71400021.operation) e1:SetOperation(c71400021.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c71400021.filter(c) function c71400021.filter(c)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER)
end end
function c71400021.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400021.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500) Duel.PayLPCost(tp,500)
end end
function c71400021.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400021.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c71400021.filter(chkc) and chkc~=e:GetHandler() end if chkc then return chkc:IsOnField() and c71400021.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c71400021.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(c71400021.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c71400021.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,c71400021.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c71400021.limit(g:GetFirst())) Duel.SetChainLimit(c71400021.limit(g:GetFirst()))
end end
end end
function c71400021.operation(e,tp,eg,ep,ev,re,r,rp) function c71400021.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect() Duel.BreakEffect()
c:CancelToGrave() c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN) Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end end
end end
function c71400021.limit(c) function c71400021.limit(c)
return function (e,lp,tp) return function (e,lp,tp)
return e:GetHandler()~=c return e:GetHandler()~=c
end end
end end
\ No newline at end of file
--梦之眼药商人 --梦之眼药商人
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400022.initial_effect(c) function c71400022.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,yume.YumeCheck(c)) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,yume.YumeCheck(c))
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400022,0)) e1:SetDescription(aux.Stringid(71400022,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,71400022) e1:SetCountLimit(1,71400022)
e1:SetCondition(c71400022.con1) e1:SetCondition(c71400022.con1)
e1:SetTarget(c71400022.target) e1:SetTarget(c71400022.target)
e1:SetCost(c71400022.cost) e1:SetCost(c71400022.cost)
e1:SetOperation(c71400022.op1) e1:SetOperation(c71400022.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable spsummon --disable spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400022,1)) e2:SetDescription(aux.Stringid(71400022,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c71400022.con2) e2:SetCondition(c71400022.con2)
e2:SetOperation(c71400022.op2) e2:SetOperation(c71400022.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400022.filter1c(c) function c71400022.filter1c(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end end
function c71400022.filter1(c,e,tp) function c71400022.filter1(c,e,tp)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c71400022.con1(e,tp,eg,ep,ev,re,r,rp) function c71400022.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function c71400022.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400022.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400022.filter1c,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400022.filter1c,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c71400022.filter1c,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c71400022.filter1c,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c71400022.target(e,tp,eg,ep,ev,re,r,rp,chk) function c71400022.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400022.filter1,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return Duel.IsExistingMatchingCard(c71400022.filter1,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c71400022.op1(e,tp,eg,ep,ev,re,r,rp) function c71400022.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71400022.filter1,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c71400022.filter1,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c71400022.con2(e,tp,eg,ep,ev,re,r,rp) function c71400022.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and rp==1-tp return c:IsReason(REASON_DESTROY) and rp==1-tp
end end
function c71400022.op2(e,tp,eg,ep,ev,re,r,rp) function c71400022.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,1-tp) Duel.RegisterEffect(e1,1-tp)
end end
\ No newline at end of file
--梦染 --梦染
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400023.initial_effect(c) function c71400023.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400023,0)) e1:SetDescription(aux.Stringid(71400023,0))
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,71400023+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,71400023+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,0x1f0) e1:SetHintTiming(0,0x1f0)
e1:SetTarget(yume.YumeFieldCheckTarget()) e1:SetTarget(yume.YumeFieldCheckTarget())
e1:SetOperation(c71400023.op1) e1:SetOperation(c71400023.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--ac in hand --ac in hand
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND) e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(yume.nonYumeCon) e0:SetCondition(yume.nonYumeCon)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--banish --banish
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400023,1)) e2:SetDescription(aux.Stringid(71400023,1))
e2:SetCategory(CATEGORY_BANISH) e2:SetCategory(CATEGORY_BANISH)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_SUMMON+TIMING_SPSUMMON+TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_SUMMON+TIMING_SPSUMMON+TIMING_END_PHASE)
e2:SetCondition(aux.exccon) e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c71400023.tg2) e2:SetTarget(c71400023.tg2)
e2:SetOperation(c71400023.op2) e2:SetOperation(c71400023.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400023.filter1(c,tp) function c71400023.filter1(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true) and c:IsSetCard(0x3714) return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true) and c:IsSetCard(0x3714)
end end
function c71400023.op1(e,tp,eg,ep,ev,re,r,rp) function c71400023.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=yume.FieldActivation(tp) local tc=yume.FieldActivation(tp)
if tc then if tc then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SSET) e1:SetCode(EFFECT_CANNOT_SSET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(1,1) e1:SetTargetRange(1,1)
e1:SetTarget(c71400023.setlimit) e1:SetTarget(c71400023.setlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
--[[ --[[
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_MSET) e2:SetCode(EFFECT_CANNOT_MSET)
tc:RegisterEffect(e2,true) tc:RegisterEffect(e2,true)
local e3=e1:Clone() local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_TURN_SET) e3:SetCode(EFFECT_CANNOT_TURN_SET)
tc:RegisterEffect(e3,true) tc:RegisterEffect(e3,true)
local e4=e1:Clone() local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetTarget(c71400023.sumlimit) e4:SetTarget(c71400023.sumlimit)
tc:RegisterEffect(e4,true) tc:RegisterEffect(e4,true)
--]] --]]
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(71400023,2)) tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(71400023,2))
end end
end end
function c71400023.setlimit(e,c) function c71400023.setlimit(e,c)
return not c:IsLocation(LOCATION_HAND) return not c:IsLocation(LOCATION_HAND)
end end
--[[ --[[
function c71400023.sumlimit(e,c,sump,sumtype,sumpos,targetp) function c71400023.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0 return bit.band(sumpos,POS_FACEDOWN)>0
end end
--]] --]]
function c71400023.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400023.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToRemove() end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil) if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_BANISH) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_BANISH)
local g1=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,1,1,nil) local g1=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_BANISH) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_BANISH)
local g2=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) local g2=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_BANISH,g1,2,0,0) Duel.SetOperationInfo(0,CATEGORY_BANISH,g1,2,0,0)
end end
function c71400023.op2(e,tp,eg,ep,ev,re,r,rp) function c71400023.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e) local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==2 then if sg:GetCount()==2 then
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end end
end end
\ No newline at end of file
--异梦书中的人偶
function c71400024.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,yume.YumeCheck(c),4,2)
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--inactivatable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c71400024.filter1)
c:RegisterEffect(e1)
local e1a=Effect.CreateEffect(c)
e1a:SetType(EFFECT_TYPE_FIELD)
e1a:SetCode(EFFECT_CANNOT_DISEFFECT)
e1a:SetRange(LOCATION_MZONE)
e1a:SetValue(c71400024.filter1)
c:RegisterEffect(e1a)
--pos
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400024,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetCountLimit(1)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCost(c71400024.cost2)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c71400024.tg2)
e2:SetOperation(c71400024.op2)
c:RegisterEffect(e2)
end
function c71400024.filter1(e,ct)
local p=e:GetHandler():GetControler()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return p==tp and te:GetHandler():IsSetCard(0x715)
end
function c71400024.cost2(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 c71400024.filter2(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end
function c71400024.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400024.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(c71400024.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c71400024.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c71400024.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,c)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,0,POS_FACEUP_DEFENSE,0)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_DEFENSE)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
\ No newline at end of file
--梦蚀 --梦蚀
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400025.initial_effect(c) function c71400025.initial_effect(c)
--activate from hand --activate from hand
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e0:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e0:SetCondition(yume.nonYumeCon) e0:SetCondition(yume.nonYumeCon)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--Activate(nofield) --Activate(nofield)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400025,0)) e1:SetDescription(aux.Stringid(71400025,0))
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(yume.nonYumeCon) e1:SetCondition(yume.nonYumeCon)
e1:SetTarget(yume.YumeFieldCheckTarget(0,2)) e1:SetTarget(yume.YumeFieldCheckTarget(0,2))
e1:SetCost(c71400025.cost1) e1:SetCost(c71400025.cost1)
e1:SetOperation(c71400025.op1) e1:SetOperation(c71400025.op1)
e1:SetCountLimit(1,71400025+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,71400025+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Activate(field) --Activate(field)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400025,1)) e2:SetDescription(aux.Stringid(71400025,1))
e2:SetCondition(yume.YumeCon) e2:SetCondition(yume.YumeCon)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,71400025+EFFECT_COUNT_CODE_OATH) e2:SetCountLimit(1,71400025+EFFECT_COUNT_CODE_OATH)
e2:SetCost(c71400025.cost2) e2:SetCost(c71400025.cost2)
e2:SetTarget(c71400025.tg2) e2:SetTarget(c71400025.tg2)
e2:SetOperation(c71400025.op2) e2:SetOperation(c71400025.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(71400025,ACTIVITY_SPSUMMON,c71400025.counterfilter) Duel.AddCustomActivityCounter(71400025,ACTIVITY_SPSUMMON,c71400025.counterfilter)
end end
function c71400025.counterfilter(c) function c71400025.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsType(TYPE_LINK) return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsType(TYPE_LINK)
end end
function c71400025.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400025.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,800) end if chk==0 then return Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800) Duel.PayLPCost(tp,800)
end end
function c71400025.op1(e,tp,eg,ep,ev,re,r,rp) function c71400025.op1(e,tp,eg,ep,ev,re,r,rp)
yume.FieldActivation(tp,nil,2) yume.FieldActivation(tp,nil,2)
end end
function c71400025.filter2(c) function c71400025.filter2(c)
return c:IsType(TYPE_LINK) return c:IsType(TYPE_LINK)
end end
function c71400025.filter2a(c,e,tp) function c71400025.filter2a(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c71400025.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400025.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71400025,tp,ACTIVITY_SPSUMMON)==0 and Duel.CheckLPCost(tp,800) end if chk==0 then return Duel.GetCustomActivityCount(71400025,tp,ACTIVITY_SPSUMMON)==0 and Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800) Duel.PayLPCost(tp,800)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c71400025.splimit) e1:SetTarget(c71400025.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c71400025.splimit(e,c,sump,sumtype,sumpos,targetp,se) function c71400025.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsType(TYPE_LINK)) and c:IsLocation(LOCATION_EXTRA) return not (c:IsType(TYPE_LINK)) and c:IsLocation(LOCATION_EXTRA)
end end
function c71400025.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400025.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsType(TYPE_LINK) and chkc:IsLocation(LOCATION_MZONE) end if chkc then return chkc:IsType(TYPE_LINK) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c71400025.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingTarget(c71400025.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(c71400025.filter2a,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c71400025.filter2a,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c71400025.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c71400025.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end end
function c71400025.op2(e,tp,eg,ep,ev,re,r,rp) function c71400025.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),tc:GetLink()) local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),tc:GetLink())
if ft<=0 then return end if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c71400025.filter2a),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,ft,nil,e,tp) local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c71400025.filter2a),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,ft,nil,e,tp)
if sg:GetCount()>0 then if sg:GetCount()>0 then
local sc=sg:GetFirst() local sc=sg:GetFirst()
local fid=c:GetFieldID() local fid=c:GetFieldID()
while sc do while sc do
if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
sc:RegisterFlagEffect(71400025,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) sc:RegisterFlagEffect(71400025,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
end end
sc=sg:GetNext() sc=sg:GetNext()
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
sg:KeepAlive() sg:KeepAlive()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(c71400025.rmcon) e1:SetCondition(c71400025.rmcon)
e1:SetOperation(c71400025.rmop) e1:SetOperation(c71400025.rmop)
e1:SetLabel(fid) e1:SetLabel(fid)
e1:SetLabelObject(sg) e1:SetLabelObject(sg)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
end end
function c71400025.rmfilter(c,fid) function c71400025.rmfilter(c,fid)
return c:GetFlagEffectLabel(71400025)==fid return c:GetFlagEffectLabel(71400025)==fid
end end
function c71400025.rmcon(e,tp,eg,ep,ev,re,r,rp) function c71400025.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject() local g=e:GetLabelObject()
if not g:IsExists(c71400025.rmfilter,1,nil,e:GetLabel()) then if not g:IsExists(c71400025.rmfilter,1,nil,e:GetLabel()) then
g:DeleteGroup() g:DeleteGroup()
e:Reset() e:Reset()
return false return false
else return true end else return true end
end end
function c71400025.rmop(e,tp,eg,ep,ev,re,r,rp) function c71400025.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject() local g=e:GetLabelObject()
local tg=g:Filter(c71400025.rmfilter,nil,e:GetLabel()) local tg=g:Filter(c71400025.rmfilter,nil,e:GetLabel())
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end end
\ No newline at end of file
--妄想梦物-黑电话 --幻异梦物-黑电话
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400026.initial_effect(c) function c71400026.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400026,0)) e1:SetDescription(aux.Stringid(71400026,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(yume.YumeCon) e1:SetCondition(yume.YumeCon)
e1:SetTarget(c71400026.tg1) e1:SetTarget(c71400026.tg1)
e1:SetOperation(c71400026.op1) e1:SetOperation(c71400026.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--search --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400026,1)) e2:SetDescription(aux.Stringid(71400026,1))
e2:SetCountLimit(1,71400026) e2:SetCountLimit(1,71400026)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c71400026.mixedYumeCon) e2:SetCondition(c71400026.mixedYumeCon)
e2:SetCost(c71400026.cost) e2:SetCost(c71400026.cost)
e2:SetTarget(c71400026.tg2) e2:SetTarget(c71400026.tg2)
e2:SetOperation(c71400026.op2) e2:SetOperation(c71400026.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400026.filter1(c,e,tp) function c71400026.filter1(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c71400026.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400026.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c71400026.filter1(chkc,e,tp) end if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:GetControler()==tp and c71400026.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c71400026.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c71400026.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c71400026.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c71400026.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c71400026.op1(e,tp,eg,ep,ev,re,r,rp) function c71400026.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c71400026.filter2c(c,e,tp) function c71400026.filter2c(c,e,tp)
return c:IsSetCard(0x714) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x714) and c:IsAbleToRemoveAsCost()
end end
function c71400026.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400026.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c71400026.filter2c,tp,LOCATION_GRAVE,0,1,c) end and Duel.IsExistingMatchingCard(c71400026.filter2c,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71400026.filter2c,tp,LOCATION_GRAVE,0,1,1,c) local g=Duel.SelectMatchingCard(tp,c71400026.filter2c,tp,LOCATION_GRAVE,0,1,1,c)
g:AddCard(c) g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c71400026.mixedYumeCon(e,tp,eg,ep,ev,re,r,rp) function c71400026.mixedYumeCon(e,tp,eg,ep,ev,re,r,rp)
return yume.YumeCon(e,tp,eg,ep,ev,re,r,rp) and aux.exccon(e,tp,eg,ep,ev,re,r,rp) return yume.YumeCon(e,tp,eg,ep,ev,re,r,rp) and aux.exccon(e,tp,eg,ep,ev,re,r,rp)
end end
function c71400026.filter2(c) function c71400026.filter2(c)
return c:IsSetCard(0xe714) and not c:IsCode(71400026) and c:IsAbleToHand() return c:IsSetCard(0xe714) and not c:IsCode(71400026) and c:IsAbleToHand()
end end
function c71400026.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400026.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400026.filter2,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400026.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c71400026.op2(e,tp,eg,ep,ev,re,r,rp) function c71400026.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400026.filter2,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c71400026.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
--梦路脑坏 --梦路脑坏
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400027.initial_effect(c) function c71400027.initial_effect(c)
--sp summon --sp summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400027,0)) e1:SetDescription(aux.Stringid(71400027,0))
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,0x1f0) e1:SetHintTiming(0,0x1f0)
e1:SetCost(c71400027.cost1) e1:SetCost(c71400027.cost1)
e1:SetTarget(c71400027.tg1) e1:SetTarget(c71400027.tg1)
e1:SetOperation(c71400027.op1) e1:SetOperation(c71400027.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--ac in hand --ac in hand
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND) e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(yume.nonYumeCon) e0:SetCondition(yume.nonYumeCon)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--draw --draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400027,1)) e2:SetDescription(aux.Stringid(71400027,1))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_DRAW+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c71400027.tg2) e2:SetTarget(c71400027.tg2)
e2:SetOperation(c71400027.op2) e2:SetOperation(c71400027.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400027.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400027.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) end if chk==0 then return Duel.CheckLPCost(tp,2000) end
Duel.PayLPCost(tp,2000) Duel.PayLPCost(tp,2000)
end end
function c71400027.filter1(c) function c71400027.filter1(c)
return c:IsPosition(POS_FACEUP_ATTACK) and not c:IsType(TYPE_TOKEN) and c:GetSummonLocation()==LOCATION_EXTRA and c:IsAbleToChangeControler() return c:IsPosition(POS_FACEUP_ATTACK) and not c:IsType(TYPE_TOKEN) and c:GetSummonLocation()==LOCATION_EXTRA and c:IsAbleToChangeControler()
end end
function c71400027.xyzfilter(c,e,tp) function c71400027.xyzfilter(c,e,tp)
return c:IsSetCard(0x3715) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsSetCard(0x3715) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c71400027.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400027.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c71400027.filter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c71400027.filter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(c71400027.filter1,tp,0,LOCATION_MZONE,2,nil) and Duel.IsExistingMatchingCard(c71400027.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(c71400027.filter1,tp,0,LOCATION_MZONE,2,nil) and Duel.IsExistingMatchingCard(c71400027.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c71400027.filter1,tp,0,LOCATION_MZONE,2,2,nil) Duel.SelectTarget(tp,c71400027.filter1,tp,0,LOCATION_MZONE,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c71400027.op1(e,tp,eg,ep,ev,re,r,rp) function c71400027.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local xyzg=Duel.GetMatchingGroup(c71400027.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local xyzg=Duel.GetMatchingGroup(c71400027.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
local sg=xyzg:Select(tp,1,1,nil) local sg=xyzg:Select(tp,1,1,nil)
local sc=sg:GetFirst() local sc=sg:GetFirst()
Debug.ShowHint(1) Debug.ShowHint(1)
if sc and Duel.SpecialSummonStep(sc,0,tp,tp,true,false,POS_FACEUP) then if sc and Duel.SpecialSummonStep(sc,0,tp,tp,true,false,POS_FACEUP) then
local fid=c:GetFieldID() local fid=c:GetFieldID()
sc:RegisterFlagEffect(71400027,RESET_EVENT+RESETS_STANDARD,0,1,fid) sc:RegisterFlagEffect(71400027,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetLabel(fid) e1:SetLabel(fid)
e1:SetLabelObject(sc) e1:SetLabelObject(sc)
e1:SetCondition(c71400027.tdcon) e1:SetCondition(c71400027.tdcon)
e1:SetOperation(c71400027.tdop) e1:SetOperation(c71400027.tdop)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK_FINAL) e2:SetCode(EFFECT_SET_ATTACK_FINAL)
e2:SetValue(0) e2:SetValue(0)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
sc:RegisterEffect(e2,true) sc:RegisterEffect(e2,true)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) Duel.SpecialSummonComplete()
if g:GetCount()==2 then local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc=g:GetFirst() if g:GetCount()==2 then
while tc do local tc=g:GetFirst()
local og=tc:GetOverlayGroup() while tc do
if og:GetCount()>0 then local og=tc:GetOverlayGroup()
Duel.SendtoGrave(og,REASON_RULE) if og:GetCount()>0 then
end Duel.SendtoGrave(og,REASON_RULE)
tc=g:GetNext() end
end tc=g:GetNext()
Duel.Overlay(sc,g) end
end Duel.Overlay(sc,g)
Duel.SpecialSummonComplete() end
end end
local e3=Effect.CreateEffect(c) if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
e3:SetType(EFFECT_TYPE_FIELD) local e3=Effect.CreateEffect(c)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0) e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetTarget(c71400027.aclimit) e3:SetTargetRange(1,0)
Duel.RegisterEffect(e3,tp) e3:SetTarget(c71400027.aclimit)
end Duel.RegisterEffect(e3,tp)
function c71400027.aclimit(e,re,tp) end
return not re:GetHandler():IsSetCard(0x714) and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e) function c71400027.aclimit(e,re,tp)
end return not re:GetHandler():IsSetCard(0x714) and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e)
function c71400027.tdcon(e,tp,eg,ep,ev,re,r,rp) end
local tc=e:GetLabelObject() function c71400027.tdcon(e,tp,eg,ep,ev,re,r,rp)
if tc:GetFlagEffectLabel(71400027)==e:GetLabel() then local tc=e:GetLabelObject()
return true if tc:GetFlagEffectLabel(71400027)==e:GetLabel() then
else return true
e:Reset() else
return false e:Reset()
end return false
end end
function c71400027.tdop(e,tp,eg,ep,ev,re,r,rp) end
local tc=e:GetLabelObject() function c71400027.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) local tc=e:GetLabelObject()
end Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
function c71400027.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chkc then return chkc:IsLocation(LOCATION_FZONE) and chkc:IsControler(tp) and c71400027.filter2(chkc) end function c71400027.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c71400027.filter2,tp,LOCATION_FZONE,0,1,nil) end if chkc then return chkc:IsLocation(LOCATION_FZONE) and chkc:IsControler(tp) and c71400027.filter2(chkc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) if chk==0 then return Duel.IsExistingTarget(c71400027.filter2,tp,LOCATION_FZONE,0,1,nil) end
local g=Duel.SelectTarget(tp,c71400027.filter2,tp,LOCATION_FZONE,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) local g=Duel.SelectTarget(tp,c71400027.filter2,tp,LOCATION_FZONE,0,1,1,nil)
Duel.SetTargetPlayer(tp) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetTargetParam(1) Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetTargetParam(1)
end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
function c71400027.filter2(c) end
return c:IsFaceup() and c:IsSetCard(0xb714) and c:IsType(TYPE_FIELD) and c:IsAbleToHand() function c71400027.filter2(c)
end return c:IsFaceup() and c:IsSetCard(0xb714) and c:IsType(TYPE_FIELD) and c:IsAbleToHand()
function c71400027.op2(e,tp,eg,ep,ev,re,r,rp) end
local tc=Duel.GetFirstTarget() function c71400027.op2(e,tp,eg,ep,ev,re,r,rp)
if tc and tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)==1 then local tc=Duel.GetFirstTarget()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) if tc and tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)==1 then
Duel.Draw(p,d,REASON_EFFECT) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
end Duel.Draw(p,d,REASON_EFFECT)
end
end end
\ No newline at end of file
--锈蚀的梦之怪物 --锈蚀的异梦怪物
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400028.initial_effect(c) function c71400028.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,yume.YumeCheck(c)) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,yume.YumeCheck(c))
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400028,0)) e1:SetDescription(aux.Stringid(71400028,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,71400028) e1:SetCountLimit(1,71400028)
e1:SetTarget(c71400028.tg1) e1:SetTarget(c71400028.tg1)
e1:SetOperation(c71400028.op1) e1:SetOperation(c71400028.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--setcode --setcode
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c71400028.tg2) e2:SetTarget(c71400028.tg2)
e2:SetCode(EFFECT_ADD_SETCODE) e2:SetCode(EFFECT_ADD_SETCODE)
e2:SetValue(0x714) e2:SetValue(0x714)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--corrupt --corrupt
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400028,1)) e3:SetDescription(aux.Stringid(71400028,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c71400028.con3) e3:SetCondition(c71400028.con3)
e3:SetTarget(c71400028.tg3) e3:SetTarget(c71400028.tg3)
e3:SetOperation(c71400028.op3) e3:SetOperation(c71400028.op3)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c71400028.filter1(c,e,tp,zone) function c71400028.filter1(c,e,tp,zone)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end end
function c71400028.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400028.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=e:GetHandler():GetLinkedZone(tp) local zone=e:GetHandler():GetLinkedZone(tp)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:GetControler()==1-tp and c71400028.filter1(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:GetControler()==1-tp and c71400028.filter1(chkc,e,tp) end
if chk==0 then return zone~=0 and Duel.IsExistingTarget(c71400028.filter1,tp,0,LOCATION_GRAVE,1,nil,e,tp,zone) end if chk==0 then return zone~=0 and Duel.IsExistingTarget(c71400028.filter1,tp,0,LOCATION_GRAVE,1,nil,e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c71400028.filter1,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,zone) local g=Duel.SelectTarget(tp,c71400028.filter1,tp,0,LOCATION_GRAVE,1,1,nil,e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c71400028.op1(e,tp,eg,ep,ev,re,r,rp) function c71400028.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local zone=e:GetHandler():GetLinkedZone(tp) local zone=e:GetHandler():GetLinkedZone(tp)
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end end
end end
function c71400028.tg2(e,c) function c71400028.tg2(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsFaceup() return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsFaceup()
end end
function c71400028.con3(e,tp,eg,ep,ev,re,r,rp) function c71400028.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return r&REASON_EFFECT+REASON_BATTLE~=0 return r&REASON_EFFECT+REASON_BATTLE~=0
end end
function c71400028.filter3(c,e,tp) function c71400028.filter3(c,e,tp)
return c:IsCode(71400030) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsCode(71400030) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c71400028.tg3(e,tp,eg,ep,ev,re,r,rp,chk) function c71400028.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 end if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c71400028.op3(e,tp,eg,ep,ev,re,r,rp) function c71400028.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71400028.filter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c71400028.filter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
--梦之方块间的围巾少女 --异梦方块的女-围巾子
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400029.initial_effect(c) function c71400029.initial_effect(c)
--summon limit --summon limit
yume.AddYumeSummonLimit(c) yume.AddYumeSummonLimit(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400029,0)) e1:SetDescription(aux.Stringid(71400029,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,71400029) e1:SetCountLimit(1,71400029)
e1:SetTarget(c71400029.tg1) e1:SetTarget(c71400029.tg1)
e1:SetCondition(c71400029.con1) e1:SetCondition(c71400029.con1)
e1:SetOperation(c71400029.op1) e1:SetOperation(c71400029.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand --to hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400029,1)) e2:SetDescription(aux.Stringid(71400029,1))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c71400029.tg2) e2:SetTarget(c71400029.tg2)
e2:SetOperation(c71400029.op2) e2:SetOperation(c71400029.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e2a=e2:Clone() local e2a=e2:Clone()
e2a:SetCode(EVENT_SPSUMMON_SUCCESS) e2a:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2a) c:RegisterEffect(e2a)
Duel.AddCustomActivityCounter(71400029,ACTIVITY_CHAIN,c71400029.chainfilter) Duel.AddCustomActivityCounter(71400029,ACTIVITY_CHAIN,c71400029.chainfilter)
end end
function c71400029.chainfilter(re,tp,cid) function c71400029.chainfilter(re,tp,cid)
return not re:GetHandler():IsSetCard(0xa714) return not re:GetHandler():IsSetCard(0xa714)
end end
function c71400029.con1(e,tp,eg,ep,ev,re,r,rp) function c71400029.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(71400029,tp,ACTIVITY_CHAIN)>0 return Duel.GetCustomActivityCount(71400029,tp,ACTIVITY_CHAIN)>0
end end
function c71400029.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400029.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c71400029.op1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400029.op1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c71400029.filter2(c) function c71400029.filter2(c)
return c:IsType(TYPE_FIELD) and c:IsSetCard(0xb714) and c:IsAbleToHand() return c:IsType(TYPE_FIELD) and c:IsSetCard(0xb714) and c:IsAbleToHand()
end end
function c71400029.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400029.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400029.filter2(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400029.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c71400029.filter2,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c71400029.filter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c71400029.filter2,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c71400029.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c71400029.op2(e,tp,eg,ep,ev,re,r,rp) function c71400029.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
\ No newline at end of file
--腐坏的梦之怪物 --腐坏的异梦怪物
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400030.initial_effect(c) function c71400030.initial_effect(c)
--link summon --link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3,3,yume.YumeCheck(c)) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3,3,yume.YumeCheck(c))
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--indes --indes
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e1a=e1:Clone() local e1a=e1:Clone()
e1a:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e1a:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e1a) c:RegisterEffect(e1a)
--[[ --[[
local e1b=e1:Clone() local e1b=e1:Clone()
e1b:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1b:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
c:RegisterEffect(e1b) c:RegisterEffect(e1b)
--]] --]]
--negate spsummon --negate spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_REMOVE) e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_F) e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_SPSUMMON) e2:SetCode(EVENT_SPSUMMON)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetDescription(aux.Stringid(71400030,0)) e2:SetDescription(aux.Stringid(71400030,0))
e2:SetCondition(c71400030.condition) e2:SetCondition(c71400030.condition)
e2:SetCost(c71400030.cost) e2:SetCost(c71400030.cost)
e2:SetTarget(c71400030.target) e2:SetTarget(c71400030.target)
e2:SetOperation(c71400030.operation) e2:SetOperation(c71400030.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400030.filter2(c) function c71400030.filter2(c)
return c:IsPreviousLocation(LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK) and c:IsAbleToRemove() return c:IsPreviousLocation(LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK) and c:IsAbleToRemove()
end end
function c71400030.cfilter2(c,g) function c71400030.cfilter2(c,g)
return g:IsContains(c) return g:IsContains(c)
end end
function c71400030.condition(e,tp,eg,ep,ev,re,r,rp) function c71400030.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and eg:IsExists(c71400030.filter2,1,nil) return Duel.GetCurrentChain()==0 and eg:IsExists(c71400030.filter2,1,nil)
end end
function c71400030.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local lg=c:GetLinkedGroup() local lg=c:GetLinkedGroup()
if chk==0 then return Duel.IsExistingMatchingCard(c71400030.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,lg) end if chk==0 then return Duel.IsExistingMatchingCard(c71400030.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71400030.cfilter2,tp,LOCATION_ONFIELD,0,1,1,nil,lg) local g=Duel.SelectMatchingCard(tp,c71400030.cfilter2,tp,LOCATION_ONFIELD,0,1,1,nil,lg)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c71400030.target(e,tp,eg,ep,ev,re,r,rp,chk) function c71400030.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=eg:Filter(c71400030.filter2,nil) local g=eg:Filter(c71400030.filter2,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function c71400030.operation(e,tp,eg,ep,ev,re,r,rp) function c71400030.operation(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c71400030.filter2,nil) local g=eg:Filter(c71400030.filter2,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.NegateSummon(g) Duel.NegateSummon(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
if og:GetCount()>0 then if og:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
local tc=og:GetFirst() local tc=og:GetFirst()
local atk=0 local atk=0
while tc do while tc do
local tatk=tc:GetTextAttack() local tatk=tc:GetTextAttack()
if tatk>0 then atk=atk+tatk end if tatk>0 then atk=atk+tatk end
tc=og:GetNext() tc=og:GetNext()
end end
Duel.SetLP(tp,Duel.GetLP(tp)-atk) Duel.SetLP(tp,Duel.GetLP(tp)-atk)
end end
end end
end end
\ No newline at end of file
--梦日记 --梦日记
function c71400031.initial_effect(c) function c71400031.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c71400031.tg) e1:SetTarget(c71400031.tg)
e1:SetOperation(c71400031.op) e1:SetOperation(c71400031.op)
e1:SetCountLimit(1,71400031+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,71400031+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c71400031.filter(c) function c71400031.filter(c)
return c:IsSetCard(0x714) and c:GetReason() & REASON_DESTROY~=0 and not c:IsCode(71400031) and c:IsAbleToHand() return c:IsSetCard(0x714) and c:GetReason() & REASON_DESTROY~=0 and not c:IsCode(71400031) and c:IsAbleToHand()
end end
function c71400031.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c71400031.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400031.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400031.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(c71400031.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.GetMatchingGroup(c71400031.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end end
function c71400031.op(e,tp,eg,ep,ev,re,r,rp) function c71400031.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71400031.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.GetMatchingGroup(c71400031.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_HAND) local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_HAND)
Duel.SetLP(tp,Duel.GetLP(tp)-ct*500) Duel.SetLP(tp,Duel.GetLP(tp)-ct*500)
end end
\ No newline at end of file
--蚀异梦境-幻想植物回路
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400032.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400032,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1)
e1:SetCondition(c71400032.con1)
e1:SetRange(LOCATION_FZONE)
e1:SetTarget(c71400032.tg1)
e1:SetOperation(c71400032.op1)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400032,1))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCondition(c71400032.con2)
e2:SetTarget(c71400032.tg2)
e2:SetOperation(c71400032.op2)
c:RegisterEffect(e2)
--self limitation & field activation
yume.AddYumeFieldGlobal(c,71400032,2)
end
function c71400032.op1(e,tp,eg,ep,ev,re,r,rp)
local cnt=Duel.GetLocationCount(tp,LOCATION_MZONE)
if cnt<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then cnt=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71400032.filter1,tp,LOCATION_HAND,0,1,cnt,nil,e,tp)
if g:GetCount()==0 then return end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local lnkg=Duel.GetMatchingGroup(c71400032.lnkfilter,tp,LOCATION_EXTRA,0,nil)
if lnkg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400032,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local lnk=lnkg:Select(tp,1,1,nil):GetFirst()
Duel.SpecialSummonRule(tp,lnk,SUMMON_TYPE_LINK)
end
end
function c71400032.filter1(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71400032.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c71400032.filter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,0)
end
function c71400032.con1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
--Select Link Monsters
function c71400032.lnkfilter(c)
return c:IsSetCard(0x716) and c:IsSpecialSummonable(SUMMON_TYPE_LINK)
end
function c71400032.con2(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst()
return eg:GetCount()==1 and ec:IsSetCard(0x714) and ec:IsSummonType(SUMMON_TYPE_LINK)
end
function c71400032.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_MZONE)
end
function c71400032.op2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c71400032.filter2,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)==1 then
local g2=Duel.SelectMatchingCard(tp,c71400032.filter2a,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-500)
end
end
end
function c71400032.filter2(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c71400032.filter2a(c)
return c:IsSetCard(0xd714) and c:IsAbleToHand()
end
\ No newline at end of file
--蚀异梦物-铁管 --蚀异梦物-铁管
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400033.initial_effect(c) function c71400033.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMING_TOGRAVE,0) e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMING_TOGRAVE,0)
e1:SetCountLimit(1,71400033+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,71400033+EFFECT_COUNT_CODE_OATH)
e1:SetDescription(aux.Stringid(71400033,0)) e1:SetDescription(aux.Stringid(71400033,0))
e1:SetTarget(c71400033.target) e1:SetTarget(c71400033.target)
e1:SetCost(c71400033.cost) e1:SetCost(c71400033.cost)
e1:SetCondition(yume.YumeLethalCon) e1:SetCondition(yume.YumeLethalCon)
e1:SetOperation(c71400033.operation) e1:SetOperation(c71400033.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c71400033.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400033.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500) Duel.PayLPCost(tp,500)
end end
function c71400033.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400033.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() and chkc~=e:GetHandler() end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToRemove() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c71400033.limit(g:GetFirst())) Duel.SetChainLimit(c71400033.limit(g:GetFirst()))
end end
end end
function c71400033.operation(e,tp,eg,ep,ev,re,r,rp) function c71400033.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect() Duel.BreakEffect()
c:CancelToGrave() c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN) Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end end
end end
function c71400033.limit(c) function c71400033.limit(c)
return function (e,lp,tp) return function (e,lp,tp)
return e:GetHandler()~=c return e:GetHandler()~=c
end end
end end
\ No newline at end of file
--蚀异梦境-里梦足迹 --蚀异梦境-里梦足迹
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400034.initial_effect(c) function c71400034.initial_effect(c)
--Activate --Activate
--See AddYumeFieldGlobal --See AddYumeFieldGlobal
--todeck --todeck
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c71400034.cost1) e1:SetCost(c71400034.cost1)
e1:SetCondition(c71400034.con1) e1:SetCondition(c71400034.con1)
e1:SetTarget(c71400034.tg1) e1:SetTarget(c71400034.tg1)
e1:SetOperation(c71400034.op1) e1:SetOperation(c71400034.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--self limitation & field activation --self limitation & field activation
yume.AddYumeFieldGlobal(c,71400034,2) yume.AddYumeFieldGlobal(c,71400034,2)
end end
function c71400034.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400034.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400034.filter1c,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400034.filter1c,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c71400034.filter1c,1,1,REASON_COST+REASON_DISCARD,nil) Duel.DiscardHand(tp,c71400034.filter1c,1,1,REASON_COST+REASON_DISCARD,nil)
end end
function c71400034.filter1c(c) function c71400034.filter1c(c)
return c:IsSetCard(0x7714) and c:IsType(TYPE_FIELD) and c:IsDiscardable() return c:IsSetCard(0x7714) and c:IsType(TYPE_FIELD) and c:IsDiscardable()
end end
function c71400034.con1(e,tp,eg,ep,ev,re,r,rp) function c71400034.con1(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and (re:IsActiveType(TYPE_MONSTER) return re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and (re:IsActiveType(TYPE_MONSTER)
or (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE))) or (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)))
end end
function c71400034.filter1(c) function c71400034.filter1(c)
return c:IsSetCard(0x716) and c:IsType(TYPE_LINK) and c:IsFaceup() return c:IsSetCard(0x716) and c:IsType(TYPE_LINK) and c:IsFaceup()
end end
function c71400034.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400034.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsDestructable() end if chk==0 then return re:GetHandler():IsDestructable() end
if Duel.IsExistingMatchingCard(c71400034.filter1,tp,LOCATION_ONFIELD,0,1,nil) then if Duel.IsExistingMatchingCard(c71400034.filter1,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_TODECK+CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK+CATEGORY_REMOVE,eg,1,0,0)
else else
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end end
end end
function c71400034.op1(e,tp,eg,ep,ev,re,r,rp) function c71400034.op1(e,tp,eg,ep,ev,re,r,rp)
if not (e:GetHandler():IsRelateToEffect(e) and re:GetHandler():IsRelateToEffect(re)) then return end if not (e:GetHandler():IsRelateToEffect(e) and re:GetHandler():IsRelateToEffect(re)) then return end
if Duel.SendtoDeck(eg,nil,2,REASON_EFFECT)==1 then if Duel.SendtoDeck(eg,nil,2,REASON_EFFECT)==1 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if Duel.IsExistingMatchingCard(c71400034.filter1,tp,LOCATION_ONFIELD,0,1,nil) and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400034,1)) then if Duel.IsExistingMatchingCard(c71400034.filter1,tp,LOCATION_ONFIELD,0,1,nil) and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400034,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg) Duel.HintSelection(sg)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT) Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
--梦行 --梦行
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400035.initial_effect(c) function c71400035.initial_effect(c)
--activate from hand --activate from hand
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_QP_ACT_IN_NTPHAND) e0:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e0:SetCondition(yume.nonYumeCon) e0:SetCondition(yume.nonYumeCon)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DISABLE) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DISABLE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c71400035.op1) e1:SetOperation(c71400035.op1)
e1:SetTarget(c71400035.tg1) e1:SetTarget(c71400035.tg1)
e1:SetTarget(yume.YumeFieldCheckTarget()) e1:SetTarget(yume.YumeFieldCheckTarget())
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c71400035.filter1(c) function c71400035.filter1(c)
return c:IsSetCard(0xc714) and c:IsAbleToGrave() return c:IsSetCard(0xc714) and c:IsAbleToGrave()
end end
function c71400035.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400035.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400035.filter1,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400035.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end end
function c71400035.op1(e,tp,eg,ep,ev,re,r,rp) function c71400035.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if yume.YumeFieldCheck(tp) and Duel.SelectYesNo(tp,aux.Stringid(71400035,1)) then if yume.YumeFieldCheck(tp) and Duel.SelectYesNo(tp,aux.Stringid(71400035,1)) then
yume.FieldActivation(tp) yume.FieldActivation(tp)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c71400035.filter1,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c71400035.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)==1 and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) then if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)==1 and Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0) then
Duel.BreakEffect() Duel.BreakEffect()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e1:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e1:SetTarget(c71400035.tg1a) e1:SetTarget(c71400035.tg1a)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabel(c:GetSequence()) e1:SetLabel(c:GetSequence())
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetOperation(c71400035.op1a) e2:SetOperation(c71400035.op1a)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetLabel(c:GetSequence()) e2:SetLabel(c:GetSequence())
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c71400035.tg1a) e3:SetTarget(c71400035.tg1a)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetLabel(c:GetSequence()) e3:SetLabel(c:GetSequence())
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local rct=1 local rct=1
if Duel.GetTurnPlayer()~=tp then rct=2 end if Duel.GetTurnPlayer()~=tp then rct=2 end
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_ACTIVATE) e4:SetCode(EFFECT_CANNOT_ACTIVATE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetValue(c71400035.aclimit) e4:SetValue(c71400035.aclimit)
e4:SetTargetRange(1,0) e4:SetTargetRange(1,0)
e4:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,rct) e4:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,rct)
Duel.RegisterEffect(e4,tp) Duel.RegisterEffect(e4,tp)
end end
function c71400035.aclimit(e,re,rp) function c71400035.aclimit(e,re,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and not rc:IsSetCard(0x714) and not rc:IsImmuneToEffect(e) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and not rc:IsSetCard(0x714) and not rc:IsImmuneToEffect(e)
end end
function c71400035.tg1a(e,c) function c71400035.tg1a(e,c)
local seq=e:GetLabel() local seq=e:GetLabel()
local p=c:GetControler() local p=c:GetControler()
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return not c:IsSetCard(0x714) return not c:IsSetCard(0x714)
and ((p==tp and c:GetSequence()==seq) or (p==1-tp and c:GetSequence()==4-seq)) and ((p==tp and c:GetSequence()==seq) or (p==1-tp and c:GetSequence()==4-seq))
end end
function c71400035.op1a(e,tp,eg,ep,ev,re,r,rp) function c71400035.op1a(e,tp,eg,ep,ev,re,r,rp)
local tseq=e:GetLabel() local tseq=e:GetLabel()
local ec=re:GetHandler() local ec=re:GetHandler()
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
seq=aux.MZoneSequence(seq) seq=aux.MZoneSequence(seq)
if ((rp==tp and seq==tseq) or (rp==1-tp and seq==4-tseq)) and (not ec:IsSetCard(0x714) and (ec:IsLocation(loc) or loc&LOCATION_ONFIELD==0) or not (ec:IsPreviousSetCard(0x714) or ec:IsLocation(loc)) and loc&LOCATION_ONFIELD~=0) then if ((rp==tp and seq==tseq) or (rp==1-tp and seq==4-tseq)) and (not ec:IsSetCard(0x714) and (ec:IsLocation(loc) or loc&LOCATION_ONFIELD==0) or not (ec:IsPreviousSetCard(0x714) or ec:IsLocation(loc)) and loc&LOCATION_ONFIELD~=0) then
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
end end
\ No newline at end of file
--幻异梦物-狼 --幻异梦物-狼
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400036.initial_effect(c) function c71400036.initial_effect(c)
--summon limit --summon limit
yume.AddYumeSummonLimit(c) yume.AddYumeSummonLimit(c)
--to hand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400036,0)) e1:SetDescription(aux.Stringid(71400036,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,71400036) e1:SetCountLimit(1,71400036)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c71400036.tg1) e1:SetTarget(c71400036.tg1)
e1:SetOperation(c71400036.op1) e1:SetOperation(c71400036.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end --to hand
function c71400036.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local e2=Effect.CreateEffect(c)
local c=e:GetHandler() e2:SetDescription(aux.Stringid(71400036,1))
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() and chkc~=c end e2:SetCountLimit(1,71500036)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end e2:SetCategory(CATEGORY_TOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) e2:SetCode(EVENT_TO_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
end e2:SetCondition(c71400036.con2)
function c71400036.op1(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetTarget(c71400036.tg2)
local tc=Duel.GetFirstTarget() e2:SetOperation(c71400036.op2)
if tc:IsRelateToEffect(e) then c:RegisterEffect(e2)
Duel.SendtoHand(tc,nil,REASON_EFFECT) end
end function c71400036.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToHand() and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c71400036.op1(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c71400036.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) and re:GetHandler():IsSetCard(0x714)
end
function c71400036.filter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c71400036.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c71400036.filter2(chkc) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(c71400036.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,CATEGORY_TOHAND)
local g=Duel.SelectTarget(tp,c71400036.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c71400036.op2(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 end
\ No newline at end of file
--幻异梦境-昭和胡同 --幻异梦境-昭和胡同
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400037.initial_effect(c) function c71400037.initial_effect(c)
--Activate --Activate
--See AddYumeFieldGlobal --See AddYumeFieldGlobal
--self limitation & field activation --self limitation & field activation
yume.AddYumeFieldGlobal(c,71400037,1) yume.AddYumeFieldGlobal(c,71400037,1)
--immune --cannot be target
local e1=Effect.CreateEffect(c) local e1a=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1a:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1a:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
e1:SetRange(LOCATION_FZONE) e1a:SetRange(LOCATION_FZONE)
e1:SetTargetRange(LOCATION_MZONE,0) e1a:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c71400037.tg1) e1a:SetValue(aux.imval1)
e1:SetValue(c71400037.filter1) c:RegisterEffect(e1a)
c:RegisterEffect(e1) local e1b=Effect.CreateEffect(c)
end e1b:SetType(EFFECT_TYPE_FIELD)
function c71400037.tg1(e,c) e1b:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
return c:IsSetCard(0x714) e1b:SetRange(LOCATION_FZONE)
end e1b:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
function c71400037.filter1(e,te,c) e1b:SetTargetRange(LOCATION_MZONE,0)
local tc=te:GetHandler() e1b:SetTarget(c71400037.tg1)
local tseq=tc:GetSequence() e1b:SetValue(1)
if tc:GetControler()~=c:GetControler() then tseq=tseq+16 end c:RegisterEffect(e1b)
if tc:IsLocation(LOCATION_SZONE) then tseq=tseq+8 end end
local zone=c:GetColumnZone(LOCATION_ONFIELD) function c71400037.tg1(e,c)
return zone and bit.extract(zone,tseq)~=0 return c:IsSetCard(0x714)
end end
\ No newline at end of file
--锖 --锖
function c71400038.initial_effect(c) function c71400038.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetCondition(c71400038.condition) e1:SetCondition(c71400038.condition)
e1:SetTarget(c71400038.target) e1:SetTarget(c71400038.target)
e1:SetOperation(c71400038.activate) e1:SetOperation(c71400038.activate)
e1:SetDescription(aux.Stringid(71400038,0)) e1:SetDescription(aux.Stringid(71400038,0))
e1:SetCountLimit(1,71400038+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,71400038+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c71400038.cost) e1:SetCost(c71400038.cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c71400038.condition(e,tp,eg,ep,ev,re,r,rp) function c71400038.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=3000 return Duel.GetLP(tp)<=3000
end end
function c71400038.filterc(c) function c71400038.filterc(c)
return c:IsSetCard(0xd714) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0xd714) and c:IsAbleToRemoveAsCost()
end end
function c71400038.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400038.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400038.filterc,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400038.filterc,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71400038.filterc,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c71400038.filterc,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c71400038.target(e,tp,eg,ep,ev,re,r,rp,chk) function c71400038.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE) Duel.SetChainLimit(aux.FALSE)
end end
end end
function c71400038.activate(e,tp,eg,ep,ev,re,r,rp) function c71400038.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetCondition(c71400038.con1) e1:SetCondition(c71400038.con1)
e1:SetOperation(c71400038.op1) e1:SetOperation(c71400038.op1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
e2:SetValue(c71400038.aclimit2) e2:SetValue(c71400038.aclimit2)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetTargetRange(LOCATION_MZONE,0) e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c71400038.tg3) e3:SetTarget(c71400038.tg3)
e3:SetValue(aux.indoval) e3:SetValue(aux.indoval)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_INACTIVATE) e4:SetCode(EFFECT_CANNOT_INACTIVATE)
e4:SetValue(c71400038.filter4) e4:SetValue(c71400038.filter4)
Duel.RegisterEffect(e4,tp) Duel.RegisterEffect(e4,tp)
local e4a=e1:Clone() local e4a=e1:Clone()
e4a:SetCode(EFFECT_CANNOT_DISEFFECT) e4a:SetCode(EFFECT_CANNOT_DISEFFECT)
Duel.RegisterEffect(e4a,tp) Duel.RegisterEffect(e4a,tp)
end yume.RustFlag=true;
function c71400038.con1(e,tp,eg,ep,ev,re,r,rp) end
return ep==tp function c71400038.con1(e,tp,eg,ep,ev,re,r,rp)
end return ep==tp
function c71400038.op1(e,tp,eg,ep,ev,re,r,rp) end
Duel.ChangeBattleDamage(ep,ev*2) function c71400038.op1(e,tp,eg,ep,ev,re,r,rp)
end Duel.ChangeBattleDamage(ep,ev*2)
function c71400038.aclimit2(e,re,rp) end
local rc=re:GetHandler() function c71400038.aclimit2(e,re,rp)
return rc:IsSetCard(0xd714) and not rc:IsImmuneToEffect(e) local rc=re:GetHandler()
end return rc:IsSetCard(0xd714) and not rc:IsImmuneToEffect(e)
function c71400038.tg3(e,c) end
return c:IsSetCard(0x714) function c71400038.tg3(e,c)
end return c:IsSetCard(0x714)
function c71400038.filter4(e,ct) end
local p=e:GetHandlerPlayer() function c71400038.filter4(e,ct)
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION) local p=e:GetHandlerPlayer()
local tc=te:GetHandler() local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return p==tp and not (not ec:IsSetCard(0x714) and (ec:IsLocation(loc) or loc&LOCATION_ONFIELD==0) or not (ec:IsPreviousSetCard(0x714) or ec:IsLocation(loc)) and loc&LOCATION_ONFIELD~=0) local tc=te:GetHandler()
return p==tp and not (not ec:IsSetCard(0x714) and (ec:IsLocation(loc) or loc&LOCATION_ONFIELD==0) or not (ec:IsPreviousSetCard(0x714) or ec:IsLocation(loc)) and loc&LOCATION_ONFIELD~=0)
end end
\ No newline at end of file
--异梦粉红小丑 --异梦粉红小丑
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400039.initial_effect(c) function c71400039.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot special summon --cannot special summon
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION) e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400039,0)) e1:SetDescription(aux.Stringid(71400039,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(yume.YumeCon) e1:SetCondition(yume.YumeCon)
e1:SetCountLimit(1,71400039) e1:SetCountLimit(1,71400039)
e1:SetTarget(c71400039.tg1) e1:SetTarget(c71400039.tg1)
e1:SetOperation(c71400039.op1) e1:SetOperation(c71400039.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--indes --indes
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e2a=e2:Clone() local e2a=e2:Clone()
e2a:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2a:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2a) c:RegisterEffect(e2a)
end end
function c71400039.filter1(c,tp) function c71400039.filter1(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsAbleToRemove() return c:IsLocation(LOCATION_MZONE) and c:IsAbleToRemove()
end end
function c71400039.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400039.tg1(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,true,true) and eg:IsExists(c71400039.filter1,1,nil) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) and eg:IsExists(c71400039.filter1,1,nil) end
Duel.SetTargetCard(eg) local g=eg:Filter(c71400039.filter1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetTargetCard(eg)
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
function c71400039.filter1a(c,e) end
return c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE) function c71400039.filter2a(c,e,tp)
end return c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE)
function c71400039.op1(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function c71400039.op1(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)~=0 then local c=e:GetHandler()
c:CompleteProcedure() if c:IsRelateToEffect(e) and yume.IsYumeFieldOnField(tp) and Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)~=0 then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) c:CompleteProcedure()
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) local g=eg:Filter(c71400039.filter2a,nil,e,tp)
end Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end end
\ No newline at end of file
--异梦笑颜兄妹 --异梦笑颜兄妹
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400040.initial_effect(c) function c71400040.initial_effect(c)
c:SetUniqueOnField(1,0,71400040) c:SetUniqueOnField(1,0,71400040)
--link summon --link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,yume.YumeCheck(c)) aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,yume.YumeCheck(c))
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--indes --indes
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e2a=e2:Clone() local e2a=e2:Clone()
e2a:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2a:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2a) c:RegisterEffect(e2a)
--cannot be target --cannot be target
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c71400040.tg3) e3:SetTarget(c71400040.tg3)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e3a=e3:Clone() local e3a=e3:Clone()
e3a:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e3a:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3a:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e3a:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
c:RegisterEffect(e3a) c:RegisterEffect(e3a)
end end
function c71400040.tg3(e,c) function c71400040.tg3(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsSetCard(0x714) return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsSetCard(0x714)
end end
\ No newline at end of file
--蚀异梦境-梦医院 --蚀异梦境-梦医院
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400041.initial_effect(c) function c71400041.initial_effect(c)
--Activate --Activate
--See AddYumeFieldGlobal --See AddYumeFieldGlobal
--self limitation & field activation --self limitation & field activation
yume.AddYumeFieldGlobal(c,71400041,2) yume.AddYumeFieldGlobal(c,71400041,2)
--to grave --to grave
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_SSET+TIMING_BATTLE_START+TIMING_MAIN_END) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_SSET+TIMING_BATTLE_START+TIMING_MAIN_END)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_FZONE)
e1:SetTarget(c71400041.tg1) e1:SetTarget(c71400041.tg1)
e1:SetDescription(aux.Stringid(71400041,0)) e1:SetDescription(aux.Stringid(71400041,0))
e1:SetCost(c71400041.cost1) e1:SetCost(c71400041.cost1)
e1:SetCondition(c71400041.con1) e1:SetCondition(c71400041.con1)
e1:SetOperation(c71400041.op1) e1:SetOperation(c71400041.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c71400041.con1(e,tp,eg,ep,ev,re,r,rp) function c71400041.con1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2) return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
end end
function c71400041.filter1c(c) function c71400041.filter1c(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_LINK) and c:IsLinkState() and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x714) and c:IsType(TYPE_LINK) and c:IsLinkState() and c:IsAbleToRemoveAsCost()
end end
function c71400041.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400041.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400041.filter1c,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400041.filter1c,tp,LOCATION_MZONE,0,1,nil) and Duel.CheckLPCost(tp,500) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.PayLPCost(tp,500)
local tc=Duel.SelectMatchingCard(tp,c71400041.filter1c,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then local tc=Duel.SelectMatchingCard(tp,c71400041.filter1c,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
local e1=Effect.CreateEffect(e:GetHandler()) if Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetDescription(aux.Stringid(71400041,1)) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(tc) e1:SetDescription(aux.Stringid(71400041,1))
e1:SetCountLimit(1) e1:SetLabelObject(tc)
e1:SetOperation(c71400041.retop) e1:SetCountLimit(1)
Duel.RegisterEffect(e1,tp) e1:SetOperation(c71400041.retop)
end Duel.RegisterEffect(e1,tp)
end end
function c71400041.retop(e,tp,eg,ep,ev,re,r,rp) end
Duel.ReturnToField(e:GetLabelObject()) function c71400041.retop(e,tp,eg,ep,ev,re,r,rp)
end Duel.ReturnToField(e:GetLabelObject())
function c71400041.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) end
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToGrave() end function c71400041.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsAbleToGrave() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
function c71400041.filter1(c,cid) end
return c:IsAbleToGrave() and c:IsCode(cid) function c71400041.filter1(c,cid)
end return c:IsAbleToGrave() and c:IsCode(cid)
function c71400041.op1(e,tp,eg,ep,ev,re,r,rp) end
local tc=Duel.GetFirstTarget() function c71400041.op1(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) then local tc=Duel.GetFirstTarget()
Duel.SendtoGrave(tc,REASON_EFFECT) if tc:IsRelateToEffect(e) then
if tc:IsLocation(LOCATION_GRAVE) then Duel.SendtoGrave(tc,REASON_EFFECT)
local p=tc:GetControler() if tc:IsLocation(LOCATION_GRAVE) then
local g=Duel.GetMatchingGroup(c71400041.filter1,p,LOCATION_DECK+LOCATION_HAND,0,nil,tc:GetCode()) local p=tc:GetControler()
if g:GetCount()>0 then local g=Duel.GetMatchingGroup(c71400041.filter1,p,LOCATION_DECK+LOCATION_HAND,0,nil,tc:GetCode())
Duel.BreakEffect() if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.BreakEffect()
g=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE) Duel.SendtoGrave(g,REASON_EFFECT)
end g=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
g:AddCard(tc) end
local lc=g:GetFirst() g:AddCard(tc)
while lc do local lc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler()) while lc do
e1:SetType(EFFECT_TYPE_FIELD) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetValue(c71400041.aclimit) e1:SetTargetRange(1,0)
e1:SetLabel(lc:GetCode()) e1:SetValue(c71400041.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetLabel(lc:GetCode())
Duel.RegisterEffect(e1,p) e1:SetReset(RESET_PHASE+PHASE_END)
lc=g:GetNext() Duel.RegisterEffect(e1,p)
end lc=g:GetNext()
end end
end end
end end
function c71400041.aclimit(e,re,tp) end
return re:GetHandler():IsCode(e:GetLabel()) function c71400041.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end end
\ No newline at end of file
--异梦之书的小管理员 --小异梦书使-馆长女儿
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400042.initial_effect(c) function c71400042.initial_effect(c)
--summon limit --summon limit
yume.AddYumeSummonLimit(c) yume.AddYumeSummonLimit(c)
--cannot attack --cannot attack
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c71400042.atklimit) e1:SetOperation(c71400042.atklimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e1a=e1:Clone() local e1a=e1:Clone()
e1a:SetCode(EVENT_FLIP_SUMMON_SUCCESS) e1a:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e1a) c:RegisterEffect(e1a)
local e1b=e1:Clone() local e1b=e1:Clone()
e1b:SetCode(EVENT_SPSUMMON_SUCCESS) e1b:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1b) c:RegisterEffect(e1b)
--direct attack --direct attack
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK) e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetCondition(c71400042.dircon) e2:SetCondition(c71400042.dircon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon --special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400042,0)) e3:SetDescription(aux.Stringid(71400042,0))
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCost(c71400042.cost3) e3:SetTarget(c71400042.tg3)
e3:SetTarget(c71400042.tg3) e3:SetOperation(c71400042.op3)
e3:SetOperation(c71400042.op3) e3:SetCondition(c71400042.con3)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--transform --transform
local e4a=Effect.CreateEffect(c) local e4a=Effect.CreateEffect(c)
e4a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e4a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4a:SetCode(EVENT_CHAINING) e4a:SetCode(EVENT_CHAINING)
e4a:SetRange(LOCATION_MZONE+LOCATION_GRAVE) e4a:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e4a:SetOperation(aux.chainreg) e4a:SetOperation(aux.chainreg)
c:RegisterEffect(e4a) c:RegisterEffect(e4a)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(71400042,1)) e4:SetDescription(aux.Stringid(71400042,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_CHAIN_SOLVED) e4:SetCode(EVENT_CHAIN_SOLVED)
e4:SetRange(LOCATION_MZONE+LOCATION_GRAVE) e4:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e4:SetCondition(c71400042.con4) e4:SetCondition(c71400042.con4)
e4:SetTarget(c71400042.tg4) e4:SetTarget(c71400042.tg4)
e4:SetOperation(c71400042.op4) e4:SetOperation(c71400042.op4)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c71400042.atklimit(e,tp,eg,ep,ev,re,r,rp) function c71400042.atklimit(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1) e:GetHandler():RegisterEffect(e1)
end end
function c71400042.cfilter1(c) function c71400042.cfilter1(c)
return c:IsFaceup() and c:IsCode(15259703) return c:IsFaceup() and c:IsCode(15259703)
end end
function c71400042.cfilter2(c) function c71400042.cfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_TOON) return c:IsFaceup() and c:IsType(TYPE_TOON)
end end
function c71400042.dircon(e) function c71400042.dircon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c71400042.cfilter1,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(c71400042.cfilter1,tp,LOCATION_ONFIELD,0,1,nil)
and not Duel.IsExistingMatchingCard(c71400042.cfilter2,tp,0,LOCATION_MZONE,1,nil) and not Duel.IsExistingMatchingCard(c71400042.cfilter2,tp,0,LOCATION_MZONE,1,nil)
end end
function c71400042.filter3(c) function c71400042.filter3(c)
local flag=false local flag=false
if c:IsLocation(LOCATION_HAND) then flag=c:IsSetCard(0x714) if c:IsLocation(LOCATION_HAND) then flag=c:IsSetCard(0x714)
else flag=c:IsSetCard(0x714) and c:IsType(TYPE_XYZ) end else flag=c:IsSetCard(0x714) and c:IsType(TYPE_XYZ) end
return flag and c:IsAbleToRemoveAsCost() return flag and c:IsAbleToRemoveAsCost()
end end
function c71400042.xyzfilter(c,e,tp) function c71400042.xyzfilter(c,e,tp)
return c:IsSetCard(0x3715) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsSetCard(0x3715) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c71400042.cost3(e,tp,eg,ep,ev,re,r,rp,chk) function c71400042.linkfilter(c)
local c=e:GetHandler() return c:IsFaceup() and c:IsType(TYPE_LINK)
if chk==0 then return Duel.IsExistingMatchingCard(c71400042.filter3,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,nil) end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) function c71400042.con3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c71400042.filter3,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,nil) return not Duel.IsExistingMatchingCard(c71400042.linkfilter,tp,LOCATION_MZONE,0,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) end
e:SetTargetCard(g) function c71400042.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
end if chk==0 then return Duel.IsExistingMatchingCard(c71400042.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
function c71400042.tg3(e,tp,eg,ep,ev,re,r,rp,chk) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
if chk==0 then return Duel.IsExistingMatchingCard(c71400042.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) function c71400042.op3(e,tp,eg,ep,ev,re,r,rp)
end local g=Duel.GetMatchingGroup(c71400042.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
function c71400042.op3(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.GetMatchingGroup(c71400042.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local sg=g:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sc=sg:GetFirst()
local sg=g:Select(tp,1,1,nil) if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
local sc=sg:GetFirst() local e1=Effect.CreateEffect(e:GetHandler())
if sc then e1:SetType(EFFECT_TYPE_SINGLE)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
if mg:GetCount()>0 then e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
Duel.Overlay(sc,mg) e1:SetValue(LOCATION_DECK)
end sc:RegisterEffect(e1)
end Duel.SpecialSummonComplete()
end end
function c71400042.filter4(c,e,tp) end
return c:IsCode(71400011) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) function c71400042.filter4(c,e,tp)
end return c:IsCode(71400011) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
function c71400042.con4(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function c71400042.con4(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local c=e:GetHandler()
return rc:IsCode(71400026) and c:GetFlagEffect(1)>0 and re:IsHasType(EFFECT_TYPE_ACTIVATE) local rc=re:GetHandler()
end return rc:IsCode(71400026) and c:GetFlagEffect(1)>0
function c71400042.tg4(e,tp,eg,ep,ev,re,r,rp,chk) end
if chk==0 then return true end function c71400042.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) if chk==0 then return true end
local c=e:GetHandler() Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
if c:IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,LOCATION_GRAVE) end local c=e:GetHandler()
end if c:IsLocation(LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,tp,LOCATION_GRAVE) end
function c71400042.op4(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function c71400042.op4(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCountFromEx(tp,tp,c)<=0 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL) then return end local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end if Duel.GetLocationCountFromEx(tp,tp,c)<=0 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp) or c:IsImmuneToEffect(e) then return end
local g=Duel.SelectMatchingCard(tp,c71400042.filter4,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=g:GetFirst() local g=Duel.SelectMatchingCard(tp,c71400042.filter4,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==1 then local sc=g:GetFirst()
sc:CompleteProcedure() if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)==1 then
if c:IsRelateToEffect(e) then sc:CompleteProcedure()
Duel.Overlay(sc,c) if c:IsRelateToEffect(e) then
end Duel.Overlay(sc,c)
end end
end
end end
\ No newline at end of file
--异梦之海的潜水员 --异梦海底的潜水员-橘黄子
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400043.initial_effect(c) function c71400043.initial_effect(c)
c:SetSPSummonOnce(71400043) c:SetSPSummonOnce(71400043)
--link summon --link summon
aux.AddLinkProcedure(c,c71400043.matfilter,1,1,yume.YumeCheck(c)) aux.AddLinkProcedure(c,c71400043.matfilter,1,1,yume.YumeCheck(c))
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--tohand --tohand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400043,0)) e1:SetDescription(aux.Stringid(71400043,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,71400043+EFFECT_COUNT_CODE_DUEL) e1:SetCountLimit(1,71400043+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(c71400043.con1) e1:SetCondition(c71400043.con1)
e1:SetTarget(c71400043.tg1) e1:SetTarget(c71400043.tg1)
e1:SetOperation(c71400043.op1) e1:SetOperation(c71400043.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--field --field
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400043,1)) e2:SetDescription(aux.Stringid(71400043,1))
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c71400043.con2) e2:SetCondition(c71400043.con2)
e2:SetOperation(c71400043.op2) e2:SetOperation(c71400043.op2)
c:RegisterEffect(e2) e2:SetTarget(c71400043.tg2)
--tohand c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) --banish
e3:SetDescription(aux.Stringid(71400043,2)) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH) e3:SetDescription(aux.Stringid(71400043,2))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET) e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c71400043.tg3) e3:SetCountLimit(1)
e3:SetOperation(c71400043.op3) e3:SetCondition(c71400043.con3)
c:RegisterEffect(e3) e3:SetOperation(c71400043.op3)
end e3:SetCost(c71400043.cost3)
function c71400043.matfilter(c) e3:SetTarget(c71400043.tg3)
return c:IsLinkType(TYPE_EFFECT) and not c:IsLinkType(TYPE_LINK) c:RegisterEffect(e3)
end --[[
function c71400043.con1(e,tp,eg,ep,ev,re,r,rp) --tohand
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) local e3=Effect.CreateEffect(c)
end e3:SetDescription(aux.Stringid(71400043,2))
function c71400043.filter1(c) e3:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND+CATEGORY_SEARCH)
return c:IsSetCard(0x5714) and c:IsAbleToHand() e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
end e3:SetCode(EVENT_TO_GRAVE)
function c71400043.tg1(e,tp,eg,ep,ev,re,r,rp,chk) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
if chk==0 then return Duel.IsExistingMatchingCard(c71400043.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end e3:SetTarget(c71400043.tg3)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) e3:SetOperation(c71400043.op3)
end c:RegisterEffect(e3)
function c71400043.op1(e,tp,eg,ep,ev,re,r,rp) --]]
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) end
local g=Duel.SelectMatchingCard(tp,c71400043.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) function c71400043.matfilter(c)
if g:GetCount()>0 then return c:IsLinkType(TYPE_EFFECT) and not c:IsLinkType(TYPE_LINK)
Duel.SendtoHand(g,nil,REASON_EFFECT) end
Duel.ConfirmCards(1-tp,g) function c71400043.con1(e,tp,eg,ep,ev,re,r,rp)
end return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function c71400043.filter2(c) function c71400043.filter1(c)
return c:GetSummonLocation()==LOCATION_EXTRA return c:IsSetCard(0xd714) and c:IsAbleToHand()
end end
function c71400043.filter2a(c) function c71400043.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsFaceup() and c:IsType(TYPE_LINK) if chk==0 then return Duel.IsExistingMatchingCard(c71400043.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
function c71400043.con2(e,tp,eg,ep,ev,re,r,rp) end
local g=Duel.GetMatchingGroup(c71400043.filter2,tp,LOCATION_MZONE,0,nil) function c71400043.op1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and g:GetCount()>0 and g:FilterCount(c71400043.filter2a,nil)==g:GetCount() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
end local g=Duel.SelectMatchingCard(tp,c71400043.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
function c71400043.op2(e,tp,eg,ep,ev,re,r,rp) if g:GetCount()>0 then
yume.FieldActivation(tp,nil,2) Duel.SendtoHand(g,nil,REASON_EFFECT)
end Duel.ConfirmCards(1-tp,g)
function c71400043.filter3a(c) end
return c:IsSetCard(0x5714) and c:IsAbleToDeck() and not c:IsPublic() end
end function c71400043.con2(e,tp,eg,ep,ev,re,r,rp)
function c71400043.filter3(c) return not (yume.RustFlag or e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN))
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end
end function c71400043.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
function c71400043.tg3(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then
if chk==0 then return Duel.IsExistingMatchingCard(c71400043.filter3,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c71400043.filter3a,tp,LOCATION_HAND,0,1,nil) end local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
Duel.SetTargetPlayer(tp) local num=0
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) if fc and fc:IsFaceup() then num=fc:GetCode() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) return yume.YumeFieldCheck(tp,num,2,LOCATION_GRAVE+LOCATION_DECK)
end end
function c71400043.op3(e,tp,eg,ep,ev,re,r,rp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) function c71400043.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c71400043.filter3a,tp,LOCATION_HAND,0,1,1,nil) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if g:GetCount()>0 then local num=0
Duel.ConfirmCards(1-tp,g) if fc and fc:IsFaceup() then num=fc:GetCode() end
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 then yume.FieldActivation(tp,num,2,LOCATION_GRAVE+LOCATION_DECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) end
local g2=Duel.SelectMatchingCard(tp,c71400043.filter3,tp,LOCATION_DECK,0,1,1,nil) function c71400043.con3(e,tp,eg,ep,ev,re,r,rp)
if g2:GetCount()>0 then return yume.RustFlag
Duel.BreakEffect() end
Duel.SendtoHand(g2,nil,REASON_EFFECT) function c71400043.filter3(c,tp)
Duel.ConfirmCards(1-tp,g2) return c:IsAbleToRemove(tp,POS_FACEDOWN) and not(c:IsLocation(LOCATION_FZONE) and c:IsType(TYPE_FIELD) and c:IsSetCard(0x3714) and c:IsFaceup() and c:IsControler(tp))
end end
end function c71400043.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost(POS_FACEDOWN) end
end Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_COST)
\ No newline at end of file end
function c71400043.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400043.filter3,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) end
local g=Duel.GetMatchingGroup(c71400043.filter3,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c71400043.op3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71400043.filter3,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end
--[[
function c71400043.filter3a(c)
return c:IsSetCard(0x5714) and c:IsAbleToDeck() and not c:IsPublic()
end
function c71400043.filter3(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c71400043.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400043.filter3,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c71400043.filter3a,tp,LOCATION_HAND,0,1,nil) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c71400043.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c71400043.filter3a,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,g)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c71400043.filter3,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g2)
end
end
end
end
--]]
\ No newline at end of file
--幻异梦物-猫 --幻异梦物-猫
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400044.initial_effect(c) function c71400044.initial_effect(c)
--summon limit --summon limit
yume.AddYumeSummonLimit(c) yume.AddYumeSummonLimit(c)
--tohand --tohand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400044,0)) e1:SetDescription(aux.Stringid(71400044,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetTarget(c71400044.tg1)
e1:SetTarget(c71400044.tg1) e1:SetOperation(c71400044.op1)
e1:SetOperation(c71400044.op1) c:RegisterEffect(e1)
c:RegisterEffect(e1) --double attack
end local e2=Effect.CreateEffect(c)
function c71400044.filter1(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and not c:IsCode(71400044) and c:IsAbleToHand() e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
end e2:SetDescription(aux.Stringid(71400044,1))
function c71400044.tg1(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetCode(EVENT_TO_GRAVE)
if chk==0 then return Duel.IsExistingMatchingCard(c71400044.filter1,tp,LOCATION_DECK,0,1,nil) end e2:SetCountLimit(1,71400044)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) e2:SetTarget(c71400044.tg2)
end e2:SetOperation(c71400044.op2)
function c71400044.op1(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) end
local g=Duel.SelectMatchingCard(tp,c71400044.filter1,tp,LOCATION_DECK,0,1,1,nil) function c71400044.filter1(c)
if g:GetCount()>0 then return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and not c:IsCode(71400044) and c:IsAbleToHand()
Duel.SendtoHand(g,nil,REASON_EFFECT) end
Duel.ConfirmCards(1-tp,g) function c71400044.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then return Duel.IsExistingMatchingCard(c71400044.filter1,tp,LOCATION_DECK,0,1,nil) end
local e1=Effect.CreateEffect(c) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) end
e1:SetCode(EVENT_DAMAGE) function c71400044.op1(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(c71400044.regop) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
e1:SetReset(RESET_PHASE+PHASE_END) local g=Duel.SelectMatchingCard(tp,c71400044.filter1,tp,LOCATION_DECK,0,1,1,nil)
e1:SetLabel(0) if g:GetCount()>0 then
Duel.RegisterEffect(e1,tp) Duel.SendtoHand(g,nil,REASON_EFFECT)
local e2=Effect.CreateEffect(c) Duel.ConfirmCards(1-tp,g)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) end
e2:SetCode(EVENT_PHASE+PHASE_END) end
e2:SetCountLimit(1) function c71400044.filter2(c)
e2:SetCondition(c71400044.damcon) return c:IsFaceup() and c:IsSetCard(0x714)
e2:SetOperation(c71400044.damop) end
e2:SetReset(RESET_PHASE+PHASE_END) function c71400044.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e2:SetLabelObject(e1) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c71400044.filter2(chkc) end
Duel.RegisterEffect(e2,tp) if chk==0 then return Duel.IsExistingTarget(c71400044.filter2,tp,LOCATION_MZONE,0,1,nil) end
end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
end Duel.SelectTarget(tp,c71400044.filter2,tp,LOCATION_MZONE,0,1,1,nil)
function c71400044.regop(e,tp,eg,ep,ev,re,r,rp) end
if e:GetLabel()~=1 and ep~=tp and (eg and eg:GetFirst():IsControler(tp) or re and re:GetHandlerPlayer()==tp) then function c71400044.op2(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(1) local tc=Duel.GetFirstTarget()
end if tc:IsRelateToEffect(e) and tc:IsFaceup() then
end local atk=tc:GetAttack()
function c71400044.damcon(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler())
return e:GetLabelObject():GetLabel()==0 e1:SetType(EFFECT_TYPE_SINGLE)
end e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
function c71400044.damop(e,tp,eg,ep,ev,re,r,rp) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
Duel.SetLP(tp,Duel.GetLP(tp)-1000) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(atk*2)
tc:RegisterEffect(e1)
end
end end
\ No newline at end of file
--黑白的异梦少女 Monoko --黑白异梦少女-黑白子
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400045.initial_effect(c) function c71400045.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,yume.YumeCheck(c),aux.NonTuner(yume.YumeCheck(c)),1) aux.AddSynchroProcedure(c,yume.YumeCheck(c),aux.NonTuner(yume.YumeCheck(c)),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--act limit --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetDescription(aux.Stringid(71400045,0))
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTargetRange(0,1) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetValue(c71400045.aclimit) e1:SetCountLimit(1,71400045)
c:RegisterEffect(e1) e1:SetCondition(c71400045.con1)
--multi attack e1:SetTarget(c71400045.tg1)
local e2=Effect.CreateEffect(c) e1:SetOperation(c71400045.op1)
e2:SetType(EFFECT_TYPE_SINGLE) c:RegisterEffect(e1)
e2:SetCode(EFFECT_EXTRA_ATTACK) --atkup
e2:SetValue(4) local e2=Effect.CreateEffect(c)
e2:SetCondition(c71400045.con2) e2:SetType(EFFECT_TYPE_SINGLE)
c:RegisterEffect(e2) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
Duel.AddCustomActivityCounter(71400045,ACTIVITY_CHAIN,c71400045.chainfilter) e2:SetCode(EFFECT_UPDATE_ATTACK)
--pos e2:SetRange(LOCATION_MZONE)
local e2a=Effect.CreateEffect(c) e2:SetValue(c71400045.val)
e2a:SetDescription(aux.Stringid(71400045,0)) c:RegisterEffect(e2)
e2a:SetCategory(CATEGORY_POSITION) --multi attack
e2a:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) local e3=Effect.CreateEffect(c)
e2a:SetCode(EVENT_PHASE+PHASE_BATTLE) e3:SetType(EFFECT_TYPE_SINGLE)
e2a:SetRange(LOCATION_MZONE) e3:SetCode(EFFECT_EXTRA_ATTACK)
e2a:SetCountLimit(1) e3:SetValue(4)
e2a:SetCondition(c71400045.con2a) e3:SetCondition(c71400045.con3)
e2a:SetOperation(c71400045.op2a) c:RegisterEffect(e3)
c:RegisterEffect(e2a) Duel.AddCustomActivityCounter(71400045,ACTIVITY_CHAIN,c71400045.chainfilter)
end --pos
function c71400045.chainfilter(re,tp,cid) local e3a=Effect.CreateEffect(c)
return not (re:GetHandler():IsCode(71400047) and re:IsHasType(EFFECT_TYPE_ACTIVATE)) e3a:SetDescription(aux.Stringid(71400045,1))
end e3a:SetCategory(CATEGORY_POSITION)
function c71400045.aclimit(e,re,tp) e3a:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
return not re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:GetHandler():IsImmuneToEffect(e) e3a:SetCode(EVENT_PHASE+PHASE_BATTLE)
end e3a:SetRange(LOCATION_MZONE)
function c71400045.con2(e) e3a:SetCountLimit(1)
return Duel.GetCustomActivityCount(71400045,e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0 e3a:SetCondition(c71400045.con3a)
end e3a:SetOperation(c71400045.op3a)
function c71400045.con2a(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e3a)
local c=e:GetHandler() end
return c71400045.con2(e) and c:IsAttackPos() and c:GetBattledGroupCount()>0 function c71400045.con1(e,tp,eg,ep,ev,re,r,rp)
end return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
function c71400045.op2a(e,tp,eg,ep,ev,re,r,rp) end
local c=e:GetHandler() function c71400045.filter1(c,e,tp)
if c:IsAttackPos() then return c:IsSetCard(0x714) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
Duel.ChangePosition(c,POS_FACEUP_DEFENSE) end
end function c71400045.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c71400045.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c71400045.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c71400045.filter1),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c71400045.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c71400045.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not (c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x714))
end
function c71400045.val(e,c)
return Duel.GetMatchingGroupCount(c71400045.filter2,c:GetControler(),LOCATION_GRAVE+LOCATION_MZONE,0,nil)*300
end
function c71400045.filter2(c)
return c:IsSetCard(0x717) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c71400045.chainfilter(re,tp,cid)
return not (re:GetHandler():IsCode(71400047) and re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function c71400045.con3(e)
return Duel.GetCustomActivityCount(71400045,e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0
end
function c71400045.con3a(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c71400045.con2(e) and c:IsAttackPos() and c:GetBattledGroupCount()>0
end
function c71400045.op3a(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsAttackPos() then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
end
end end
\ No newline at end of file
--黑白的异梦少女 Monoe --黑白异梦少女-黑白江
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400046.initial_effect(c) function c71400046.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,yume.YumeCheck(c),aux.NonTuner(yume.YumeCheck(c)),1) aux.AddSynchroProcedure(c,yume.YumeCheck(c),aux.NonTuner(yume.YumeCheck(c)),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--destroy --to deck
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400046,0)) e1:SetDescription(aux.Stringid(71400046,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCountLimit(1,71400046)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCategory(CATEGORY_TODECK)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c71400046.con1) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c71400046.tg1) e1:SetCondition(c71400046.con1)
e1:SetOperation(c71400046.op1) e1:SetTarget(c71400046.tg1)
c:RegisterEffect(e1) e1:SetOperation(c71400046.op1)
--self banish c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e1a=e1:Clone()
e2:SetDescription(aux.Stringid(71400046,1)) e1a:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCategory(CATEGORY_REMOVE) c:RegisterEffect(e1a)
e2:SetType(EFFECT_TYPE_QUICK_F) --atkup
e2:SetRange(LOCATION_MZONE) local e2=Effect.CreateEffect(c)
e2:SetCode(EVENT_BECOME_TARGET) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCondition(c71400046.con2) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetTarget(c71400046.tg2) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetOperation(c71400046.op2) e2:SetRange(LOCATION_MZONE)
c:RegisterEffect(e2) e2:SetValue(c71400046.val)
local e2a=e2:Clone() c:RegisterEffect(e2)
e2a:SetDescription(aux.Stringid(71400046,1)) --self banish
e2a:SetCode(EVENT_BE_BATTLE_TARGET) local e3=Effect.CreateEffect(c)
c:RegisterEffect(e2a) e3:SetDescription(aux.Stringid(71400046,1))
end e3:SetCategory(CATEGORY_REMOVE)
function c71400046.con1(e,tp,eg,ep,ev,re,r,rp) e3:SetType(EFFECT_TYPE_QUICK_F)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) e3:SetRange(LOCATION_MZONE)
end e3:SetCode(EVENT_BECOME_TARGET)
function c71400046.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e3:SetCondition(c71400046.con3)
local c=e:GetHandler() e3:SetTarget(c71400046.tg3)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc~=c end e3:SetOperation(c71400046.op3)
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end c:RegisterEffect(e3)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local e3a=e3:Clone()
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) e3a:SetCode(EVENT_BE_BATTLE_TARGET)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) c:RegisterEffect(e3a)
end end
function c71400046.op1(e,tp,eg,ep,ev,re,r,rp) function c71400046.filter1(c,tp)
local tc=Duel.GetFirstTarget() return c:IsSummonPlayer(1-tp) and c:IsAbleToDeck() and c:IsLocation(LOCATION_MZONE)
if tc:IsRelateToEffect(e) then end
Duel.Destroy(tc,REASON_EFFECT) function c71400046.con1(e,tp,eg,ep,ev,re,r,rp)
end return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c71400046.con2(e,tp,eg,ep,ev,re,r,rp) function c71400046.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
return eg:IsContains(e:GetHandler()) local g=eg:Filter(c71400046.filter1,nil,tp)
end local ct=g:GetCount()
function c71400046.tg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return ct>0 end
if chk==0 then return true end Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,ct,0,0)
end end
function c71400046.op2(e,tp,eg,ep,ev,re,r,rp) function c71400046.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local g=eg:Filter(c71400046.filter1,nil,tp):Filter(Card.IsRelateToEffect,nil,e)
if c:IsRelateToEffect(e) and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then if g:GetCount()>0 then
local e1=Effect.CreateEffect(c) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) end
e1:SetCode(EVENT_PHASE+PHASE_END) end
e1:SetReset(RESET_PHASE+PHASE_END) function c71400046.val(e,c)
e1:SetLabelObject(c) return Duel.GetMatchingGroupCount(c71400046.filter2,c:GetControler(),LOCATION_GRAVE+LOCATION_MZONE,0,nil)*300
e1:SetCountLimit(1) end
e1:SetOperation(c71400046.retop) function c71400046.filter2(c)
Duel.RegisterEffect(e1,tp) return c:IsSetCard(0x717) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end end
end function c71400046.con3(e,tp,eg,ep,ev,re,r,rp)
function c71400046.retop(e,tp,eg,ep,ev,re,r,rp) return eg:IsContains(e:GetHandler())
Duel.ReturnToField(e:GetLabelObject()) end
function c71400046.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end
function c71400046.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c71400046.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c71400046.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end end
\ No newline at end of file
--幻异梦物-信号灯 --幻异梦物-信号灯
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400047.initial_effect(c) function c71400047.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetDescription(aux.Stringid(71400047,0)) e1:SetDescription(aux.Stringid(71400047,0))
e1:SetCondition(c71400047.con1) e1:SetCondition(c71400047.con1)
e1:SetOperation(c71400047.op1) e1:SetOperation(c71400047.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c71400047.con1(e,tp,eg,ep,ev,re,r,rp) function c71400047.con1(e,tp,eg,ep,ev,re,r,rp)
return yume.YumeCon(e,tp) and Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.IsAbleToEnterBP() return yume.YumeCon(e,tp) and Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.IsAbleToEnterBP()
end end
function c71400047.op1(e,tp,eg,ep,ev,re,r,rp) function c71400047.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c71400047.atktarget) e1:SetTarget(c71400047.atktarget)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
if not (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)) then return end if not (Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)) then return end
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_BP_TWICE) e2:SetCode(EFFECT_BP_TWICE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
function c71400047.atktarget(e,c) function c71400047.atktarget(e,c)
return not (c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x714)) return not (c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x714))
end end
\ No newline at end of file
--黑白的异梦小少女 Monoko --黑白的异梦小少女 Monoko
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400048.initial_effect(c) function c71400048.initial_effect(c)
--summon limit --summon limit
yume.AddYumeSummonLimit(c) yume.AddYumeSummonLimit(c)
--cannot attack --cannot attack
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(c71400048.atklimit) e1:SetOperation(c71400048.atklimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e1a=e1:Clone() local e1a=e1:Clone()
e1a:SetCode(EVENT_FLIP_SUMMON_SUCCESS) e1a:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e1a) c:RegisterEffect(e1a)
local e1b=e1:Clone() local e1b=e1:Clone()
e1b:SetCode(EVENT_SPSUMMON_SUCCESS) e1b:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1b) c:RegisterEffect(e1b)
--direct attack --direct attack
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK) e2:SetCode(EFFECT_DIRECT_ATTACK)
e2:SetCondition(c71400048.dircon) e2:SetCondition(c71400048.dircon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--multi attack --multi attack
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_EXTRA_ATTACK_MONSTER) e3:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e3:SetValue(4) e3:SetValue(4)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--transform --transform
local e4a=Effect.CreateEffect(c) local e4a=Effect.CreateEffect(c)
e4a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e4a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4a:SetCode(EVENT_CHAINING) e4a:SetCode(EVENT_CHAINING)
e4a:SetRange(LOCATION_MZONE+LOCATION_GRAVE) e4a:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e4a:SetOperation(aux.chainreg) e4a:SetOperation(aux.chainreg)
c:RegisterEffect(e4a) c:RegisterEffect(e4a)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(71400048,0)) e4:SetDescription(aux.Stringid(71400048,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_CHAIN_SOLVED) e4:SetCode(EVENT_CHAIN_SOLVED)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c71400048.con4) e4:SetCondition(c71400048.con4)
e4:SetTarget(c71400048.tg4) e4:SetTarget(c71400048.tg4)
e4:SetOperation(c71400048.op4) e4:SetOperation(c71400048.op4)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--transform --transform
local e4b=Effect.CreateEffect(c) local e4b=Effect.CreateEffect(c)
e4b:SetDescription(aux.Stringid(71400048,0)) e4b:SetDescription(aux.Stringid(71400048,0))
e4b:SetCategory(CATEGORY_SPECIAL_SUMMON) e4b:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4b:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4b:SetCountLimit(1) e4b:SetCountLimit(1)
e4b:SetCode(EVENT_PHASE+PHASE_BATTLE_START) e4b:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e4b:SetRange(LOCATION_MZONE) e4b:SetRange(LOCATION_MZONE)
e4b:SetCondition(c71400048.con4b) e4b:SetCondition(c71400048.con4b)
e4b:SetTarget(c71400048.tg4) e4b:SetTarget(c71400048.tg4)
e4b:SetOperation(c71400048.op4) e4b:SetOperation(c71400048.op4)
c:RegisterEffect(e4b) c:RegisterEffect(e4b)
Duel.AddCustomActivityCounter(71400048,ACTIVITY_CHAIN,c71400048.chainfilter) Duel.AddCustomActivityCounter(71400048,ACTIVITY_CHAIN,c71400048.chainfilter)
end end
function c71400048.cfilter1(c) function c71400048.cfilter1(c)
return c:IsFaceup() and c:IsCode(15259703) return c:IsFaceup() and c:IsCode(15259703)
end end
function c71400048.cfilter2(c) function c71400048.cfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_TOON) return c:IsFaceup() and c:IsType(TYPE_TOON)
end end
function c71400048.dircon(e) function c71400048.dircon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c71400048.cfilter1,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(c71400048.cfilter1,tp,LOCATION_ONFIELD,0,1,nil)
and not Duel.IsExistingMatchingCard(c71400048.cfilter2,tp,0,LOCATION_MZONE,1,nil) and not Duel.IsExistingMatchingCard(c71400048.cfilter2,tp,0,LOCATION_MZONE,1,nil)
end end
function c71400048.filter4(c,e,tp) function c71400048.filter4(c,e,tp)
return c:IsCode(71400045) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) return c:IsCode(71400045) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end end
function c71400048.con4(e,tp,eg,ep,ev,re,r,rp) function c71400048.con4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re:GetHandler() local rc=re:GetHandler()
return rc:IsCode(71400047) and c:GetFlagEffect(1)>0 and re:IsHasType(EFFECT_TYPE_ACTIVATE) return rc:IsCode(71400047) and c:GetFlagEffect(1)>0 and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function c71400048.tg4(e,tp,eg,ep,ev,re,r,rp,chk) function c71400048.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c71400048.chainfilter(re,tp,cid) function c71400048.chainfilter(re,tp,cid)
return not (re:GetHandler():IsCode(71400047) and re:IsHasType(EFFECT_TYPE_ACTIVATE)) return not (re:GetHandler():IsCode(71400047) and re:IsHasType(EFFECT_TYPE_ACTIVATE))
end end
function c71400048.con4b(e) function c71400048.con4b(e)
return Duel.GetCustomActivityCount(71400048,e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0 return Duel.GetCustomActivityCount(71400048,e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0
end end
function c71400048.op4(e,tp,eg,ep,ev,re,r,rp) function c71400048.op4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SendtoGrave(c,REASON_EFFECT)==0 then return end if not c:IsRelateToEffect(e) or Duel.SendtoGrave(c,REASON_EFFECT)==0 then return end
if Duel.GetLocationCountFromEx(tp,tp,c)<=0 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end if Duel.GetLocationCountFromEx(tp,tp,c)<=0 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71400048.filter4,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c71400048.filter4,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
\ No newline at end of file
--幻异梦境-黑白世界 --幻异梦境-黑白世界
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400049.initial_effect(c) function c71400049.initial_effect(c)
--Activate --Activate
--See AddYumeFieldGlobal --See AddYumeFieldGlobal
--self limitation & field activation --self limitation & field activation
yume.AddYumeFieldGlobal(c,71400049,1) yume.AddYumeFieldGlobal(c,71400049,1)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400049,0)) e1:SetDescription(aux.Stringid(71400049,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(c71400049.con1) e1:SetCondition(c71400049.con1)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_FZONE)
e1:SetTarget(c71400049.tg1) e1:SetTarget(c71400049.tg1)
e1:SetOperation(c71400049.op1) e1:SetOperation(c71400049.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400049,1)) e2:SetDescription(aux.Stringid(71400049,1))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c71400049.con2) e2:SetCondition(c71400049.con2)
e2:SetTarget(c71400049.tg2) e2:SetTarget(c71400049.tg2)
e2:SetOperation(c71400049.op2) e2:SetOperation(c71400049.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400049.op1(e,tp,eg,ep,ev,re,r,rp) function c71400049.op1(e,tp,eg,ep,ev,re,r,rp)
local cnt=Duel.GetLocationCount(tp,LOCATION_MZONE) local cnt=Duel.GetLocationCount(tp,LOCATION_MZONE)
if cnt<=0 or not e:GetHandler():IsRelateToEffect(e) then return end if cnt<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then cnt=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then cnt=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71400049.filter1,tp,LOCATION_HAND,0,1,cnt,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c71400049.filter1,tp,LOCATION_HAND,0,1,cnt,nil,e,tp)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local syng=Duel.GetMatchingGroup(c71400049.synfilter,tp,LOCATION_EXTRA,0,nil) local syng=Duel.GetMatchingGroup(c71400049.synfilter,tp,LOCATION_EXTRA,0,nil)
if syng:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400049,2)) then if syng:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400049,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local syn=syng:Select(tp,1,1,nil):GetFirst() local syn=syng:Select(tp,1,1,nil):GetFirst()
Duel.SynchroSummon(tp,syn,nil) Duel.SynchroSummon(tp,syn,nil)
end end
end end
function c71400049.filter1(c,e,tp) function c71400049.filter1(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c71400049.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400049.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c71400049.filter1,tp,LOCATION_HAND,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c71400049.filter1,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,0)
end end
function c71400049.con1(e,tp,eg,ep,ev,re,r,rp) function c71400049.con1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
--Select Synchro Monsters --Select Synchro Monsters
function c71400049.synfilter(c) function c71400049.synfilter(c)
return c:IsSetCard(0x717) and c:IsSpecialSummonable(SUMMON_TYPE_SYNCHRO) return c:IsSetCard(0x717) and c:IsSpecialSummonable(SUMMON_TYPE_SYNCHRO)
end end
--Synchro Summon Filter --Synchro Summon Filter
function c71400049.synfilter2(c) function c71400049.synfilter2(c)
return c:IsSetCard(0x714) and c:IsSummonType(SUMMON_TYPE_SYNCHRO) return c:IsSetCard(0x714) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c71400049.con2(e,tp,eg,ep,ev,re,r,rp) function c71400049.con2(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c71400049.synfilter2,nil) local ct=eg:FilterCount(c71400049.synfilter2,nil)
if ct>0 then e:SetLabel(ct) end return ct>0
return ct>0 end
end function c71400049.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
function c71400049.tg2(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end
if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end
end function c71400049.op2(e,tp,eg,ep,ev,re,r,rp)
function c71400049.op2(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end
if not e:GetHandler():IsRelateToEffect(e) then return end local ct=eg:FilterCount(c71400049.synfilter2,nil)
local ct=e:GetLabel() or 0 local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local g=Duel.GetMatchingGroup(c71400049.filter1,tp,LOCATION_GRAVE,0,nil,e,tp)
local g=Duel.GetMatchingGroup(c71400049.filter1,tp,LOCATION_GRAVE,0,nil,e,tp) ct=math.min(ct,ft,g:GetCount())
ct=math.min(ct,ft,g:GetCount()) if ct<1 then return end
if ct<1 then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local sg=g:Select(tp,1,ct,nil)
local sg=g:Select(tp,1,ct,nil) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
\ No newline at end of file
--黑白的异梦引导 --黑白异梦的邂逅
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400050.initial_effect(c) function c71400050.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c71400050.tg1) e1:SetTarget(c71400050.tg1)
e1:SetCondition(yume.YumeCon) e1:SetCondition(yume.YumeCon)
e1:SetOperation(c71400050.op1) e1:SetOperation(c71400050.op1)
e1:SetDescription(aux.Stringid(71400050,0)) e1:SetDescription(aux.Stringid(71400050,0))
e1:SetCountLimit(1,71400050) e1:SetCountLimit(1,71400050)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy replace --destroy replace
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,71500050) e2:SetCountLimit(1,71500050)
e2:SetCondition(yume.YumeCon) e2:SetCondition(yume.YumeCon)
e2:SetTarget(c71400050.tg2) e2:SetTarget(c71400050.tg2)
e2:SetValue(c71400050.repval) e2:SetValue(c71400050.repval)
e2:SetOperation(c71400050.op2) e2:SetOperation(c71400050.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400050.filter1(c) function c71400050.filter1(c)
return c:IsSetCard(0x717) and c:IsAbleToHand() return c:IsSetCard(0x717) and c:IsAbleToHand()
end end
function c71400050.filter1a(c) function c71400050.filter1a(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_TUNER) and c:IsAbleToHand() return c:IsSetCard(0x714) and c:IsType(TYPE_TUNER) and c:IsAbleToHand()
end end
function c71400050.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400050.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400050.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400050.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c71400050.op1(e,tp,eg,ep,ev,re,r,rp) function c71400050.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400050.filter1,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c71400050.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
local thg=Duel.GetMatchingGroup(c71400050.filter1a,tp,LOCATION_GRAVE,0,nil) local thg=Duel.GetMatchingGroup(c71400050.filter1a,tp,LOCATION_GRAVE,0,nil)
if thg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400050,1)) then if thg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400050,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sc=thg:Select(tp,1,1,nil):GetFirst() local sc=thg:Select(tp,1,1,nil):GetFirst()
Duel.SendtoHand(sc,nil,REASON_EFFECT) Duel.SendtoHand(sc,nil,REASON_EFFECT)
end end
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c71400050.splimit) e1:SetTarget(c71400050.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c71400050.splimit(e,c) function c71400050.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA) return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end end
function c71400050.filter2(c,tp) function c71400050.filter2(c,tp)
return c:IsFaceup() and c:IsSetCard(0x714) return c:IsFaceup() and c:IsSetCard(0x714)
and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE) and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end end
function c71400050.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400050.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c71400050.filter2,1,nil,tp) end if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c71400050.filter2,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end end
function c71400050.repval(e,c) function c71400050.repval(e,c)
return c71400050.filter2(c,e:GetHandlerPlayer()) return c71400050.filter2(c,e:GetHandlerPlayer())
end end
function c71400050.op2(e,tp,eg,ep,ev,re,r,rp) function c71400050.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end end
\ No newline at end of file
--黑白的异梦协奏 --黑白异梦的协奏
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400051.initial_effect(c) function c71400051.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c71400051.tg1) e1:SetTarget(c71400051.tg1)
e1:SetOperation(c71400051.op1) e1:SetOperation(c71400051.op1)
e1:SetCondition(c71400051.con1) e1:SetCondition(c71400051.con1)
e1:SetDescription(aux.Stringid(71400051,0)) e1:SetDescription(aux.Stringid(71400051,0))
e1:SetCountLimit(1,71400051) e1:SetCountLimit(1,71400051)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy --to grave
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400051,1)) e2:SetDescription(aux.Stringid(71400051,1))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_CHAIN_NEGATED) e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,71500051) e1:SetCountLimit(1,71500051)
e2:SetCondition(c71400051.con2) e2:SetCondition(c71400051.con2)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c71400051.tg2) e2:SetTarget(c71400051.tg2)
e2:SetOperation(c71400051.op2) e2:SetOperation(c71400051.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400051.tunerfilter(c) function c71400051.tunerfilter(c)
return c:IsType(TYPE_TUNER) and c:IsSetCard(0x714) and c:IsAbleToRemove() return c:IsType(TYPE_TUNER) and c:IsSetCard(0x714) and c:IsAbleToRemove()
end end
function c71400051.nontunerfilter(c) function c71400051.nontunerfilter(c)
return not c:IsType(TYPE_TUNER) and c:IsSetCard(0x714) and c:IsAbleToRemove() return not c:IsType(TYPE_TUNER) and c:IsSetCard(0x714) and c:IsAbleToRemove()
end end
function c71400051.fieldsynfilter(c) function c71400051.fieldsynfilter(c)
return c:IsSetCard(0x717) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup() return c:IsSetCard(0x717) and c:IsType(TYPE_SYNCHRO) and c:IsFaceup()
end end
function c71400051.con1(e,tp,eg,ep,ev,re,r,rp) function c71400051.con1(e,tp,eg,ep,ev,re,r,rp)
return yume.YumeCon(e,tp) and Duel.IsExistingMatchingCard(c71400051.fieldsynfilter,tp,LOCATION_MZONE,0,1,nil) return yume.YumeCon(e,tp) and Duel.IsExistingMatchingCard(c71400051.fieldsynfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c71400051.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400051.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400051.tunerfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c71400051.nontunerfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400051.tunerfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c71400051.nontunerfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c71400051.extrasynfilter(c,e,tp) function c71400051.extrasynfilter(c,e,tp)
return c:IsSetCard(0x714) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,true) return c:IsSetCard(0x714) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,true)
end end
function c71400051.op1(e,tp,eg,ep,ev,re,r,rp) function c71400051.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.GetMatchingGroup(c71400051.tunerfilter,tp,LOCATION_DECK,0,nil) local g1=Duel.GetMatchingGroup(c71400051.tunerfilter,tp,LOCATION_DECK,0,nil)
local g2=Duel.GetMatchingGroup(c71400051.nontunerfilter,tp,LOCATION_DECK,0,nil) local g2=Duel.GetMatchingGroup(c71400051.nontunerfilter,tp,LOCATION_DECK,0,nil)
if g1:GetCount()==0 or g2:GetCount()==0 then return end if g1:GetCount()==0 or g2:GetCount()==0 then return end
local sg1=g1:Select(tp,1,1,nil) local sg1=g1:Select(tp,1,1,nil)
local sg2=g2:Select(tp,1,2,nil) local sg2=g2:Select(tp,1,2,nil)
sg1:Merge(sg2) sg1:Merge(sg2)
local rc=sg1:GetFirst() local rc=sg1:GetFirst()
local lv=0 local lv=0
while rc do while rc do
lv=lv+rc:GetLevel() lv=lv+rc:GetLevel()
rc=g:GetNext() rc=g:GetNext()
end end
Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT) Duel.Remove(sg1,POS_FACEUP,REASON_EFFECT)
local syng=Duel.GetMatchingGroup(c71400051.extrasynfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local syng=Duel.GetMatchingGroup(c71400051.extrasynfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
yume.UniquifyCardName(syng) yume.UniquifyCardName(syng)
local ft=Duel.GetLocationCountFromEx(tp) local ft=Duel.GetLocationCountFromEx(tp)
if ft<1 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end if ft<1 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if syng:CheckWithSumEqual(Card.GetLevel,lv,1,ft) and Duel.SelectYesNo(tp,aux.Stringid(71400051,2)) then if syng:CheckWithSumEqual(Card.GetLevel,lv,1,ft) and Duel.SelectYesNo(tp,aux.Stringid(71400051,2)) then
Duel.BreakEffect() Duel.BreakEffect()
tg=syng:SelectWithSumEqual(tp,Card.GetLevel,lv,1,ft) tg=syng:SelectWithSumEqual(tp,Card.GetLevel,lv,1,ft)
local tc=tg:GetFirst() local tc=tg:GetFirst()
while tc do while tc do
Duel.SpecialSummonStep(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummonStep(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
tc=tg:GetNext() tc=tg:GetNext()
end end
end end
end end
function c71400051.con2(e,tp,eg,ep,ev,re,r,rp) function c71400051.con2(e,tp,eg,ep,ev,re,r,rp)
local de,dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON,CHAININFO_DISABLE_PLAYER) local de,dp=Duel.GetChainInfo(ev,CHAININFO_DISABLE_REASON,CHAININFO_DISABLE_PLAYER)
return yume.YumeCon(e,tp) and de and dp~=tp and re:GetHandler():IsSetCard(0x714) and rp==tp return yume.YumeCon(e,tp) and de and dp~=tp and re:GetHandler():IsSetCard(0x714) and rp==tp
end end
function c71400051.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400051.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,e:GetHandler(),0x717) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,e:GetHandler(),0x717) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD+LOCATION_HAND,nil)
end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,1-tp,LOCATION_ONFIELD+LOCATION_HAND)
function c71400051.op2(e,tp,eg,ep,ev,re,r,rp) end
local ct=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,0x717) function c71400051.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) if not yume.IsYumeFieldOnField(tp) then return end
if ct>0 and g:GetCount()>0 then local ct=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,nil,0x717)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD+LOCATION_HAND,nil)
local dg=g:Select(tp,1,ct,nil) if ct>0 and g:GetCount()>0 then
Duel.HintSelection(dg) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.Destroy(dg,REASON_EFFECT) local dg=g:Select(tp,1,ct,nil)
end Duel.HintSelection(dg)
Duel.SendtoGrave(dg,REASON_EFFECT)
end
end end
\ No newline at end of file
--蚀异梦物-机械 --蚀异梦物-机械
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400052.initial_effect(c) function c71400052.initial_effect(c)
--summon limit --summon limit
yume.AddYumeSummonLimit(c) yume.AddYumeSummonLimit(c)
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400052,0)) e1:SetDescription(aux.Stringid(71400052,0))
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCost(c71400052.cost1) e1:SetCost(c71400052.cost1)
e1:SetTarget(c71400052.tg1) e1:SetTarget(c71400052.tg1)
e1:SetOperation(c71400052.op1) e1:SetOperation(c71400052.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Equip --Equip
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400052,1)) e2:SetDescription(aux.Stringid(71400052,1))
e2:SetCategory(CATEGORY_EQUIP) e2:SetCategory(CATEGORY_EQUIP)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c71400052.con2) e2:SetCondition(c71400052.con2)
e2:SetTarget(c71400052.tg2) e2:SetTarget(c71400052.tg2)
e2:SetOperation(c71400052.op2) e2:SetOperation(c71400052.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atk --atk
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0) e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x714)) e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x714))
e3:SetValue(c71400052.atkval) e3:SetValue(c71400052.atkval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--def --def
local e3a=e3:Clone() local e3a=e3:Clone()
e3a:SetCode(EFFECT_UPDATE_DEFENSE) e3a:SetCode(EFFECT_UPDATE_DEFENSE)
e3a:SetValue(c71400052.defval) e3a:SetValue(c71400052.defval)
c:RegisterEffect(e3a) c:RegisterEffect(e3a)
end end
function c71400052.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400052.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c71400052.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400052.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c71400052.op1(e,tp,eg,ep,ev,re,r,rp) function c71400052.op1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function c71400052.filter2(c,ec) function c71400052.filter2(c,ec)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:GetLinkedGroup():IsContains(ec) return c:IsFaceup() and c:IsType(TYPE_LINK) and c:GetLinkedGroup():IsContains(ec)
end end
function c71400052.can_equip_monster(c) function c71400052.can_equip_monster(c)
return true return true
end end
function c71400052.con2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400052.con2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c71400052.filter2,0,LOCATION_MZONE,LOCATION_MZONE,nil,c) local g=Duel.GetMatchingGroup(c71400052.filter2,0,LOCATION_MZONE,LOCATION_MZONE,nil,c)
return Duel.GetTurnPlayer()~=tp and g:GetCount()>1 and c71400052.can_equip_monster(c) return Duel.GetTurnPlayer()~=tp and g:GetCount()>1 and c71400052.can_equip_monster(c)
end end
function c71400052.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400052.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end end
function c71400052.eqlimit(e,c) function c71400052.eqlimit(e,c)
return e:GetOwner()==c return e:GetOwner()==c
end end
function c71400052.equip_monster(c,tp,tc) function c71400052.equip_monster(c,tp,tc)
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(71400052,RESET_EVENT+RESETS_STANDARD,0,0) tc:RegisterFlagEffect(71400052,RESET_EVENT+RESETS_STANDARD,0,0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c71400052.eqlimit) e1:SetValue(c71400052.eqlimit)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
function c71400052.op2(e,tp,eg,ep,ev,re,r,rp) function c71400052.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and tc:IsControler(1-tp) then if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and tc:IsControler(1-tp) then
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
c71400052.equip_monster(c,tp,tc) c71400052.equip_monster(c,tp,tc)
else Duel.SendtoGrave(tc,REASON_RULE) end else Duel.SendtoGrave(tc,REASON_RULE) end
end end
end end
function c71400052.atkval(e,c) function c71400052.atkval(e,c)
local atk=0 local atk=0
local g=c:GetEquipGroup() local g=c:GetEquipGroup()
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
if tc:GetFlagEffect(71400052)~=0 and tc:IsFaceup() and tc:GetAttack()>=0 then if tc:GetFlagEffect(71400052)~=0 and tc:IsFaceup() and tc:GetAttack()>=0 then
atk=atk+tc:GetAttack() atk=atk+tc:GetAttack()
end end
tc=g:GetNext() tc=g:GetNext()
end end
return atk return atk
end end
function c71400052.defval(e,c) function c71400052.defval(e,c)
local def=0 local def=0
local g=c:GetEquipGroup() local g=c:GetEquipGroup()
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
if tc:GetFlagEffect(71400052)~=0 and tc:IsFaceup() and tc:GetDefense()>=0 then if tc:GetFlagEffect(71400052)~=0 and tc:IsFaceup() and tc:GetDefense()>=0 then
def=def+tc:GetDefense() def=def+tc:GetDefense()
end end
tc=g:GetNext() tc=g:GetNext()
end end
return def return def
end end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment