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

Add files via upload

parent 1f024f1c
This diff is collapsed.
--冰雪中的梦之旅者
function c71400002.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,71400002)
e1:SetCondition(c71400002.condition1)
c:RegisterEffect(e1)
--attribute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_GRAVE+LOCATION_MZONE,0)
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetValue(ATTRIBUTE_WATER)
c:RegisterEffect(e2)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400002,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_TOGRAVE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c71400002.target3)
e3:SetOperation(c71400002.operation3)
e3:SetCountLimit(1)
c:RegisterEffect(e3)
end
function c71400002.filter1(c)
return c:IsSetCard(0x714) and c:IsFaceup()
end
function c71400002.filter3(c)
return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER)
end
function c71400002.condition1(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0
and Duel.IsExistingMatchingCard(c71400002.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c71400002.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c71400002.filter3(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c71400002.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c71400002.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,LOCATION_MZONE+LOCATION_GRAVE)
end
function c71400002.operation3(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetValue(500)
c:RegisterEffect(e1)
end
--异梦旅者-冰冻子
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400002.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,71400002)
e1:SetCondition(c71400002.condition1)
c:RegisterEffect(e1)
--attribute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_GRAVE+LOCATION_MZONE,0)
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetValue(ATTRIBUTE_WATER)
e2:SetCondition(yume.YumeCon)
c:RegisterEffect(e2)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400002,0))
e3:SetCategory(CATEGORY_TODECK)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMING_TOGRAVE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c71400002.target3)
e3:SetOperation(c71400002.operation3)
e3:SetCountLimit(1)
c:RegisterEffect(e3)
end
function c71400002.filter1(c)
return c:IsSetCard(0x714) and c:IsFaceup()
end
function c71400002.filter3(c)
return c:IsAbleToDeck() and c:IsType(TYPE_MONSTER) and c:IsAttribute(ATTRIBUTE_WATER)
end
function c71400002.condition1(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0
and Duel.IsExistingMatchingCard(c71400002.filter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c71400002.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c71400002.filter3(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c71400002.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c71400002.filter3,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,LOCATION_MZONE+LOCATION_GRAVE)
end
function c71400002.operation3(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetValue(500)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--梦之公寓的圆盘人
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400004.initial_effect(c)
--summon limit
yume.AddYumeSummonLimit(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c71400004.condition1)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400004,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,71400004)
e2:SetCondition(c71400004.condition2)
e2:SetTarget(c71400004.target2)
e2:SetOperation(c71400004.operation2)
c:RegisterEffect(e2)
end
function c71400004.filter1(c)
return c:IsSetCard(0x714) and c:IsFaceup() and c:IsType(TYPE_TUNER)
end
function c71400004.condition1(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
and Duel.IsExistingMatchingCard(c71400004.filter1,tp,LOCATION_MZONE,0,1,nil) and yume.YumeCheck(c)
end
function c71400004.filter2(c)
return c:IsSetCard(0xe714) and c:IsAbleToHand()
end
function c71400004.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c71400004.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400004.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
--梦之公寓的圆盘人
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400004.initial_effect(c)
--summon limit
yume.AddYumeSummonLimit(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c71400004.condition1)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400004,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCountLimit(1,71400004)
e2:SetCondition(c71400004.condition2)
e2:SetTarget(c71400004.target2)
e2:SetOperation(c71400004.operation2)
c:RegisterEffect(e2)
end
function c71400004.filter1(c)
return c:IsSetCard(0x714) and c:IsFaceup() and c:IsType(TYPE_TUNER)
end
function c71400004.condition1(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
and Duel.IsExistingMatchingCard(c71400004.filter1,tp,LOCATION_MZONE,0,1,nil) and yume.YumeCheck(c)
end
function c71400004.filter2(c)
return c:IsSetCard(0xe714) and c:IsAbleToHand()
end
function c71400004.condition2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c71400004.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400004.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--梦之钢琴师
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400005.initial_effect(c)
--summon limit
yume.AddYumeSummonLimit(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c71400005.target1)
e1:SetCountLimit(1,71400005)
e1:SetOperation(c71400005.operation1)
c:RegisterEffect(e1)
--synchro effect
local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400005,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetCountLimit(1)
e2:SetCondition(c71400005.condition2)
e2:SetTarget(c71400005.target2)
e2:SetOperation(c71400005.operation2)
c:RegisterEffect(e2)
end
function c71400005.filter1(c,e,sp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
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)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c71400005.operation1(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,c71400005.filter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c71400005.condition2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return false end
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2
end
function c71400005.filter2(c)
return c:IsSetCard(0x714)
end
function c71400005.synfilter(c,mg)
return c:IsSetCard(0x714) and c:IsSynchroSummonable(nil,mg)
end
function c71400005.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(c71400005.filter2,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(c71400005.synfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c71400005.operation2(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(c71400005.filter2,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(c71400005.synfilter,tp,LOCATION_EXTRA,0,nil,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end
--梦之钢琴师
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400005.initial_effect(c)
--summon limit
yume.AddYumeSummonLimit(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c71400005.target1)
e1:SetCountLimit(1,71400005)
e1:SetOperation(c71400005.operation1)
c:RegisterEffect(e1)
--synchro effect
local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400005,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetCountLimit(1)
e2:SetCondition(c71400005.condition2)
e2:SetTarget(c71400005.target2)
e2:SetOperation(c71400005.operation2)
c:RegisterEffect(e2)
end
function c71400005.filter1(c,e,sp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
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)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c71400005.operation1(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,c71400005.filter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
function c71400005.condition2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then return false end
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2
end
function c71400005.filter2(c)
return c:IsSetCard(0x714)
end
function c71400005.synfilter(c,mg)
return c:IsSetCard(0x714) and c:IsSynchroSummonable(nil,mg)
end
function c71400005.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(c71400005.filter2,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(c71400005.synfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c71400005.operation2(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(c71400005.filter2,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(c71400005.synfilter,tp,LOCATION_EXTRA,0,nil,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end
end
\ No newline at end of file
--梦医院的梦之患者
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400006.initial_effect(c)
--summon limit
yume.AddYumeSummonLimit(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400006,0))
e1:SetCountLimit(1,71400006)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c71400006.target1)
e1:SetOperation(c71400006.operation1)
c:RegisterEffect(e1)
local e1a=e1:Clone()
e1a:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1a)
--self des
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400006,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c71400006.con2)
e2:SetTarget(c71400006.target2)
e2:SetOperation(c71400006.operation2)
c:RegisterEffect(e2)
local e2a=e2:Clone()
e2a:SetDescription(aux.Stringid(71400006,1))
e2a:SetCode(EVENT_BE_BATTLE_TARGET)
c:RegisterEffect(e2a)
end
function c71400006.filter1(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
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 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)
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_REMOVE,g,1,0,LOCATION_MZONE)
end
function c71400006.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
Duel.SpecialSummonComplete()
local dg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if dg:GetCount()>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
Duel.Remove(g:GetFirst(),POS_FACEUP,REASON_EFFECT)
end
end
end
function c71400006.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c71400006.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c71400006.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
--异梦医院的病人-青汁君
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400006.initial_effect(c)
--summon limit
yume.AddYumeSummonLimit(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400006,0))
e1:SetCountLimit(1,71400006)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c71400006.target1)
e1:SetOperation(c71400006.operation1)
c:RegisterEffect(e1)
local e1a=e1:Clone()
e1a:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1a)
--self des
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400006,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetCondition(c71400006.con2)
e2:SetTarget(c71400006.target2)
e2:SetOperation(c71400006.operation2)
c:RegisterEffect(e2)
local e2a=e2:Clone()
e2a:SetDescription(aux.Stringid(71400006,1))
e2a:SetCode(EVENT_BE_BATTLE_TARGET)
c:RegisterEffect(e2a)
end
function c71400006.filter1(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
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 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)
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_REMOVE,g,1,0,LOCATION_MZONE)
end
function c71400006.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
Duel.SpecialSummonComplete()
local dg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if dg:GetCount()>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
Duel.Remove(g:GetFirst(),POS_FACEUP,REASON_EFFECT)
end
end
end
function c71400006.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c71400006.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c71400006.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Destroy(c,REASON_EFFECT)
end
end
\ No newline at end of file
--梦之镇的路标
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400007.initial_effect(c)
--summon limit
yume.AddYumeSummonLimit(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(71400007,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,71400007)
e1:SetTarget(c71400007.tg1)
e1:SetOperation(c71400007.op1)
c:RegisterEffect(e1)
local e1a=e1:Clone()
e1a:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1a)
--gy banish
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetDescription(aux.Stringid(71400007,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,71500007)
e2:SetCost(c71400007.cost)
e2:SetTarget(c71400007.target)
e2:SetOperation(c71400007.operation)
c:RegisterEffect(e2)
end
function c71400007.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:IsControler(tp) and Card.IsLinkState(chkc) and chkc~=c end
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
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71400007,2))
Duel.SelectTarget(tp,Card.IsLinkState,tp,LOCATION_MZONE,0,1,1,c)
end
function c71400007.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
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.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,0)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
end
function c71400007.filter(c,e,tp,zone)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c71400007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c71400007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=Duel.GetLinkedZone(tp)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c71400007.filter(chkc,e,tp,zone) end
if chk==0 then return zone~=0
and Duel.IsExistingTarget(c71400007.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectTarget(tp,c71400007.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0)
end
function c71400007.operation(e,tp,eg,ep,ev,re,r,rp)
local zone=Duel.GetLinkedZone(tp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and zone~=0 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
--异梦胡同的路标
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400007.initial_effect(c)
--summon limit
yume.AddYumeSummonLimit(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400007,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCountLimit(1,71400007)
e1:SetCondition(c71400007.con1)
e1:SetTarget(c71400007.tg1)
e1:SetOperation(c71400007.op1)
c:RegisterEffect(e1)
--gy banish
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetDescription(aux.Stringid(71400007,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,71500007)
e2:SetCost(c71400007.cost)
e2:SetTarget(c71400007.target)
e2:SetOperation(c71400007.operation)
c:RegisterEffect(e2)
end
function c71400007.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK
end
function c71400007.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c71400007.op1(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c71400007.filter(c,e,tp,zone)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c71400007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c71400007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local zone=Duel.GetLinkedZone(tp)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c71400007.filter(chkc,e,tp,zone) end
if chk==0 then return zone~=0
and Duel.IsExistingTarget(c71400007.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectTarget(tp,c71400007.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0)
end
function c71400007.operation(e,tp,eg,ep,ev,re,r,rp)
local zone=Duel.GetLinkedZone(tp)
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
\ No newline at end of file
--梦之书中的三足怪物
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400008.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,yume.YumeCheck(c),4,3)
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--nuke
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400008,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_F)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c71400008.condition)
e1:SetCost(c71400008.cost)
e1:SetTarget(c71400008.target)
e1:SetOperation(c71400008.operation)
c:RegisterEffect(e1)
end
function c71400008.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp
end
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
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c71400008.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),1-tp,0)
end
function c71400008.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,e:GetHandler())
if Duel.Destroy(g,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-1500)
end
--异梦书中的三足怪物
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400008.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,yume.YumeCheck(c),4,3)
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--nuke
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400008,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_F)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c71400008.condition)
e1:SetCost(c71400008.cost)
e1:SetTarget(c71400008.target)
e1:SetOperation(c71400008.operation)
c:RegisterEffect(e1)
end
function c71400008.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_ONFIELD,nil)>2
end
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
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c71400008.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),1-tp,0)
end
function c71400008.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,e:GetHandler())
if Duel.Destroy(g,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-1500)
end
end
\ No newline at end of file
--梦之书中的公式证明图表
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400009.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,yume.YumeCheck(c),4,2)
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetDescription(aux.Stringid(71400009,0))
e1:SetCondition(c71400009.condition)
e1:SetTarget(c71400009.target)
e1:SetOperation(c71400009.operation)
c:RegisterEffect(e1)
end
function c71400009.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetOverlayCount()
e:SetLabel(ct)
return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK)
end
function c71400009.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,1-tp,LOCATION_ONFIELD+LOCATION_HAND)
end
function c71400009.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()==0 then return end
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local mcount=e:GetLabel()
if not mcount or mcount<=0 or not Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,mcount,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,mcount,mcount,nil)
Duel.HintSelection(sg)
if Duel.Destroy(sg,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-1000)
end
end
--异梦书中的公式证明图表
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400009.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,yume.YumeCheck(c),4,2)
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetDescription(aux.Stringid(71400009,0))
e1:SetCountLimit(1,71400009)
e1:SetTarget(c71400009.tg1)
e1:SetOperation(c71400009.op1)
c:RegisterEffect(e1)
--multi attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(c71400009.raval)
c:RegisterEffect(e2)
end
function c71400009.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,0,0)
end
function c71400009.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mcount=c:GetOverlayCount()
if mcount<=0 or not Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,mcount,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,mcount,nil)
Duel.HintSelection(sg)
if Duel.Destroy(sg,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-1000)
end
end
function c71400009.raval(e,c)
local oc=e:GetHandler():GetOverlayCount()
return math.max(0,oc-1)
end
\ No newline at end of file
--梦之书中的脑女
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400010.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,yume.YumeCheck(c),4,2)
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--get all
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetDescription(aux.Stringid(71400010,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,71400010)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c71400010.cost)
e1:SetTarget(c71400010.target1)
e1:SetOperation(c71400010.operation1)
c:RegisterEffect(e1)
--lose one
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_CONTROL)
e2:SetDescription(aux.Stringid(71400010,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c71400010.target2)
e2:SetOperation(c71400010.operation2)
e2:SetCondition(c71400010.condition2)
c:RegisterEffect(e2)
end
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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c71400010.filter1(c)
return c:IsFaceup() and c:IsAbleToChangeControler()
end
function c71400010.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
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
local g=Duel.GetMatchingGroup(c71400010.filter1,tp,0,LOCATION_MZONE,c)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),1-tp,LOCATION_MZONE)
end
function c71400010.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,1-tp,LOCATION_REASON_CONTROL)
local g=Duel.GetMatchingGroup(c71400010.filter1,tp,0,LOCATION_MZONE,c)
local ct=g:GetCount()
if ct>ft then ct=ft end
if ct<1 then return end
if ct<g:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
g=g:Select(tp,ct,ct,nil)
end
Duel.GetControl(g,tp)
local og=Duel.GetOperatedGroup()
if og:GetCount()<1 then return end
local tc=og:GetFirst()
local atk=0
while tc do
local tatk=tc:GetAttack()
if tatk>0 then atk=atk+tatk end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(0x714)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2,true)
tc=og:GetNext()
end
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-atk/2)
end
function c71400010.condition2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK)
end
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 chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,LOCATION_MZONE)
end
function c71400010.operation2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,1-tp)
end
--异梦书中的脑女
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400010.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,yume.YumeCheck(c),4,2)
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--get all
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_CONTROL)
e1:SetDescription(aux.Stringid(71400010,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,71400010)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c71400010.cost)
e1:SetTarget(c71400010.target1)
e1:SetOperation(c71400010.operation1)
c:RegisterEffect(e1)
--lose one
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_CONTROL)
e2:SetDescription(aux.Stringid(71400010,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c71400010.target2)
e2:SetOperation(c71400010.operation2)
e2:SetCondition(c71400010.condition2)
c:RegisterEffect(e2)
end
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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c71400010.filter1(c)
return c:IsFaceup() and c:IsAbleToChangeControler()
end
function c71400010.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
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
local g=Duel.GetMatchingGroup(c71400010.filter1,tp,0,LOCATION_MZONE,c)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,g:GetCount(),1-tp,LOCATION_MZONE)
end
function c71400010.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE,1-tp,LOCATION_REASON_CONTROL)
local g=Duel.GetMatchingGroup(c71400010.filter1,tp,0,LOCATION_MZONE,c)
local ct=g:GetCount()
if ct>ft then ct=ft end
if ct<1 then return end
if ct<g:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
g=g:Select(tp,ct,ct,nil)
end
Duel.GetControl(g,tp)
local og=Duel.GetOperatedGroup()
if og:GetCount()<1 then return end
local tc=og:GetFirst()
local atk=0
while tc do
local tatk=tc:GetAttack()
if tatk>0 then atk=atk+tatk end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(0x714)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2,true)
tc=og:GetNext()
end
Duel.SetLP(tp,Duel.GetLP(tp)-atk/2)
end
function c71400010.condition2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and not c:IsLocation(LOCATION_DECK)
end
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 chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,tp,LOCATION_MZONE)
end
function c71400010.operation2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,1-tp)
end
end
\ No newline at end of file
--梦之书的管理员
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400011.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,yume.YumeCheck(c),4,2)
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400011,0))
e1:SetCountLimit(1,71400011)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(c71400011.cost)
e1:SetTarget(c71400011.target1)
e1:SetOperation(c71400011.operation1)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e1)
--fly away
local e2a=Effect.CreateEffect(c)
e2a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2a:SetCode(EVENT_CHAINING)
e2a:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2a:SetOperation(aux.chainreg)
c:RegisterEffect(e2a)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400011,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e2:SetCondition(c71400011.condition2)
e2:SetTarget(c71400011.target2)
e2:SetOperation(c71400011.operation2)
c:RegisterEffect(e2)
end
function c71400011.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c71400011.filter1(c)
return c:IsSetCard(0x714)
end
function c71400011.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
end
function c71400011.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g1=Duel.SelectTarget(tp,c71400011.filter1,tp,LOCATION_GRAVE,0,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,g1:GetCount(),tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c71400011.operation1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71400011.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if mg:GetCount()>0 then
Duel.Overlay(sc,mg)
end
end
end
function c71400011.filter2(c)
return c:IsSetCard(0xb714) and c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function c71400011.condition2(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 and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c71400011.target2(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.operation2(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.filter2,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
--异梦书使-馆长女儿
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400011.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,yume.YumeCheck(c),4,2)
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400011,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,71400011+EFFECT_COUNT_CODE_DUEL)
e1:SetCondition(c71400011.con1)
e1:SetTarget(c71400011.tg1)
e1:SetOperation(c71400011.op1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400011,1))
e2:SetCountLimit(1,71500011)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCost(c71400011.cost)
e2:SetTarget(c71400011.tg2)
e2:SetOperation(c71400011.op2)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e2)
--fly away
local e3a=Effect.CreateEffect(c)
e3a:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3a:SetCode(EVENT_CHAINING)
e3a:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e3a:SetOperation(aux.chainreg)
c:RegisterEffect(e3a)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400011,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e3:SetCondition(c71400011.con3)
e3:SetTarget(c71400011.tg3)
e3:SetOperation(c71400011.op3)
c:RegisterEffect(e3)
end
function c71400011.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c71400011.filter1(c)
return c:IsSetCard(0xe714) and c:IsAbleToHand()
end
function c71400011.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400011.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c71400011.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400011.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c71400011.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c71400011.filter2(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER)
end
function c71400011.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
end
function c71400011.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,0,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c71400011.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71400011.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst()
if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
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
\ No newline at end of file
--梦之迷宫的剧面人
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400012.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,yume.YumeCheck(c),aux.NonTuner(yume.YumeCheck(c)),1)
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
--banish
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400012,0))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_START)
e2:SetTarget(c71400012.target)
e2:SetOperation(c71400012.operation)
c:RegisterEffect(e2)
end
function c71400012.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget()
if chk==0 then return tc and tc:IsControler(1-tp) and tc:IsAbleToRemove() and not tc:IsType(TYPE_TOKEN) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000)
end
function c71400012.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.Damage(1-tp,2000,REASON_EFFECT)~=0 then
local tc=e:GetHandler():GetBattleTarget()
if tc:IsRelateToBattle() then
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end
end
--异梦迷宫的狐面武士-师傅
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400012.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,yume.YumeCheck(c),aux.NonTuner(yume.YumeCheck(c)),1)
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c71400012.filter1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
--banish
local e2a=Effect.CreateEffect(c)
e2a:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2a:SetCode(EVENT_CHAINING)
e2a:SetRange(LOCATION_MZONE)
e2a:SetOperation(aux.chainreg)
c:RegisterEffect(e2a)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetOperation(c71400012.op2)
c:RegisterEffect(e2)
--banish
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400012,0))
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_BATTLE_START)
e3:SetTarget(c71400012.tg3)
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
\ No newline at end of file
--梦坠
function c71400013.initial_effect(c)
--Activate(nofield)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400013,1))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetCondition(c71400013.condition1)
e1:SetTarget(c71400013.target1)
e1:SetCost(c71400013.cost)
e1:SetOperation(c71400013.operation1)
e1:SetCountLimit(1,71400013+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--Activate(field)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400013,2))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c71400013.condition2)
e2:SetTarget(c71400013.target2)
e2:SetCost(c71400013.cost)
e2:SetOperation(c71400013.operation2)
e2:SetCountLimit(1,71400013+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e2)
end
function c71400013.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c71400013.condition1(e,tp,eg,ep,ev,re,r,rp)
tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
return tc==nil or tc:IsFacedown() or not tc:IsSetCard(0x3714)
end
function c71400013.condition2(e,tp,eg,ep,ev,re,r,rp)
tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
return tc and tc:IsFaceup() and tc:IsSetCard(0x3714)
end
function c71400013.filter1(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true) and c:IsSetCard(0xb714)
end
function c71400013.filter1a(c)
return c:IsFaceup() and c:IsAbleToGrave()
end
function c71400013.filter2(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c71400013.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=yume.FieldActivation(tp,nil,1)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local des=dg:Select(tp,1,1,nil)
Duel.HintSelection(des)
Duel.BreakEffect()
Duel.SendtoGrave(des,REASON_EFFECT)
end
local el1=Effect.CreateEffect(c)
el1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
el1:SetType(EFFECT_TYPE_FIELD)
el1:SetCode(EFFECT_CANNOT_SUMMON)
el1:SetTarget(c71400013.sumlimit)
el1:SetTargetRange(1,0)
el1:SetReset(RESET_PHASE+PHASE_END,2)
c:RegisterEffect(el1,tp)
local el2=el1:Clone()
el2:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(el2)
local el3=el1:Clone()
el3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(el3)
end
function c71400013.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c71400013.filter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,2,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,nil,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
if og:GetCount()==2 then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(c71400013.discon)
e1:SetOperation(c71400013.disop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
local el1=Effect.CreateEffect(c)
el1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
el1:SetType(EFFECT_TYPE_FIELD)
el1:SetCode(EFFECT_CANNOT_SUMMON)
el1:SetTarget(c71400013.sumlimit)
el1:SetTargetRange(1,0)
el1:SetReset(RESET_PHASE+PHASE_END,2)
c:RegisterEffect(el1,tp)
local el2=el1:Clone()
el2:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(el2)
local el3=el1:Clone()
el3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(el3)
end
function c71400013.discon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and rp==1-tp
end
function c71400013.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c71400013.sumlimit(e,c)
return not c:IsSetCard(0x714)
end
function c71400013.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return yume.YumeFieldCheck(tp,0,1) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_ONFIELD)
end
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
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_HAND+LOCATION_ONFIELD)
--梦坠
function c71400013.initial_effect(c)
--Activate(nofield)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400013,1))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetCondition(c71400013.condition1)
e1:SetTarget(c71400013.target1)
e1:SetCost(c71400013.cost)
e1:SetOperation(c71400013.operation1)
e1:SetCountLimit(1,71400013+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--Activate(field)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400013,2))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c71400013.condition2)
e2:SetTarget(c71400013.target2)
e2:SetCost(c71400013.cost)
e2:SetOperation(c71400013.operation2)
e2:SetCountLimit(1,71400013+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e2)
end
function c71400013.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c71400013.condition1(e,tp,eg,ep,ev,re,r,rp)
tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
return tc==nil or tc:IsFacedown() or not tc:IsSetCard(0x3714)
end
function c71400013.condition2(e,tp,eg,ep,ev,re,r,rp)
tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
return tc and tc:IsFaceup() and tc:IsSetCard(0x3714)
end
function c71400013.filter1(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true) and c:IsSetCard(0xb714)
end
function c71400013.filter1a(c)
return c:IsFaceup() and c:IsAbleToGrave()
end
function c71400013.filter2(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c71400013.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=yume.FieldActivation(tp,nil,1)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local des=dg:Select(tp,1,1,nil)
Duel.HintSelection(des)
Duel.BreakEffect()
Duel.SendtoGrave(des,REASON_EFFECT)
end
local el1=Effect.CreateEffect(c)
el1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
el1:SetType(EFFECT_TYPE_FIELD)
el1:SetCode(EFFECT_CANNOT_SUMMON)
el1:SetTarget(c71400013.sumlimit)
el1:SetTargetRange(1,0)
el1:SetReset(RESET_PHASE+PHASE_END,2)
c:RegisterEffect(el1,tp)
local el2=el1:Clone()
el2:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(el2)
local el3=el1:Clone()
el3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(el3)
end
function c71400013.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c71400013.filter2,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,2,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,nil,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
if og:GetCount()==2 then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCondition(c71400013.discon)
e1:SetOperation(c71400013.disop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
local el1=Effect.CreateEffect(c)
el1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
el1:SetType(EFFECT_TYPE_FIELD)
el1:SetCode(EFFECT_CANNOT_SUMMON)
el1:SetTarget(c71400013.sumlimit)
el1:SetTargetRange(1,0)
el1:SetReset(RESET_PHASE+PHASE_END,2)
c:RegisterEffect(el1,tp)
local el2=el1:Clone()
el2:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(el2)
local el3=el1:Clone()
el3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(el3)
end
function c71400013.discon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and rp==1-tp
end
function c71400013.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c71400013.sumlimit(e,c)
return not c:IsSetCard(0x714)
end
function c71400013.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return yume.YumeFieldCheck(tp,0,1) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,1-tp,LOCATION_ONFIELD)
end
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
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_HAND+LOCATION_ONFIELD)
end
\ No newline at end of file
--妄想梦境-梦幻图书馆
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400014.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400014,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1)
e2:SetCondition(c71400014.condition2)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(c71400014.target2)
e2:SetOperation(c71400014.operation2)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400014,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(c71400014.condition3)
e3:SetTarget(c71400014.target3)
e3:SetOperation(c71400014.operation3)
c:RegisterEffect(e3)
--self limitation & field activation
yume.AddYumeFieldGlobal(c,71400014,1)
end
function c71400014.operation2(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,c71400014.filter2,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 xyzg=Duel.GetMatchingGroup(c71400014.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if xyzg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400014,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.BreakEffect()
Duel.XyzSummon(tp,xyz,nil)
end
end
function c71400014.filter2(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71400014.target2(e,tp,eg,ep,ev,re,r,rp,chk)
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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND)
end
function c71400014.condition2(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c71400014.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(c71400014.xyzfilter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(c71400014.xyz2filter,tp,LOCATION_EXTRA,0,1,nil,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
--Select Xyz Monsters
function c71400014.xyzfilter(c)
return c:IsSetCard(0x715) and c:IsXyzSummonable(nil)
end
function c71400014.filter3(c)
return c:IsSetCard(0x714) and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function c71400014.condition3(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c71400014.filter3,1,nil)
end
function c71400014.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
--[[
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1)
--]]
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function c71400014.operation3(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
--local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
--Duel.Draw(p,d,REASON_EFFECT)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=g:Select(tp,1,1,nil)
Duel.HintSelection(g)
Duel.SendtoGrave(g:GetFirst(),REASON_EFFECT)
end
--幻异梦境-梦幻图书馆
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400014.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400014,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1)
e2:SetCondition(c71400014.condition2)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(c71400014.target2)
e2:SetOperation(c71400014.operation2)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400014,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(c71400014.condition3)
e3:SetTarget(c71400014.target3)
e3:SetOperation(c71400014.operation3)
c:RegisterEffect(e3)
--self limitation & field activation
yume.AddYumeFieldGlobal(c,71400014,1)
end
function c71400014.operation2(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,c71400014.filter2,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 xyzg=Duel.GetMatchingGroup(c71400014.xyzfilter,tp,LOCATION_EXTRA,0,nil)
if xyzg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400014,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.BreakEffect()
Duel.XyzSummon(tp,xyz,nil)
end
end
function c71400014.filter2(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71400014.target2(e,tp,eg,ep,ev,re,r,rp,chk)
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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND)
end
function c71400014.condition2(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c71400014.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(c71400014.xyzfilter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(c71400014.xyz2filter,tp,LOCATION_EXTRA,0,1,nil,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
--Select Xyz Monsters
function c71400014.xyzfilter(c)
return c:IsSetCard(0x715) and c:IsXyzSummonable(nil)
end
function c71400014.filter3(c)
return c:IsSetCard(0x714) and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function c71400014.condition3(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c71400014.filter3,1,nil)
end
function c71400014.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
--[[
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,1,tp,1)
--]]
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function c71400014.operation3(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
--local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
--Duel.Draw(p,d,REASON_EFFECT)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=g:Select(tp,1,1,nil)
Duel.HintSelection(g)
Duel.SendtoGrave(g:GetFirst(),REASON_EFFECT)
end
end
\ No newline at end of file
--妄想梦境-梦湖回廊
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400015.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400015,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetCost(c71400015.cost)
e1:SetTarget(c71400015.target1)
e1:SetOperation(c71400015.operation1)
c:RegisterEffect(e1)
--Recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400015,1))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetTarget(c71400015.target2)
e2:SetOperation(c71400015.operation2)
c:RegisterEffect(e2)
--self limitation & field activation
yume.AddYumeFieldGlobal(c,71400015,1)
end
function c71400015.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_DISCARD+REASON_COST,nil)
end
function c71400015.filter1(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71400015.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400015.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c71400015.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c71400015.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_GRAVE)
end
function c71400015.operation1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
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
--幻异梦境-梦湖回廊
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400015.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400015,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetTarget(c71400015.target1)
e1:SetOperation(c71400015.operation1)
c:RegisterEffect(e1)
--Recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400015,1))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetTarget(c71400015.target2)
e2:SetOperation(c71400015.operation2)
c:RegisterEffect(e2)
--self limitation & field activation
yume.AddYumeFieldGlobal(c,71400015,1)
end
function c71400015.filter1(c)
return c:IsSetCard(0xe714) and c:IsAbleToHand()
end
function c71400015.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400015.filter1(chkc) end
if chk==0 then Duel.IsExistingTarget(c71400015.filter1,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c71400015.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE)
end
function c71400015.operation1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
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
\ No newline at end of file
--妄想梦境-空中庭园
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400016.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400016,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c71400016.target)
e1:SetOperation(c71400016.operation)
c:RegisterEffect(e1)
--self limitation & field activation
yume.AddYumeFieldGlobal(c,71400016,1)
end
function c71400016.filter(c)
return c:IsSetCard(0x714) and c:IsAbleToHand()
end
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 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)
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())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,mg,1,tp,LOCATION_ONFIELD)
end
function c71400016.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
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
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c71400016.aclimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c71400016.aclimit(e,re,tp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e)
--幻异梦境-空中庭园
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400016.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400016,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c71400016.target)
e1:SetOperation(c71400016.operation)
c:RegisterEffect(e1)
--self limitation & field activation
yume.AddYumeFieldGlobal(c,71400016,1)
end
function c71400016.filter(c)
return c:IsSetCard(0x714) and c:IsAbleToHand()
end
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 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)
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())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,mg,1,tp,LOCATION_ONFIELD)
end
function c71400016.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
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
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c71400016.aclimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c71400016.aclimit(e,re,tp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e)
end
\ No newline at end of file
--妄想梦境-门的世界
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400017.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400017,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetTarget(c71400017.tg1)
e1:SetOperation(c71400017.op1)
c:RegisterEffect(e1)
--banish
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400017,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetCountLimit(1,71400017+EFFECT_COUNT_CODE_DUEL)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c71400017.tg2)
e2:SetCost(c71400017.cost)
e2:SetOperation(c71400017.op2)
c:RegisterEffect(e2)
--self limitation & field activation
yume.AddYumeFieldGlobal(c,71400017,1)
end
function c71400017.filter1(c)
return c:IsSetCard(0xa714) and c:IsType(TYPE_FIELD) and not c:IsCode(71400017) and c:IsAbleToHand()
end
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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end
function c71400017.op1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c71400017.filter1,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g:Select(tp,1,1,nil)
--[[
g:Remove(Card.IsCode,nil,sg1:GetFirst():GetCode())
if g:GetCount()>0 and Duel.SelectYesNo(tp,210) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g:Select(tp,1,1,nil)
sg1:Merge(sg2)
end
--]]
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
function c71400017.filter2(c)
return c:IsCode(71400020) and c:IsAbleToHand()
end
function c71400017.filter2c(c)
return c:IsSetCard(0xe714) and c:IsAbleToRemoveAsCost()
end
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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c71400017.cost(e,tp,eg,ep,ev,re,r,rp,chk)
c=e:GetHandler()
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
local rg=Group.CreateGroup()
for i=1,5 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sc=g:Select(tp,1,1,nil):GetFirst()
rg:AddCard(sc)
g:Remove(Card.IsCode,nil,sc:GetCode())
end
rg:AddCard(c)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
end
function c71400017.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400017.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
--幻异梦境-门扉房间
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400017.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400017,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetTarget(c71400017.tg1)
e1:SetOperation(c71400017.op1)
c:RegisterEffect(e1)
--banish
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400017,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetCountLimit(1,71400017+EFFECT_COUNT_CODE_DUEL)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetTarget(c71400017.tg2)
e2:SetCost(c71400017.cost)
e2:SetOperation(c71400017.op2)
c:RegisterEffect(e2)
--self limitation & field activation
yume.AddYumeFieldGlobal(c,71400017,1)
end
function c71400017.filter1(c)
return c:IsSetCard(0xa714) and c:IsType(TYPE_FIELD) and not c:IsCode(71400017) and c:IsAbleToHand()
end
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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
end
function c71400017.op1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c71400017.filter1,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g:Select(tp,1,1,nil)
--[[
g:Remove(Card.IsCode,nil,sg1:GetFirst():GetCode())
if g:GetCount()>0 and Duel.SelectYesNo(tp,210) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g:Select(tp,1,1,nil)
sg1:Merge(sg2)
end
--]]
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
function c71400017.filter2(c)
return c:IsCode(71400020) and c:IsAbleToHand()
end
function c71400017.filter2c(c)
return c:IsSetCard(0xe714) and c:IsAbleToRemoveAsCost()
end
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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c71400017.cost(e,tp,eg,ep,ev,re,r,rp,chk)
c=e:GetHandler()
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
local rg=Group.CreateGroup()
for i=1,5 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sc=g:Select(tp,1,1,nil):GetFirst()
rg:AddCard(sc)
g:Remove(Card.IsCode,nil,sc:GetCode())
end
rg:AddCard(c)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
end
function c71400017.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400017.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--妄想梦物-电锯
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400018.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMING_EQUIP,0)
e1:SetCountLimit(1,71400018+EFFECT_COUNT_CODE_OATH)
e1:SetDescription(aux.Stringid(71400018,0))
e1:SetTarget(c71400018.target)
e1:SetCost(c71400018.cost)
e1:SetCondition(yume.YumeLethalCon)
e1:SetOperation(c71400018.operation)
c:RegisterEffect(e1)
end
function c71400018.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c71400018.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
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 chk==0 then return Duel.IsExistingTarget(c71400018.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
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)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c71400018.limit(g:GetFirst()))
end
end
function c71400018.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function c71400018.limit(c)
return function (e,lp,tp)
return e:GetHandler()~=c
end
--幻异梦物-电锯
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400018.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMING_EQUIP,0)
e1:SetCountLimit(1,71400018+EFFECT_COUNT_CODE_OATH)
e1:SetDescription(aux.Stringid(71400018,0))
e1:SetTarget(c71400018.target)
e1:SetCost(c71400018.cost)
e1:SetCondition(yume.YumeLethalCon)
e1:SetOperation(c71400018.operation)
c:RegisterEffect(e1)
end
function c71400018.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c71400018.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
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 chk==0 then return Duel.IsExistingTarget(c71400018.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
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)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c71400018.limit(g:GetFirst()))
end
end
function c71400018.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function c71400018.limit(c)
return function (e,lp,tp)
return e:GetHandler()~=c
end
end
\ No newline at end of file
--妄想梦物-魔女
function c71400019.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,71400019+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c71400019.target)
e1:SetCondition(c71400019.condition)
e1:SetOperation(c71400019.operation)
c:RegisterEffect(e1)
end
function c71400019.filter(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71400019.target(e,tp,eg,ep,ev,re,r,rp,chk)
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.condition(e,tp,eg,ep,ev,re,r,rp)
tc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
return tc and tc:IsFaceup() and tc:IsSetCard(0x3714)
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
--幻异梦物-魔女
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400019.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(71400019,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,71400019+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c71400019.target)
e1:SetCondition(yume.YumeCon)
e1:SetOperation(c71400019.operation)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400019,1))
e2:SetCategory(CATEGORY_DRAW+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,71500019)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c71400019.cost2)
e2:SetTarget(c71400019.tg2)
e2:SetOperation(c71400019.op2)
c:RegisterEffect(e2)
end
function c71400019.filter(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71400019.target(e,tp,eg,ep,ev,re,r,rp,chk)
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
\ No newline at end of file
--梦终
function c71400020.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetCondition(c71400020.condition)
e1:SetTarget(c71400020.target)
e1:SetOperation(c71400020.operation)
e1:SetCountLimit(1,71400020+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
end
function c71400020.filter1(c)
return c:IsSetCard(0x714)
end
function c71400020.filter2(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true)
end
function c71400020.filter3(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
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 ct=g:GetClassCount(Card.GetCode)
return ct>12
end
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)
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_REMOVE,nil,g:GetCount(),0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
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)
if Duel.Remove(fg,POS_FACEUP,REASON_EFFECT)<=0 then return end
Duel.BreakEffect()
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()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
local flag=Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return 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
Duel.BreakEffect()
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)
end
end
--梦终
function c71400020.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetCondition(c71400020.condition)
e1:SetTarget(c71400020.target)
e1:SetOperation(c71400020.operation)
e1:SetCountLimit(1,71400020+EFFECT_COUNT_CODE_DUEL+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
end
function c71400020.filter1(c)
return c:IsSetCard(0x714)
end
function c71400020.filter2(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true)
end
function c71400020.filter3(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
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 ct=g:GetClassCount(Card.GetCode)
return ct>12
end
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)
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_REMOVE,nil,g:GetCount(),0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
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)
if Duel.Remove(fg,POS_FACEUP,REASON_EFFECT)<=0 then return end
Duel.BreakEffect()
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()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
local flag=Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return 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
Duel.BreakEffect()
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)
end
end
end
\ No newline at end of file
--妄想梦物-菜刀
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400021.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMING_SPSUMMON+TIMING_SUMMON,0)
e1:SetCountLimit(1,71400021+EFFECT_COUNT_CODE_OATH)
e1:SetDescription(aux.Stringid(71400021,0))
e1:SetTarget(c71400021.target)
e1:SetCost(c71400021.cost)
e1:SetCondition(yume.YumeLethalCon)
e1:SetOperation(c71400021.operation)
c:RegisterEffect(e1)
end
function c71400021.filter(c)
return c:IsType(TYPE_MONSTER)
end
function c71400021.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
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 chk==0 then return Duel.IsExistingTarget(c71400021.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c71400021.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c71400021.limit(g:GetFirst()))
end
end
function c71400021.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function c71400021.limit(c)
return function (e,lp,tp)
return e:GetHandler()~=c
end
--幻异梦物-菜刀
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400021.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMING_SPSUMMON+TIMING_SUMMON,0)
e1:SetCountLimit(1,71400021+EFFECT_COUNT_CODE_OATH)
e1:SetDescription(aux.Stringid(71400021,0))
e1:SetTarget(c71400021.target)
e1:SetCost(c71400021.cost)
e1:SetCondition(yume.YumeLethalCon)
e1:SetOperation(c71400021.operation)
c:RegisterEffect(e1)
end
function c71400021.filter(c)
return c:IsType(TYPE_MONSTER)
end
function c71400021.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
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 chk==0 then return Duel.IsExistingTarget(c71400021.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c71400021.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c71400021.limit(g:GetFirst()))
end
end
function c71400021.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function c71400021.limit(c)
return function (e,lp,tp)
return e:GetHandler()~=c
end
end
\ No newline at end of file
--梦之眼药商人
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400022.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,yume.YumeCheck(c))
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400022,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,71400022)
e1:SetCondition(c71400022.con1)
e1:SetTarget(c71400022.target)
e1:SetCost(c71400022.cost)
e1:SetOperation(c71400022.op1)
c:RegisterEffect(e1)
--disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400022,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c71400022.con2)
e2:SetOperation(c71400022.op2)
c:RegisterEffect(e2)
end
function c71400022.filter1c(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c71400022.filter1(c,e,tp)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71400022.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c71400022.filter1c,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c71400022.op1(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,c71400022.filter1,tp,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 c71400022.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and rp==1-tp
end
function c71400022.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,1-tp)
--梦之眼药商人
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400022.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,yume.YumeCheck(c))
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400022,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,71400022)
e1:SetCondition(c71400022.con1)
e1:SetTarget(c71400022.target)
e1:SetCost(c71400022.cost)
e1:SetOperation(c71400022.op1)
c:RegisterEffect(e1)
--disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400022,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c71400022.con2)
e2:SetOperation(c71400022.op2)
c:RegisterEffect(e2)
end
function c71400022.filter1c(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c71400022.filter1(c,e,tp)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71400022.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c71400022.filter1c,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c71400022.op1(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,c71400022.filter1,tp,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 c71400022.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and rp==1-tp
end
function c71400022.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,1-tp)
end
\ No newline at end of file
--梦染
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400023.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400023,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,71400023+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,0x1f0)
e1:SetTarget(yume.YumeFieldCheckTarget())
e1:SetOperation(c71400023.op1)
c:RegisterEffect(e1)
--ac in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(yume.nonYumeCon)
c:RegisterEffect(e0)
--banish
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400023,1))
e2:SetCategory(CATEGORY_BANISH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_SUMMON+TIMING_SPSUMMON+TIMING_END_PHASE)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c71400023.tg2)
e2:SetOperation(c71400023.op2)
c:RegisterEffect(e2)
end
function c71400023.filter1(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true) and c:IsSetCard(0x3714)
end
function c71400023.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=yume.FieldActivation(tp)
if tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SSET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(1,1)
e1:SetTarget(c71400023.setlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
--[[
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_MSET)
tc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_TURN_SET)
tc:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetTarget(c71400023.sumlimit)
tc:RegisterEffect(e4,true)
--]]
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(71400023,2))
end
end
function c71400023.setlimit(e,c)
return not c:IsLocation(LOCATION_HAND)
end
--[[
function c71400023.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
--]]
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 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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_BANISH)
local g1=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_BANISH)
local g2=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_BANISH,g1,2,0,0)
end
function c71400023.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==2 then
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
--梦染
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400023.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400023,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,71400023+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,0x1f0)
e1:SetTarget(yume.YumeFieldCheckTarget())
e1:SetOperation(c71400023.op1)
c:RegisterEffect(e1)
--ac in hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(yume.nonYumeCon)
c:RegisterEffect(e0)
--banish
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400023,1))
e2:SetCategory(CATEGORY_BANISH)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_SUMMON+TIMING_SPSUMMON+TIMING_END_PHASE)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c71400023.tg2)
e2:SetOperation(c71400023.op2)
c:RegisterEffect(e2)
end
function c71400023.filter1(c,tp)
return c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true) and c:IsSetCard(0x3714)
end
function c71400023.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=yume.FieldActivation(tp)
if tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SSET)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(1,1)
e1:SetTarget(c71400023.setlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
--[[
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_MSET)
tc:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_TURN_SET)
tc:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetTarget(c71400023.sumlimit)
tc:RegisterEffect(e4,true)
--]]
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(71400023,2))
end
end
function c71400023.setlimit(e,c)
return not c:IsLocation(LOCATION_HAND)
end
--[[
function c71400023.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0
end
--]]
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 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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_BANISH)
local g1=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_BANISH)
local g2=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_BANISH,g1,2,0,0)
end
function c71400023.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==2 then
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
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)
function c71400025.initial_effect(c)
--activate from hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e0:SetCondition(yume.nonYumeCon)
c:RegisterEffect(e0)
--Activate(nofield)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400025,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(yume.nonYumeCon)
e1:SetTarget(yume.YumeFieldCheckTarget(0,2))
e1:SetCost(c71400025.cost1)
e1:SetOperation(c71400025.op1)
e1:SetCountLimit(1,71400025+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--Activate(field)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400025,1))
e2:SetCondition(yume.YumeCon)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,71400025+EFFECT_COUNT_CODE_OATH)
e2:SetCost(c71400025.cost2)
e2:SetTarget(c71400025.tg2)
e2:SetOperation(c71400025.op2)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(71400025,ACTIVITY_SPSUMMON,c71400025.counterfilter)
end
function c71400025.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsType(TYPE_LINK)
end
function c71400025.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800)
end
function c71400025.op1(e,tp,eg,ep,ev,re,r,rp)
yume.FieldActivation(tp,nil,2)
end
function c71400025.filter2(c)
return c:IsType(TYPE_LINK)
end
function c71400025.filter2a(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
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
Duel.PayLPCost(tp,800)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c71400025.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c71400025.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsType(TYPE_LINK)) and c:IsLocation(LOCATION_EXTRA)
end
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 chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
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)
end
function c71400025.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),tc:GetLink())
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
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)
if sg:GetCount()>0 then
local sc=sg:GetFirst()
local fid=c:GetFieldID()
while sc do
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)
end
sc=sg:GetNext()
end
Duel.SpecialSummonComplete()
sg:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c71400025.rmcon)
e1:SetOperation(c71400025.rmop)
e1:SetLabel(fid)
e1:SetLabelObject(sg)
Duel.RegisterEffect(e1,tp)
end
end
function c71400025.rmfilter(c,fid)
return c:GetFlagEffectLabel(71400025)==fid
end
function c71400025.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c71400025.rmfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c71400025.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c71400025.rmfilter,nil,e:GetLabel())
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
--梦蚀
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400025.initial_effect(c)
--activate from hand
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e0:SetCondition(yume.nonYumeCon)
c:RegisterEffect(e0)
--Activate(nofield)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400025,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(yume.nonYumeCon)
e1:SetTarget(yume.YumeFieldCheckTarget(0,2))
e1:SetCost(c71400025.cost1)
e1:SetOperation(c71400025.op1)
e1:SetCountLimit(1,71400025+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--Activate(field)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400025,1))
e2:SetCondition(yume.YumeCon)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,71400025+EFFECT_COUNT_CODE_OATH)
e2:SetCost(c71400025.cost2)
e2:SetTarget(c71400025.tg2)
e2:SetOperation(c71400025.op2)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(71400025,ACTIVITY_SPSUMMON,c71400025.counterfilter)
end
function c71400025.counterfilter(c)
return c:GetSummonLocation()~=LOCATION_EXTRA or c:IsType(TYPE_LINK)
end
function c71400025.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800)
end
function c71400025.op1(e,tp,eg,ep,ev,re,r,rp)
yume.FieldActivation(tp,nil,2)
end
function c71400025.filter2(c)
return c:IsType(TYPE_LINK)
end
function c71400025.filter2a(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
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
Duel.PayLPCost(tp,800)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c71400025.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c71400025.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not (c:IsType(TYPE_LINK)) and c:IsLocation(LOCATION_EXTRA)
end
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 chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
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)
end
function c71400025.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),tc:GetLink())
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
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)
if sg:GetCount()>0 then
local sc=sg:GetFirst()
local fid=c:GetFieldID()
while sc do
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)
end
sc=sg:GetNext()
end
Duel.SpecialSummonComplete()
sg:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetCondition(c71400025.rmcon)
e1:SetOperation(c71400025.rmop)
e1:SetLabel(fid)
e1:SetLabelObject(sg)
Duel.RegisterEffect(e1,tp)
end
end
function c71400025.rmfilter(c,fid)
return c:GetFlagEffectLabel(71400025)==fid
end
function c71400025.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c71400025.rmfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c71400025.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c71400025.rmfilter,nil,e:GetLabel())
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--妄想梦物-黑电话
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400026.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400026,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(yume.YumeCon)
e1:SetTarget(c71400026.tg1)
e1:SetOperation(c71400026.op1)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400026,1))
e2:SetCountLimit(1,71400026)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c71400026.mixedYumeCon)
e2:SetCost(c71400026.cost)
e2:SetTarget(c71400026.tg2)
e2:SetOperation(c71400026.op2)
c:RegisterEffect(e2)
end
function c71400026.filter1(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
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 chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c71400026.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
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)
end
function c71400026.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c71400026.filter2c(c,e,tp)
return c:IsSetCard(0x714) and c:IsAbleToRemoveAsCost()
end
function c71400026.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c71400026.filter2c,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71400026.filter2c,tp,LOCATION_GRAVE,0,1,1,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
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)
end
function c71400026.filter2(c)
return c:IsSetCard(0xe714) and not c:IsCode(71400026) and c:IsAbleToHand()
end
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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c71400026.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400026.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
--幻异梦物-黑电话
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400026.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400026,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(yume.YumeCon)
e1:SetTarget(c71400026.tg1)
e1:SetOperation(c71400026.op1)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400026,1))
e2:SetCountLimit(1,71400026)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c71400026.mixedYumeCon)
e2:SetCost(c71400026.cost)
e2:SetTarget(c71400026.tg2)
e2:SetOperation(c71400026.op2)
c:RegisterEffect(e2)
end
function c71400026.filter1(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
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 chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c71400026.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
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)
end
function c71400026.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c71400026.filter2c(c,e,tp)
return c:IsSetCard(0x714) and c:IsAbleToRemoveAsCost()
end
function c71400026.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c71400026.filter2c,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71400026.filter2c,tp,LOCATION_GRAVE,0,1,1,c)
g:AddCard(c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
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)
end
function c71400026.filter2(c)
return c:IsSetCard(0xe714) and not c:IsCode(71400026) and c:IsAbleToHand()
end
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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c71400026.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400026.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
This diff is collapsed.
--锈蚀的梦之怪物
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400028.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,yume.YumeCheck(c))
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400028,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,71400028)
e1:SetTarget(c71400028.tg1)
e1:SetOperation(c71400028.op1)
c:RegisterEffect(e1)
--setcode
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c71400028.tg2)
e2:SetCode(EFFECT_ADD_SETCODE)
e2:SetValue(0x714)
c:RegisterEffect(e2)
--corrupt
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400028,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c71400028.con3)
e3:SetTarget(c71400028.tg3)
e3:SetOperation(c71400028.op3)
c:RegisterEffect(e3)
end
function c71400028.filter1(c,e,tp,zone)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c71400028.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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 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)
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)
end
function c71400028.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local zone=e:GetHandler():GetLinkedZone(tp)
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
function c71400028.tg2(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsFaceup()
end
function c71400028.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return r&REASON_EFFECT+REASON_BATTLE~=0
end
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
end
function c71400028.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c71400028.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71400028.filter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
--锈蚀的异梦怪物
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400028.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,yume.YumeCheck(c))
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400028,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,71400028)
e1:SetTarget(c71400028.tg1)
e1:SetOperation(c71400028.op1)
c:RegisterEffect(e1)
--setcode
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c71400028.tg2)
e2:SetCode(EFFECT_ADD_SETCODE)
e2:SetValue(0x714)
c:RegisterEffect(e2)
--corrupt
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400028,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c71400028.con3)
e3:SetTarget(c71400028.tg3)
e3:SetOperation(c71400028.op3)
c:RegisterEffect(e3)
end
function c71400028.filter1(c,e,tp,zone)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c71400028.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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 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)
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)
end
function c71400028.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local zone=e:GetHandler():GetLinkedZone(tp)
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone)
end
end
function c71400028.tg2(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsFaceup()
end
function c71400028.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return r&REASON_EFFECT+REASON_BATTLE~=0
end
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
end
function c71400028.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c71400028.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71400028.filter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--梦之方块间的围巾少女
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400029.initial_effect(c)
--summon limit
yume.AddYumeSummonLimit(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400029,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,71400029)
e1:SetTarget(c71400029.tg1)
e1:SetCondition(c71400029.con1)
e1:SetOperation(c71400029.op1)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400029,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c71400029.tg2)
e2:SetOperation(c71400029.op2)
c:RegisterEffect(e2)
local e2a=e2:Clone()
e2a:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2a)
Duel.AddCustomActivityCounter(71400029,ACTIVITY_CHAIN,c71400029.chainfilter)
end
function c71400029.chainfilter(re,tp,cid)
return not re:GetHandler():IsSetCard(0xa714)
end
function c71400029.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(71400029,tp,ACTIVITY_CHAIN)>0
end
function c71400029.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
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)
end
function c71400029.op1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c71400029.filter2(c)
return c:IsType(TYPE_FIELD) and c:IsSetCard(0xb714) and c:IsAbleToHand()
end
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 chk==0 then return Duel.IsExistingTarget(c71400029.filter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c71400029.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c71400029.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
--异梦方块的女-围巾子
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400029.initial_effect(c)
--summon limit
yume.AddYumeSummonLimit(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400029,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,71400029)
e1:SetTarget(c71400029.tg1)
e1:SetCondition(c71400029.con1)
e1:SetOperation(c71400029.op1)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400029,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c71400029.tg2)
e2:SetOperation(c71400029.op2)
c:RegisterEffect(e2)
local e2a=e2:Clone()
e2a:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2a)
Duel.AddCustomActivityCounter(71400029,ACTIVITY_CHAIN,c71400029.chainfilter)
end
function c71400029.chainfilter(re,tp,cid)
return not re:GetHandler():IsSetCard(0xa714)
end
function c71400029.con1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(71400029,tp,ACTIVITY_CHAIN)>0
end
function c71400029.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
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)
end
function c71400029.op1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c71400029.filter2(c)
return c:IsType(TYPE_FIELD) and c:IsSetCard(0xb714) and c:IsAbleToHand()
end
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 chk==0 then return Duel.IsExistingTarget(c71400029.filter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c71400029.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c71400029.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
--腐坏的梦之怪物
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400030.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3,3,yume.YumeCheck(c))
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e1a=e1:Clone()
e1a:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e1a)
--[[
local e1b=e1:Clone()
e1b:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
c:RegisterEffect(e1b)
--]]
--negate spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_SPSUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetDescription(aux.Stringid(71400030,0))
e2:SetCondition(c71400030.condition)
e2:SetCost(c71400030.cost)
e2:SetTarget(c71400030.target)
e2:SetOperation(c71400030.operation)
c:RegisterEffect(e2)
end
function c71400030.filter2(c)
return c:IsPreviousLocation(LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK) and c:IsAbleToRemove()
end
function c71400030.cfilter2(c,g)
return g:IsContains(c)
end
function c71400030.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and eg:IsExists(c71400030.filter2,1,nil)
end
function c71400030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local lg=c:GetLinkedGroup()
if chk==0 then return Duel.IsExistingMatchingCard(c71400030.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71400030.cfilter2,tp,LOCATION_ONFIELD,0,1,1,nil,lg)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c71400030.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=eg:Filter(c71400030.filter2,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c71400030.operation(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c71400030.filter2,nil)
if g:GetCount()>0 then
Duel.NegateSummon(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
if og:GetCount()>0 then
Duel.BreakEffect()
local tc=og:GetFirst()
local atk=0
while tc do
local tatk=tc:GetTextAttack()
if tatk>0 then atk=atk+tatk end
tc=og:GetNext()
end
Duel.SetLP(tp,Duel.GetLP(tp)-atk)
end
end
--腐坏的异梦怪物
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400030.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),3,3,yume.YumeCheck(c))
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
local e1a=e1:Clone()
e1a:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e1a)
--[[
local e1b=e1:Clone()
e1b:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
c:RegisterEffect(e1b)
--]]
--negate spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_SPSUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetDescription(aux.Stringid(71400030,0))
e2:SetCondition(c71400030.condition)
e2:SetCost(c71400030.cost)
e2:SetTarget(c71400030.target)
e2:SetOperation(c71400030.operation)
c:RegisterEffect(e2)
end
function c71400030.filter2(c)
return c:IsPreviousLocation(LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK) and c:IsAbleToRemove()
end
function c71400030.cfilter2(c,g)
return g:IsContains(c)
end
function c71400030.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and eg:IsExists(c71400030.filter2,1,nil)
end
function c71400030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local lg=c:GetLinkedGroup()
if chk==0 then return Duel.IsExistingMatchingCard(c71400030.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,lg) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c71400030.cfilter2,tp,LOCATION_ONFIELD,0,1,1,nil,lg)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c71400030.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=eg:Filter(c71400030.filter2,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c71400030.operation(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c71400030.filter2,nil)
if g:GetCount()>0 then
Duel.NegateSummon(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
if og:GetCount()>0 then
Duel.BreakEffect()
local tc=og:GetFirst()
local atk=0
while tc do
local tatk=tc:GetTextAttack()
if tatk>0 then atk=atk+tatk end
tc=og:GetNext()
end
Duel.SetLP(tp,Duel.GetLP(tp)-atk)
end
end
end
\ No newline at end of file
--梦日记
function c71400031.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c71400031.tg)
e1:SetOperation(c71400031.op)
e1:SetCountLimit(1,71400031+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
end
function c71400031.filter(c)
return c:IsSetCard(0x714) and c:GetReason() & REASON_DESTROY~=0 and not c:IsCode(71400031) and c:IsAbleToHand()
end
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(c71400031.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c71400031.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71400031.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_HAND)
Duel.SetLP(tp,Duel.GetLP(tp)-ct*500)
--梦日记
function c71400031.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c71400031.tg)
e1:SetOperation(c71400031.op)
e1:SetCountLimit(1,71400031+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
end
function c71400031.filter(c)
return c:IsSetCard(0x714) and c:GetReason() & REASON_DESTROY~=0 and not c:IsCode(71400031) and c:IsAbleToHand()
end
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(c71400031.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c71400031.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71400031.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_HAND)
Duel.SetLP(tp,Duel.GetLP(tp)-ct*500)
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)
function c71400033.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMING_TOGRAVE,0)
e1:SetCountLimit(1,71400033+EFFECT_COUNT_CODE_OATH)
e1:SetDescription(aux.Stringid(71400033,0))
e1:SetTarget(c71400033.target)
e1:SetCost(c71400033.cost)
e1:SetCondition(yume.YumeLethalCon)
e1:SetOperation(c71400033.operation)
c:RegisterEffect(e1)
end
function c71400033.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
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 chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c71400033.limit(g:GetFirst()))
end
end
function c71400033.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function c71400033.limit(c)
return function (e,lp,tp)
return e:GetHandler()~=c
end
--蚀异梦物-铁管
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400033.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(TIMING_DRAW_PHASE+TIMING_END_PHASE+TIMING_TOGRAVE,0)
e1:SetCountLimit(1,71400033+EFFECT_COUNT_CODE_OATH)
e1:SetDescription(aux.Stringid(71400033,0))
e1:SetTarget(c71400033.target)
e1:SetCost(c71400033.cost)
e1:SetCondition(yume.YumeLethalCon)
e1:SetOperation(c71400033.operation)
c:RegisterEffect(e1)
end
function c71400033.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
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 chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c71400033.limit(g:GetFirst()))
end
end
function c71400033.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
function c71400033.limit(c)
return function (e,lp,tp)
return e:GetHandler()~=c
end
end
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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