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

Add files via upload

parent 1f024f1c
...@@ -55,6 +55,7 @@ end ...@@ -55,6 +55,7 @@ end
end end
--global part --global part
table=require("table") table=require("table")
yume.RustFlag=false
function yume.AddYumeSummonLimit(c,ssm) function yume.AddYumeSummonLimit(c,ssm)
--1=special summon monster, 0=non special summon monster --1=special summon monster, 0=non special summon monster
ssm=ssm or 0 ssm=ssm or 0
...@@ -80,16 +81,17 @@ function yume.GetValueType(v) ...@@ -80,16 +81,17 @@ function yume.GetValueType(v)
local t=type(v) local t=type(v)
if t=="userdata" then if t=="userdata" then
local mt=getmetatable(v) local mt=getmetatable(v)
if mt==Group then return "Group" if mt==Group then return "G"
elseif mt==Effect then return "Effect" elseif mt==Effect then return "E"
else return "Card" end else return "C" end
else return t end else return t end
end end
function yume.YumeCheckFilter(c) function yume.YumeCheckFilter(c)
return c:IsFaceup() and c:IsSetCard(0x3714) return c:IsFaceup() and c:IsSetCard(0x3714)
end end
function yume.IsYumeFieldOnField(tp) function yume.IsYumeFieldOnField(tp)
return Duel.IsExistingMatchingCard(yume.YumeCheckFilter,tp,LOCATION_FZONE,0,1,nil) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
return fc and yume.YumeCheckFilter(fc)
end end
--[[ --[[
Yume SpSummon Check Yume SpSummon Check
...@@ -98,9 +100,9 @@ v in card = material filter gen(return true = can summon) ...@@ -98,9 +100,9 @@ v in card = material filter gen(return true = can summon)
--]] --]]
function yume.YumeCheck(v,se,sp) function yume.YumeCheck(v,se,sp)
local t=yume.GetValueType(v) local t=yume.GetValueType(v)
if t=="Effect" then if t=="E" then
return yume.IsYumeFieldOnField(sp) return yume.IsYumeFieldOnField(sp)
elseif t=="Card" then elseif t=="C" then
return function(c) return yume.IsYumeFieldOnField(v:GetControler()) end return function(c) return yume.IsYumeFieldOnField(v:GetControler()) end
end end
end end
...@@ -138,7 +140,7 @@ function yume.AddYumeFieldGlobal(c,id,ft) ...@@ -138,7 +140,7 @@ function yume.AddYumeFieldGlobal(c,id,ft)
eac:SetCode(EVENT_FREE_CHAIN) eac:SetCode(EVENT_FREE_CHAIN)
eac:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) eac:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(eac) c:RegisterEffect(eac)
--self limitation --[[--old self limitation
local esl=Effect.CreateEffect(c) local esl=Effect.CreateEffect(c)
esl:SetDescription(aux.Stringid(71400001,1)) esl:SetDescription(aux.Stringid(71400001,1))
esl:SetType(EFFECT_TYPE_QUICK_F) esl:SetType(EFFECT_TYPE_QUICK_F)
...@@ -147,6 +149,21 @@ function yume.AddYumeFieldGlobal(c,id,ft) ...@@ -147,6 +149,21 @@ function yume.AddYumeFieldGlobal(c,id,ft)
esl:SetCondition(yume.YumeFieldLimitCon) esl:SetCondition(yume.YumeFieldLimitCon)
esl:SetOperation(yume.YumeFieldLimitOp) esl:SetOperation(yume.YumeFieldLimitOp)
c:RegisterEffect(esl) c:RegisterEffect(esl)
--]]
--self to deck
local esd1=Effect.CreateEffect(c)
esd1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
esd1:SetCode(EVENT_CHAINING)
esd1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
esd1:SetRange(LOCATION_FZONE)
esd1:SetOperation(aux.chainreg)
c:RegisterEffect(esd1)
local esd2=Effect.CreateEffect(c)
esd2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
esd2:SetCode(EVENT_CHAIN_SOLVED)
esd2:SetRange(LOCATION_FZONE)
esd2:SetOperation(yume.SelfToDeckOp)
c:RegisterEffect(esd2)
--field activation --field activation
local efa=Effect.CreateEffect(c) local efa=Effect.CreateEffect(c)
efa:SetDescription(aux.Stringid(71400001,2)) efa:SetDescription(aux.Stringid(71400001,2))
...@@ -159,7 +176,7 @@ function yume.AddYumeFieldGlobal(c,id,ft) ...@@ -159,7 +176,7 @@ function yume.AddYumeFieldGlobal(c,id,ft)
efa:SetOperation(yume.FieldActivationOp) efa:SetOperation(yume.FieldActivationOp)
c:RegisterEffect(efa) c:RegisterEffect(efa)
end end
--Against Yume --[[--old Against Yume
function yume.YumeFieldLimitCon(e,tp,eg,ep,ev,re,r,rp) function yume.YumeFieldLimitCon(e,tp,eg,ep,ev,re,r,rp)
local ec=re:GetHandler() local ec=re:GetHandler()
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
...@@ -203,7 +220,15 @@ function yume.YumeFieldLimitOp(e,tp,eg,ep,ev,re,r,rp) ...@@ -203,7 +220,15 @@ function yume.YumeFieldLimitOp(e,tp,eg,ep,ev,re,r,rp)
end end
function yume.YumeFieldActivationLimit(e,re,tp) function yume.YumeFieldActivationLimit(e,re,tp)
local c=re:GetHandler() local c=re:GetHandler()
return c:IsSetCard(0x714) and not c:IsImmuneToEffect(e) return c:IsSetCard(0x714)
end
--]]
--Self To Deck
function yume.SelfToDeckOp(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not re:GetHandler():IsSetCard(0x714) and c:GetFlagEffect(1)>0 then
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end end
--Field Activation --Field Activation
function yume.YumeFieldCheck(tp,num,ft,loc) function yume.YumeFieldCheck(tp,num,ft,loc)
......
--冰雪中的梦之旅者 --异梦旅者-冰冻子
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400002.initial_effect(c) function c71400002.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -16,6 +17,7 @@ function c71400002.initial_effect(c) ...@@ -16,6 +17,7 @@ function c71400002.initial_effect(c)
e2:SetTargetRange(LOCATION_GRAVE+LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_GRAVE+LOCATION_MZONE,0)
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE) e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetValue(ATTRIBUTE_WATER) e2:SetValue(ATTRIBUTE_WATER)
e2:SetCondition(yume.YumeCon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to deck --to deck
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
--梦医院的梦之患者 --异梦医院的病人-青汁君
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400006.initial_effect(c) function c71400006.initial_effect(c)
--summon limit --summon limit
......
--梦之镇的路标 --异梦胡同的路标
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400007.initial_effect(c) function c71400007.initial_effect(c)
--summon limit --summon limit
yume.AddYumeSummonLimit(c) yume.AddYumeSummonLimit(c)
--summon success --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(71400007,0)) e1:SetDescription(aux.Stringid(71400007,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCountLimit(1,71400007) e1:SetCountLimit(1,71400007)
e1:SetCondition(c71400007.con1)
e1:SetTarget(c71400007.tg1) e1:SetTarget(c71400007.tg1)
e1:SetOperation(c71400007.op1) e1:SetOperation(c71400007.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e1a=e1:Clone()
e1a:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e1a)
--gy banish --gy banish
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -30,21 +28,19 @@ function c71400007.initial_effect(c) ...@@ -30,21 +28,19 @@ function c71400007.initial_effect(c)
e2:SetOperation(c71400007.operation) e2:SetOperation(c71400007.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c71400007.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() function c71400007.con1(e,tp,eg,ep,ev,re,r,rp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and Card.IsLinkState(chkc) and chkc~=c end return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_LINK
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 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(71400007,2)) function c71400007.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SelectTarget(tp,Card.IsLinkState,tp,LOCATION_MZONE,0,1,1,c) 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 end
function c71400007.op1(e,tp,eg,ep,ev,re,r,rp) function c71400007.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local tc=Duel.GetFirstTarget() Duel.Draw(p,d,REASON_EFFECT)
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 end
function c71400007.filter(c,e,tp,zone) function c71400007.filter(c,e,tp,zone)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
......
--梦之书中的三足怪物 --异梦书中的三足怪物
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400008.initial_effect(c) function c71400008.initial_effect(c)
--xyz summon --xyz summon
...@@ -20,7 +20,7 @@ function c71400008.initial_effect(c) ...@@ -20,7 +20,7 @@ function c71400008.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c71400008.condition(e,tp,eg,ep,ev,re,r,rp) function c71400008.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp return rp~=tp and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_ONFIELD,nil)>2
end end
function c71400008.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400008.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
--梦之书中的公式证明图表 --异梦书中的公式证明图表
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400009.initial_effect(c) function c71400009.initial_effect(c)
--xyz summon --xyz summon
...@@ -8,39 +8,38 @@ function c71400009.initial_effect(c) ...@@ -8,39 +8,38 @@ function c71400009.initial_effect(c)
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_LEAVE_FIELD) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetDescription(aux.Stringid(71400009,0)) e1:SetDescription(aux.Stringid(71400009,0))
e1:SetCondition(c71400009.condition) e1:SetCountLimit(1,71400009)
e1:SetTarget(c71400009.target) e1:SetTarget(c71400009.tg1)
e1:SetOperation(c71400009.operation) e1:SetOperation(c71400009.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--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 end
function c71400009.condition(e,tp,eg,ep,ev,re,r,rp) function c71400009.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
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 if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,1-tp,LOCATION_ONFIELD+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,0,0,0)
end end
function c71400009.operation(e,tp,eg,ep,ev,re,r,rp) function c71400009.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,mcount,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) Duel.HintSelection(sg)
if Duel.Destroy(sg,REASON_EFFECT)>0 then if Duel.Destroy(sg,REASON_EFFECT)>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-1000) Duel.SetLP(tp,Duel.GetLP(tp)-1000)
end end
end end
function c71400009.raval(e,c)
local oc=e:GetHandler():GetOverlayCount()
return math.max(0,oc-1)
end end
\ No newline at end of file
--梦之书中的脑女 --异梦书中的脑女
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400010.initial_effect(c) function c71400010.initial_effect(c)
--xyz summon --xyz summon
...@@ -85,7 +85,6 @@ function c71400010.operation1(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,7 +85,6 @@ function c71400010.operation1(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2,true) tc:RegisterEffect(e2,true)
tc=og:GetNext() tc=og:GetNext()
end end
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-atk/2) Duel.SetLP(tp,Duel.GetLP(tp)-atk/2)
end end
function c71400010.condition2(e,tp,eg,ep,ev,re,r,rp) function c71400010.condition2(e,tp,eg,ep,ev,re,r,rp)
......
--梦之书的管理员 --异梦书使-馆长女儿
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400011.initial_effect(c) function c71400011.initial_effect(c)
--xyz summon --xyz summon
...@@ -6,86 +6,122 @@ function c71400011.initial_effect(c) ...@@ -6,86 +6,122 @@ function c71400011.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--special summon --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400011,0)) e1:SetDescription(aux.Stringid(71400011,0))
e1:SetCountLimit(1,71400011) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,71400011+EFFECT_COUNT_CODE_DUEL)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCondition(c71400011.con1)
e1:SetCost(c71400011.cost) e1:SetTarget(c71400011.tg1)
e1:SetTarget(c71400011.target1) e1:SetOperation(c71400011.op1)
e1:SetOperation(c71400011.operation1)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--fly away --special summon
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) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400011,1)) e2:SetDescription(aux.Stringid(71400011,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCountLimit(1,71500011)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCode(EVENT_CHAIN_SOLVED) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE+LOCATION_GRAVE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c71400011.condition2) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetTarget(c71400011.target2) e2:SetCost(c71400011.cost)
e2:SetOperation(c71400011.operation2) e2:SetTarget(c71400011.tg2)
e2:SetOperation(c71400011.op2)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e2) 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 end
function c71400011.cost(e,tp,eg,ep,ev,re,r,rp,chk) 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 if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c71400011.filter1(c) function c71400011.filter2(c)
return c:IsSetCard(0x714) return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER)
end end
function c71400011.xyzfilter(c,e,tp) 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 return c:IsSetCard(0x3715) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c71400011.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400011.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
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 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.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,nil,0,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,g1:GetCount(),tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c71400011.operation1(e,tp,eg,ep,ev,re,r,rp) function c71400011.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71400011.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local g=Duel.GetMatchingGroup(c71400011.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst() local sc=sg:GetFirst()
if sc then if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) local e1=Effect.CreateEffect(e:GetHandler())
local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) 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 if mg:GetCount()>0 then
Duel.Overlay(sc,mg) local smg=mg:Select(tp,1,3,nil)
Duel.Overlay(sc,smg)
end end
end end
end end
function c71400011.filter2(c) function c71400011.filter3(c)
return c:IsSetCard(0xb714) and c:IsType(TYPE_FIELD) and c:IsAbleToHand() return c:IsSetCard(0xb714) and c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end end
function c71400011.condition2(e,tp,eg,ep,ev,re,r,rp) function c71400011.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re:GetHandler() local rc=re:GetHandler()
return rc:IsCode(71400026) and c:GetFlagEffect(1)>0 and re:IsHasType(EFFECT_TYPE_ACTIVATE) return rc:IsCode(71400026) and c:GetFlagEffect(1)>0
end end
function c71400011.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400011.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function c71400011.operation2(e,tp,eg,ep,ev,re,r,rp) function c71400011.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() 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 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) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71400011.filter2,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c71400011.filter3,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
--梦之迷宫的剧面人 --异梦迷宫的狐面武士-师傅
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400012.initial_effect(c) function c71400012.initial_effect(c)
--synchro summon --synchro summon
...@@ -6,35 +6,74 @@ function c71400012.initial_effect(c) ...@@ -6,35 +6,74 @@ function c71400012.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--cannot be target --immune
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.tgoval) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c71400012.filter1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--banish --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) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400012,0)) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) e2:SetRange(LOCATION_MZONE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCode(EVENT_BATTLE_START) e2:SetOperation(c71400012.op2)
e2:SetTarget(c71400012.target)
e2:SetOperation(c71400012.operation)
c:RegisterEffect(e2) 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 end
function c71400012.target(e,tp,eg,ep,ev,re,r,rp,chk) function c71400012.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetBattleTarget() 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 if chk==0 then return tc and tc:IsAbleToRemove() end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tc:GetControler(),2000)
end end
function c71400012.operation(e,tp,eg,ep,ev,re,r,rp) function c71400012.op3(e,tp,eg,ep,ev,re,r,rp)
if Duel.Damage(1-tp,2000,REASON_EFFECT)~=0 then
local tc=e:GetHandler():GetBattleTarget() local tc=e:GetHandler():GetBattleTarget()
if tc:IsRelateToBattle() then if tc then
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) local bp=tc:GetControler()
if tc:IsRelateToBattle() and Duel.Destroy(tc,REASON_EFFECT,LOCATION_REMOVED)>0 then
Duel.Damage(bp,2000,REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
--妄想梦境-梦幻图书馆 --幻异梦境-梦幻图书馆
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400014.initial_effect(c) function c71400014.initial_effect(c)
--Activate --Activate
......
--妄想梦境-梦湖回廊 --幻异梦境-梦湖回廊
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400015.initial_effect(c) function c71400015.initial_effect(c)
--Activate --Activate
--See AddYumeFieldGlobal --See AddYumeFieldGlobal
--spsummon --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400015,0)) e1:SetDescription(aux.Stringid(71400015,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c71400015.cost)
e1:SetTarget(c71400015.target1) e1:SetTarget(c71400015.target1)
e1:SetOperation(c71400015.operation1) e1:SetOperation(c71400015.operation1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -28,33 +27,21 @@ function c71400015.initial_effect(c) ...@@ -28,33 +27,21 @@ function c71400015.initial_effect(c)
--self limitation & field activation --self limitation & field activation
yume.AddYumeFieldGlobal(c,71400015,1) yume.AddYumeFieldGlobal(c,71400015,1)
end end
function c71400015.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c71400015.filter1(c)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end return c:IsSetCard(0xe714) and c:IsAbleToHand()
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 end
function c71400015.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71400015.filter1(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then Duel.IsExistingTarget(c71400015.filter1,tp,LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingTarget(c71400015.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c71400015.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) 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) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE)
end end
function c71400015.operation1(e,tp,eg,ep,ev,re,r,rp) function c71400015.operation1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then Duel.SendtoHand(tc,nil,REASON_EFFECT)
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
end end
function c71400015.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400015.target2(e,tp,eg,ep,ev,re,r,rp,chk)
......
--妄想梦境-空中庭园 --幻异梦境-空中庭园
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400016.initial_effect(c) function c71400016.initial_effect(c)
--Activate --Activate
......
--妄想梦境-门的世界 --幻异梦境-门扉房间
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400017.initial_effect(c) function c71400017.initial_effect(c)
--Activate --Activate
......
--妄想梦物-电锯 --幻异梦物-电锯
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400018.initial_effect(c) function c71400018.initial_effect(c)
--Activate --Activate
......
--妄想梦物-魔女 --幻异梦物-魔女
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400019.initial_effect(c) function c71400019.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(71400019,0))
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,71400019+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,71400019+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c71400019.target) e1:SetTarget(c71400019.target)
e1:SetCondition(c71400019.condition) e1:SetCondition(yume.YumeCon)
e1:SetOperation(c71400019.operation) e1:SetOperation(c71400019.operation)
c:RegisterEffect(e1) 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 end
function c71400019.filter(c,e,tp) function c71400019.filter(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -19,10 +33,6 @@ function c71400019.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,10 +33,6 @@ function c71400019.target(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(c71400019.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end 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) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end 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) function c71400019.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -31,3 +41,22 @@ function c71400019.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,3 +41,22 @@ function c71400019.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function 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
--妄想梦物-菜刀 --幻异梦物-菜刀
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400021.initial_effect(c) function c71400021.initial_effect(c)
--Activate --Activate
......
--异梦书中的人偶
function c71400024.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,yume.YumeCheck(c),4,2)
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--inactivatable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c71400024.filter1)
c:RegisterEffect(e1)
local e1a=Effect.CreateEffect(c)
e1a:SetType(EFFECT_TYPE_FIELD)
e1a:SetCode(EFFECT_CANNOT_DISEFFECT)
e1a:SetRange(LOCATION_MZONE)
e1a:SetValue(c71400024.filter1)
c:RegisterEffect(e1a)
--pos
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400024,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetCountLimit(1)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCost(c71400024.cost2)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c71400024.tg2)
e2:SetOperation(c71400024.op2)
c:RegisterEffect(e2)
end
function c71400024.filter1(e,ct)
local p=e:GetHandler():GetControler()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return p==tp and te:GetHandler():IsSetCard(0x715)
end
function c71400024.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c71400024.filter2(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end
function c71400024.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400024.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(c71400024.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c71400024.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c71400024.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,c)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE,0,POS_FACEUP_DEFENSE,0)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_DEFENSE)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
\ No newline at end of file
--妄想梦物-黑电话 --幻异梦物-黑电话
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400026.initial_effect(c) function c71400026.initial_effect(c)
--Activate --Activate
......
...@@ -73,6 +73,7 @@ function c71400027.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,6 +73,7 @@ function c71400027.op1(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(0) e2:SetValue(0)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
sc:RegisterEffect(e2,true) sc:RegisterEffect(e2,true)
Duel.SpecialSummonComplete()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()==2 then if g:GetCount()==2 then
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -85,8 +86,8 @@ function c71400027.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,8 +86,8 @@ function c71400027.op1(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.Overlay(sc,g) Duel.Overlay(sc,g)
end end
Duel.SpecialSummonComplete()
end end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
--锈蚀的梦之怪物 --锈蚀的异梦怪物
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400028.initial_effect(c) function c71400028.initial_effect(c)
--link summon --link summon
......
--梦之方块间的围巾少女 --异梦方块的女-围巾子
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400029.initial_effect(c) function c71400029.initial_effect(c)
--summon limit --summon limit
......
--腐坏的梦之怪物 --腐坏的异梦怪物
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400030.initial_effect(c) function c71400030.initial_effect(c)
--link summon --link summon
......
--蚀异梦境-幻想植物回路
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
...@@ -14,6 +14,18 @@ function c71400036.initial_effect(c) ...@@ -14,6 +14,18 @@ function c71400036.initial_effect(c)
e1:SetTarget(c71400036.tg1) e1:SetTarget(c71400036.tg1)
e1:SetOperation(c71400036.op1) e1:SetOperation(c71400036.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400036,1))
e2:SetCountLimit(1,71500036)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCondition(c71400036.con2)
e2:SetTarget(c71400036.tg2)
e2:SetOperation(c71400036.op2)
c:RegisterEffect(e2)
end end
function c71400036.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400036.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -29,3 +41,23 @@ function c71400036.op1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,3 +41,23 @@ function c71400036.op1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
function c71400036.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_XYZ) and c:IsPreviousLocation(LOCATION_OVERLAY) and re:GetHandler():IsSetCard(0x714)
end
function c71400036.filter2(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c71400036.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c71400036.filter2(chkc) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(c71400036.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,CATEGORY_TOHAND)
local g=Duel.SelectTarget(tp,c71400036.filter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c71400036.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
...@@ -5,24 +5,24 @@ function c71400037.initial_effect(c) ...@@ -5,24 +5,24 @@ function c71400037.initial_effect(c)
--See AddYumeFieldGlobal --See AddYumeFieldGlobal
--self limitation & field activation --self limitation & field activation
yume.AddYumeFieldGlobal(c,71400037,1) yume.AddYumeFieldGlobal(c,71400037,1)
--immune --cannot be target
local e1=Effect.CreateEffect(c) local e1a=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1a:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1a:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
e1:SetRange(LOCATION_FZONE) e1a:SetRange(LOCATION_FZONE)
e1:SetTargetRange(LOCATION_MZONE,0) e1a:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c71400037.tg1) e1a:SetValue(aux.imval1)
e1:SetValue(c71400037.filter1) c:RegisterEffect(e1a)
c:RegisterEffect(e1) local e1b=Effect.CreateEffect(c)
e1b:SetType(EFFECT_TYPE_FIELD)
e1b:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1b:SetRange(LOCATION_FZONE)
e1b:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1b:SetTargetRange(LOCATION_MZONE,0)
e1b:SetTarget(c71400037.tg1)
e1b:SetValue(1)
c:RegisterEffect(e1b)
end end
function c71400037.tg1(e,c) function c71400037.tg1(e,c)
return c:IsSetCard(0x714) return c:IsSetCard(0x714)
end end
\ No newline at end of file
function c71400037.filter1(e,te,c)
local tc=te:GetHandler()
local tseq=tc:GetSequence()
if tc:GetControler()~=c:GetControler() then tseq=tseq+16 end
if tc:IsLocation(LOCATION_SZONE) then tseq=tseq+8 end
local zone=c:GetColumnZone(LOCATION_ONFIELD)
return zone and bit.extract(zone,tseq)~=0
end
\ No newline at end of file
...@@ -61,6 +61,7 @@ function c71400038.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,6 +61,7 @@ function c71400038.activate(e,tp,eg,ep,ev,re,r,rp)
local e4a=e1:Clone() local e4a=e1:Clone()
e4a:SetCode(EFFECT_CANNOT_DISEFFECT) e4a:SetCode(EFFECT_CANNOT_DISEFFECT)
Duel.RegisterEffect(e4a,tp) Duel.RegisterEffect(e4a,tp)
yume.RustFlag=true;
end end
function c71400038.con1(e,tp,eg,ep,ev,re,r,rp) function c71400038.con1(e,tp,eg,ep,ev,re,r,rp)
return ep==tp return ep==tp
......
...@@ -37,17 +37,18 @@ function c71400039.filter1(c,tp) ...@@ -37,17 +37,18 @@ function c71400039.filter1(c,tp)
end end
function c71400039.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400039.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) and eg:IsExists(c71400039.filter1,1,nil) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,true) and eg:IsExists(c71400039.filter1,1,nil) end
local g=eg:Filter(c71400039.filter1,nil,tp)
Duel.SetTargetCard(eg) Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c71400039.filter1a(c,e) function c71400039.filter2a(c,e,tp)
return c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE) return c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE)
end end
function c71400039.op1(e,tp,eg,ep,ev,re,r,rp) function c71400039.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and yume.IsYumeFieldOnField(tp) and Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)~=0 then
c:CompleteProcedure() c:CompleteProcedure()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=eg:Filter(c71400039.filter2a,nil,e,tp)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -28,7 +28,8 @@ function c71400041.filter1c(c) ...@@ -28,7 +28,8 @@ function c71400041.filter1c(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_LINK) and c:IsLinkState() and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x714) and c:IsType(TYPE_LINK) and c:IsLinkState() and c:IsAbleToRemoveAsCost()
end end
function c71400041.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400041.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400041.filter1c,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400041.filter1c,tp,LOCATION_MZONE,0,1,nil) and Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,c71400041.filter1c,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,c71400041.filter1c,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then if Duel.Remove(tc,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
......
--异梦之书的小管理员 --小异梦书使-馆长女儿
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400042.initial_effect(c) function c71400042.initial_effect(c)
--summon limit --summon limit
...@@ -29,9 +29,9 @@ function c71400042.initial_effect(c) ...@@ -29,9 +29,9 @@ function c71400042.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCost(c71400042.cost3)
e3:SetTarget(c71400042.tg3) e3:SetTarget(c71400042.tg3)
e3:SetOperation(c71400042.op3) e3:SetOperation(c71400042.op3)
e3:SetCondition(c71400042.con3)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--transform --transform
...@@ -80,13 +80,11 @@ end ...@@ -80,13 +80,11 @@ end
function c71400042.xyzfilter(c,e,tp) function c71400042.xyzfilter(c,e,tp)
return c:IsSetCard(0x3715) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsSetCard(0x3715) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c71400042.cost3(e,tp,eg,ep,ev,re,r,rp,chk) function c71400042.linkfilter(c)
local c=e:GetHandler() return c:IsFaceup() and c:IsType(TYPE_LINK)
if chk==0 then return Duel.IsExistingMatchingCard(c71400042.filter3,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,nil) end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) function c71400042.con3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c71400042.filter3,tp,LOCATION_HAND+LOCATION_GRAVE,0,2,2,nil) return not Duel.IsExistingMatchingCard(c71400042.linkfilter,tp,LOCATION_MZONE,0,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetTargetCard(g)
end end
function c71400042.tg3(e,tp,eg,ep,ev,re,r,rp,chk) function c71400042.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400042.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c71400042.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
...@@ -97,12 +95,15 @@ function c71400042.op3(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,12 +95,15 @@ function c71400042.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst() local sc=sg:GetFirst()
if sc then if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) local e1=Effect.CreateEffect(e:GetHandler())
local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) e1:SetType(EFFECT_TYPE_SINGLE)
if mg:GetCount()>0 then e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
Duel.Overlay(sc,mg) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
end e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_DECK)
sc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end end
end end
function c71400042.filter4(c,e,tp) function c71400042.filter4(c,e,tp)
...@@ -111,7 +112,7 @@ end ...@@ -111,7 +112,7 @@ end
function c71400042.con4(e,tp,eg,ep,ev,re,r,rp) function c71400042.con4(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=re:GetHandler() local rc=re:GetHandler()
return rc:IsCode(71400026) and c:GetFlagEffect(1)>0 and re:IsHasType(EFFECT_TYPE_ACTIVATE) return rc:IsCode(71400026) and c:GetFlagEffect(1)>0
end end
function c71400042.tg4(e,tp,eg,ep,ev,re,r,rp,chk) function c71400042.tg4(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
--异梦之海的潜水员 --异梦海底的潜水员-橘黄子
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400043.initial_effect(c) function c71400043.initial_effect(c)
c:SetSPSummonOnce(71400043) c:SetSPSummonOnce(71400043)
...@@ -28,7 +28,21 @@ function c71400043.initial_effect(c) ...@@ -28,7 +28,21 @@ function c71400043.initial_effect(c)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c71400043.con2) e2:SetCondition(c71400043.con2)
e2:SetOperation(c71400043.op2) e2:SetOperation(c71400043.op2)
e2:SetTarget(c71400043.tg2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--banish
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400043,2))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c71400043.con3)
e3:SetOperation(c71400043.op3)
e3:SetCost(c71400043.cost3)
e3:SetTarget(c71400043.tg3)
c:RegisterEffect(e3)
--[[
--tohand --tohand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400043,2)) e3:SetDescription(aux.Stringid(71400043,2))
...@@ -39,6 +53,7 @@ function c71400043.initial_effect(c) ...@@ -39,6 +53,7 @@ function c71400043.initial_effect(c)
e3:SetTarget(c71400043.tg3) e3:SetTarget(c71400043.tg3)
e3:SetOperation(c71400043.op3) e3:SetOperation(c71400043.op3)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--]]
end end
function c71400043.matfilter(c) function c71400043.matfilter(c)
return c:IsLinkType(TYPE_EFFECT) and not c:IsLinkType(TYPE_LINK) return c:IsLinkType(TYPE_EFFECT) and not c:IsLinkType(TYPE_LINK)
...@@ -47,7 +62,7 @@ function c71400043.con1(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +62,7 @@ function c71400043.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end end
function c71400043.filter1(c) function c71400043.filter1(c)
return c:IsSetCard(0x5714) and c:IsAbleToHand() return c:IsSetCard(0xd714) and c:IsAbleToHand()
end end
function c71400043.tg1(e,tp,eg,ep,ev,re,r,rp,chk) function c71400043.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400043.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71400043.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
...@@ -61,19 +76,43 @@ function c71400043.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,19 +76,43 @@ function c71400043.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c71400043.filter2(c)
return c:GetSummonLocation()==LOCATION_EXTRA
end
function c71400043.filter2a(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c71400043.con2(e,tp,eg,ep,ev,re,r,rp) function c71400043.con2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71400043.filter2,tp,LOCATION_MZONE,0,nil) return not (yume.RustFlag or e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN))
return Duel.GetTurnPlayer()~=tp and g:GetCount()>0 and g:FilterCount(c71400043.filter2a,nil)==g:GetCount() end
function c71400043.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
local num=0
if fc and fc:IsFaceup() then num=fc:GetCode() end
return yume.YumeFieldCheck(tp,num,2,LOCATION_GRAVE+LOCATION_DECK)
end
end end
function c71400043.op2(e,tp,eg,ep,ev,re,r,rp) function c71400043.op2(e,tp,eg,ep,ev,re,r,rp)
yume.FieldActivation(tp,nil,2) local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
local num=0
if fc and fc:IsFaceup() then num=fc:GetCode() end
yume.FieldActivation(tp,num,2,LOCATION_GRAVE+LOCATION_DECK)
end
function c71400043.con3(e,tp,eg,ep,ev,re,r,rp)
return yume.RustFlag
end
function c71400043.filter3(c,tp)
return c:IsAbleToRemove(tp,POS_FACEDOWN) and not(c:IsLocation(LOCATION_FZONE) and c:IsType(TYPE_FIELD) and c:IsSetCard(0x3714) and c:IsFaceup() and c:IsControler(tp))
end
function c71400043.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost(POS_FACEDOWN) end
Duel.Remove(e:GetHandler(),POS_FACEDOWN,REASON_COST)
end
function c71400043.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400043.filter3,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,tp) end
local g=Duel.GetMatchingGroup(c71400043.filter3,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c71400043.op3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71400043.filter3,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
end end
--[[
function c71400043.filter3a(c) function c71400043.filter3a(c)
return c:IsSetCard(0x5714) and c:IsAbleToDeck() and not c:IsPublic() return c:IsSetCard(0x5714) and c:IsAbleToDeck() and not c:IsPublic()
end end
...@@ -102,3 +141,4 @@ function c71400043.op3(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,3 +141,4 @@ function c71400043.op3(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
--]]
\ No newline at end of file
...@@ -9,10 +9,19 @@ function c71400044.initial_effect(c) ...@@ -9,10 +9,19 @@ function c71400044.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetTarget(c71400044.tg1) e1:SetTarget(c71400044.tg1)
e1:SetOperation(c71400044.op1) e1:SetOperation(c71400044.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--double attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetDescription(aux.Stringid(71400044,1))
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,71400044)
e2:SetTarget(c71400044.tg2)
e2:SetOperation(c71400044.op2)
c:RegisterEffect(e2)
end end
function c71400044.filter1(c) function c71400044.filter1(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and not c:IsCode(71400044) and c:IsAbleToHand() return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and not c:IsCode(71400044) and c:IsAbleToHand()
...@@ -27,33 +36,27 @@ function c71400044.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,33 +36,27 @@ function c71400044.op1(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_DAMAGE)
e1:SetOperation(c71400044.regop)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabel(0)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(c71400044.damcon)
e2:SetOperation(c71400044.damop)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,tp)
end end
end end
function c71400044.regop(e,tp,eg,ep,ev,re,r,rp) function c71400044.filter2(c)
if e:GetLabel()~=1 and ep~=tp and (eg and eg:GetFirst():IsControler(tp) or re and re:GetHandlerPlayer()==tp) then return c:IsFaceup() and c:IsSetCard(0x714)
e:SetLabel(1)
end
end end
function c71400044.damcon(e,tp,eg,ep,ev,re,r,rp) function c71400044.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
return e:GetLabelObject():GetLabel()==0 if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c71400044.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c71400044.filter2,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c71400044.filter2,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c71400044.damop(e,tp,eg,ep,ev,re,r,rp) function c71400044.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(tp,Duel.GetLP(tp)-1000) local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local atk=tc:GetAttack()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(atk*2)
tc:RegisterEffect(e1)
end
end end
\ No newline at end of file
--黑白的异梦少女 Monoko --黑白异梦少女-黑白子
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400045.initial_effect(c) function c71400045.initial_effect(c)
--synchro summon --synchro summon
...@@ -6,49 +6,94 @@ function c71400045.initial_effect(c) ...@@ -6,49 +6,94 @@ function c71400045.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--act limit --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetDescription(aux.Stringid(71400045,0))
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTargetRange(0,1) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetValue(c71400045.aclimit) e1:SetCountLimit(1,71400045)
e1:SetCondition(c71400045.con1)
e1:SetTarget(c71400045.tg1)
e1:SetOperation(c71400045.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--multi attack --atkup
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetValue(4) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetCondition(c71400045.con2) e2:SetRange(LOCATION_MZONE)
e2:SetValue(c71400045.val)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--multi attack
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_EXTRA_ATTACK)
e3:SetValue(4)
e3:SetCondition(c71400045.con3)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(71400045,ACTIVITY_CHAIN,c71400045.chainfilter) Duel.AddCustomActivityCounter(71400045,ACTIVITY_CHAIN,c71400045.chainfilter)
--pos --pos
local e2a=Effect.CreateEffect(c) local e3a=Effect.CreateEffect(c)
e2a:SetDescription(aux.Stringid(71400045,0)) e3a:SetDescription(aux.Stringid(71400045,1))
e2a:SetCategory(CATEGORY_POSITION) e3a:SetCategory(CATEGORY_POSITION)
e2a:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD) e3a:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e2a:SetCode(EVENT_PHASE+PHASE_BATTLE) e3a:SetCode(EVENT_PHASE+PHASE_BATTLE)
e2a:SetRange(LOCATION_MZONE) e3a:SetRange(LOCATION_MZONE)
e2a:SetCountLimit(1) e3a:SetCountLimit(1)
e2a:SetCondition(c71400045.con2a) e3a:SetCondition(c71400045.con3a)
e2a:SetOperation(c71400045.op2a) e3a:SetOperation(c71400045.op3a)
c:RegisterEffect(e2a) c:RegisterEffect(e3a)
end
function c71400045.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c71400045.filter1(c,e,tp)
return c:IsSetCard(0x714) and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function c71400045.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c71400045.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c71400045.op1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c71400045.filter1),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c71400045.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c71400045.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not (c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x714))
end
function c71400045.val(e,c)
return Duel.GetMatchingGroupCount(c71400045.filter2,c:GetControler(),LOCATION_GRAVE+LOCATION_MZONE,0,nil)*300
end
function c71400045.filter2(c)
return c:IsSetCard(0x717) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end end
function c71400045.chainfilter(re,tp,cid) function c71400045.chainfilter(re,tp,cid)
return not (re:GetHandler():IsCode(71400047) and re:IsHasType(EFFECT_TYPE_ACTIVATE)) return not (re:GetHandler():IsCode(71400047) and re:IsHasType(EFFECT_TYPE_ACTIVATE))
end end
function c71400045.aclimit(e,re,tp) function c71400045.con3(e)
return not re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:GetHandler():IsImmuneToEffect(e)
end
function c71400045.con2(e)
return Duel.GetCustomActivityCount(71400045,e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0 return Duel.GetCustomActivityCount(71400045,e:GetHandlerPlayer(),ACTIVITY_CHAIN)>0
end end
function c71400045.con2a(e,tp,eg,ep,ev,re,r,rp) function c71400045.con3a(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c71400045.con2(e) and c:IsAttackPos() and c:GetBattledGroupCount()>0 return c71400045.con2(e) and c:IsAttackPos() and c:GetBattledGroupCount()>0
end end
function c71400045.op2a(e,tp,eg,ep,ev,re,r,rp) function c71400045.op3a(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsAttackPos() then if c:IsAttackPos() then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE) Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
......
--黑白的异梦少女 Monoe --黑白异梦少女-黑白江
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400046.initial_effect(c) function c71400046.initial_effect(c)
--synchro summon --synchro summon
...@@ -6,58 +6,77 @@ function c71400046.initial_effect(c) ...@@ -6,58 +6,77 @@ function c71400046.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--summon limit --summon limit
yume.AddYumeSummonLimit(c,1) yume.AddYumeSummonLimit(c,1)
--destroy --to deck
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400046,0)) e1:SetDescription(aux.Stringid(71400046,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCountLimit(1,71400046)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetCategory(CATEGORY_TODECK)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c71400046.con1) e1:SetCondition(c71400046.con1)
e1:SetTarget(c71400046.tg1) e1:SetTarget(c71400046.tg1)
e1:SetOperation(c71400046.op1) e1:SetOperation(c71400046.op1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--self banish local e1a=e1:Clone()
e1a:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e1a)
--atkup
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400046,1)) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCategory(CATEGORY_REMOVE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetType(EFFECT_TYPE_QUICK_F) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_BECOME_TARGET) e2:SetValue(c71400046.val)
e2:SetCondition(c71400046.con2)
e2:SetTarget(c71400046.tg2)
e2:SetOperation(c71400046.op2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e2a=e2:Clone() --self banish
e2a:SetDescription(aux.Stringid(71400046,1)) local e3=Effect.CreateEffect(c)
e2a:SetCode(EVENT_BE_BATTLE_TARGET) e3:SetDescription(aux.Stringid(71400046,1))
c:RegisterEffect(e2a) e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_BECOME_TARGET)
e3:SetCondition(c71400046.con3)
e3:SetTarget(c71400046.tg3)
e3:SetOperation(c71400046.op3)
c:RegisterEffect(e3)
local e3a=e3:Clone()
e3a:SetCode(EVENT_BE_BATTLE_TARGET)
c:RegisterEffect(e3a)
end
function c71400046.filter1(c,tp)
return c:IsSummonPlayer(1-tp) and c:IsAbleToDeck() and c:IsLocation(LOCATION_MZONE)
end end
function c71400046.con1(e,tp,eg,ep,ev,re,r,rp) function c71400046.con1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c71400046.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71400046.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local g=eg:Filter(c71400046.filter1,nil,tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc~=c end local ct=g:GetCount()
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end if chk==0 then return ct>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.SetTargetCard(eg)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,ct,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function c71400046.op1(e,tp,eg,ep,ev,re,r,rp) function c71400046.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local g=eg:Filter(c71400046.filter1,nil,tp):Filter(Card.IsRelateToEffect,nil,e)
if tc:IsRelateToEffect(e) then if g:GetCount()>0 then
Duel.Destroy(tc,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end end
end end
function c71400046.con2(e,tp,eg,ep,ev,re,r,rp) function c71400046.val(e,c)
return Duel.GetMatchingGroupCount(c71400046.filter2,c:GetControler(),LOCATION_GRAVE+LOCATION_MZONE,0,nil)*300
end
function c71400046.filter2(c)
return c:IsSetCard(0x717) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c71400046.con3(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler()) return eg:IsContains(e:GetHandler())
end end
function c71400046.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400046.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0)
end end
function c71400046.op2(e,tp,eg,ep,ev,re,r,rp) function c71400046.op3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then if c:IsRelateToEffect(e) and Duel.Remove(c,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -68,16 +68,15 @@ function c71400049.synfilter2(c) ...@@ -68,16 +68,15 @@ function c71400049.synfilter2(c)
end end
function c71400049.con2(e,tp,eg,ep,ev,re,r,rp) function c71400049.con2(e,tp,eg,ep,ev,re,r,rp)
local ct=eg:FilterCount(c71400049.synfilter2,nil) local ct=eg:FilterCount(c71400049.synfilter2,nil)
if ct>0 then e:SetLabel(ct) end
return ct>0 return ct>0
end end
function c71400049.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400049.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE)
end end
function c71400049.op2(e,tp,eg,ep,ev,re,r,rp) function c71400049.op2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local ct=e:GetLabel() or 0 local ct=eg:FilterCount(c71400049.synfilter2,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c71400049.filter1,tp,LOCATION_GRAVE,0,nil,e,tp) local g=Duel.GetMatchingGroup(c71400049.filter1,tp,LOCATION_GRAVE,0,nil,e,tp)
ct=math.min(ct,ft,g:GetCount()) ct=math.min(ct,ft,g:GetCount())
......
--黑白的异梦引导 --黑白异梦的邂逅
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400050.initial_effect(c) function c71400050.initial_effect(c)
--Activate --Activate
......
--黑白的异梦协奏 --黑白异梦的协奏
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end) xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400051.initial_effect(c) function c71400051.initial_effect(c)
--Activate --Activate
...@@ -12,10 +12,10 @@ function c71400051.initial_effect(c) ...@@ -12,10 +12,10 @@ function c71400051.initial_effect(c)
e1:SetDescription(aux.Stringid(71400051,0)) e1:SetDescription(aux.Stringid(71400051,0))
e1:SetCountLimit(1,71400051) e1:SetCountLimit(1,71400051)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy --to grave
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71400051,1)) e2:SetDescription(aux.Stringid(71400051,1))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_CHAIN_NEGATED) e2:SetCode(EVENT_CHAIN_NEGATED)
...@@ -83,16 +83,18 @@ function c71400051.con2(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,16 +83,18 @@ function c71400051.con2(e,tp,eg,ep,ev,re,r,rp)
return yume.YumeCon(e,tp) and de and dp~=tp and re:GetHandler():IsSetCard(0x714) and rp==tp return yume.YumeCon(e,tp) and de and dp~=tp and re:GetHandler():IsSetCard(0x714) and rp==tp
end end
function c71400051.tg2(e,tp,eg,ep,ev,re,r,rp,chk) function c71400051.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,e:GetHandler(),0x717) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,e:GetHandler(),0x717) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD+LOCATION_HAND,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,1-tp,LOCATION_ONFIELD+LOCATION_HAND)
end end
function c71400051.op2(e,tp,eg,ep,ev,re,r,rp) function c71400051.op2(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,0x717) if not yume.IsYumeFieldOnField(tp) then return end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local ct=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,nil,0x717)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD+LOCATION_HAND,nil)
if ct>0 and g:GetCount()>0 then if ct>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,ct,nil) local dg=g:Select(tp,1,ct,nil)
Duel.HintSelection(dg) Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT) Duel.SendtoGrave(dg,REASON_EFFECT)
end end
end end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment