Commit b250afbd authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 62e41110
No preview for this file type
......@@ -19,15 +19,12 @@ function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_FZONE)
--e2:SetTarget(cm.srtg)
e2:SetOperation(cm.srop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
......
......@@ -94,8 +94,10 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
if Duel.GetCurrentPhase()==PHASE_BATTLE then
c:ResetFlagEffect(m+1)
end
end
end
function cm.val(e,c)
......
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(64800085,"VrAqua")
--虚拟水神之剑
local m=64800085
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
......@@ -21,11 +22,12 @@ function cm.initial_effect(c)
e4:SetOperation(cm.atkop)
c:RegisterEffect(e4)
end
cm.VrAqua=true
function cm.cfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsFaceup()
end
function cm.cfilter1(c)
return rsva.IsSetM(c) and c:IsFaceup()
return c.VrAqua and c:IsFaceup()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
......
--虚拟水神剑士
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(64831500,"VrAqua")
local m=64831500
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--summon with no tribute
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetValue(1)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(cm.ntcon)
c:RegisterEffect(e1)
--cannot material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -35,6 +36,15 @@ function cm.initial_effect(c)
e5:SetOperation(cm.regop)
c:RegisterEffect(e5)
end
cm.VrAqua=true
function cm.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
function cm.ntcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
......@@ -58,6 +68,3 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
function cm.fuslimit(e,c,sumtype)
return sumtype==SUMMON_TYPE_FUSION
end
--虚拟水神之月
Duel.LoadScript("c64839999.lua")
local m,cm=rscf.DefineCard(64831501,"VrAqua")
if rsvraq then return end
rsva=cm
rscf.DefineSet(rsva,"VrAqua")
function rsva.filter_l(c)
return c:IsLevel(10)
end
function rsva.filter_ar(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_CYBERSE)
end
function rsva.filter_al(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(10)
end
function rsva.filter_rl(c)
return c:IsRace(RACE_CYBERSE) and c:IsLevel(10)
end
function rsva.filter_rl2(c)
return c:IsRace(RACE_CYBERSE) and c:IsLevel(4)
end
function rsva.filter_a(c)
return c:IsAttribute(ATTRIBUTE_WATER)
end
function rsva.Summon(tp,checkhint,isbreak,filter)
rsop.SelectOC(checkhint and {m,2} or nil,isbreak)
return rsop.SelectSolve(HINTMSG_SUMMON,tp,cm.sumfilter(filter),tp,LOCATION_HAND,0,1,1,nil,cm.sumfun,tp)
end
function cm.sumfilter(filter)
return function(c,tp)
return (not filter or filter(c,tp)) and c:IsSummonable(true,nil)
end
end
function cm.sumfun(g,tp)
local tc=g:GetFirst()
Duel.Summon(tp,tc,true,nil)
return true
end
function rsva.MonsterEffect(c,code,op)
local e1=rsef.STO(c,EVENT_SUMMON_SUCCESS,{m,3},{1,code},"se,th","de,dsp",nil,nil,rsop.target(cm.sfthfilter,"th",LOCATION_DECK),cm.sfthop)
local e2=rsef.RegisterClone(c,e1,"code",EVENT_FLIP)
local e3=rsef.QO(c,nil,{m,4},{1,code},"sum",nil,LOCATION_MZONE,nil,rscost.cost(Card.IsAbleToHandAsCost,"th"),rsop.target(cm.mesumfilter,"sum",LOCATION_HAND),cm.mesumop(op))
return e1,e2,e3
end
function cm.sfthfilter(c)
return c:IsAbleToHand() and (rsva.IsSetST(c) or rsva.filter_al(c))
end
function cm.sfthop(e,tp)
rsop.SelectToHand(tp,cm.sfthfilter,tp,LOCATION_DECK,0,1,1,nil,{})
end
function cm.mesumfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil)
end
function cm.mesumop(op)
return function(e,tp,...)
if op then op(e,tp,...) end
rsva.Summon(tp,false,false,cm.mesumfilter)
end
end
-----------------------------
local m=64831501
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m},"se,th",nil,nil,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.act)
local e2=rsef.I(c,{m,0},{1,m},"td,dr","tg",LOCATION_GRAVE,nil,aux.bfgcost,rstg.target({cm.tdfilter,"td",LOCATION_GRAVE,0,1,3,c},rsop.list(1,"dr",1)),cm.tdop)
end
function cm.thfilter(c)
return ((c:IsLevelBelow(4) and rsva.filter_ar(c)) or (c:IsType(TYPE_TRAP) and rsva.IsSet(c))) and c:IsAbleToHand()
end
function cm.act(e,tp)
rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--draw
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,m)
e4:SetCost(aux.bfgcost)
e4:SetTarget(cm.drtg)
e4:SetOperation(cm.drop)
c:RegisterEffect(e4)
end
cm.VrAqua=true
function cm.filter(c)
return ((c:IsLevelBelow(4) and c:IsRace(RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_WATER)) or (c.VrAqua and c:IsType(TYPE_TRAP))) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.tdfilter(c)
return rsva.IsSet(c) and c:IsAbleToDeck()
end
function cm.tdop(e,tp)
local tg=rsgf.GetTargetGroup()
if #tg>0 and Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)>0 then
local og=Duel.GetOperatedGroup()
if not og:IsExists(Card.IsLocation,1,nil,rsloc.de) then return end
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
Duel.ShuffleDeck(tp)
end
return c.VrAqua and c:IsAbleToDeck()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(cm.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,3,nil)
local ct=g:GetCount()
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,ct,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<=0 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--虚拟水神士兵
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(64831502,"VrAqua")
local m=64831502
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
local e1,e2,e3=rsva.MonsterEffect(c,m,cm.op)
--search
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e0:SetProperty(EFFECT_FLAG_DELAY)
e0:SetCode(EVENT_SUMMON_SUCCESS)
e0:SetCountLimit(1,m)
e0:SetTarget(cm.thtg)
e0:SetOperation(cm.thop)
c:RegisterEffect(e0)
local e1=e0:Clone()
e1:SetCode(EVENT_FLIP)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.op(e,tp)
cm.VrAqua=true
function cm.thfilter(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(10)) or (c.VrAqua and c:IsType(TYPE_SPELL+TYPE_TRAP))) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function cm.sumfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1,e2=rsef.FV_UPDATE({c,tp},"atk,def",cm.atkval,cm.atktg,{LOCATION_MZONE,0},cm.atkcon,rsreset.pend)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(cm.actcon)
e1:SetOperation(cm.actop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_BE_BATTLE_TARGET)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(cm.distg)
e3:SetValue(cm.atkval)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_UPDATE_DEFENSE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(cm.distg)
e4:SetValue(cm.atkval)
Duel.RegisterEffect(e4,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function cm.atkval(e,c)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)*800
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
local sc=Duel.GetAttackTarget()
if tc:IsControler(1-tp) then tc,sc=sc,tc end
return tc and sc and tc:IsControler(tp) and tc:IsLevel(10)
end
function cm.atktg(e,c)
return c:IsLevel(10) and (Duel.GetAttacker()==c or (Duel.GetAttackTarget() and Duel.GetAttackTarget()==c))
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetAttackTarget()
if tc:IsControler(1-tp) then tc=Duel.GetAttacker() end
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1)
Duel.AdjustInstantly(c)
end
function cm.atkcon(e)
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL
function cm.distg(e,c)
return c:GetFlagEffect(m)~=0
end
function cm.atkval(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*800
end
--虚拟水神忍者
--2022/2/1 remake by VHisc
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(64831503,"VrAqua")
local m=64831503
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,2))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,m+10000)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
--search
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e0:SetProperty(EFFECT_FLAG_DELAY)
e0:SetCode(EVENT_SUMMON_SUCCESS)
e0:SetCountLimit(1,m)
e0:SetTarget(cm.thtg)
e0:SetOperation(cm.thop)
c:RegisterEffect(e0)
local e1=e0:Clone()
e1:SetCode(EVENT_FLIP)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+10000)
e3:SetCost(cm.cost)
e3:SetTarget(cm.smtg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
end
--e1e2
cm.VrAqua=true
function cm.thfilter(c)
return c:IsAbleToHand() and ((rsva.IsSetST(c) and not c:IsType(TYPE_MONSTER)) or (c:IsRace(RACE_CYBERSE) and c:IsLevel(10)))
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(10)) or (c.VrAqua and c:IsType(TYPE_SPELL+TYPE_TRAP))) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -45,18 +45,18 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
end
end
--e3
function cm.smtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,0)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function cm.op(e,tp)
if Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) then
function cm.sumfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
......@@ -66,24 +66,29 @@ function cm.op(e,tp)
e1:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function cm.cssfilter(c)
return c:IsFaceup() and c:IsLevel(10)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION)
return rscon.excard2(rsva.filter_l,LOCATION_MZONE)(e,tp) and loc & LOCATION_MZONE ~=0
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return loc==LOCATION_MZONE and re:IsActiveType(TYPE_MONSTER)
and Duel.IsExistingMatchingCard(cm.cssfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.desop(e,tp)
if Duel.GetFlagEffect(tp,m)==0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33200119,0))
then
if Duel.GetFlagEffect(tp,m)==0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_CARD,0,m)
rsop.SelectDestroy(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,{})
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
end
function cm.sumfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil)
end
--虚拟水神天使
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(64831504,"VrAqua")
local m=64831504
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
local e1=rsef.QO(c,nil,{m,0},{1,m},"sp",nil,LOCATION_HAND,cm.spcon,nil,rsop.target(rscf.spfilter2(),"sp"),cm.spop)
local e2=rsef.QO(c,nil,{m,1},{1,m+1},"sum",nil,LOCATION_MZONE,rscon.phmp,rscost.cost(Card.IsAbleToHandAsCost,"th"),rsop.target(rsva.mesumfilter,"sum",LOCATION_HAND),cm.sumop)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.cpcon)
e1:SetTarget(cm.cptg)
e1:SetOperation(cm.cpop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.spcon)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.cfilter1(c)
cm.VrAqua=true
function cm.cpfilter(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE)
end
function cm.spcon(e,tp)
local b1=Duel.IsExistingMatchingCard(cm.cfilter1,tp,LOCATION_MZONE,0,1,nil) and not Duel.IsExistingMatchingCard(cm.cfilter1,tp,0,LOCATION_MZONE,1,nil)
local b2=not Duel.IsExistingMatchingCard(Card.IsSummonType,tp,LOCATION_MZONE,0,1,nil,SUMMON_TYPE_SPECIAL) and Duel.IsExistingMatchingCard(Card.IsSummonType,tp,0,LOCATION_MZONE,1,nil,SUMMON_TYPE_SPECIAL)
return b1 or b2
function cm.cpcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,0,LOCATION_MZONE,1,nil,LOCATION_EXTRA) and not Duel.IsExistingMatchingCard(Card.IsSummonLocation,tp,LOCATION_MZONE,0,1,nil,LOCATION_EXTRA))
or (Duel.IsExistingMatchingCard(cm.cpfilter,tp,LOCATION_MZONE,0,1,nil)
and not Duel.IsExistingMatchingCard(cm.cpfilter,tp,0,LOCATION_MZONE,1,nil))
end
function cm.spop(e,tp)
local c=aux.ExceptThisCard(e)
if c then rssf.SpecialSummon(c) end
function cm.cptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.sumop(e,tp)
local e1=rsef.FV_LIMIT_PLAYER({e:GetHandler(),tp},"act",cm.val,nil,{0,1},nil,rsreset.pend)
rsva.Summon(tp,false,false,rsva.mesumfilter)
function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function cm.sumfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsLevel(10)
end
function cm.val(e,re)
function cm.aclimit(e,re,tp)
local rc=re:GetHandler()
local g=Duel.GetMatchingGroup(cm.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
local ag,atk=g:GetMaxGroup(Card.GetAttack)
......
--虚拟水神泳者
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(64831506,"VrAqua")
local m=64831506
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
local e1,e2,e3=rsva.MonsterEffect(c,m,cm.op)
--search
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e0:SetProperty(EFFECT_FLAG_DELAY)
e0:SetCode(EVENT_SUMMON_SUCCESS)
e0:SetCountLimit(1,m)
e0:SetTarget(cm.thtg)
e0:SetOperation(cm.thop)
c:RegisterEffect(e0)
local e1=e0:Clone()
e1:SetCode(EVENT_FLIP)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.op(e,tp)
cm.VrAqua=true
function cm.thfilter(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(10)) or (c.VrAqua and c:IsType(TYPE_SPELL+TYPE_TRAP))) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function cm.sumfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=rsef.FV_CANNOT_BE_TARGET({c,tp},"effect",aux.tgoval,cm.tg,{LOCATION_MZONE,0},nil,rsreset.pend)
local e2=rsef.FV_INDESTRUCTABLE({c,tp},"effect",1,cm.tg,{LOCATION_MZONE,0},nil,rsreset.pend)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(cm.efftg)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.efftg)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(1)
Duel.RegisterEffect(e2,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function cm.tg(e,c)
return c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsLevel(10)
function cm.efftg(e,c)
return c:IsLevel(10) and c:IsSummonType(SUMMON_TYPE_NORMAL)
end
--虚拟水神旅者
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(64831507,"VrAqua")
local m=64831507
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
local e1,e2,e3=rsva.MonsterEffect(c,m,cm.op)
--search
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e0:SetProperty(EFFECT_FLAG_DELAY)
e0:SetCode(EVENT_SUMMON_SUCCESS)
e0:SetCountLimit(1,m)
e0:SetTarget(cm.thtg)
e0:SetOperation(cm.thop)
c:RegisterEffect(e0)
local e1=e0:Clone()
e1:SetCode(EVENT_FLIP)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(cm.spcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.op(e,tp)
cm.VrAqua=true
function cm.thfilter(c)
return ((c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(10)) or (c.VrAqua and c:IsType(TYPE_SPELL+TYPE_TRAP))) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function cm.sumfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsSummonable(true,nil)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=rsef.FC({c,tp},EVENT_CHAIN_SOLVING,nil,nil,nil,nil,cm.negcon,cm.negop,rsreset.pend)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetTarget(cm.negcon)
e1:SetOperation(cm.negop)
e1:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Summon(tp,tc,true,nil)
end
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsLevel(10)
......@@ -17,10 +81,10 @@ function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.negop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rsop.SelectYesNo(tp,{m,0}) then
if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.PayLPCost(tp,800)
Duel.Hint(HINT_CARD,0,m)
Duel.RegisterFlagEffect(tp,m,rsreset.pend,0,1)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
Duel.NegateEffect(ev)
end
end
--虚拟水神战士
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(64831508,"VrAqua")
local m=64831508
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--summon with no tribute
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SUMMON_PROC)
e0:SetCondition(cm.ntcon)
c:RegisterEffect(e0)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetValue(1)
e1:SetCondition(cm.con)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,m)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e2=rsef.STF(c,EVENT_SUMMON_SUCCESS,{m,1},{1,m},"tg,atk",nil,nil,nil,rsop.target(cm.tgfilter,"tg",LOCATION_MZONE+LOCATION_HAND,0,1,1,c),cm.tgop)
local e3=rsef.QO(c,nil,{m,2},{1,m+1},"rec","ptg",LOCATION_MZONE,rscon.phase("mp1_o","mp2_o"),nil,rsop.target(100,"rec"),cm.recop)
--link summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+1)
e2:SetCondition(cm.lpcon)
e2:SetTarget(cm.lptg)
e2:SetOperation(cm.lpop)
c:RegisterEffect(e2)
end
cm.VrAqua=true
function cm.cfilter(c)
return c:IsFacedown() or not c:IsRace(RACE_CYBERSE)
return c:IsFaceup() and not c:IsRace(RACE_CYBERSE)
end
function cm.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and not Duel.IsExistingMatchingCard(cm.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function cm.filter(c)
return c.VrAqua and c:IsType(TYPE_MONSTER) and c:IsFaceupEx() and c:IsAbleToGrave()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.con(e)
return not Duel.IsExistingMatchingCard(cm.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,c)
Duel.SendtoGrave(g,REASON_EFFECT)
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_SELF_TURN+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_SELF_TURN+RESET_PHASE+PHASE_END,2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(aux.indoval)
c:RegisterEffect(e4)
end
end
function cm.tgfilter(c)
return c:IsAbleToGrave() and rsva.IsSetM(c)
function cm.lpcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function cm.tgop(e,tp)
if rsop.SelectToGrave(tp,cm.tgfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,aux.ExceptThisCard(e),{})<=0 then return end
local c=rscf.GetFaceUpSelf(e)
if not c then return end
Duel.BreakEffect()
local e1,e2=rscf.QuickBuff(c,"atk+,def+",1000,"reset",{rsreset.est_pend+RESET_DISABLE+RESET_SELF_TURN,2})
local e3=rsef.SV_INDESTRUCTABLE(c,"battle",1,nil,{rsreset.est_pend+RESET_SELF_TURN,2},"cd")
local e3=rsef.SV_INDESTRUCTABLE(c,"effect",aux.indoval,nil,{rsreset.est_pend+RESET_SELF_TURN,2},"cd")
function cm.lptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(100)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,100)
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
function cm.lpop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--虚拟水神都市 狄拉克之渊
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(64831510,"VrAqua")
local m=64831510
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsef.FTO(c,EVENT_SUMMON_SUCCESS,{m,0},{1,m},nil,"de",LOCATION_FZONE,cm.setcon,nil,rsop.target(cm.setfilter,nil,rsloc.dg),cm.setop)
local e3=rsef.FTO(c,EVENT_CHAIN_SOLVING,{m,1},{1,m},"se,th,sum","de",LOCATION_FZONE,cm.thcon,nil,rsop.target(cm.thfilter,"th",LOCATION_DECK),cm.thop)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rsva.IsSetST(rc) and (not rc:IsRelateToEffect(re) or rc~=c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--synchro summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.setcon)
e1:SetTarget(cm.settg)
e1:SetOperation(cm.setop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.thcon)
e3:SetTarget(cm.thtg)
e3:SetOperation(cm.thop)
c:RegisterEffect(e3)
end
function cm.cfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and (rsva.filter_rl2(c) or rsva.filter_al(c))
cm.VrAqua=true
function cm.sfilter(c,tp)
return c:IsFaceup() and ((c:IsRace(RACE_CYBERSE) and c:IsLevel(4)) or (c:IsAttribute(ATTRIBUTE_WATER) or c:IsLevel(10))) and c:IsControler(tp)
end
function cm.setcon(e,tp,eg)
return eg:IsExists(cm.cfilter,1,nil,tp)
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.sfilter,1,nil,tp)
end
function cm.setfilter(c)
return rsva.IsSetST(c) and c:IsSSetable()
end
function cm.setop(e,tp)
local c=aux.ExceptThisCard(e)
if not c then return end
local ct,og,tc=rsop.SelectSSet(tp,aux.NecroValleyFilter(cm.setfilter),tp,rsloc.dg,0,1,1,nil,{})
if tc and Duel.GetTurnPlayer()~=tp then
if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(c)
return c.VrAqua and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
if tc:IsType(TYPE_QUICKPLAY) and Duel.GetTurnPlayer()==1-tp then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
if tc:IsType(TYPE_TRAP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if tc:IsType(TYPE_TRAP) and Duel.GetTurnPlayer()==1-tp then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc.VrAqua
end
function cm.thfilter(c)
return c:IsLevel(10) and c:IsAbleToHand()
end
function cm.thop(e,tp)
if not aux.ExceptThisCard(e) then return end
if rsop.SelectToHand(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil,{})>0 then
return rsva.Summon(tp,true,true,rsva.filter_ar)
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsRace(RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
local tc=sg:GetFirst()
Duel.Summon(tp,tc,true,nil)
end
end
end
end
--虚拟水神要塞 特洛伊之墙
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(64831511,"VrAqua")
local m=64831511
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m,1})
e1:SetTarget(cm.tg)
e1:SetOperation(cm.act)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e2:SetCost(cm.cost)
e2:SetTarget(cm.tstg)
e2:SetOperation(cm.tsop)
c:RegisterEffect(e2)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e3:SetCost(cm.cost)
e3:SetOperation(cm.activate)
c:RegisterEffect(e3)
end
function cm.thfilter1(c)
return c:IsAbleToHand() and rsva.IsSetM(c)
cm.VrAqua=true
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.thfilter2(c)
return c:IsAbleToHand() and rsva.IsSet(c) and not c:IsCode(m)
function cm.thfilter(c)
return c.VrAqua and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.thfilter1,tp,rsloc.dg,0,1,nil)
local b2=Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_GRAVE,0,1,nil)
local b3=true
if chk==0 then return b1 or b2 or b3 end
local op=rsop.SelectOption(tp,b1,{m,0},b2,{m,1},b3,{m,2})
if op==1 then
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,rsloc.dg)
elseif op==2 then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
else
e:SetCategory(0)
end
e:SetLabel(op)
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.act(e,tp)
local c=e:GetHandler()
local op=e:GetLabel()
if op==1 then
if rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter1),tp,rsloc.dg,0,1,1,nil,{})>0 then
--VHisc Repairing 2021/10/12
if Duel.IsExistingMatchingCard(c64831511.sumfilter,tp,LOCATION_HAND,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(64831511,3)) then
function cm.sumfilter(c)
return c:IsSummonable(true,nil) and c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(cm.sumfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,c64831511.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local sg=Duel.SelectMatchingCard(tp,cm.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
local tc=sg:GetFirst()
Duel.Summon(tp,tc,true,nil)
end
end
--------------------
end
elseif op==2 then
if rsop.SelectToHand(tp,aux.NecroValleyFilter(cm.thfilter2),tp,LOCATION_GRAVE,0,1,1,nil,{})>0
--VHisc Repairing 2021/11/6
and Duel.IsExistingMatchingCard(c64831511.sumfilter2,tp,LOCATION_HAND,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(64831511,3))
--------------------
then
--old version:
--rsva.Summon(tp,true,true,rsva.filter_al)
--------------------
end
function cm.tsfilter(c)
return c.VrAqua and not c:IsCode(m) and c:IsAbleToHand()
end
function cm.tstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tsfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.ssmfilter(c)
return c:IsSummonable(true,nil) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(10)
end
function cm.tsop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tsfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(cm.ssmfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,c64831511.sumfilter2,tp,LOCATION_HAND,0,1,1,nil)
local sg=Duel.SelectMatchingCard(tp,cm.ssmfilter,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
local tc=sg:GetFirst()
Duel.Summon(tp,tc,true,nil)
end
--------------------
end
else
local e1=Effect.CreateEffect(c)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_DISEFFECT)
e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetValue(cm.effectfilter)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=rsef.RegisterClone({c,tp},e1,"code",EFFECT_CANNOT_INACTIVATE)
end
if c:IsRelateToEffect(e) and c:IsCanTurnSet() and rscon.excard2(rsva.filter_ar,LOCATION_MZONE,0,1)(e,tp) then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetValue(cm.effectfilter)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function cm.effectfilter(e,ct)
local te=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT)
local rc=te:GetHandler()
return rsva.IsSet(rc) and rc:IsControler(e:GetHandlerPlayer())
end
--Repairing 2021/10/12 and 2021/11/6
function c64831511.sumfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsSummonable(true,nil)
end
function c64831511.sumfilter2(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsLevel(10) and c:IsSummonable(true,nil)
local p=e:GetHandler():GetControler()
local te,tp=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
local tc=te:GetHandler()
return p==tp and tc.VrAqua
end
--虚拟水神的乱流
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(64831512,"VrAqua")
local m=64831512
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,{1,m,1},"rm",nil,rscon.excard2(rsva.filter_a,LOCATION_MZONE),nil,cm.tg,cm.act)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.con)
e1:SetCost(cm.cost)
e1:SetTarget(cm.rmtg)
e1:SetOperation(cm.rmop)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(cm.con)
e2:SetCost(cm.cost)
e2:SetTarget(cm.rmtg)
e2:SetOperation(cm.rmop)
c:RegisterEffect(e2)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e3:SetCondition(cm.con)
e3:SetCost(cm.cost)
e3:SetTarget(cm.rrtg)
e3:SetOperation(cm.rrop)
c:RegisterEffect(e3)
end
cm.VrAqua=true
function cm.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.rmfilter1(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.rmfilter2(c)
return c:IsFaceup() and c:IsType(TYPE_TRAP) and c:IsAbleToRemove()
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function cm.rmfilter3(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
function cm.dfilter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsRace(RACE_CYBERSE) and c:IsLevel(10)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.rmfilter1,tp,0,rsloc.og,1,nil)
local b2=Duel.IsExistingMatchingCard(cm.rmfilter2,tp,0,rsloc.og,1,nil)
local b3=Duel.IsExistingMatchingCard(cm.rmfilter3,tp,0,rsloc.og,1,nil)
if chk==0 then return b1 or b2 or b3 end
local op=rsop.SelectOption(tp,b1,{m,0},b2,{m,1},b3,{m,2})
e:SetLabel(op)
function cm.rmfilter(c)
return c:IsFaceupEx() and c:IsType(TYPE_SPELL) and c:IsAbleToRemove()
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_NORMAL) and rsva.filter_rl(c)
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.act(e,tp)
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op=e:GetLabel()
if op==1 then
if rsop.SelectRemove(tp,aux.NecroValleyFilter(cm.rmfilter1),tp,0,rsloc.og,1,1,nil,{})>0 and Duel.GetOperatedGroup():GetFirst():IsLocation(LOCATION_REMOVED) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) then
local e1=rsef.FV_LIMIT({c,tp},"dis",nil,aux.TargetBoolFunction(Card.IsType,TYPE_SPELL),{ 0,LOCATION_ONFIELD },nil,rsreset.pend)
end
elseif op==2 then
if rsop.SelectRemove(tp,aux.NecroValleyFilter(cm.rmfilter2),tp,0,rsloc.og,1,1,nil,{})>0 and Duel.GetOperatedGroup():GetFirst():IsLocation(LOCATION_REMOVED) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) then
local e1=rsef.FV_LIMIT({c,tp},"dis",nil,aux.TargetBoolFunction(Card.IsType,TYPE_TRAP),{ 0,LOCATION_ONFIELD },nil,rsreset.pend)
end
else
local ct,og,tc=rsop.SelectRemove(tp,aux.NecroValleyFilter(cm.rmfilter3),tp,0,rsloc.og,1,1,nil,{})
if tc and tc:IsType(TYPE_MONSTER) and tc:IsLocation(LOCATION_REMOVED) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rmfilter),tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_MZONE,0,1,nil) then
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_SZONE)
e1:SetTarget(cm.distg)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.distg(e,c)
return c:IsType(TYPE_SPELL)
end
function cm.rsfilter(c)
return c:IsFaceupEx() and c:IsType(TYPE_TRAP) and c:IsAbleToRemove()
end
function cm.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.rsfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rsfilter),tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_MZONE,0,1,nil) then
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(cm.discon)
e2:SetOperation(cm.disop)
e2:SetLabelObject(tc)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(0,LOCATION_SZONE)
e2:SetTarget(cm.drstg)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
--disable trap monster
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(cm.drstg)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
end
end
function cm.distg(e,c)
function cm.drstg(e,c)
return c:IsType(TYPE_TRAP)
end
function cm.rrfilter(c)
return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function cm.rrtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.rrfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.rrop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.rrfilter),tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local tc=g:GetFirst()
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DISABLE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(cm.ddstg)
e4:SetLabelObject(tc)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_CHAIN_SOLVING)
e5:SetCondition(cm.ddscon)
e5:SetOperation(cm.ddsop)
e5:SetLabelObject(tc)
e5:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e5,tp)
end
end
function cm.ddstg(e,c)
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule()) and (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0)
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
function cm.ddscon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
function cm.ddsop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--虚拟水神一闪
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(64831513,"VrAqua")
local m=64831513
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
local e1=rsef.ACT(c,EVENT_CHAINING,nil,{1,m,1},"neg,des",nil,cm.con,nil,cm.tg,cm.act)
--Activate(effect)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
if not rscon.excard2(rsva.filter_ar,LOCATION_MZONE)(e,tp) then return false end
cm.VrAqua=true
function cm.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_WATER)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
if not Duel.IsChainNegatable(ev) then return false end
return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
if rscon.excard2(rsva.filter_l,LOCATION_MZONE)(e,tp) and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
e:SetLabel(100)
else
e:SetLabel(0)
end
end
function cm.act(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 and e:GetLabel()==100 then
local e1=rsef.FV_LIMIT_PLAYER({e:GetHandler(),tp},"act",cm.val(rc),nil,{0,1},nil,{rsreset.pend+RESET_OPPO_TURN,2})
end
function cm.dfilter(c)
return c:IsFaceup() and c:IsLevel(10)
end
function cm.val(rc)
return function(e,re)
return re:GetHandler():IsCode(rc:GetCode())
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
if Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_MZONE,0,1,nil) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(cm.aclimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.aclimit(e,re,tp)
local c=re:GetHandler()
local tc=e:GetLabelObject()
return c:IsOriginalCodeRule(tc:GetOriginalCodeRule())
end
--虚拟水神喵咪
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(81009041,"VrAqua")
--虚拟水神奇遇家
local m=81009041
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......@@ -37,8 +39,9 @@ function cm.initial_effect(c)
e3:SetOperation(cm.regop)
c:RegisterEffect(e3)
end
cm.VrAqua=true
function cm.cfilter(c)
return c:IsFacedown() or not rsva.IsSetM(c)
return c:IsFacedown() or not c.VrAqua
end
function cm.nscon(e,c,minc)
if c==nil then return true end
......
--虚拟水神随拍
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(81009042,"VrAqua")
local m=81009042
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Normal Summon
local e1=Effect.CreateEffect(c)
......@@ -25,6 +26,7 @@ function cm.initial_effect(c)
e2:SetOperation(cm.drop)
c:RegisterEffect(e2)
end
cm.VrAqua=true
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
......@@ -58,7 +60,7 @@ function cm.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
function cm.drfilter(c)
return rsva.IsSet(c) and c:IsAbleToDeck() and not c:IsPublic()
return c.VrAqua and c:IsAbleToDeck() and not c:IsPublic()
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp)
......
--虚拟水神女仆长
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(81009043,"VrAqua")
local m=81009043
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
......@@ -24,6 +25,7 @@ function cm.initial_effect(c)
e5:SetCode(EVENT_FLIP)
c:RegisterEffect(e5)
end
cm.VrAqua=true
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
......
--虚拟水神之忆
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(81009044,"VrAqua")
local m=81009044
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
......@@ -13,12 +14,13 @@ function cm.initial_effect(c)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
cm.VrAqua=true
function cm.thcfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_CYBERSE) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost() and c:IsFaceupEx()
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE,0,1,nil,c:GetCode())
end
function cm.thfilter(c,code)
return c:IsType(TYPE_MONSTER) and rsva.IsSetM(c) and not c:IsCode(code) and c:IsAbleToHand()
return c:IsType(TYPE_MONSTER) and c.VrAqua and not c:IsCode(code) and c:IsAbleToHand()
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thcfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end
......
--虚拟水神学妹
Duel.LoadScript("c64831501.lua")
local m,cm=rscf.DefineCard(81009045,"VrAqua")
--虚拟水神偶像
local m=81009045
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
......@@ -28,8 +29,9 @@ function cm.initial_effect(c)
e3:SetCode(EVENT_FLIP)
c:RegisterEffect(e3)
end
cm.VrAqua=true
function cm.thfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and rsva.IsSet(c) and c:IsAbleToHand()
return c:IsFaceupEx() and c.VrAqua and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
......
......@@ -31,6 +31,7 @@ function c88178020.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,88179920)
e3:SetTarget(c88178020.tgtg)
e3:SetOperation(c88178020.tgop)
c:RegisterEffect(e3)
......
......@@ -51,6 +51,7 @@ function c88178056.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_AVOID_BATTLE_DAMAGE) and Duel.GetBattleDamage(tp)>0 end
end
function c88178056.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
......
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