Commit 075332a5 authored by POLYMER's avatar POLYMER

update 251124

parent fca7db3b
...@@ -7135,6 +7135,8 @@ ...@@ -7135,6 +7135,8 @@
95004010 0 95004010 0
95004020 0 95004020 0
95019901 0 95019901 0
10200107 0
10200108 0
#limit #limit
33403513 1 33403513 1
82204250 0 82204250 0
......
No preview for this file type
expansions/pics/66680215.jpg

49.9 KB | W: | H:

expansions/pics/66680215.jpg

50 KB | W: | H:

expansions/pics/66680215.jpg
expansions/pics/66680215.jpg
expansions/pics/66680215.jpg
expansions/pics/66680215.jpg
  • 2-up
  • Swipe
  • Onion skin
--幻叙·显鳞之龙巫女 LV3
function c10200102.initial_effect(c)
-- 主动等级上升
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10200102,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,10200102)
e1:SetOperation(c10200102.lvop1)
c:RegisterEffect(e1)
-- 等级上升
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200102,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_RELEASE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,10200103)
e2:SetCondition(c10200102.lvcon2a)
e2:SetOperation(c10200102.lvop2)
c:RegisterEffect(e2)
local e2b=e2:Clone()
e2b:SetCode(EVENT_BE_MATERIAL)
e2b:SetCondition(c10200102.lvcon2b)
c:RegisterEffect(e2b)
-- 1星效果
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_PROPERTY_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetCondition(c10200102.lv1con)
e3:SetValue(1)
c:RegisterEffect(e3)
local e3b=Effect.CreateEffect(c)
e3b:SetType(EFFECT_TYPE_SINGLE)
e3b:SetProperty(EFFECT_PROPERTY_SINGLE_RANGE)
e3b:SetRange(LOCATION_MZONE)
e3b:SetCode(EFFECT_UPDATE_DEFENSE)
e3b:SetCondition(c10200102.lv1con)
e3b:SetValue(1000)
c:RegisterEffect(e3b)
-- 2星效果
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10200102,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DAMAGE_STEP_END)
e4:SetCondition(c10200102.lv2con)
e4:SetTarget(c10200102.destg)
e4:SetOperation(c10200102.desop)
c:RegisterEffect(e4)
-- 3星效果
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10200102,3))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c10200102.lv3con)
e5:SetTarget(c10200102.thtg)
e5:SetOperation(c10200102.thop)
c:RegisterEffect(e5)
-- 升级
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(10200102,4))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_MZONE)
e6:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e6:SetCondition(c10200102.spcon)
e6:SetCost(c10200102.spcost)
e6:SetTarget(c10200102.sptg)
e6:SetOperation(c10200102.spop)
c:RegisterEffect(e6)
end
c10200102.lvup={10200104}
-- 1
function c10200102.lvop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
-- 2
function c10200102.lvfilter2(c)
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c10200102.lvcon2a(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10200102.lvfilter2,1,nil)
end
function c10200102.lvcon2b(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10200102.lvfilter2,1,nil)
and (r&(REASON_FUSION+REASON_SYNCHRO+REASON_XYZ+REASON_LINK))~=0
end
function c10200102.lvop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local ct=eg:FilterCount(c10200102.lvfilter2,nil)
if ct>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(ct)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
end
-- 3
function c10200102.lv1con(e)
return e:GetHandler():GetLevel()>=1
end
-- 4
function c10200102.lv2con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()>=2 and e:GetHandler():IsRelateToBattle()
end
function c10200102.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200102.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
-- 5
function c10200102.lv3con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()>=3
end
function c10200102.thfilter(c)
return c:IsSetCard(0x838) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c10200102.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10200102.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200102.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10200102.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
-- 6
function c10200102.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()==3
end
function c10200102.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c10200102.spfilter(c,e,tp)
return c:IsCode(10200104) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10200102.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c10200102.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200102.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10200102.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--幻叙·显鳞之龙巫女 LV6
function c10200104.initial_effect(c)
c:EnableReviveLimit()
-- 不能通常召唤
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.FALSE)
c:RegisterEffect(e0)
-- 主动等级上升
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10200104,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,10200104)
e1:SetOperation(c10200104.lvop1)
c:RegisterEffect(e1)
-- 等级上升
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200104,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_RELEASE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,10200105)
e2:SetCondition(c10200104.lvcon2a)
e2:SetOperation(c10200104.lvop2)
c:RegisterEffect(e2)
local e2b=e2:Clone()
e2b:SetCode(EVENT_BE_MATERIAL)
e2b:SetCondition(c10200104.lvcon2b)
c:RegisterEffect(e2b)
-- 4星效果
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10200104,2))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c10200104.lv4con)
e3:SetTarget(c10200104.atktg)
e3:SetOperation(c10200104.atkop)
c:RegisterEffect(e3)
-- 5星效果:直接攻击
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_PROPERTY_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_DIRECT_ATTACK)
e4:SetCondition(c10200104.lv5con)
c:RegisterEffect(e4)
-- 5星效果:不受对方魔陷影响
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_PROPERTY_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetCondition(c10200104.lv5con)
e5:SetValue(c10200104.efilter)
c:RegisterEffect(e5)
-- 6星效果:对方战阶不能发动
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_PROPERTY_PLAYER_TARGET)
e6:SetCode(EFFECT_CANNOT_ACTIVATE)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(0,1)
e6:SetCondition(c10200104.lv6con)
e6:SetValue(c10200104.aclimit)
c:RegisterEffect(e6)
-- 6星效果:对方怪兽攻击力-1000
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_UPDATE_ATTACK)
e7:SetRange(LOCATION_MZONE)
e7:SetTargetRange(0,LOCATION_MZONE)
e7:SetCondition(c10200104.lv6con)
e7:SetValue(-1000)
c:RegisterEffect(e7)
-- 升级
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(10200104,3))
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCode(EVENT_FREE_CHAIN)
e8:SetRange(LOCATION_MZONE)
e8:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e8:SetCondition(c10200104.spcon)
e8:SetCost(c10200104.spcost)
e8:SetTarget(c10200104.sptg)
e8:SetOperation(c10200104.spop)
c:RegisterEffect(e8)
end
c10200104.lvup={10200106}
c10200104.lvdn={10200102}
-- 1
function c10200104.lvop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
-- 2
function c10200104.lvfilter2(c)
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c10200104.lvcon2a(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10200104.lvfilter2,1,nil)
end
function c10200104.lvcon2b(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10200104.lvfilter2,1,nil)
and (r&(REASON_FUSION+REASON_SYNCHRO+REASON_XYZ+REASON_LINK))~=0
end
function c10200104.lvop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local ct=eg:FilterCount(c10200104.lvfilter2,nil)
if ct>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(ct)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
end
-- 3
function c10200104.lv4con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()>=4
end
function c10200104.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200104.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
end
end
-- 4
function c10200104.lv5con(e)
return e:GetHandler():GetLevel()>=5
end
function c10200104.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
-- 5
function c10200104.lv6con(e)
return e:GetHandler():GetLevel()>=6
end
function c10200104.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP) and Duel.IsBattlePhase()
end
-- 6
function c10200104.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()==6
end
function c10200104.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c10200104.spfilter(c,e,tp)
return c:IsCode(10200106) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function c10200104.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c10200104.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200104.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10200104.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
end
end
--幻叙·深渊之龙巫女 LV9
function c10200106.initial_effect(c)
c:EnableReviveLimit()
-- 不能通常召唤
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.FALSE)
c:RegisterEffect(e0)
-- 等级上升
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10200106,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_RELEASE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,10200106)
e1:SetCondition(c10200106.lvcon1a)
e1:SetOperation(c10200106.lvop1)
c:RegisterEffect(e1)
local e1b=e1:Clone()
e1b:SetCode(EVENT_BE_MATERIAL)
e1b:SetCondition(c10200106.lvcon1b)
c:RegisterEffect(e1b)
-- 7星效果
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200106,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c10200106.lv7con)
e2:SetTarget(c10200106.lv7tg)
e2:SetOperation(c10200106.lv7op)
c:RegisterEffect(e2)
-- 8星效果:对方怪兽效果无效
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(c10200106.lv8con)
e3:SetTarget(c10200106.distg)
c:RegisterEffect(e3)
-- 8星效果:不能改变表示形式
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetCondition(c10200106.lv8con)
c:RegisterEffect(e4)
-- 9星效果
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10200106,2))
e5:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE+CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c10200106.lv9con)
e5:SetTarget(c10200106.lv9tg)
e5:SetOperation(c10200106.lv9op)
c:RegisterEffect(e5)
-- 升级
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(10200106,3))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_MZONE)
e6:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e6:SetCondition(c10200106.spcon)
e6:SetCost(c10200106.spcost)
e6:SetTarget(c10200106.sptg)
e6:SetOperation(c10200106.spop)
c:RegisterEffect(e6)
end
c10200106.lvup={10200107}
c10200106.lvdn={10200104}
-- 1
function c10200106.lvfilter1(c)
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c10200106.lvcon1a(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10200106.lvfilter1,1,nil)
end
function c10200106.lvcon1b(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10200106.lvfilter1,1,nil)
and (r&(REASON_FUSION+REASON_SYNCHRO+REASON_XYZ+REASON_LINK))~=0
end
function c10200106.lvop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local ct=eg:FilterCount(c10200106.lvfilter1,nil)
if ct>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(ct)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
end
-- 2
function c10200106.lv7con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()>=7 and rp~=tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c10200106.lv7tg(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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200106.lv7op(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
-- 3
function c10200106.lv8con(e)
return e:GetHandler():GetLevel()>=8
end
function c10200106.distg(e,c)
return c:IsFaceup()
end
-- 4
function c10200106.lv9con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()>=9
end
function c10200106.lv9tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200106.lv9op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_GRAVE,0,1,1,nil)
if #g>0 and Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
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(500)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
Duel.Recover(tp,1000,REASON_EFFECT)
end
end
-- 5
function c10200106.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()==9
end
function c10200106.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c10200106.spfilter(c,e,tp)
return c:IsCode(10200107) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function c10200106.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c10200106.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200106.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10200106.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
g:GetFirst():CompleteProcedure()
end
end
--幻叙·灾厄之龙巫女 LV11
function c10200107.initial_effect(c)
c:EnableReviveLimit()
-- 不能通常召唤
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.FALSE)
c:RegisterEffect(e0)
-- 等级上升
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10200107,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_RELEASE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,10200107)
e1:SetCondition(c10200107.lvcon1a)
e1:SetOperation(c10200107.lvop1)
c:RegisterEffect(e1)
local e1b=e1:Clone()
e1b:SetCode(EVENT_BE_MATERIAL)
e1b:SetCondition(c10200107.lvcon1b)
c:RegisterEffect(e1b)
-- 10星效果
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10200107,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c10200107.lv10con)
e2:SetTarget(c10200107.lv10tg)
e2:SetOperation(c10200107.lv10op)
c:RegisterEffect(e2)
-- 11星效果:攻击力翻倍
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_PROPERTY_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetCondition(c10200107.lv11con)
e3:SetValue(c10200107.atkval)
c:RegisterEffect(e3)
-- 11星效果:3次攻击
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_PROPERTY_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_EXTRA_ATTACK)
e4:SetCondition(c10200107.lv11con)
e4:SetValue(2)
c:RegisterEffect(e4)
-- 升级
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(10200107,2))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c10200107.spcon)
e5:SetCost(c10200107.spcost)
e5:SetTarget(c10200107.sptg)
e5:SetOperation(c10200107.spop)
c:RegisterEffect(e5)
local e5b=e5:Clone()
e5b:SetType(EFFECT_TYPE_QUICK_O)
e5b:SetCode(EVENT_FREE_CHAIN)
e5b:SetHintTiming(TIMING_BATTLE_PHASE)
e5b:SetCondition(c10200107.spcon2)
c:RegisterEffect(e5b)
end
c10200107.lvup={10200108}
c10200107.lvdn={10200106}
-- 1
function c10200107.lvfilter1(c)
return c:IsPreviousLocation(LOCATION_MZONE)
end
function c10200107.lvcon1a(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10200107.lvfilter1,1,nil)
end
function c10200107.lvcon1b(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c10200107.lvfilter1,1,nil)
and (r&(REASON_FUSION+REASON_SYNCHRO+REASON_XYZ+REASON_LINK))~=0
end
function c10200107.lvop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local ct=eg:FilterCount(c10200107.lvfilter1,nil)
if ct>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(ct)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
end
end
-- 2
function c10200107.lv10con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()>=10
end
function c10200107.lv10tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200107.lv10op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
-- 3
function c10200107.lv11con(e)
return e:GetHandler():GetLevel()>=11
end
function c10200107.atkval(e,c)
return c:GetBaseAttack()*2
end
-- 4
function c10200107.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()==11 and Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c10200107.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetLevel()==11 and Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function c10200107.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c10200107.spfilter(c,e,tp)
return c:IsCode(10200108) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
end
function c10200107.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c10200107.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c10200107.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c10200107.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
end
end
--幻叙·灭世之邪龙 LV12
function c10200108.initial_effect(c)
c:EnableReviveLimit()
-- 不能通常召唤
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.FALSE)
c:RegisterEffect(e0)
-- 胜利
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10200108,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c10200108.wincon)
e1:SetOperation(c10200108.winop)
c:RegisterEffect(e1)
end
c10200108.lvdn={10200107}
-- 1
function c10200108.wincon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10200107)
end
function c10200108.winop(e,tp,eg,ep,ev,re,r,rp)
Duel.Win(tp,0xe24)
end
...@@ -9,7 +9,7 @@ function c11771515.initial_effect(c) ...@@ -9,7 +9,7 @@ function c11771515.initial_effect(c)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(1) e1:SetValue(aux.tgoval)
e1:SetCondition(s.rmcon) e1:SetCondition(s.rmcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not s.global_check then if not s.global_check then
...@@ -37,7 +37,7 @@ function c11771515.initial_effect(c) ...@@ -37,7 +37,7 @@ function c11771515.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE) e3:SetCode(EVENT_REMOVE)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,id) e3:SetCountLimit(1,id+1)
e3:SetTarget(s.sptg1) e3:SetTarget(s.sptg1)
e3:SetOperation(s.spop1) e3:SetOperation(s.spop1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
......
...@@ -26,7 +26,7 @@ function c11771525.initial_effect(c) ...@@ -26,7 +26,7 @@ function c11771525.initial_effect(c)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id) e2:SetCountLimit(2,id)
e2:SetCondition(s.discon) e2:SetCondition(s.discon)
e2:SetTarget(s.distg) e2:SetTarget(s.distg)
e2:SetOperation(s.disop) e2:SetOperation(s.disop)
......
...@@ -96,6 +96,7 @@ function s.thop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,6 +96,7 @@ function s.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tg=Duel.SelectMatchingCard(tp,s.rtgfilter1,tp,LOCATION_DECK,0,1,1,nil) local tg=Duel.SelectMatchingCard(tp,s.rtgfilter1,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end end
end end
end end
......
--朝与夜
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,12866755)
--fusion summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(1193)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(s.tdcon)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
end
function s.mfilter0(c)
return c:IsCanBeFusionMaterial()
end
function s.mfilter2(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function s.mfilter3(c)
return c:IsCode(12866755) and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToGrave()
end
function s.spfilter1(c,e,tp,m,f,chkf)
return c:IsRace(RACE_FIEND) and c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.spfilter2(c,e,tp,m,f,chkf)
return aux.IsCodeListed(c,12866755) and c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function s.gcheck(sg)
return sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)<=1
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp)
local res=Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if res then return true end
local mg2=Duel.GetMatchingGroup(s.mfilter3,tp,LOCATION_DECK,0,nil)
mg2:Merge(mg1)
aux.GCheckAdditional=s.gcheck
local res=Duel.IsExistingMatchingCard(s.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg4=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg4,mf,chkf)
end
end
aux.GCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetFusionMaterial(tp)
local mg1=mg:Filter(s.mfilter2,nil,e)
local sg1=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=Duel.GetMatchingGroup(s.mfilter3,tp,LOCATION_DECK,0,nil)
mg2:Merge(mg1)
aux.GCheckAdditional=s.gcheck
local sg2=Duel.GetMatchingGroup(s.spfilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,nil,chkf)
sg1:Merge(sg2)
local mg4=nil
local sg3=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg4=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg3=Duel.GetMatchingGroup(s.spfilter1,tp,LOCATION_EXTRA,0,nil,e,tp,mg4,mf,chkf)
end
if sg1:GetCount()>0 or (sg3~=nil and sg3:GetCount()>0) then
local sg=sg1:Clone()
if sg3 then sg:Merge(sg3) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg3==nil or not sg3:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
if aux.IsCodeListed(tc,12866755) then
aux.GCheckAdditional=s.gcheck
local mat1=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
aux.GCheckAdditional=nil
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
aux.FCheckAdditional=nil
tc:SetMaterial(mat2)
Duel.SendtoGrave(mat2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
end
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat=Duel.SelectFusionMaterial(tp,tc,mg4,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat)
end
tc:CompleteProcedure()
end
end
function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function s.filter(c)
return (c:IsCode(12866755) or (c:IsType(TYPE_FUSION) and c:IsRace(RACE_FIEND))) and c:IsFaceup() and c:IsAbleToDeck()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
end
\ No newline at end of file
local m=15000694
local cm=_G["c"..m]
cm.name="超同调"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
if not cm.global_effect then
cm.global_effect=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD)
ge1:SetCode(EFFECT_SYNCHRO_MATERIAL)
ge1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
ge1:SetCondition(cm.syncon)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_SPSUMMON)
ge2:SetCondition(cm.syncon)
ge2:SetOperation(cm.spop)
Duel.RegisterEffect(ge2,0)
end
end
function cm.syncon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(0,15000694)~=0
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.ResetFlagEffect(0,15000694)
Duel.ResetFlagEffect(1,15000694)
end
function cm.filter1(c,e,sc,chkx)
return c:IsFaceup() and (chkx==0 or (not c:IsImmuneToEffect(e))) and c:IsCanBeSynchroMaterial(sc)
end
function cm.filter2(c,e,tp,chkx)
local ag=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE):Filter(cm.filter1,nil,e,c,chkx)
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and Duel.CheckSynchroMaterial(c,nil,nil,1,99,nil,ag)
end
function cm.filter3(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
Duel.RegisterFlagEffect(tp,15000694,RESET_CHAIN,0,1)
Duel.RegisterFlagEffect(1-tp,15000694,RESET_CHAIN,0,1)
local x=0
if Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,0) then x=1 end
Duel.ResetFlagEffect(tp,15000694)
Duel.ResetFlagEffect(1-tp,15000694)
return x==1
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(aux.FALSE)
end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,15000694,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(1-tp,15000694,RESET_PHASE+PHASE_END,0,1)
local g=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,1)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
local ag=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE):Filter(cm.filter1,nil,e,sg:GetFirst(),1)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,ag)
end
end
\ No newline at end of file
...@@ -44,9 +44,9 @@ function c22024360.filter(c) ...@@ -44,9 +44,9 @@ function c22024360.filter(c)
end end
function c22024360.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22024360.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22024360.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22024360.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c22024360.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c22024360.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c22024360.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c22024360.filter,tp,0,LOCATION_MZONE,1,1,nil)
end end
function c22024360.operation(e,tp,eg,ep,ev,re,r,rp) function c22024360.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -3,23 +3,19 @@ function c28315848.initial_effect(c) ...@@ -3,23 +3,19 @@ function c28315848.initial_effect(c)
aux.AddCodeList(c,28335405) aux.AddCodeList(c,28335405)
--pendulum --pendulum
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--shhis pendulum return --destroy replace
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(28315848,0)) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCategory(CATEGORY_TOHAND) e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
--e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c28315848.retcon) e1:SetTarget(c28315848.reptg)
e1:SetCost(c28315848.retcost) e1:SetValue(c28315848.repval)
e1:SetTarget(c28315848.rettg) e1:SetOperation(c28315848.repop)
e1:SetOperation(c28315848.retop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--shhis spsummon --shhis pendulum
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(28315848,1)) e2:SetDescription(aux.Stringid(28315848,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,28315848) e2:SetCountLimit(1,28315848)
...@@ -28,29 +24,20 @@ function c28315848.initial_effect(c) ...@@ -28,29 +24,20 @@ function c28315848.initial_effect(c)
e2:SetOperation(c28315848.spop) e2:SetOperation(c28315848.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c28315848.chkfilter(c) function c28315848.repfilter(c,tp)
return c:IsRace(RACE_FAIRY) and c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsFaceup() return c:IsControler(tp) and c:IsOnField() and c:IsRace(RACE_FAIRY) and c:IsFaceup()
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end end
function c28315848.retcon(e,tp,eg,ep,ev,re,r,rp) function c28315848.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
return eg:IsExists(c28315848.chkfilter,1,nil) local c=e:GetHandler()
end if chk==0 then return not c:IsStatus(STATUS_DESTROY_CONFIRMED) and eg:IsExists(c28315848.repfilter,1,c,tp) and c:IsDestructable(e) and c:IsAbleToRemove()end
function c28315848.retcost(e,tp,eg,ep,ev,re,r,rp,chk) return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if chk==0 then return g:FilterCount(Card.IsAbleToHandAsCost,nil)==#g end
Duel.SendtoHand(g,nil,REASON_COST)
end
function c28315848.rthfilter(c)
return c:IsSetCard(0x283) and c:IsAbleToHand() and c:IsFaceup()
end end
function c28315848.rettg(e,tp,eg,ep,ev,re,r,rp,chk) function c28315848.repval(e,c)
if chk==0 then return Duel.IsExistingMatchingCard(c28315848.rthfilter,tp,LOCATION_REMOVED,0,1,nil) end return c28315848.repfilter(c,e:GetHandlerPlayer())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end end
function c28315848.retop(e,tp,eg,ep,ev,re,r,rp) function c28315848.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Destroy(e:GetHandler(),REASON_EFFECT,LOCATION_REMOVED)
local tg=Duel.SelectMatchingCard(tp,c28315848.rthfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end end
function c28315848.cfilter(c) function c28315848.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsFaceup() return c:IsAttribute(ATTRIBUTE_WATER) and c:IsFaceup()
...@@ -62,16 +49,21 @@ function c28315848.tgfilter(c) ...@@ -62,16 +49,21 @@ function c28315848.tgfilter(c)
return aux.IsCodeListed(c,28335405)-- and c:IsAbleToGrave() return aux.IsCodeListed(c,28335405)-- and c:IsAbleToGrave()
end end
function c28315848.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c28315848.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local c=e:GetHandler()
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) if chk==0 then return Duel.IsExistingMatchingCard(c28315848.tgfilter,tp,LOCATION_DECK,0,1,nil) and (c:IsAbleToHand() or c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0) end
and Duel.IsExistingMatchingCard(c28315848.tgfilter,tp,LOCATION_DECK,0,1,nil)end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c28315848.spop(e,tp,eg,ep,ev,re,r,rp) function c28315848.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(c28315848.tgfilter,tp,LOCATION_DECK,0,1,nil) then local b1=c:IsAbleToHand()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local b2=Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
local tg=Duel.SelectMatchingCard(tp,c28315848.tgfilter,tp,LOCATION_DECK,0,1,1,nil) if not c:IsRelateToEffect(e) or not (b1 and b2) then return end
Duel.Destroy(tg,REASON_EFFECT) if c:IsAbleToHand() and (not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or Duel.GetMZoneCount(tp)<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
if not c:IsLocation(LOCATION_HAND) then return end
else
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=Duel.SelectMatchingCard(tp,c28315848.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.Destroy(tg,REASON_EFFECT)
end end
...@@ -2,96 +2,78 @@ ...@@ -2,96 +2,78 @@
function c28317054.initial_effect(c) function c28317054.initial_effect(c)
--pendulum --pendulum
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--shhis pendulum return --shhis pendulum
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(28317054,0)) e1:SetDescription(aux.Stringid(28317054,1))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
--e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c28317054.retcon) e1:SetCountLimit(1,28317054)
e1:SetCost(c28317054.retcost) e1:SetCondition(c28317054.spcon)
e1:SetTarget(c28317054.rettg) e1:SetTarget(c28317054.sptg)
e1:SetOperation(c28317054.retop) e1:SetOperation(c28317054.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--shhis spsummon --search
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(28317054,1)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY+CATEGORY_REMOVE)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_HAND) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,28317054) e2:SetTarget(c28317054.thtg)
e2:SetCondition(c28317054.spcon) e2:SetOperation(c28317054.thop)
e2:SetTarget(c28317054.sptg)
e2:SetOperation(c28317054.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--search local e3=e2:Clone()
local e3=Effect.CreateEffect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(c28317054.thtg)
e3:SetOperation(c28317054.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c28317054.chkfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsSummonType(SUMMON_TYPE_PENDULUM) and c:IsFaceup()
end
function c28317054.retcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c28317054.chkfilter,1,nil)
end
function c28317054.retcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
if chk==0 then return g:FilterCount(Card.IsAbleToHandAsCost,nil)==#g end
Duel.SendtoHand(g,nil,REASON_COST)
end
function c28317054.gthfilter(c)
return c:IsSetCard(0x283) and c:IsAbleToHand()
end
function c28317054.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28317054.gthfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c28317054.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c28317054.rthfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
function c28317054.cfilter(c) function c28317054.cfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsFaceup() return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsFaceup()
end end
function c28317054.spcon(e,tp,eg,ep,ev,re,r,rp) function c28317054.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c28317054.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c28317054.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c28317054.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c28317054.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil) local c=e:GetHandler()
and Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil) and (c:IsAbleToHand() or c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
end end
function c28317054.spop(e,tp,eg,ep,ev,re,r,rp) function c28317054.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,nil) then local b1=c:IsAbleToHand()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local b2=Duel.GetMZoneCount(tp)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,1,nil) if not c:IsRelateToEffect(e) or not (b1 and b2) then return end
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) if c:IsAbleToHand() and (not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or Duel.GetMZoneCount(tp)<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
if not c:IsLocation(LOCATION_HAND) then return end
else
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,0,1,1,nil)
if #tg==0 then return end
Duel.HintSelection(tg)
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end end
function c28317054.dthfilter(c) function c28317054.thfilter(c)
return c:IsSetCard(0x283) and (c:IsType(TYPE_MONSTER) or Duel.IsExistingMatchingCard(nil,c:GetControler(),LOCATION_PZONE,0,1,nil)) and c:IsAbleToHand() return c:IsSetCard(0x283) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c28317054.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c28317054.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28317054.dthfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return true end
local res=e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL) and re and 1 or 0
e:SetLabel(res)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c28317054.desfilter(c)
return c:IsSetCard(0x283) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsAbleToRemove()
end
function c28317054.thop(e,tp,eg,ep,ev,re,r,rp) function c28317054.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c28317054.dthfilter,tp,LOCATION_DECK,0,1,1,nil) local tc=Duel.SelectMatchingCard(tp,c28317054.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if g:GetCount()>0 then if not tc or Duel.SendtoHand(tc,nil,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_HAND) then return end
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,tc)
Duel.ConfirmCards(1-tp,g) if e:GetLabel()==0 then return end
end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tg=Duel.SelectMatchingCard(tp,c28317054.desfilter,tp,LOCATION_DECK,0,1,1,nil)
if e:GetHandler():IsRelateToEffect(e) then tg:AddCard(e:GetHandler()) end
Duel.Destroy(tg,REASON_EFFECT,LOCATION_REMOVED)
end end
...@@ -10,7 +10,7 @@ function c28399999.initial_effect(c) ...@@ -10,7 +10,7 @@ function c28399999.initial_effect(c)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetHintTiming(0,TIMING_MAIN_END) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetDescription(aux.Stringid(28399999,0)) e1:SetDescription(aux.Stringid(28399999,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
...@@ -19,15 +19,15 @@ function c28399999.initial_effect(c) ...@@ -19,15 +19,15 @@ function c28399999.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,28399999+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,28399999+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c28399999.descon) e1:SetCondition(c28399999.descon)
e1:SetCost(c28399999.descost)
e1:SetTarget(c28399999.destg) e1:SetTarget(c28399999.destg)
e1:SetOperation(c28399999.desop) e1:SetOperation(c28399999.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--remove --remove
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE) e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_ACTIVATE) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCost(aux.bfgcost)
e3:SetCost(c28399999.rmcost)
e3:SetTarget(c28399999.rmtg) e3:SetTarget(c28399999.rmtg)
e3:SetOperation(c28399999.rmop) e3:SetOperation(c28399999.rmop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -36,7 +36,7 @@ function c28399999.initial_effect(c) ...@@ -36,7 +36,7 @@ function c28399999.initial_effect(c)
e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES) e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCost(c28399999.tgcost) e4:SetCost(c28399999.tgcost)
e4:SetTarget(c28399999.tgtg) e4:SetTarget(c28399999.tgtg)
e4:SetOperation(c28399999.tgop) e4:SetOperation(c28399999.tgop)
...@@ -46,7 +46,7 @@ function c28399999.initial_effect(c) ...@@ -46,7 +46,7 @@ function c28399999.initial_effect(c)
e6:SetCategory(CATEGORY_TODECK) e6:SetCategory(CATEGORY_TODECK)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_TO_GRAVE) e6:SetCode(EVENT_TO_GRAVE)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e6:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e6:SetTarget(c28399999.tdtg) e6:SetTarget(c28399999.tdtg)
e6:SetOperation(c28399999.tdop) e6:SetOperation(c28399999.tdop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
...@@ -54,7 +54,7 @@ function c28399999.initial_effect(c) ...@@ -54,7 +54,7 @@ function c28399999.initial_effect(c)
local e9=Effect.CreateEffect(c) local e9=Effect.CreateEffect(c)
e9:SetCategory(CATEGORY_DRAW) e9:SetCategory(CATEGORY_DRAW)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e9:SetCode(EVENT_SPSUMMON_SUCCESS) e9:SetCode(EVENT_SUMMON_SUCCESS)
e9:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET) e9:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e9:SetCountLimit(1,28399999) e9:SetCountLimit(1,28399999)
e9:SetTarget(c28399999.drtg) e9:SetTarget(c28399999.drtg)
...@@ -68,6 +68,34 @@ function c28399999.initial_effect(c) ...@@ -68,6 +68,34 @@ function c28399999.initial_effect(c)
e10:SetTarget(c28399999.thtg) e10:SetTarget(c28399999.thtg)
e10:SetOperation(c28399999.thop) e10:SetOperation(c28399999.thop)
c:RegisterEffect(e10) c:RegisterEffect(e10)
--attack up-self
local e14=Effect.CreateEffect(c)
e14:SetType(EFFECT_TYPE_SINGLE)
e14:SetCode(EFFECT_UPDATE_ATTACK)
e14:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e14:SetRange(LOCATION_MZONE)
e14:SetValue(500)
c:RegisterEffect(e14)
--attack up-other
local e14=Effect.CreateEffect(c)
e14:SetType(EFFECT_TYPE_FIELD)
e14:SetCode(EFFECT_UPDATE_ATTACK)
e14:SetRange(LOCATION_MZONE)
e14:SetTargetRange(LOCATION_MZONE,0)
e14:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY))
e14:SetValue(500)
c:RegisterEffect(e14)
--attack up-activated
local e14=Effect.CreateEffect(c)
e14:SetCategory(CATEGORY_ATKCHANGE)
e14:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e14:SetCode(EVENT_SPSUMMON_SUCCESS)
e14:SetProperty(EFFECT_FLAG_DELAY)
e14:SetRange(LOCATION_MZONE)
e14:SetCondition(c28399999.atkcon)
e14:SetTarget(c28399999.atktg)
e14:SetOperation(c28399999.atkop)
c:RegisterEffect(e14)
--spsummon-self --spsummon-self
local e19=Effect.CreateEffect(c) local e19=Effect.CreateEffect(c)
e19:SetCategory(CATEGORY_SPECIAL_SUMMON) e19:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -78,11 +106,11 @@ function c28399999.initial_effect(c) ...@@ -78,11 +106,11 @@ function c28399999.initial_effect(c)
c:RegisterEffect(e19) c:RegisterEffect(e19)
--spsummon-other --spsummon-other
local e19=Effect.CreateEffect(c) local e19=Effect.CreateEffect(c)
e19:SetCategory(CATEGORY_SPECIAL_SUMMON) e19:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON+CATEGORY_GRAVE_ACTION)
e19:SetType(EFFECT_TYPE_ACTIVATE) e19:SetType(EFFECT_TYPE_ACTIVATE)
e19:SetCode(EVENT_FREE_CHAIN) e19:SetCode(EVENT_FREE_CHAIN)
e19:SetTarget(c28399999.target) e19:SetTarget(c28399999.sptg)
e19:SetOperation(c28399999.activate) e19:SetOperation(c28399999.spop)
c:RegisterEffect(e19) c:RegisterEffect(e19)
--damage --damage
local e23=Effect.CreateEffect(c) local e23=Effect.CreateEffect(c)
...@@ -117,7 +145,11 @@ end ...@@ -117,7 +145,11 @@ end
--destroy --destroy
function c28399999.descon(e,tp,eg,ep,ev,re,r,rp) function c28399999.descon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return Duel.IsMainPhase()--ph==PHASE_MAIN1 or ph==PHASE_MAIN2 return ph==PHASE_MAIN1 or ph==PHASE_MAIN2--Duel.IsMainPhase()
end
function c28399999.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end end
function c28399999.desfilter(c) function c28399999.desfilter(c)
return c:IsFaceup() return c:IsFaceup()
...@@ -136,10 +168,6 @@ function c28399999.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -136,10 +168,6 @@ function c28399999.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
--remove --remove
function c28399999.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c28399999.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c28399999.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
...@@ -201,21 +229,44 @@ function c28399999.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -201,21 +229,44 @@ function c28399999.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
--search --search
function c28399999.thfilter(c) function c28399999.thfilter(c,chk)
return c:IsSetCard(0x283) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x283) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and (chk==0 or aux.NecroValleyFilter()(c))
end end
function c28399999.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c28399999.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c28399999.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c28399999.thfilter,tp,LOCATION_DECK,0,1,nil,0) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c28399999.thop(e,tp,eg,ep,ev,re,r,rp) function c28399999.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=Duel.SelectMatchingCard(tp,c28399999.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,c28399999.thfilter,tp,LOCATION_DECK,0,1,1,nil,1):GetFirst()
if tc then if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
--attack up-activated
function c28399999.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsSummonPlayer,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c28399999.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
end
function c28399999.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetValue(500)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_ATTACK)
tc:RegisterEffect(e2)
end
end
--spsummon-self --spsummon-self
function c28399999.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c28399999.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -229,19 +280,19 @@ function c28399999.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -229,19 +280,19 @@ function c28399999.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
--spsummon-other --spsummon-other
function c28399999.spfilter(c,e,tp) function c28399999.spfilter(c,e,tp,chk)
return c:IsSetCard(0x283) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x283) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (chk==0 or aux.NecroValleyFilter()(c))-- and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c28399999.target(e,tp,eg,ep,ev,re,r,rp,chk) function c28399999.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c28399999.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c28399999.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,0)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function c28399999.activate(e,tp,eg,ep,ev,re,r,rp) function c28399999.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c28399999.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst() local sc=Duel.SelectMatchingCard(tp,c28399999.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,1):GetFirst()
if sc then if sc then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end end
...@@ -249,6 +300,7 @@ end ...@@ -249,6 +300,7 @@ end
--damage --damage
function c28399999.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c28399999.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500) Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
......
--乱斗 商业中心
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(s.actop)
c:RegisterEffect(e1)
--Atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x838))
e2:SetValue(500)
c:RegisterEffect(e2)
--Def
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(s.reptg)
e2:SetValue(s.repval)
e2:SetOperation(s.repop)
c:RegisterEffect(e2)
--release replace
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_FZONE)
e3:SetCode(EFFECT_SEND_REPLACE)
e3:SetTarget(s.reptg2)
e3:SetValue(function(e,c) return c:GetFlagEffect(id)>0 end)
c:RegisterEffect(e3)
end
function s.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function s.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsSetCard(0x838) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function s.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(s.repfilter,1,c,tp) and c:IsAbleToGrave()
and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function s.repval(e,c)
return s.repfilter(c,e:GetHandlerPlayer())
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
function s.filter2(c,re,tp,r)
return c:IsSetCard(0x838) and c:IsReason(REASON_RELEASE) and bit.band(r,REASON_COST)~=0 and re and aux.GetValueType(re)=="Effect" and re:IsActivated() and re:GetHandler()==c and re:GetHandlerPlayer()==tp
end
function s.reptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(s.filter2,1,nil,re,tp,r) end
if e:GetHandler():IsReleasable() and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
local g=eg:Filter(s.filter2,nil,re,tp,r)
for tc in aux.Next(g) do
tc:RegisterFlagEffect(id,RESET_CHAIN,0,1)
end
Duel.Release(e:GetHandler(),REASON_COST)
return true
else return false end
end
\ No newline at end of file
--幻叙 模型构建
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local g=Group.CreateGroup()
aux.RegisterMergedDelayedEvent(c,id,EVENT_SUMMON_SUCCESS,g)
aux.RegisterMergedDelayedEvent(c,id,EVENT_SPSUMMON_SUCCESS,g)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+id)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--Send and Search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,id)
e3:SetCost(s.tgcost)
e3:SetTarget(s.tgtg)
e3:SetOperation(s.tgop)
c:RegisterEffect(e3)
end
function s.spfilter(c,e,tp,att)
return (c:GetAttribute()&att>0 or c:IsLocation(LOCATION_HAND)) and c:IsSetCard(0x838) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local att=0
local g=eg:Filter(Card.IsFaceup,nil)
for tc in aux.Next(g) do
att=att|tc:GetAttribute()
end
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,att) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.actfilter(c,tp)
return c:IsSetCard(0x838) and c:IsType(TYPE_FIELD) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local att=0
local g=eg:Filter(Card.IsFaceup,nil)
for tc in aux.Next(g) do
att=att|tc:GetAttribute()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,att)
if #g>0 then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local fg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.actfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,tp)
if #fg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local sc=fg:Select(tp,1,1,nil):GetFirst()
Duel.MoveToField(sc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=sc:GetActivateEffect()
te:UseCountLimit(tp,1,true)
local tep=sc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(sc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
local desc=te:GetDescription()
if desc then
Duel.Hint(HINT_OPSELECTED,tp,desc)
Duel.Hint(HINT_OPSELECTED,1-tp,desc)
end
end
end
end
end
function s.tgfilter(c)
return c:IsSetCard(0x838) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function s.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
e:SetLabelObject(g:GetFirst())
end
function s.tgtg(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_GRAVE)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if tc then
local code=tc:GetOriginalCode()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
e1:SetLabel(code)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1)
e2:SetLabel(Duel.GetTurnCount())
e2:SetLabelObject(tc)
e2:SetCondition(s.thcon)
e2:SetOperation(s.thop)
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then
e2:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2)
else
e2:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
end
Duel.RegisterEffect(e2,tp)
end
end
function s.aclimit(e,re,tp)
return re:GetHandler():IsOriginalCodeRule(e:GetLabel())
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()>e:GetLabel()
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc and tc:IsLocation(LOCATION_GRAVE) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
--幻叙领航员-杰米奈
local s,id,o=GetID()
function s.initial_effect(c)
--Search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--Change Effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.chcon)
e3:SetCost(s.chcost)
e3:SetTarget(s.chtg)
e3:SetOperation(s.chop)
c:RegisterEffect(e3)
end
function s.thfilter(c)
return c:IsSetCard(0x838) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.chcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function s.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.FromCards(re:GetHandler())
Duel.ChangeChainOperation(ev,s.repop)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
c:CancelToGrave()
if Duel.SendtoHand(c,nil,REASON_EFFECT)>0 and c:IsLocation(LOCATION_HAND) then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
--幻叙中枢-杰米奈 Ver.3.0
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2,99,s.lcheck)
--Search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.thcon)
e1:SetCountLimit(1,id)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--Change Effect
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+1)
e2:SetCost(s.chcost)
e2:SetTarget(s.chtg)
e2:SetOperation(s.chop)
c:RegisterEffect(e2)
--Cannot be targeted
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(s.tgtg)
e3:SetValue(aux.tgoval)
c:RegisterEffect(e3)
end
function s.lcheck(g,lc,sumtype,tp)
return g:IsExists(Card.IsSetCard,1,nil,0x838,lc,sumtype,tp)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.thfilter(c)
return c:IsSetCard(0x838) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.costfilter(c,g)
return g:IsContains(c) and c:IsReleasable()
end
function s.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()+e:GetHandler()
if chk==0 then return Duel.CheckReleaseGroup(tp,s.costfilter,1,nil,lg) end
local sg=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil,lg)
Duel.Release(sg,REASON_COST)
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,s.repop)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToHand),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.tgtg(e,c)
return c==e:GetHandler() or (c:IsSetCard(0x838) and e:GetHandler():GetLinkedGroup():IsContains(c))
end
--幻叙 深度幻梦
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--sset
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,id)
e2:SetCondition(aux.exccon)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
end
function s.rvfilter(c)
return c:IsSetCard(0x838) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
local g=Duel.GetMatchingGroup(s.rvfilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and g:GetClassCount(Card.GetCode)>=3 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(s.rvfilter,tp,LOCATION_DECK,0,nil)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,3,3)
if sg then
Duel.ConfirmCards(1-tp,sg)
local rg=sg:RandomSelect(1-tp,1)
local rc=rg:GetFirst()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local code=rc:GetOriginalCode()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(code)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
end
end
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then Duel.SSet(tp,c) end
end
\ No newline at end of file
--幻叙回滚
local s,id,o=GetID()
function s.initial_effect(c)
--Return to Deck
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetTarget(s.tg1)
e1:SetOperation(s.op1)
c:RegisterEffect(e1)
--Send to Grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.tg2)
e2:SetOperation(s.op2)
c:RegisterEffect(e2)
end
function s.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x838) and c:IsAbleToDeck()
end
function s.tgfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x838) and c:IsAbleToGrave()
end
function s.spfilter(c,e,tp,att)
return c:IsSetCard(0x838) and c:GetAttribute()~=att and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.tgfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end
function s.op1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local att=tc:GetAttribute()
if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp,att)
if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function s.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and s.tgfilter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.tgfilter2,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,s.tgfilter2,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE)
end
function s.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local att=tc:GetAttribute()
if Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp,att)
if #g>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
\ No newline at end of file
--幻叙探索者 Neko
local s,id,o=GetID()
function s.initial_effect(c)
if c:IsOriginalCodeRule(id) then
local tp=0
if Duel.GetFieldGroupCount(0,0,LOCATION_DECK)>0 or Duel.GetFieldGroupCount(0,LOCATION_EXTRA,0)>0 then tp=1 end
local pname=s.getplayername(tp)
local lv=Duel.GetRegistryValue("pname")
if lv then
s.setlv(c,lv)
else
Duel.SetRegistryValue("pname",1)
s.setlv(c,1)
end
end
--Change Name
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.nmcon)
e1:SetOperation(s.nmop)
c:RegisterEffect(e1)
--ATK/DEF Up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(s.val)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id)
e4:SetCondition(s.thcon)
e4:SetCost(s.thcost)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetCondition(s.thcon2)
c:RegisterEffect(e5)
end
function s.getplayername(tp)
local p0=Duel.GetRegistryValue("player_name_0")
local p1=Duel.GetRegistryValue("player_name_1")
if p0==p1 then
p1=p1.."_2"
Duel.SetRegistryValue("player_name_1",p1)
end
local pname="Neko_Level_Count_"
if Duel.GetRegistryValue("player_type_0")==tp then
pname=pname..p0
else
pname=pname..p1
end
return pname
end
function s.setlv(c,lv)
if aux.GetValueType(lv)=="string" then lv=tonumber(lv) end
c:SetCardData(CARDDATA_LEVEL,lv)
if lv==1 or lv==2 then c:SetCardData(CARDDATA_CODE,id) end
if lv==3 or lv==4 then c:SetCardData(CARDDATA_CODE,id+1) end
if lv>=5 then c:SetCardData(CARDDATA_CODE,id+2) end
end
function s.nmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsFaceup() and rc:IsOnField() and rc:IsRelateToEffect(re) and rc:GetOriginalCode()~=id
end
function s.nmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_CODE)
e1:SetValue(id)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e1)
end
function s.val(e,c)
return c:GetLevel()*200
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>c:GetLevel()
end
function s.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)<=c:GetLevel()
end
function s.costfilter(c,tp)
return c:IsSetCard(0x838) and c:IsReleasable() and Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.costfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,s.costfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.cfilter(c,tp)
return c:IsOriginalCodeRule(id) and c:GetOwner()==tp
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
local pname=s.getplayername(tp)
local lv=Duel.GetRegistryValue("pname")
if lv then
lv=lv+1
Duel.SetRegistryValue("pname",lv)
else
Duel.SetRegistryValue("pname",1)
end
local g=Duel.GetFieldGroup(0,0x7f,0x7f)
local xg=Duel.GetOverlayGroup(0,0x7f,0x7f)
g:Merge(xg)
g=g:Filter(s.cfilter,nil,tp)
for tc in aux.Next(g) do
s.setlv(c,lv)
end
end
\ No newline at end of file
--幻叙指引
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
end
function s.filter(c)
return c:IsSetCard(0x838) and c:IsType(TYPE_MONSTER)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local codes={}
while true do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac = 0
getmetatable(c).announce_filter={0x838,OPCODE_ISSETCARD,TYPE_MONSTER,OPCODE_ISTYPE,OPCODE_AND,code,OPCODE_ISCODE,OPCODE_NOT,OPCODE_AND,TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(c).announce_filter))
table.insert(codes,ac)
if not Duel.SelectYesNo(tp,aux.Stringid(id, 0)) then
break
end
end
-- 将宣言的卡名列表和数量存入Label
-- 结构:[1]=数量, [2...n]=卡名
e:SetLabel(#codes, table.unpack(codes))
Duel.SetTargetParam(#codes) -- 提示一下数量
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local labs={e:GetLabel()}
local count=labs[1]
if count and count > 0 then
local c=e:GetHandler()
-- 注册延时效果
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(0,table.unpack(labs))
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
e1:SetReset(RESET_PHASE+PHASE_STANDBY,count)
Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG, tp, aux.Stringid(id, 2)) -- 提示玩家正在等待时序
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
-- 任何玩家的准备阶段都计数
return true
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local labs={e:GetLabel()}
local current_ct = labs[1] + 1
local target_ct = labs[2]
local codes = {}
for i=3, #labs do
table.insert(codes, labs[i])
end
if current_ct < target_ct then
e:SetLabel(current_ct, target_ct, table.unpack(codes))
c=e:GetOwner()
if c then
Duel.Hint(HINT_CARD,0,id)
end
else
Duel.Hint(HINT_CARD,0,id)
local g_to_summon = Group.CreateGroup()
local ft = Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft > 0 then
for _, code in ipairs(codes) do
if ft <= 0 then break end
local tc = Duel.GetFirstMatchingCard(function(c) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end, tp, LOCATION_DECK, 0, nil)
if tc then
Duel.SpecialSummonStep(tc, 0, tp, tp, false, false, POS_FACEUP)
g_to_summon:AddCard(tc)
ft = ft - 1
end
end
Duel.SpecialSummonComplete()
end
local mg = Duel.GetFieldGroup(tp,LOCATION_MZONE,0)
local extra_g = Duel.GetMatchingGroup(Card.IsLinkSummonable, tp, LOCATION_EXTRA, 0, nil, nil, mg)
if #extra_g > 0 and Duel.SelectYesNo(tp,aux.Stringid(id, 3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SPSUMMON)
local sg = extra_g:Select(tp, 1, 1, nil)
if #sg > 0 then
Duel.LinkSummon(tp,sg:GetFirst(), nil, mg)
end
end
e:Reset()
end
end
--幻叙从者 艾尔布鲁
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableCounterPermit(0x838)
--Special Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--Remove Counters
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCost(s.effcost)
e2:SetTarget(s.efftg)
e2:SetOperation(s.effop)
c:RegisterEffect(e2)
--Negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,5))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.negcon)
e3:SetTarget(s.negtg)
e3:SetOperation(s.negop)
c:RegisterEffect(e3)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x838)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function s.sptg(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 s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(s.acop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function s.acop(e,tp,eg,ep,ev,re,r,rp)
if rp~=tp then
e:GetHandler():AddCounter(0x838,1)
end
end
function s.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1,3,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x838,3,REASON_COST)
end
function s.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.GetFlagEffect(tp,id+1)==0
local b2=Duel.GetFlagEffect(tp,id+2)==0 and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
local b3=Duel.GetFlagEffect(tp,id+3)==0
if chk==0 then return b1 or b2 or b3 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,2)},
{b2,aux.Stringid(id,3)},
{b3,aux.Stringid(id,4)})
e:SetLabel(op)
Duel.RegisterFlagEffect(tp,id+op,RESET_PHASE+PHASE_END,0,1)
if op==2 then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_ONFIELD)
end
end
function s.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local op=e:GetLabel()
if op==1 then
if c:IsRelateToEffect(e) and c:IsFaceup() 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)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e3)
end
elseif op==2 then
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetValue(aux.tgoval)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
elseif op==3 then
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(s.aclimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
end
function s.aclimit(e,re,tp)
return re:GetHandler()==e:GetHandler()
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or not Duel.IsChainNegatable(ev) then return false end
if re:IsHasCategory(CATEGORY_NEGATE)
and Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT):IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0
end
function s.negtg(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
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
\ No newline at end of file
--幻叙救济 弥勒
local s,id,o=GetID()
function s.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e0:SetValue(s.matlimit)
c:RegisterEffect(e0)
local e01=e0:Clone()
e01:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e01)
local e02=e0:Clone()
e02:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e02)
local e03=e0:Clone()
e03:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e03)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DISABLE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.condition)
e1:SetCost(aux.bfgcost)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
end
function s.matlimit(e,c)
if not c then return false end
return not c:IsSetCard(0x838)
end
function s.filter_non_talespace(c)
return c:IsType(TYPE_MONSTER) and not c:IsSetCard(0x838)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.filter_non_talespace,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabelObject(c)
e1:SetOperation(s.endop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.endop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetLabelObject()
local g_count=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)
if not c:IsLocation(LOCATION_REMOVED) then return end
if g_count>5 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(s.val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
e2:SetTarget(function(e,tc) return tc:IsLocation(LOCATION_EXTRA) end)
e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE)
c:RegisterEffect(e2)
Duel.SpecialSummonComplete()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tc=Duel.SelectMatchingCard(tp,Card.IsSummonType,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,SUMMON_TYPE_SPECIAL):GetFirst()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DISABLE_EFFECT)
e4:SetValue(RESET_TURN_SET)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
end
elseif g_count<5 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(s.val2)
e2:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE)
c:RegisterEffect(e2)
Duel.SpecialSummonComplete()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local pg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if #pg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=pg:Select(tp,1,1,nil)
local tc=sg:GetFirst()
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DISABLE_EFFECT)
e4:SetValue(RESET_TURN_SET)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
Duel.SpecialSummonComplete()
end
end
end
end
end
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x838) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil,TYPE_MONSTER)*500
end
function s.val2(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,LOCATION_MZONE)*1000
end
\ No newline at end of file
...@@ -41,17 +41,20 @@ function s.initial_effect(c) ...@@ -41,17 +41,20 @@ function s.initial_effect(c)
e5:SetValue(s.atklimit) e5:SetValue(s.atklimit)
c:RegisterEffect(e5) c:RegisterEffect(e5)
-- ●暗:场上的这张卡不会被战斗·效果破坏 -- ●暗:每次对方把魔法·陷阱卡的效果发动,给与对方600伤害
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e6:SetCode(EVENT_CHAINING)
e6:SetRange(LOCATION_MZONE) e6:SetRange(LOCATION_MZONE)
e6:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetCondition(s.xyzcon2) e6:SetOperation(s.regop)
e6:SetValue(1)
c:RegisterEffect(e6) c:RegisterEffect(e6)
local e7=e6:Clone() local e7=Effect.CreateEffect(c)
e7:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_CHAIN_SOLVED)
e7:SetRange(LOCATION_MZONE)
e7:SetCondition(s.damcon)
e7:SetOperation(s.damop)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
...@@ -91,3 +94,21 @@ end ...@@ -91,3 +94,21 @@ end
function s.atklimit(e,c) function s.atklimit(e,c)
return c==e:GetHandler() return c==e:GetHandler()
end end
-- ●暗:每次对方把魔法·陷阱卡的效果发动,给与对方600伤害
function s.regop(e,tp,eg,ep,ev,re,r,rp)
if rp==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET+RESET_CHAIN,0,1)
end
end
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return s.xyzcon2(e) and ep~=tp and Duel.GetLP(1-tp)>0
and c:GetFlagEffect(id)~=0 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
Duel.Damage(1-tp,600,REASON_EFFECT)
end
--神隐
local s,id=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,56433456)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10045474,0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_SPSUMMON)
e2:SetCondition(s.condition)
e2:SetCost(s.cost)
e2:SetTarget(s.target)
e2:SetOperation(s.operation)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.counterfilter)
end
function s.counterfilter(c)
return false
end
function s.cfilter(c)
return c:IsPreviousLocation(LOCATION_EXTRA)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil) and Duel.GetCurrentChain()==0
end
function s.aclimit(e,re,tp)
local c=re:GetHandler()
return e:GetLabel()~=c:GetFieldID()
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)==0 or Duel.IsEnvironment(56433456) end
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) and not Duel.IsEnvironment(56433456) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetTargetRange(1,0)
e3:SetLabel(c:GetFieldID())
e3:SetValue(s.aclimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=eg:Filter(s.cfilter,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(s.cfilter,nil)
Duel.NegateSummon(g)
Duel.Destroy(g,REASON_EFFECT)
end
\ No newline at end of file
--曙龙归来之雷霆
function c9910826.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK+CATEGORY_HANDES+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,9910826)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(c9910826.target)
e1:SetOperation(c9910826.activate)
c:RegisterEffect(e1)
--recycle
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,9910827)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCondition(c9910826.thcon)
e2:SetCost(aux.bfgcost)
e2:SetOperation(c9910826.thop)
c:RegisterEffect(e2)
end
function c9910826.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3)
end
function c9910826.gselect(g)
return g:IsExists(Card.IsSetCard,1,nil,0x6951) and g:FilterCount(Card.IsDiscardable,nil,REASON_EFFECT)==2
end
function c9910826.tdfilter(c)
return c:IsFaceup() and c:IsSetCard(0x6951) and c:IsAbleToDeck()
end
function c9910826.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local g1=Duel.GetDecktopGroup(p,3)
if Duel.Draw(p,d,REASON_EFFECT)==3 then
local off=1
local ops={}
local opval={}
ops[off]=aux.Stringid(9910826,0)
opval[off-1]=1
off=off+1
local g2=Duel.GetFieldGroup(p,LOCATION_HAND,0)
if #g2>=2 and g2:CheckSubGroup(c9910826.gselect,2,2) then
ops[off]=aux.Stringid(9910826,1)
opval[off-1]=2
off=off+1
end
local op=Duel.SelectOption(p,table.unpack(ops))
if opval[op]==1 then
Duel.BreakEffect()
local g3=Duel.GetMatchingGroup(c9910826.tdfilter,p,LOCATION_ONFIELD,0,aux.ExceptThisCard(e))
g1:Merge(g3)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg1=g1:Select(p,3,3,nil)
Duel.ShuffleHand(p)
Duel.SendtoDeck(sg1,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
else
Duel.BreakEffect()
Duel.ShuffleHand(p)
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DISCARD)
local sg2=g2:SelectSubGroup(p,c9910826.gselect,false,2,2)
if sg2 and #sg2==2 and Duel.SendtoGrave(sg2,REASON_DISCARD+REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(aux.TRUE,p,LOCATION_ONFIELD,LOCATION_ONFIELD,1,aux.ExceptThisCard(e))
and Duel.SelectYesNo(p,aux.Stringid(9910826,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_DESTROY)
local sg3=Duel.GetFieldGroup(p,LOCATION_ONFIELD,LOCATION_ONFIELD):Select(p,1,1,aux.ExceptThisCard(e))
Duel.HintSelection(sg3)
Duel.Destroy(sg3,REASON_EFFECT)
end
end
end
end
function c9910826.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,REASON_DISCARD)~=0
end
function c9910826.thop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c9910826.thcon2)
e1:SetOperation(c9910826.thop2)
e1:SetReset(RESET_PHASE+PHASE_STANDBY,2)
Duel.RegisterEffect(e1,tp)
end
function c9910826.thcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==e:GetLabel()+1
end
function c9910826.cfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER)
end
function c9910826.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,9910826)
local g=Duel.GetMatchingGroup(c9910826.cfilter,tp,LOCATION_GRAVE,0,nil)
local ct=math.floor(g:GetClassCount(Card.GetCode)/2)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToHand),tp,LOCATION_GRAVE,0,ct,ct,nil)
if #sg>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
...@@ -1217,6 +1217,7 @@ ...@@ -1217,6 +1217,7 @@
!setname 0x5225 绝海滋养 !setname 0x5225 绝海滋养
!setname 0x6225 璀璨原钻 !setname 0x6225 璀璨原钻
!setname 0x9225 乱流舞者 !setname 0x9225 乱流舞者
!setname 0xa225 星界灵
#Qwe.3359™ #Qwe.3359™
!counter 0x6371 蓄电指示物 !counter 0x6371 蓄电指示物
...@@ -1258,6 +1259,9 @@ ...@@ -1258,6 +1259,9 @@
!setname 0x835 忒提斯 !setname 0x835 忒提斯
!setname 0x836 秘计螺旋 !setname 0x836 秘计螺旋
!setname 0x837 救世之章 !setname 0x837 救世之章
!setname 0x838 幻叙
!counter 0x838 幻叙指示物
!victory 0xe24 「幻叙·灭世之邪龙 LV12」特殊胜利
#修女鱼 2824676518 312 0x3a0-0x3af(strings文件中缺少字段区间) #修女鱼 2824676518 312 0x3a0-0x3af(strings文件中缺少字段区间)
!counter 0x13a0 机骸指示物 !counter 0x13a0 机骸指示物
...@@ -1278,13 +1282,14 @@ ...@@ -1278,13 +1282,14 @@
!setname 0x5919 皇庭学院 !setname 0x5919 皇庭学院
!setname 0x91b 赛博 !setname 0x91b 赛博
#玄羽 #玄羽 163 0xdc0-0xdcf
!setname 0xdc0 圣殿英雄 !setname 0xdc0 圣殿英雄
!setname 0xdc1 花信 !setname 0xdc1 花信
!setname 0x3dc2 究极骑士 !setname 0x3dc2 究极骑士
!setname 0x5dc2 数码精神 !setname 0x5dc2 数码精神
!setname 0x6dc2 自由斗士 !setname 0x6dc2 自由斗士
!setname 0x9dc2 驯兽师 !setname 0x5dc7 魔法骑士
!setname 0x6dc7 旋风战士
#66君 950 0x960-0x96f #66君 950 0x960-0x96f
!setname 0x960 剑技 !setname 0x960 剑技
......
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