Commit 714af4c8 authored by Nemo Ma's avatar Nemo Ma Committed by GitHub

Merge pull request #8 from Sonic714/master

21.6.8 yume update
parents aa4eb478 39737f44
No preview for this file type
......@@ -120,7 +120,13 @@ function yume.YumeCon(e,tp,eg,ep,ev,re,r,rp)
end
--Yume Condition for lethal weapons
function yume.YumeLethalCon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and yume.YumeCon(e,tp,eg,ep,ev,re,r,rp)
if not yume.IsYumeFieldOnField(tp) then return false end
local ph=Duel.GetCurrentPhase()
if Duel.GetTurnPlayer()==tp then
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
else
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
end
function yume.nonYumeCon(e,tp,eg,ep,ev,re,r,rp)
if not tp then tp=e:GetHandlerPlayer() end
......@@ -231,7 +237,7 @@ function yume.SelfToDeckOp(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end
--Field Activation
--activate field
function yume.YumeFieldCheck(tp,id,ft,loc)
ft=ft or 0
id=id or 0
......@@ -280,8 +286,7 @@ function yume.ActivateFieldFilter(c,tp,id,ft)
end
function yume.ActivateFieldCon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and not c:IsLocation(LOCATION_DECK)
and c:IsPreviousPosition(POS_FACEUP)
return c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function yume.ActivateFieldOp(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -38,7 +38,7 @@ function c71400006.filter1(c,e,tp)
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
if chk==0 then return Duel.IsExistingTarget(c71400006.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,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)
......
......@@ -6,35 +6,58 @@ function c71400008.initial_effect(c)
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
--nuke
--Marginal Vivid Worker
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)
e1:SetCost(c71400008.cost1)
e1:SetTarget(c71400008.tg1)
e1:SetOperation(c71400008.op1)
e1:SetCondition(c71400008.con1)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetDescription(aux.Stringid(71400008,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetTarget(c71400008.tg2)
e2:SetOperation(c71400008.op2)
e2:SetCondition(c71400008.con2)
c:RegisterEffect(e2)
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)
function c71400008.cost1(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)
function c71400008.con1(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler()
end
function c71400008.tg1(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)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,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)
function c71400008.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c71400008.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c71400008.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),tp,0)
end
function c71400008.op2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
Duel.Destroy(g,REASON_EFFECT)
end
\ No newline at end of file
......@@ -22,24 +22,48 @@ function c71400009.initial_effect(c)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(c71400009.raval)
c:RegisterEffect(e2)
--hand des
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetDescription(aux.Stringid(71400009,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetTarget(c71400009.tg3)
e3:SetOperation(c71400009.op3)
e3:SetCondition(c71400009.con3)
c:RegisterEffect(e3)
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)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,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
if not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,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)
local sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(sg)
if Duel.Destroy(sg,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.SetLP(tp,Duel.GetLP(tp)-1000)
Duel.SetLP(tp,Duel.GetLP(tp)-800)
end
end
function c71400009.raval(e,c)
local oc=e:GetHandler():GetOverlayCount()
return math.max(0,oc-1)
end
function c71400009.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c71400009.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND)
end
function c71400009.op3(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
if dg:GetCount()>0 then
Duel.Destroy(dg,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -89,7 +89,7 @@ function c71400010.operation1(e,tp,eg,ep,ev,re,r,rp)
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)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
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
......
......@@ -29,6 +29,7 @@ function c71400011.initial_effect(c)
e2:SetCost(c71400011.cost)
e2:SetTarget(c71400011.tg2)
e2:SetOperation(c71400011.op2)
e2:SetCondition(c71400011.con2)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
c:RegisterEffect(e2)
--fly away
......@@ -68,6 +69,9 @@ function c71400011.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
function c71400011.con2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsStatus(STATUS_SPSUMMON_TURN)
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)
......
--梦坠
xpcall(function() require("expansions/script/c71400001") end,function() require("script/c71400001") end)
function c71400013.initial_effect(c)
--Activate(nofield)
local e1=Effect.CreateEffect(c)
......@@ -6,10 +7,10 @@ function c71400013.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetCondition(c71400013.condition1)
e1:SetTarget(c71400013.target1)
e1:SetCondition(yume.nonYumeCon)
e1:SetTarget(c71400013.tg1)
e1:SetCost(c71400013.cost)
e1:SetOperation(c71400013.operation1)
e1:SetOperation(c71400013.op1)
e1:SetCountLimit(1,71400013+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--Activate(field)
......@@ -18,10 +19,10 @@ function c71400013.initial_effect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c71400013.condition2)
e2:SetTarget(c71400013.target2)
e2:SetCondition(yume.YumeCon)
e2:SetTarget(c71400013.tg2)
e2:SetCost(c71400013.cost)
e2:SetOperation(c71400013.operation2)
e2:SetOperation(c71400013.op2)
e2:SetCountLimit(1,71400013+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e2)
end
......@@ -29,14 +30,6 @@ 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
......@@ -46,10 +39,10 @@ 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)
function c71400013.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=yume.ActivateYumeField(tp,nil,1)
local dg=Duel.GetMatchingGroup(c71400013.filter1a,tp,0,LOCATION_ONFIELD,nil)
local dg=Duel.GetMatchingGroup(c71400013.filter1a,tp,LOCATION_ONFIELD,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)
......@@ -72,7 +65,7 @@ function c71400013.operation1(e,tp,eg,ep,ev,re,r,rp)
el3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(el3)
end
function c71400013.operation2(e,tp,eg,ep,ev,re,r,rp)
function c71400013.op2(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)
......@@ -106,7 +99,7 @@ function c71400013.operation2(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(el3)
end
function c71400013.discon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and rp==1-tp and re:GetActivateLocation()&(LOCATION_MZONE+LOCATION_GRAVE)~=0
return re:IsActiveType(TYPE_MONSTER) and re:GetActivateLocation()&(LOCATION_MZONE+LOCATION_GRAVE)~=0
end
function c71400013.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
......@@ -114,11 +107,11 @@ end
function c71400013.sumlimit(e,c)
return not c:IsSetCard(0x714)
end
function c71400013.target1(e,tp,eg,ep,ev,re,r,rp,chk)
function c71400013.tg1(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)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_ONFIELD)
end
function c71400013.target2(e,tp,eg,ep,ev,re,r,rp,chk)
function c71400013.tg2(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
--red remedy
local e1a=Effect.CreateEffect(c)
e1a:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1a:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1a:SetCode(EVENT_CHAINING)
e1a:SetRange(LOCATION_FZONE)
e1a:SetOperation(aux.chainreg)
c:RegisterEffect(e1a)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_FZONE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetOperation(c71400014.op1)
e1:SetCondition(c71400014.con1)
c:RegisterEffect(e1)
--heart
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:SetDescription(aux.Stringid(71400014,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(c71400014.target2)
e2:SetOperation(c71400014.operation2)
e2:SetCountLimit(1)
e2:SetCost(c71400014.cost2)
e2:SetTarget(c71400014.tg2)
e2:SetOperation(c71400014.op2)
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 to deck & field activation
--self to deck & activate field
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)
function c71400014.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,71400014)
Duel.Hint(HINT_SELECTMSG,rp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(rp,nil,rp,LOCATION_ONFIELD,0,1,1,aux.ExceptThisCard(re))
if g:GetCount()>0 then
Duel.HintSelection(g)
if Duel.SendtoGrave(g,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.Recover(rp,1000,REASON_EFFECT)
end
end
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c71400014.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,rp)
c:RegisterFlagEffect(0,RESET_PHASE+PHASE_END+RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(71400014,0))
end
function c71400014.aclimit(e,re,tp)
return not re:IsActiveType(TYPE_TRAP)
end
function c71400014.con1(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_TRAP) and e:GetHandler():GetFlagEffect(1)~=0
end
function c71400014.filter2(c,e,tp)
return c:IsSetCard(0x714) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......@@ -55,45 +67,43 @@ function c71400014.target2(e,tp,eg,ep,ev,re,r,rp,chk)
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)
function c71400014.cost2(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c71400014.condition3(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c71400014.filter3,1,nil)
function c71400014.filter2(c)
return c:IsXyzSummonable(nil) and c:IsSetCard(0x715)
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)
function c71400014.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400014.filter2,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
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)
function c71400014.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c71400014.filter2,tp,LOCATION_EXTRA,0,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)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:Select(tp,1,1,nil)
local tc=tg:GetFirst()
Duel.XyzSummon(tp,tc,nil)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_COST)
e1:SetLabelObject(c)
e1:SetOperation(c71400014.regop)
tc:RegisterEffect(e1)
end
end
function c71400014.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetLabelObject())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetDescription(aux.Stringid(71400014,1))
e1:SetValue(1000)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
e:Reset()
end
\ No newline at end of file
......@@ -24,7 +24,7 @@ function c71400015.initial_effect(c)
e2:SetTarget(c71400015.target2)
e2:SetOperation(c71400015.operation2)
c:RegisterEffect(e2)
--self to deck & field activation
--self to deck & activate field
yume.AddYumeFieldGlobal(c,71400015,1)
end
function c71400015.filter1(c)
......@@ -53,6 +53,6 @@ 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,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)
if mcount>0 then
local val=Duel.Recover(tp,mcount*300,REASON_EFFECT)
Duel.Recover(tp,mcount*300,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -4,20 +4,20 @@ function c71400016.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--summon
--self to deck & field activation
--self to deck & activate field
yume.AddYumeFieldGlobal(c,71400016,1)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71400016,0))
e1:SetCategory(CATEGORY_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetCondition(c71400016.con1)
e1:SetTarget(c71400016.tg1)
e1:SetOperation(c71400016.op1)
c:RegisterEffect(e1)
--draw
--discard deck
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCategory(CATEGORY_DRAW)
......@@ -31,6 +31,10 @@ function c71400016.initial_effect(c)
e2:SetOperation(c71400016.op2)
c:RegisterEffect(e2)
end
function c71400016.con1(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c71400016.filter1(c)
return c:IsSetCard(0x714) and c:IsSummonable(true,nil)
end
......@@ -39,43 +43,46 @@ function c71400016.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c71400016.op1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c71400016.filter1,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
c=e:GetHandler()
Duel.Summon(tp,tc,true,nil)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_COST)
e1:SetOperation(c71400016.regop)
c:RegisterEffect(e1)
e1:SetLabelObject(c)
tc:RegisterEffect(e1)
end
end
function c71400016.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
local lc=e:GetLabelObject()
local e1=Effect.CreateEffect(lc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetDescription(aux.Stringid(71400016,2))
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(aux.imval1)
e1:SetReset(RESET_EVENT+0xff0000)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(lc)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DESTROYED)
e2:SetLabelObject(tc)
e2:SetCondition(c71400016.reccon)
e2:SetOperation(c71400016.recop)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
local e3=Effect.CreateEffect(lc)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_DESTROY)
e3:SetLabelObject(e2)
e3:SetOperation(c71400016.checkop)
e3:SetReset(RESET_EVENT+0xff0000)
tc:RegisterEffect(e3)
c:RegisterEffect(e3)
e:Reset()
end
function c71400016.checkop(e,tp,eg,ep,ev,re,r,rp)
......@@ -83,7 +90,7 @@ function c71400016.checkop(e,tp,eg,ep,ev,re,r,rp)
e2:SetLabel(1)
end
function c71400016.reccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabel()==1
return e:GetLabel()==1 and c:IsPreviousLocation(LOCATION_MZONE)
end
function c71400016.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,e:GetLabelObject():GetBaseAttack(),REASON_EFFECT)
......@@ -99,6 +106,7 @@ function c71400016.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c71400016.op2(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)
end
\ No newline at end of file
......@@ -24,7 +24,7 @@ function c71400017.initial_effect(c)
e2:SetCost(c71400017.cost)
e2:SetOperation(c71400017.op2)
c:RegisterEffect(e2)
--self to deck & field activation
--self to deck & activate field
yume.AddYumeFieldGlobal(c,71400017,1)
end
function c71400017.filter1(c)
......
......@@ -12,7 +12,7 @@ function c71400018.initial_effect(c)
e1:SetDescription(aux.Stringid(71400018,0))
e1:SetTarget(c71400018.target)
e1:SetCost(c71400018.cost1)
e1:SetCondition(yume.YumeCon)
e1:SetCondition(yume.YumeLethalCon)
e1:SetOperation(c71400018.operation)
c:RegisterEffect(e1)
end
......
......@@ -51,12 +51,12 @@ function c71400019.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
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
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,50)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
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)
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -11,7 +11,7 @@ function c71400021.initial_effect(c)
e1:SetCountLimit(1,71400021+EFFECT_COUNT_CODE_OATH)
e1:SetDescription(aux.Stringid(71400021,0))
e1:SetTarget(c71400021.target)
e1:SetCondition(yume.YumeCon)
e1:SetCondition(yume.YumeLethalCon)
e1:SetOperation(c71400021.operation)
c:RegisterEffect(e1)
end
......
......@@ -11,12 +11,10 @@ function c71400022.initial_effect(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:SetTarget(c71400022.tg1)
e1:SetOperation(c71400022.op1)
c:RegisterEffect(e1)
--disable spsummon
......@@ -37,23 +35,17 @@ 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)
function c71400022.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local zone=e:GetHandler():GetLinkedZone(tp)
return Duel.IsExistingMatchingCard(c71400022.filter1,tp,LOCATION_HAND,0,1,nil,e,tp,zone) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return Duel.IsExistingMatchingCard(c71400022.filter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c71400022.op1(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71400022.filter1,tp,LOCATION_HAND,0,1,1,nil,e,tp,zone)
local g=Duel.SelectMatchingCard(tp,c71400022.filter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,zone)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone)
end
......
......@@ -31,6 +31,14 @@ function c71400024.initial_effect(c)
e2:SetTarget(c71400024.tg2)
e2:SetOperation(c71400024.op2)
c:RegisterEffect(e2)
--skip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(71400024,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetOperation(c71400024.op3)
e3:SetCondition(c71400024.con3)
c:RegisterEffect(e3)
end
function c71400024.filter1(e,ct)
local p=e:GetHandler():GetControler()
......@@ -68,4 +76,27 @@ function c71400024.op2(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
function c71400024.con3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c71400024.op3(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SKIP_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
if Duel.GetTurnPlayer()==tp and ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c71400024.skipcon)
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e1,tp)
end
function c71400024.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
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))
......
......@@ -10,70 +10,56 @@ function c71400028.initial_effect(c)
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:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_REMOVE)
e1:SetCountLimit(1,71400028)
e1:SetTarget(c71400028.tg1)
e1:SetOperation(c71400028.op1)
c:RegisterEffect(e1)
--setcode
--corrupt
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetDescription(aux.Stringid(71400028,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(c71400028.con2)
e2:SetTarget(c71400028.tg2)
e2:SetCode(EFFECT_ADD_SETCODE)
e2:SetValue(0x714)
e2:SetOperation(c71400028.op2)
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)
function c71400028.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 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)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
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)
function c71400028.con2(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)
function c71400028.filter2(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
function c71400028.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400028.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_LMATERIAL) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c71400028.op3(e,tp,eg,ep,ev,re,r,rp)
function c71400028.op2(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 not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_LMATERIAL) then return end
local g=Duel.SelectMatchingCard(tp,c71400028.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst()
Duel.SpecialSummon(tc,SUMMON_TYPE_LINK,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
end
end
\ No newline at end of file
......@@ -2,7 +2,7 @@
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))
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,99,yume.YumeCheck(c))
c:EnableReviveLimit()
--summon limit
yume.AddYumeSummonLimit(c,1)
......
......@@ -3,89 +3,78 @@ xpcall(function() require("expansions/script/c71400001") end,function() require(
function c71400032.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--special summon
--rece
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:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_FZONE)
e1:SetTarget(c71400032.tg1)
e1:SetOperation(c71400032.op1)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(RACE_PLANT)
c:RegisterEffect(e1)
--tograve
--disable
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:SetDescription(aux.Stringid(71400032,0))
e2:SetCategory(CATEGORY_DISABLE+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCondition(c71400032.con2)
e2:SetTarget(c71400032.tg2)
e2:SetOperation(c71400032.op2)
c:RegisterEffect(e2)
--self to deck & field activation
--self to deck & activate field
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)
function c71400032.con2(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)
function c71400032.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c71400032.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c71400032.filter2,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,c71400032.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
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)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e)
and tc:IsType(TYPE_EFFECT) and not tc:IsImmuneToEffect(e) then
c:SetCardTarget(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c71400032.rcon)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_ATTACK)
tc:RegisterEffect(e2)
local g=Duel.GetMatchingGroup(c71400032.filter2a,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if Duel.IsExistingMatchingCard(c71400032.filter2b,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400032,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function c71400032.filter2(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
return c:IsFaceup() and c:IsRace(RACE_PLANT)
end
function c71400032.filter2a(c)
return c:IsSetCard(0xd714) and c:IsAbleToHand()
end
function c71400032.filter2b(c)
return c:IsSetCard(0x716) and c:IsType(TYPE_LINK) and c:IsFaceup()
end
function c71400032.rcon(e)
local c=e:GetHandler()
return e:GetOwner():IsHasCardTarget(c) and c:IsRace(RACE_PLANT)
end
\ No newline at end of file
......@@ -3,48 +3,85 @@ xpcall(function() require("expansions/script/c71400001") end,function() require(
function c71400034.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--todeck
--special summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_FZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetDescription(aux.Stringid(71400034,0))
e1:SetCountLimit(1)
e1:SetCost(c71400034.cost1)
e1:SetCondition(c71400034.con1)
e1:SetTarget(c71400034.tg1)
e1:SetOperation(c71400034.op1)
e1:SetCost(c71400034.cost1)
c:RegisterEffect(e1)
--self to deck & field activation
--todeck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetDescription(aux.Stringid(71400034,1))
e2:SetCost(c71400034.cost2)
e2:SetCondition(c71400034.con2)
e2:SetTarget(c71400034.tg2)
e2:SetOperation(c71400034.op2)
c:RegisterEffect(e2)
--self to deck & activate field
yume.AddYumeFieldGlobal(c,71400034,2)
end
function c71400034.filter1c(c)
return c:IsSetCard(0x714) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c71400034.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400034.filter1c,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c71400034.filter1c,1,1,REASON_COST+REASON_DISCARD,nil)
if chk==0 then return Duel.IsExistingMatchingCard(c71400034.filter1c,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c71400034.filter1c,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c71400034.filter1c(c)
function c71400034.filter1(c)
return c:IsSetCard(0x716) and c:IsLinkSummonable(nil)
end
function c71400034.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400034.filter1,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c71400034.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71400034.filter1,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.LinkSummon(tp,tc,nil)
end
end
function c71400034.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71400034.filter2c,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c71400034.filter2c,1,1,REASON_COST+REASON_DISCARD,nil)
end
function c71400034.filter2c(c)
return c:IsSetCard(0x7714) and c:IsType(TYPE_FIELD) and c:IsDiscardable()
end
function c71400034.con1(e,tp,eg,ep,ev,re,r,rp)
function c71400034.con2(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and (re:IsActiveType(TYPE_MONSTER)
or (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)))
end
function c71400034.filter1(c)
function c71400034.filter2(c)
return c:IsSetCard(0x716) and c:IsType(TYPE_LINK) and c:IsFaceup()
end
function c71400034.tg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsDestructable() end
if Duel.IsExistingMatchingCard(c71400034.filter1,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_TODECK+CATEGORY_REMOVE,eg,1,0,0)
else
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
function c71400034.filter2b(c,tp)
return c:IsAbleToRemove(tp) and not c71400034.filter2(c)
end
function c71400034.op1(e,tp,eg,ep,ev,re,r,rp)
function c71400034.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,eg,1,0,0)
end
function c71400034.op2(e,tp,eg,ep,ev,re,r,rp)
if not (e:GetHandler():IsRelateToEffect(e) and re:GetHandler():IsRelateToEffect(re)) then return end
if Duel.SendtoDeck(eg,nil,2,REASON_EFFECT)==1 then
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,nil,tp)
if Duel.IsExistingMatchingCard(c71400034.filter1,tp,LOCATION_ONFIELD,0,1,nil) and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400034,1)) then
local g=Duel.GetMatchingGroup(c71400034.filter2b,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,tp)
if Duel.IsExistingMatchingCard(c71400034.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(71400034,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
......
......@@ -3,7 +3,7 @@ xpcall(function() require("expansions/script/c71400001") end,function() require(
function c71400037.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--self to deck & field activation
--self to deck & activate field
yume.AddYumeFieldGlobal(c,71400037,1)
--spsummon
local e2=Effect.CreateEffect(c)
......
......@@ -3,7 +3,7 @@ xpcall(function() require("expansions/script/c71400001") end,function() require(
function c71400041.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--self to deck & field activation
--self to deck & activate field
yume.AddYumeFieldGlobal(c,71400041,2)
--to grave
local e1=Effect.CreateEffect(c)
......
......@@ -14,6 +14,7 @@ function c71400044.initial_effect(c)
c:RegisterEffect(e1)
--double attack
local e2=Effect.CreateEffect(c)
e2:SetCountLimit(1,71400044)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetDescription(aux.Stringid(71400044,1))
......
......@@ -3,7 +3,7 @@ xpcall(function() require("expansions/script/c71400001") end,function() require(
function c71400049.initial_effect(c)
--Activate
--See AddYumeFieldGlobal
--self to deck & field activation
--self to deck & activate field
yume.AddYumeFieldGlobal(c,71400049,1)
--special summon
local e1=Effect.CreateEffect(c)
......
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