Commit 218ae1d3 authored by Nemo Ma's avatar Nemo Ma

Update 2019 May

parent 568ff407
No preview for this file type
......@@ -60,7 +60,7 @@ function c33700148.activate(e,tp,eg,ep,ev,re,r,rp)
e5:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e5,true)
local e6=e3:Clone()
e6:SetCode(EFFECT_CHANGE_LEVEL_FINAL)
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(11)
e6:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e6,true)
......
......@@ -44,7 +44,7 @@ function c33700171.synfilter1(c,syncard,lv,g)
return c:IsType(TYPE_TUNER) and g:IsExists(c33700171.synfilter2,1,c,syncard,lv,g,c)
end
function c33700171.lvfilter(c,lv,g)
return c:IsNotTuner() and c:GetLevel()<lv and c:IsType(TYPE_MONSTER)
return c:IsNotTuner(nil)(nil) and c:GetLevel()<lv and c:IsType(TYPE_MONSTER)
and c:IsCanBeSynchroMaterial(g)
end
function c33700171.synfilter2(c,syncard,lv,g,mc)
......@@ -85,7 +85,7 @@ end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local t2=mg:FilterSelect(tp,c33700171.synfilter2,1,1,m1,c,lv,mg,m1)
g:Merge(t2)
local mg2=mg:Filter(Card.IsNotTuner,nil)
local mg2=mg:Filter(Card.IsNotTuner(nil),nil)
Duel.SetSelectedCard(g)
c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
......
......@@ -13,7 +13,7 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CHAIN_UNIQUE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(2)
e2:SetTarget(cm.target)
......
--天国的阶梯 亚由
local m=33700337
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
aux.AddSynchroMixProcedure(c,cm.mfilter1,cm.mfilter2,nil,aux.NonTuner(nil),2,63)
c:EnableReviveLimit()
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(cm.target)
e3:SetOperation(cm.operation)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetValue(function(e,te)
return te:GetOwner()~=e:GetOwner() and not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,e:GetHandler())
end)
c:RegisterEffect(e4)
end
function cm.mfilter1(c)
return c:IsAttribute(ATTRIBUTE_LIGHT)
end
function cm.mfilter2(c,syncard,c1)
return c:IsAttribute(ATTRIBUTE_DARK) and (c:IsType(TYPE_TUNER) or c1:IsType(TYPE_TUNER))
end
function cm.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--虚拟YouTuber Mirai Akari
local m=33700344
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.dfc_front_side=m+1
function cm.initial_effect(c)
aux.AddSynchroMixProcedure(c,aux.TRUE,nil,nil,aux.TRUE,2,63,function(g)
return g:IsExists(aux.Tuner(nil),1,nil) and g:IsExists(aux.NonTuner(nil),1,nil)
end)
c:EnableReviveLimit()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cm.mtcon)
e2:SetOperation(cm.mtop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(cm.valcheck)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g then return false end
local tc=g:GetFirst()
local c=e:GetHandler()
local ex,tg,tc_=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and g:IsContains(c) and (not ex or not tg or not tg:IsContains(c))
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Senya.IsDFCTransformable(e:GetHandler()) end
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) and Senya.IsDFCTransformable(c) then
c:ReleaseEffectRelation(re)
Senya.TransformDFCCard(c)
end
end)
c:RegisterEffect(e1)
end
function cm.mfilter(c)
return c:IsType(TYPE_TUNER)
end
function cm.mfilter1(c)
return not c:IsType(TYPE_TUNER)
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
local ct=g:FilterCount(cm.mfilter,nil)
local ct2=g:FilterCount(cm.mfilter1,nil)
e:GetLabelObject():SetLabel(ct | (ct2 << 8))
end
function cm.mtcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()>0
end
function cm.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel() & 0xff
local ct2=e:GetLabel() >> 8
if ct>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(function(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end)
e1:SetCountLimit(ct)
c:RegisterEffect(e1)
end
if ct2>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(function(e,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end)
e1:SetCountLimit(ct2)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--虚拟YouTuber 黑暗Akari
local m=33700345
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
cm.dfc_back_side=m-1
function cm.initial_effect(c)
Senya.DFCBackSideCommonEffect(c)
c:EnableReviveLimit()
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_DESTROY_REPLACE)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDecreaseAttackAsCost(500) and c:IsAbleToDecreaseDefenseAsCost(500) end
if Duel.SelectEffectYesNo(tp,c,96) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(-500)
c:RegisterEffect(e1)
return true
else return false end
end)
c:RegisterEffect(e1)
end
--虚拟YouTuber 绊爱
local m=33700346
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsAttackBelow,1500),2,63)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(function(e)
return c:GetLinkedGroupCount()<3 and not c:IsHasEffect(EFFECT_CANNOT_DISABLE)
end)
e1:SetValue(-1500)
c:RegisterEffect(e1)
end
--虚拟YouTuber 电脑少女小白
local m=33700347
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,4,2,nil,nil,99)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetCondition(aux.bdcon)
e4:SetCost(Senya.RemoveOverlayCost(1))
e4:SetTarget(cm.atktg)
e4:SetOperation(cm.atkop)
c:RegisterEffect(e4)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_PIERCE)
e4:SetCondition(cm.con(3))
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e5:SetCondition(cm.con(2,function(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end))
e5:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2)
end)
c:RegisterEffect(e5)
end
function cm.con(ct,con)
return function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetRemovedOverlayCount()>=ct and (not con or con(e,tp,eg,ep,ev,re,r,rp))
end
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToBattle() end
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToBattle() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e1)
end
\ No newline at end of file
--虚拟YouTuber 辉夜月
local m=33700348
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsAttackAbove,2100),2,true)
local e1=Effect.CreateEffect(c)
e1:SetDescription(CATEGORY_POSITION)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
local function pfilter(c)
return not c:IsPosition(POS_FACEUP_ATTACK) and c:IsLocation(LOCATION_MZONE)
end
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(pfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,0,0)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(pfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
local c=e:GetHandler()
if #g>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(#g*200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
end)
c:RegisterEffect(e1)
end
--虚拟YouTuber Nekomasu
local m=33700349
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsDefenseAbove,2000),2,2)
c:EnableReviveLimit()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(function(e)
return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end)
c:RegisterEffect(e1)
end
--虚拟YouTuber YOMEMI
local m=33700350
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
aux.AddSynchroMixProcedure(c,aux.NonTuner(nil),nil,nil,aux.Tuner(nil),2,99)
c:EnableReviveLimit()
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(57579381,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(57579381,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(aux.bfgcost)
e1:SetTarget(cm.target1)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000)
end
--虚拟YouTuber 猫宫Hinata
local m=33700352
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,function(c) return c:IsAttackAbove(2000) end,function(c) return c:IsAttackBelow(2000) end,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.spcon)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(m*16)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
local function v_filter(c)
return (c:IsLocation(LOCATION_HAND) and not c:IsPublic()) or (c:IsOnField() and c:IsFacedown())
end
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(v_filter,tp,0,LOCATION_HAND+LOCATION_ONFIELD,1,nil) end
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectMatchingCard(tp,v_filter,tp,0,LOCATION_HAND+LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.ConfirmCards(tp,g)
end
end)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(m*16)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m)
e2:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end)
e2:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(v_filter,tp,0,LOCATION_HAND+LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
cm.announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCardFilter(tp,table.unpack(cm.announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD_FILTER)
end)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local g=Duel.GetMatchingGroup(v_filter,tp,0,LOCATION_HAND+LOCATION_ONFIELD,nil):Filter(Card.IsCode,nil,ac)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end)
c:RegisterEffect(e2)
end
function cm.spfilter(c,fc)
return c:IsAttack(2000) and c:IsCanBeFusionMaterial(fc)
end
function cm.spfilter_(c,fc)
return c:IsAttack(2000) and c:IsCanBeFusionMaterial(fc) and c:IsFaceup()
end
function cm.spfilter1(c,tp,g)
return g:IsExists(cm.spfilter2,1,c,tp,c)
end
function cm.spfilter2(c,tp,mc)
return Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(c,mc))>0
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetReleaseGroup(tp):Filter(cm.spfilter,nil,c)
local g2=Duel.GetMatchingGroup(1-tp):Filter(cm.spfilter_,nil,c)
g1:Merge(g2)
return g:IsExists(cm.spfilter1,1,nil,tp,g)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetReleaseGroup(tp):Filter(cm.spfilter,nil,c)
local g2=Duel.GetMatchingGroup(1-tp):Filter(cm.spfilter_,nil,c)
g1:Merge(g2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=g:FilterSelect(tp,cm.spfilter1,1,1,nil,tp,g)
local mc=g1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=g:FilterSelect(tp,cm.spfilter2,1,1,mc,tp,mc)
g1:Merge(g2)
c:SetMaterial(g1)
Duel.Release(g1,REASON_COST+REASON_FUSION+REASON_MATERIAL)
end
\ No newline at end of file
--虚拟YouTuber 薬袋Karte
local m=33700353
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,4,2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(Senya.RemoveOverlayCost(1))
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetReset(RESET_PHASE+PHASE_DAMAGE)
e2:SetValue(1)
Duel.RegisterEffect(e2,tp)
end)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and Duel.GetFlagEffect(tp,m)==0
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end)
c:RegisterEffect(e1)
if not cm.chk then
cm.chk=true
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DAMAGE)
ge1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>PHASE_MAIN1 and Duel.GetCurrentPhase()<PHASE_MAIN2
end)
ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(ep,m,RESET_PHASE+PHASE_END,0,1)
end)
end
end
--虚拟YouTuber 虹河Laki
local m=33700354
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
end
--虚拟YouTuber 梓璃梦
local m=33700355
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c37564765") end,function() require("script/c37564765") end)
function cm.initial_effect(c)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_RECOVER)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end)
e3:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if chk==0 then return #g>0 end
end)
e3:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local dg=Group.CreateGroup()
local c=e:GetHandler()
local tc=g:GetFirst()
while tc do
local preatk=tc:GetAttack()
local predef=tc:GetDefense()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if (preatk~=0 and tc:IsAttack(0)) or (predef~=0 and tc:IsDefense(0)) then dg:AddCard(tc) end
tc=g:GetNext()
end
Duel.SendtoHand(dg,nil,REASON_EFFECT)
end)
c:RegisterEffect(e3)
end
......@@ -3,7 +3,7 @@ local m=33700357
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,cm.lcheck)
aux.AddLinkProcedure(c,nil,2,3,cm.lcheck)
c:EnableReviveLimit()
--spsummon
local e3=Effect.CreateEffect(c)
......
......@@ -107,7 +107,7 @@ function card.atkop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_AVAILABLE_BD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,1)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
......
--VTuber Mochi Hiyoko
--AlphaKretin
--For Nemoma
local s = c33700413
local id = 33700413
function s.initial_effect(c)
c:SetUniqueOnField(1, 1, aux.FilterBoolFunction(Card.IsCode, id), LOCATION_MZONE)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroProcedure(
c,
aux.FilterBoolFunction(Card.IsAttackBelow, 500),
--1,
--1,
aux.NonTuner(Card.IsAttackBelow, 500),
1,
99
)
--Gain ATK
local e1 = Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id, 0))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(2500)
c:RegisterEffect(e1)
--Activate other effect
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1, id)
e2:SetTarget(s.target)
e2:SetOperation(s.activate)
c:RegisterEffect(e2)
end
function s.getValidIgnitionEffects(c, e, tp, eg, ep, ev, re, r, rp, chk)
local effs = {c:GetCardEffect()}
local validEffs = {}
for _, eff in ipairs(effs) do
if
eff:GetType() & EFFECT_TYPE_IGNITION == EFFECT_TYPE_IGNITION or
eff:GetType() & EFFECT_TYPE_QUICK_O == EFFECT_TYPE_QUICK_O
then
local con = eff:GetCondition()
local cost = eff:GetCost()
local tg = eff:GetTarget()
local event = eff:GetCode()
if
(not con or con(e, tp, eg, ep, ev, re, r, rp)) and (not cost or cost(e, tp, eg, ep, ev, re, r, rp, chk)) and
(not tg or tg(e, tp, eg, ep, ev, re, r, rp, chk)) and
(not event or event == EVENT_FREE_CHAIN)
then
validEffs[#validEffs + 1] = eff
end
end
end
return validEffs
end
function s.filter(c, e, tp, eg, ep, ev, re, r, rp, chk)
return #s.getValidIgnitionEffects(c, e, tp, eg, ep, ev, re, r, rp, chk) > 0
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return Duel.IsExistingMatchingCard(s.filter, tp, LOCATION_MZONE, 0, 1, nil, e, tp, eg, ep, ev, re, r, rp, chk)
end
local g = Duel.GetMatchingGroup(s.filter, tp, LOCATION_MZONE, 0, nil, e, tp, eg, ep, ev, re, r, rp, 0)
local tc = g:Select(tp, 1, 1, nil):GetFirst()
local sel = 1
local effs = card.getValidIgnitionEffects(tc, e, tp, eg, ep, ev, re, r, rp, 0)
if #effs > 1 then
local descs = {}
for _, eff in ipairs(effs) do
descs[#descs + 1] = eff:GetDescription()
end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_EFFECT)
sel = Duel.SelectOption(tp, table.unpack(descs)) + 1
end
local eff = effs[sel]
e:SetLabelObject(eff)
local cost = eff:GetCost()
local tg = eff:GetTarget()
if cost then
cost(e, tp, eg, ep, ev, re, r, rp, 1)
end
if tg then
tg(e, tp, eg, ep, ev, re, r, rp, 1)
end
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
e:GetLabelObject():GetOperation()(e, tp, eg, ep, ev, re, r, rp)
end
--Rapid Occurence
--AlphaKretin
--For Nemoma
local s = c33700414
local id = 33700414
local CTR = 0x144a
function s.initial_effect(c)
c:EnableCounterPermit(CTR)
--Activate
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--counter
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(s.regop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(s.ctcon)
e3:SetOperation(s.ctop)
e3:SetLabelObject(e1)
c:RegisterEffect(e3)
--reset
local e4 = Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE + PHASE_END)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1)
e4:SetCondition(s.reset)
c:RegisterEffect(e4)
--Gain LP
local e5 = Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id, 0))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1, EFFECT_COUNT_CODE_SINGLE)
e5:SetCost(s.ctcost)
e5:SetLabel(3)
e5:SetTarget(s.lptg)
e5:SetOperation(s.lpop)
c:RegisterEffect(e5)
--Gain ATK
local e6 = e5:Clone()
e6:SetDescription(aux.Stringid(id, 1))
e6:SetCategory(CATEGORY_ATKCHANGE)
e6:SetLabel(5)
e6:SetTarget(s.atktg)
e6:SetOperation(s.atkop)
c:RegisterEffect(e6)
--Draw
local e7 = e5:Clone()
e7:SetDescription(aux.Stringid(id, 2))
e7:SetCategory(CATEGORY_DRAW)
e7:SetLabel(7)
e7:SetTarget(s.drtg)
e7:SetOperation(s.drop)
c:RegisterEffect(e7)
--Set LP
local e7 = e5:Clone()
e7:SetDescription(aux.Stringid(id, 3))
e7:SetCategory(0)
e7:SetLabel(10)
e7:SetTarget(s.lptg2)
e7:SetOperation(s.lpop2)
c:RegisterEffect(e7)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return true
end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CODE)
local ac = Duel.AnnounceCard(tp)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0, CATEGORY_ANNOUNCE, nil, 0, tp, ANNOUNCE_CARD)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
local ac = Duel.GetChainInfo(0, CHAININFO_TARGET_PARAM)
e:SetLabel(ac)
e:GetHandler():SetHint(CHINT_CARD, ac)
Duel.AdjustInstantly(e:GetHandler())
end
function s.regop(e, tp, eg, ep, ev, re, r, rp)
if re:GetHandler():GetCode() == e:GetLabelObject():GetLabel() and re:GetHandlerPlayer() == tp then
e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + 0x1fc0000 + RESET_CHAIN, 0, 1)
return true
end
end
function s.ctcon(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
return c:GetFlagEffect(id) ~= 0 and c:GetFlagEffect(id + 1) < 3 and
re:GetHandler():GetCode() == e:GetLabelObject():GetLabel()
end
function s.ctop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
c:AddCounter(CTR, 1)
local ct = c:GetFlagEffect(id + 1)
c:RegisterFlagEffect(id + 1, RESET_EVENT + RESETS_STANDARD, 0, ct + 1)
end
function s.reset(e, tp, eg, ep, ev, re, r, rp)
e:GetHandler():ResetFlagEffect(id + 1)
return false
end
function s.ctcost(e, tp, eg, ep, ev, re, r, rp, chk)
local c = e:GetHandler()
local ct = e:GetLabel()
if chk == 0 then
return c:IsCanRemoveCounter(tp, CTR, ct, REASON_COST)
end
c:RemoveCounter(tp, CTR, ct, REASON_COST)
end
function s.lptg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return true
end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1500)
Duel.SetOperationInfo(0, CATEGORY_RECOVER, nil, 0, tp, 1500)
end
function s.lpop(e, tp, eg, ep, ev, re, r, rp)
local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
Duel.Recover(p, d, REASON_EFFECT)
end
function s.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 s.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:SetValue(800)
e1:SetReset(RESET_EVENT + RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2 = e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
end
end
function s.drtg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return Duel.IsPlayerCanDraw(tp, 2)
end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, 2)
end
function s.drop(e, tp, eg, ep, ev, re, r, rp)
local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
Duel.Draw(p, d, REASON_EFFECT)
end
function s.lptg2(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return Duel.GetLP(tp) ~= 8000
end
end
function s.lpop2(e, tp, eg, ep, ev, re, r, rp)
Duel.SetLP(tp, 8000)
end
--Ikamusume, the Multitasker
--AlphaKretin
--For Nemoma
local s = c33700415
local id = 33700415
function s.initial_effect(c)
--special summon
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
c:RegisterEffect(e1)
--atk
local e2 = Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id, 0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(s.optcost)
e2:SetTarget(s.atktg)
e2:SetOperation(s.atkop)
c:RegisterEffect(e2)
--draw
local e3 = Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id, 1))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCost(s.drcost)
e3:SetTarget(s.drtg)
e3:SetOperation(s.drop)
c:RegisterEffect(e3)
--atk
local e4 = Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id, 2))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(s.optcost)
e4:SetOperation(s.atkop2)
c:RegisterEffect(e4)
end
function s.spfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TOKEN)
end
function s.spcon(e, c)
if c == nil then
return true
end
local tp = c:GetControler()
return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and
Duel.IsExistingMatchingCard(s.spfilter, tp, LOCATION_MZONE, 0, 1, nil)
end
function s.tkct(tp)
return Duel.GetMatchingGroupCount(Card.IsType, tp, LOCATION_MZONE, 0, nil, TYPE_TOKEN) --tokens can't be facedown
end
function s.optcost(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return Duel.GetFlagEffect(tp, id) < s.tkct(tp)
end
Duel.RegisterFlagEffect(tp, id, RESET_PHASE + PHASE_END, Duel.GetFlagEffect(tp, id) + 1, 0)
end
function s.atktg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
if chkc then
return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsType(TYPE_TOKEN)
end
if chk == 0 then
return Duel.IsExistingTarget(Card.IsType, tp, LOCATION_MZONE, 0, 1, nil, TYPE_TOKEN)
end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
Duel.SelectTarget(tp, Card.IsType, tp, LOCATION_MZONE, 0, 1, 1, nil, TYPE_TOKEN)
end
function s.atkop(e, tp, eg, ep, ev, re, r, rp)
local tc = Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1 = Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
tc:RegisterEffect(e1)
end
end
function s.drcost(e, tp, eg, ep, ev, re, r, rp, chk)
local c = e:GetHandler()
if chk == 0 then
return s.optcost(e, tp, eg, ep, ec, re, r, rp, chk) and
Duel.CheckReleaseGroupCost(tp, Card.IsType, 1, false, nil, nil, TYPE_TOKEN) and
Duel.IsPlayerCanDraw(tp, 1)
end
local sg = Duel.SelectReleaseGroupCost(tp, Card.IsType, 1, 1, false, nil, nil, TYPE_TOKEN)
Duel.Release(sg, REASON_COST)
end
function s.drtg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return true
end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, 1)
end
function s.drop(e, tp, eg, ep, ev, re, r, rp)
local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
Duel.Draw(p, d, REASON_EFFECT)
end
function s.atkop2(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT + RESETS_STANDARD_DISABLE + RESET_PHASE + PHASE_END)
c:RegisterEffect(e1)
--pierce
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetReset(RESET_EVENT + RESETS_STANDARD)
c:RegisterEffect(e2)
end
end
--Ikamusume, Friend from the Sea
--AlphaKretin
--For Nemoma
local s = c33700416
local id = 33700416
function s.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroProcedure(c, nil, 1, 1, aux.NonTuner(Card.IsType, TYPE_TOKEN), 1, 99)
--summon token
local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.tktg)
e1:SetOperation(s.tkop)
c:RegisterEffect(e1)
--no material
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE, 0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsType, TYPE_TOKEN))
e2:SetValue(1)
c:RegisterEffect(e2)
local e3 = e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e3)
local e4 = e2:Clone()
e4:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e4)
local e5 = e2:Clone()
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e5)
--attack directly
local e6 = e2:Clone()
e6:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e6)
end
function s.tkfilter(c, tp)
return c:IsFaceup() and c:IsLevelAbove(0) and not c:IsType(TYPE_TOKEN) and
Duel.IsPlayerCanSpecialSummonMonster(
tp,
id + 1,
0,
0x4011,
c:GetAttack(),
c:GetDefense(),
c:GetLevel(),
c:GetRace(),
c:GetAttribute()
)
end
function s.tktg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
if chkc then
return chkc:IsLocation(LOCATION_MZONE) and s.tkfilter(chkc, tp)
end
if chk == 0 then
return (Duel.GetLocationCount(tp, LOCATION_MZONE) + Duel.GetLocationCount(1 - tp, LOCATION_MZONE)) > 0 and
Duel.IsExistingTarget(s.tkfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil, tp)
end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
local g = Duel.SelectTarget(tp, s.tkfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil, tp)
Duel.SetOperationInfo(0, CATEGORY_TOKEN, nil, 1, 0, 0)
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, 0)
end
function s.tkop(e, tp, eg, ep, ev, re, r, rp)
local ct1 = Duel.GetLocationCount(tp, LOCATION_MZONE)
local ct2 = Duel.GetLocationCount(1 - tp, LOCATION_MZONE)
if ct1 + ct2 <= 0 then
return
end
local tc = Duel.GetFirstTarget()
if
tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and
Duel.IsPlayerCanSpecialSummonMonster(
tp,
id + 1,
0,
0x4011,
tc:GetAttack(),
tc:GetDefense(),
tc:GetLevel(),
tc:GetRace(),
tc:GetAttribute()
)
then
local token = Duel.CreateToken(tp, id + 1)
if ct2 > 0 and (not (ct1 > 0) or Duel.SelectYesNo(tp, aux.Stringid(61665245, 2))) then
Duel.SpecialSummonStep(token, 0, tp, 1 - tp, false, false, POS_FACEUP)
else
Duel.SpecialSummonStep(token, 0, tp, tp, false, false, POS_FACEUP)
end
local e1 = Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(tc:GetAttack())
e1:SetReset(RESET_EVENT + RESETS_STANDARD)
token:RegisterEffect(e1)
local e2 = e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(tc:GetDefense())
token:RegisterEffect(e2)
local e3 = e1:Clone()
e3:SetCode(EFFECT_CHANGE_LEVEL)
e3:SetValue(tc:GetLevel())
token:RegisterEffect(e3)
local e4 = e1:Clone()
e4:SetCode(EFFECT_CHANGE_RACE)
e4:SetValue(tc:GetRace())
token:RegisterEffect(e4)
local e5 = e1:Clone()
e5:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e5:SetValue(tc:GetAttribute())
token:RegisterEffect(e5)
Duel.SpecialSummonComplete()
end
end
--Visitor from the Sea
--AlphaKretin
--For Nemoma
local s = c33700418
local id = 33700418
function s.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroProcedure(c, nil, 1, 1, aux.NonTuner(Card.IsType, TYPE_TOKEN), 1, 99)
--mat check
local e0 = Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(s.matcheck)
c:RegisterEffect(e0)
--draw
local e1 = Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id, 0))
e1:SetCategory(CATEGORY_DRAW + CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(s.drcon)
e1:SetTarget(s.drtg)
e1:SetOperation(s.drop)
e1:SetLabelObject(e0)
c:RegisterEffect(e1)
--token
local e2 = Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O + EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(s.tktg)
e2:SetOperation(s.tkop)
c:RegisterEffect(e2)
end
function s.matcheck(e, c)
e:SetLabel(c:GetMaterial():FilterCount(Card.IsType, nil, TYPE_TOKEN))
end
function s.drcon(e, tp, eg, ep, ev, re, r, rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.drtg(e, tp, eg, ep, ev, re, r, rp, chk)
local hg = Duel.GetFieldGroup(tp, LOCATION_HAND, 0)
local ct = e:GetLabelObject():GetLabel()
if chk == 0 then
return #hg > 0 and ct > 0 and Duel.IsPlayerCanDraw(tp, ct)
end
Duel.SetOperationInfo(0, CATEGORY_HANDES, hg, #hg, 0, 0)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, ct)
end
function s.drop(e, tp, eg, ep, ev, re, r, rp)
local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
local hg = Duel.GetFieldGroup(p, LOCATION_HAND, 0)
if Duel.SendtoGrave(hg, REASON_EFFECT + REASON_DISCARD) > 0 then
Duel.BreakEffect()
Duel.Draw(p, d, REASON_EFFECT)
end
end
function s.tkfilter(c, tp)
return c:IsType(TYPE_TOKEN) and
Duel.IsPlayerCanSpecialSummonMonster(
tp,
c:GetCode(),
c:GetSetCard(),
c:GetType(),
c:GetAttack(),
c:GetDefense(),
c:GetLevel(),
c:GetRace(),
c:GetAttribute()
)
end
function s.tktg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
if chkc then
return chkc:IsLocation(LOCATION_MZONE) and s.tkfilter(chkc)
end
if chk == 0 then
return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and
Duel.IsExistingTarget(s.tkfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil, tp)
end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
local g = Duel.SelectTarget(tp, s.tkfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, 1, nil, tp)
Duel.SetOperationInfo(0, CATEGORY_TOKEN, nil, 1, 0, 0)
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, 0)
end
function s.tkop(e, tp, eg, ep, ev, re, r, rp)
if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 then
return
end
local tc = Duel.GetFirstTarget()
if
tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and
Duel.IsPlayerCanSpecialSummonMonster(
tp,
tc:GetCode(),
tc:GetSetCard(),
tc:GetType(),
tc:GetAttack(),
tc:GetDefense(),
tc:GetLevel(),
tc:GetRace(),
tc:GetAttribute()
)
then
local token = Duel.CreateToken(tp, tc:GetCode())
Duel.SpecialSummon(token, 0, tp, tp, false, false, POS_FACEUP)
end
end
--Hyperactive Multitasker Ikamusume
--AlphaKretin
--For Nemoma
local s = c33700419
local id = 33700419
function s.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroProcedure(c, nil, 1, 1, aux.NonTuner(Card.IsType, TYPE_TOKEN), 1, 99)
--gain atk
local e1 = Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id, 0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCost(s.atkcost)
e1:SetOperation(s.atkop)
c:RegisterEffect(e1)
--summon token
local e2 = Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(s.tktg)
e2:SetOperation(s.tkop)
c:RegisterEffect(e2)
end
function s.atkcost(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return Duel.CheckReleaseGroupCost(
tp,
aux.FilterBoolFunction(Card.IsType, TYPE_TOKEN),
1,
false,
nil,
nil
)
end
local g =
Duel.SelectReleaseGroupCost(
tp,
aux.FilterBoolFunction(Card.IsType, TYPE_TOKEN),
1,
1,
false,
nil,
nil
)
local tc = g:GetFirst()
local atk = tc:GetTextAttack()
local def = tc:GetTextDefense()
e:SetLabel(atk * 1000 + def)
Duel.Release(g, REASON_COST)
end
function s.atkop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
local lb = e:GetLabel()
local atk = lb // 1000
local def = lb % 1000
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(atk)
e1:SetReset(RESET_EVENT + RESETS_STANDARD_DISABLE + RESET_PHASE + PHASE_END)
c:RegisterEffect(e1)
local e2 = e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(def)
c:RegisterEffect(e2)
end
end
function s.tkfilter(c, tp)
return c:IsFaceup() and
Duel.IsPlayerCanSpecialSummonMonster(
tp,
id + 1,
0,
0x4011,
c:GetAttack(),
c:GetDefense(),
4,
c:GetRace(),
c:GetAttribute()
)
end
function s.tktg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
if chkc then
return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc, tp)
end
if chk == 0 then
return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and
Duel.IsExistingTarget(s.tkfilter, tp, LOCATION_GRAVE, LOCATION_GRAVE, 1, nil, tp)
end
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_FACEUP)
local g = Duel.SelectTarget(tp, s.tkfilter, tp, LOCATION_GRAVE, LOCATION_GRAVE, 1, 1, nil, tp)
Duel.SetOperationInfo(0, CATEGORY_TOKEN, nil, 1, 0, 0)
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, 0)
end
function s.tkop(e, tp, eg, ep, ev, re, r, rp)
if Duel.GetLocationCount(tp, LOCATION_MZONE) <= 0 then
return
end
local tc = Duel.GetFirstTarget()
if
tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and
Duel.IsPlayerCanSpecialSummonMonster(
tp,
id + 1,
0,
0x4011,
tc:GetAttack(),
tc:GetDefense(),
4,
tc:GetRace(),
tc:GetAttribute()
)
then
local token = Duel.CreateToken(tp, id + 1)
Duel.SpecialSummonStep(token, 0, tp, tp, false, false, POS_FACEUP)
local e1 = Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(tc:GetAttack())
e1:SetReset(RESET_EVENT + RESETS_STANDARD)
token:RegisterEffect(e1)
local e2 = e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
e2:SetValue(tc:GetDefense())
token:RegisterEffect(e2)
local e3 = e1:Clone()
e3:SetCode(EFFECT_CHANGE_RACE)
e3:SetValue(tc:GetRace())
token:RegisterEffect(e3)
local e4 = e1:Clone()
e4:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e4:SetValue(tc:GetAttribute())
token:RegisterEffect(e4)
Duel.SpecialSummonComplete()
end
end
--Slightly Tilted
--AlphaKretin
--For Nemoma
local s = c33700421
local id = 33700421
function s.initial_effect(c)
--Activate
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Grant effect
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(s.regcon)
e2:SetOperation(s.regop)
c:RegisterEffect(e2)
local e3 = e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function s.cfilter(c, tp)
return c:GetSummonPlayer() == tp
end
function s.regcon(e, tp, eg, ep, ev, re, r, rp)
return eg:IsExists(s.cfilter, 1, nil, 1 - tp)
end
function s.regop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
for tc in aux.Next(eg:Filter(s.cfilter, nil, 1 - tp)) do
s.registerEffects(tc, c)
end
end
function s.registerEffects(c, rc)
local e1 = Effect.CreateEffect(rc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-500)
e1:SetReset(RESET_EVENT + RESETS_STANDARD - RESET_TOFIELD)
c:RegisterEffect(e1)
local e2 = Effect.CreateEffect(rc)
e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(s.inhcon1)
e2:SetOperation(s.inhop)
e2:SetReset(RESET_EVENT + RESETS_STANDARD - RESET_LEAVE - RESET_TOGRAVE - RESET_TOFIELD) --take out some resets to allow recursion
c:RegisterEffect(e2)
local e3 = e2:Clone()
e3:SetCode(EVENT_RELEASE)
e3:SetCondition(s.inhcon2)
c:RegisterEffect(e3)
c:RegisterFlagEffect(
0,
RESET_EVENT + RESETS_STANDARD - RESET_TOFIELD,
EFFECT_FLAG_CLIENT_HINT,
1,
0,
aux.Stringid(id, 0)
)
end
function s.inhcon1(e, tp, eg, ep, ev, re, r, rp)
local rc = e:GetHandler():GetReasonCard()
return rc and rc:GetSummonLocation() == LOCATION_EXTRA
end
function s.inhcon2(e, tp, eg, ep, ev, re, r, rp)
return e:GetHandler():IsReason(REASON_SUMMON)
end
function s.inhop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
local rc = c:GetReasonCard()
s.registerEffects(rc, c)
--magic hack so it does reset in grave after recursion
local a, b = e:GetReset()
if a ~= 0 or b ~= 0 then
e:Reset()
end
end
......@@ -78,7 +78,7 @@ function c33700917.initial_effect(c)
c:RegisterEffect(e42)
end
function c33700917.synfilter(c,sync)
return c:IsNotTuner(sync) and not c:IsAttribute(ATTRIBUTE_LIGHT)
return c:IsNotTuner(nil)(sync) and not c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c33700917.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -47,7 +47,7 @@ function c33700919.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c33700919.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and e:GetHandler():GetCounter(0x1b)>0 end
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and e:GetHandler():GetCounter(0x1b)>2 end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
e:SetLabel(e:GetLabelObject():GetLabel())
end
......@@ -55,7 +55,7 @@ function c33700919.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp)
e1:SetLabel(ac)
e:SetLabel(ac)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end
......
......@@ -88,8 +88,7 @@ end
function c33700921.dop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(33700921,0)) then
Duel.Recover(tp,ev,REASON_EFFECT)
else
Duel.ChangeBattleDamage(ep,0)
end
Duel.ChangeBattleDamage(ep,0)
end
--残星倩影 不知归途
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33700990
local cm=_G["c"..m]
if not rsv.Starspirit then
rsv.Starspirit={}
rsss=rsv.Starspirit
function rsss.TargetFunction(c,reset)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SELF_TOGRAVE)
e1:SetCondition(rsss.sdcon)
if reset then
e1:SetReset(rsreset.est)
end
c:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_BECOME_TARGET)
e2:SetOperation(rsss.desop1)
if reset then
e2:SetReset(rsreset.est)
end
c:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetOperation(rsss.desop2)
e3:SetLabelObject(e2)
if reset then
e3:SetReset(rsreset.est)
end
c:RegisterEffect(e3,true)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_BATTLED)
e4:SetOperation(rsss.desop3)
e4:SetLabelObject(e2)
if reset then
e4:SetReset(rsreset.est)
end
c:RegisterEffect(e4,true)
end
function rsss.sdcon(e)
return e:GetHandler():GetOwnerTargetCount()>0 and not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),33701004)
end
function rsss.desop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then
e:SetLabelObject(re)
e:SetLabel(0)
end
end
function rsss.desop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if re==e:GetLabelObject():GetLabelObject() and c:IsRelateToEffect(re) and not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),33701004) then
if Duel.GetCurrentPhase()==PHASE_DAMAGE and not Duel.IsDamageCalculated() then
e:GetLabelObject():SetLabel(1)
else
if c:IsHasEffect(EFFECT_DISABLE) then return end
if not c:IsDisabled() then Duel.SendtoGrave(c,REASON_EFFECT) end
end
end
end
function rsss.desop3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local des=e:GetLabelObject():GetLabel()
e:GetLabelObject():SetLabel(0)
if c:IsHasEffect(EFFECT_DISABLE) then return end
if des==1 and not c:IsDisabled() and not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),33701004) then
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
function rsss.SpecialSummonRule(c,con)
local e1=rscf.SetSpecialSummonProduce(c,LOCATION_HAND+LOCATION_GRAVE,rsss.sscon(con),rsss.ssop)
e1:SetValue(1)
return e1
end
function rsss.sscon(con)
return function(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and con(e,tp)
end
end
function rsss.ssop(e,tp,eg,ep,ev,re,r,rp,c)
if c:IsLocation(LOCATION_GRAVE) then
local e1=rsef.SV_REDIRECT(c,"leave",LOCATION_REMOVED,nil,rsreset.est-RESET_TOFIELD)
end
end
function rsss.MatFunction(c,fun)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCondition(rsss.efcon)
e1:SetOperation(rsss.efop(fun))
c:RegisterEffect(e1)
end
function rsss.efcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
return rc:IsPreviousLocation(LOCATION_EXTRA)
end
function rsss.efop(fun)
return function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
rsss.TargetFunction(rc,true)
local e1=fun(rc)
e1:SetReset(rsreset.est)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
rc:RegisterEffect(e2,true)
end
end
end
function rsss.DirectAttackFun(c,con)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetCondition(con)
c:RegisterEffect(e1)
end
function rsss.DamageFunction(c,op)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(rsss.damfuncon)
e1:SetOperation(op)
c:RegisterEffect(e1)
end
function rsss.damfuncon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function rsss.NoTributeFunction(c,con,fun)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,5))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(rsss.ntcon(con))
e1:SetOperation(rsss.ntop(fun))
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e2)
end
function rsss.ntcon(con)
return function(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and con(e,e:GetHandlerPlayer())
end
end
function rsss.ntop(fun)
return function(e,tp,eg,ep,ev,re,r,rp,c)
local e1=fun(c)
e1:SetReset(rsreset.est-RESET_TOFIELD)
end
end
function rsss.ActFieldFunction(c,code)
local e1=rsef.QO(c,nil,{m,6},{1,code},nil,nil,LOCATION_FZONE,nil,rscost.costself(Card.IsAbleToDeckAsCost,"td"),rsss.actg,rsss.acop)
e1:SetLabel(code)
return e1
end
function rsss.actg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(rsss.acfilter,tp,LOCATION_DECK,0,1,nil,tp,e:GetLabel()) end
end
function rsss.acfilter(c,tp,code)
if not c:IsType(TYPE_FIELD) then return false end
local te=c:GetActivateEffect()
return te:IsActivatable(tp,true) and c:IsSetCard(0x144d) and not c:IsCode(code)
end
function rsss.acop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,rsss.acfilter,tp,LOCATION_DECK,0,1,1,nil,tp,e:GetLabel()):GetFirst()
if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect()
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
function rsss.CounterFunction(c)
c:EnableCounterPermit(0x1a)
local e1=rsef.FTO(c,EVENT_TO_GRAVE,{m,7},nil,"ct,dam","de",LOCATION_SZONE,rsss.ctcon,nil,rsss.cttg,rsss.ctop)
end
function rsss.ctcon(e,tp,eg)
local f=function(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_EFFECT) and c:GetReasonEffect():GetHandler()==c
end
return eg:IsExists(f,1,nil)
end
function rsss.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function rsss.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=rscf.GetRelationThisCard()
if not c then return end
Duel.Damage(tp,500,REASON_EFFECT)
c:AddCounter(0x1a,1)
end
---------------
end
---------------
if cm then
function cm.initial_effect(c)
rsss.TargetFunction(c)
rsss.SpecialSummonRule(c,cm.con)
rsss.MatFunction(c,cm.fun)
end
function cm.con(e,tp)
return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil)
end
function cm.fun(rc)
local e1=rsef.I({rc,true},{m,0},1,"se,th",nil,LOCATION_MZONE,nil,nil,cm.tg,cm.op)
return e1
end
function cm.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x144d)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.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
---------------
end
\ No newline at end of file
--残星倩影 不知本心
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33700991
local cm=_G["c"..m]
function cm.initial_effect(c)
rsss.TargetFunction(c)
rsss.SpecialSummonRule(c,cm.con)
rsss.MatFunction(c,cm.fun)
local e3=rsef.STF(c,EVENT_SPSUMMON_SUCCESS,{m,4},nil,"dam","ptg",cm.damcon,nil,cm.damtg,cm.damop)
if not cm.check then
cm.check=true
cm.dam={[0]=0,[1]=0}
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DAMAGE)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(cm.resetcount)
Duel.RegisterEffect(ge2,0)
end
end
function cm.resetcount(e)
cm.dam={[0]=0,[1]=0}
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if r&REASON_EFFECT ~=0 then
cm.dam[ep]=cm.dam[ep]+ev
end
end
function cm.con(e,tp)
return cm.dam[tp]>0
end
function cm.fun(rc)
local e1=rsef.I({rc,true},{m,0},1,"dam",nil,LOCATION_MZONE,nil,cm.cost,cm.tg,cm.op)
return e1
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLP(tp)>=1000 end
Duel.Damage(tp,1000,REASON_COST)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function cm.damcon(e,tp,eg)
local st=e:GetHandler():GetSummonType()
return st==SUMMON_TYPE_SPECIAL+1 and cm.dam[tp]>0
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local dam=Duel.GetFlagEffectLabel(tp,m)
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local dam=cm.dam[tp]
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,dam,REASON_EFFECT)
end
--残星倩影 不知灵慧
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33700992
local cm=_G["c"..m]
function cm.initial_effect(c)
rsss.TargetFunction(c)
rsss.SpecialSummonRule(c,cm.con)
rsss.MatFunction(c,cm.fun)
local e3=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,4},nil,"dam","de",cm.setcon,nil,cm.settg,cm.setop)
end
function cm.con(e,tp)
local g1=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)
return #g2>#g1
end
function cm.fun(rc)
local e1=rsef.QO({rc,true},nil,{m,0},1,"sp",nil,LOCATION_MZONE,nil,nil,cm.tg,cm.op)
return e1
end
function cm.setfilter(c,e,tp)
if not c:IsSetCard(0x144d) then return false end
if c:IsType(TYPE_MONSTER) then return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
else
return c:IsSSetable()
end
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
end
function cm.op(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if not tc then return end
if tc:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
else
Duel.SSet(tp,tc)
end
Duel.ConfirmCards(1-tp,tc)
end
function cm.setcon(e,tp,eg)
local st=e:GetHandler():GetSummonType()
return st==SUMMON_TYPE_SPECIAL+1
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
end
function cm.setop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if not tc then return end
if tc:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
else
Duel.SSet(tp,tc)
end
end
\ No newline at end of file
--残星倩影 道路开辟
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33700993
local cm=_G["c"..m]
function cm.initial_effect(c)
rsss.TargetFunction(c)
rsss.DirectAttackFun(c,cm.con)
rsss.DamageFunction(c,cm.op)
end
function cm.con(e)
return not Duel.IsExistingMatchingCard(Card.IsFaceup,e:GetHandlerPlayer(),0,LOCATION_ONFIELD,1,nil)
end
function cm.op(e,tp)
local c=e:GetHandler()
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_MSET)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetReset(rsreset.pend)
e4:SetTargetRange(0,1)
e4:SetTarget(aux.TRUE)
Duel.RegisterEffect(e4,tp)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_SSET)
Duel.RegisterEffect(e8,tp)
local e6=e4:Clone()
e6:SetCode(EFFECT_CANNOT_TURN_SET)
Duel.RegisterEffect(e6,tp)
local e7=e4:Clone()
e7:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e7:SetTarget(cm.sumlimit)
Duel.RegisterEffect(e7,tp)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return sumpos&POS_FACEDOWN >0
end
\ No newline at end of file
--残星倩影 夙愿开辟
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33700994
local cm=_G["c"..m]
function cm.initial_effect(c)
rsss.TargetFunction(c)
rsss.DirectAttackFun(c,cm.con)
rsss.DamageFunction(c,cm.op)
if not cm.check then
cm.check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DAMAGE)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if r&REASON_EFFECT ~=0 then
local lab=Duel.GetFlagEffectLabel(tp,m)
if not lab then lab=0 end
Duel.RegisterFlagEffect(ep,m,rsreset.pend,0,1,ev+lab)
end
end
function cm.con(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),m)>0
end
function cm.op(e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_REVERSE_DAMAGE)
e1:SetTargetRange(1,0)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--残星倩影 瞬念开辟
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33700995
local cm=_G["c"..m]
function cm.initial_effect(c)
rsss.TargetFunction(c)
rsss.DirectAttackFun(c,cm.con)
rsss.DamageFunction(c,cm.op)
end
function cm.con(e)
local tp=e:GetHandlerPlayer()
local g1=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)
return #g2>#g1
end
function cm.op(e,tp)
local c=e:GetHandler()
local rct=1
if Duel.GetTurnPlayer()==tp then rct=2 end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(rsreset.pend+RESET_SELF_TURN,rct)
e1:SetTarget(cm.sumtg)
e1:SetOwnerPlayer(tp)
e1:SetTargetRange(0,1)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetReset(rsreset.pend+RESET_SELF_TURN,rct)
e2:SetValue(cm.aclimit)
e2:SetOwnerPlayer(tp)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_CHANGE_POS_E)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetReset(rsreset.pend+RESET_SELF_TURN,rct)
e3:SetTarget(cm.sumtg)
e3:SetOwnerPlayer(tp)
e3:SetTargetRange(0,1)
Duel.RegisterEffect(e3,tp)
end
function cm.sumtg(e,c)
return c:IsControler(1-e:GetOwnerPlayer())
end
function cm.aclimit(e,re,tp)
local rc=re:GetHandler()
return not rc:IsImmuneToEffect(e) and rc:IsFacedown() and rc:IsOnField() and rc:IsControler(1-e:GetOwnerPlayer())
end
--残星倩影 天破格开
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33700996
local cm=_G["c"..m]
function cm.initial_effect(c)
rsss.TargetFunction(c)
rsss.NoTributeFunction(c,cm.con,cm.op)
end
function cm.con(e,tp)
return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil)
end
function cm.op(c)
local e1=rsef.I(c,{m,0},1,"tg,dr",nil,LOCATION_MZONE,nil,nil,cm.dtg,cm.dop)
return e1
end
function cm.cfilter(c)
return c:IsFacedown() and c:IsAbleToGrave()
end
function cm.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.dop(e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--残星倩影 地破格明
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33700997
local cm=_G["c"..m]
function cm.initial_effect(c)
rsss.TargetFunction(c)
rsss.NoTributeFunction(c,cm.con,cm.op)
if not cm.check then
cm.check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DAMAGE)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
if r&REASON_EFFECT ~=0 then
local lab=Duel.GetFlagEffectLabel(tp,m)
if not lab then lab=0 end
Duel.RegisterFlagEffect(ep,m,rsreset.pend,0,1,ev+lab)
end
end
function cm.con(e,tp)
return Duel.GetFlagEffect(tp,m)>0
end
function cm.op(c)
local e1=rsef.FTO(c,EVENT_PHASE+PHASE_END,{m,0},1,"dr","ptg",LOCATION_MZONE,cm.dcon,nil,cm.dtg,cm.dop)
return e1
end
function cm.dcon(e,tp)
return Duel.GetTurnPlayer()==tp
end
function cm.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFlagEffect(tp,m)
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function cm.dop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFlagEffect(tp,m)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,ct,REASON_EFFECT)
end
--残星倩影 人破格魂
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33700998
local cm=_G["c"..m]
function cm.initial_effect(c)
rsss.TargetFunction(c)
rsss.NoTributeFunction(c,cm.con,cm.op)
end
function cm.con(e,tp)
if not tp then tp=e:GetHandlerPlayer() end
local g1=Duel.GetMatchingGroup(Card.IsFacedown,tp,LOCATION_ONFIELD,0,nil)
local g2=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)
return #g2>#g1,#g2-#g1
end
function cm.op(c)
local e1=rsef.I(c,{m,0},1,"dr","ptg",LOCATION_MZONE,nil,nil,cm.dtg,cm.dop)
return e1
end
function cm.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
local _,ct=cm.con(e)
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function cm.dop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local _,ct=cm.con(e,p)
if ct<=0 then return end
Duel.Draw(p,ct,REASON_EFFECT)
end
--残星倩影 读天时
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33700999
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
rsss.MatFunction(c,cm.fun)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_TUNER),2)
cm.fun(c)
end
function cm.fun(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_CONFIRM)
e1:SetCondition(cm.tgcon)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
return e1
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc and bc:IsRelateToBattle() and not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),33701004)
end
function cm.tgop(e)
Duel.Hint(HINT_CARD,0,m)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
--残星倩影 读人心
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33701000
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,2)
local e1=rsef.FV_CANNOT_BE_TARGET(c,"battle",nil,cm.cfilter,{LOCATION_MZONE,LOCATION_MZONE },cm.con)
local e3=rsef.FV_CANNOT_BE_TARGET(c,"effect",nil,cm.cfilter,{LOCATION_MZONE,LOCATION_MZONE },cm.con)
--effect gain
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(cm.regop)
c:RegisterEffect(e2)
e1:SetLabelObject(e2)
e3:SetLabelObject(e2)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mat=c:GetMaterial()
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) and #mat>0 and mat:IsExists(Card.IsSetCard,1,nil,0x144d)
end
function cm.regop(e,tp)
if cm.regcon(e,tp,eg,ep,ev,re,r,rp) then
e:SetLabel(1)
else
e:SetLabel(0)
end
end
function cm.con(e)
return e:GetLabelObject():GetLabel()==1
end
function cm.cfilter(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsSetCard(0x144d)
end
\ No newline at end of file
--残星倩影 知地利
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33701001
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x144d),aux.NonTuner(nil),1)
local e1=rsef.SV_INDESTRUCTABLE(c,"effect")
end
--残星倩影 阅遍三界
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33701002
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x144d),aux.NonTuner(nil),1)
local e1=rsef.STF(c,EVENT_ATTACK_ANNOUNCE,{m,0},nil,"atk,def","tg")
rsef.RegisterSolve(e1,nil,nil,rstg.target({cm.cfilter,nil,LOCATION_MZONE,0,1,1,c }),cm.op)
local e2=rsef.STF(c,EVENT_BE_BATTLE_TARGET,{m,0},nil,"atk,def","tg")
rsef.RegisterSolve(e1,nil,nil,rstg.target({cm.cfilter,nil,LOCATION_MZONE,0,1,1,c }),cm.op)
local e3=rsef.STF(c,EVENT_ATTACK_ANNOUNCE,{m,0},nil,"tg")
rsef.RegisterSolve(e1,cm.tgcon,nil,cm.tgtg,cm.tgop)
local e4=rsef.STF(c,EVENT_BE_BATTLE_TARGET,{m,0},nil,"tg")
rsef.RegisterSolve(e1,cm.tgcon,nil,cm.tgtg,cm.tgop)
end
function cm.cfilter(c)
return c:IsSetCard(0x144d) and c:IsFaceup()
end
function cm.op(e,tp)
local c=e:GetHandler()
local tc=rscf.GetTargetCard()
if not tc then return end
local e1=rsef.SV_INDESTRUCTABLE({c,tc},"effect",1,nil,rsreset.est_pend)
if tc:IsType(TYPE_MONSTER) and tc:IsFaceup() then
local e2,e3=rsef.SV_UPDATE({c,tc},"atk,def",5000,nil,rsreset.est_pend)
end
end
function cm.tgcon(e,tp)
return not Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler()) and not Duel.IsPlayerAffectedByEffect(e:GetHandlerPlayer(),33701004)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
function cm.tgop(e,tp)
local c=aux.ExceptThisCard(e)
if c then Duel.SendtoGrave(c,REASON_EFFECT) end
end
\ No newline at end of file
--那残星倩影却在灯火阑珊处
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33701003
local cm=_G["c"..m]
function cm.initial_effect(c)
rsss.TargetFunction(c)
local e1=rsef.ACT(c)
local e2=rsss.ActFieldFunction(c,m)
local e3=rsef.FTO(c,EVENT_TO_GRAVE,{m,1},nil,"th","de",LOCATION_FZONE,nil,nil,rstg.target2(cm.fun,{cm.cfilter,"th",LOCATION_GRAVE,0,1,true}),cm.thop)
end
function cm.fun(g)
Duel.SetTargetCard(g)
end
function cm.cfilter(c,e,tp,eg,ep,ev,re,r,rp)
if not eg:IsContains(c) then return false end
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x144d) and c:IsAbleToHand() and re and re:GetHandler()==c
end
function cm.thop(e,tp,eg)
local tg=rsgf.GetTargetGroup()
if #tg>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--那残星倩影识得千花万树红
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33701004
local cm=_G["c"..m]
function cm.initial_effect(c)
rsss.TargetFunction(c)
local e1=rsef.ACT(c)
local e2=rsss.ActFieldFunction(c,m)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(m)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(1,0)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_BATTLE_CONFIRM)
e4:SetRange(LOCATION_FZONE)
e4:SetCondition(cm.tgcon)
e4:SetOperation(cm.tgop)
c:RegisterEffect(e4)
end
function cm.cfilter(c,tp)
return c:IsSetCard(0x144d) and c:IsFaceup() and c:IsControler(tp)
end
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
return (ac and cm.cfilter(ac,tp)) or (bc and cm.cfilter(bc,tp))
end
function cm.tgop(e,tp)
Duel.Hint(HINT_CARD,0,m)
local ac=Duel.GetAttacker()
local bc=Duel.GetAttackTarget()
local tc=ac
if not cm.cfilter(ac,tp) then tc=bc end
Duel.SendtoGrave(tc,REASON_EFFECT)
end
--那残星倩影正颂巧器迷人心
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33701005
local cm=_G["c"..m]
function cm.initial_effect(c)
rsss.TargetFunction(c)
local e1=rsef.ACT(c)
local e2=rsss.ActFieldFunction(c,m)
local e3=rsef.FV_IMMUNE_EFFECT(c,cm.val,aux.TargetBoolFunction(Card.IsSetCard,0x144d),{LOCATION_ONFIELD,LOCATION_ONFIELD })
end
function cm.val(e,te)
local c=e:GetHandler()
local ec=te:GetHandler()
if not te:IsHasType(EFFECT_TYPE_ACTIONS) or not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return tg and #tg>=2
end
--带着负罪感与残星倩影做朋友吧
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33701006
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsss.CounterFunction(c)
local e3=rsef.FV_LIMIT(c,"dis",nil,aux.TargetBoolFunction(Card.IsPosition,POS_FACEUP_DEFENSE),{0,LOCATION_MZONE },cm.con(3))
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_MSET)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(cm.con(5))
e4:SetTargetRange(0,1)
e4:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_MONSTER))
c:RegisterEffect(e4)
local e6=e4:Clone()
e6:SetCode(EFFECT_CANNOT_TURN_SET)
c:RegisterEffect(e6)
local e7=e4:Clone()
e7:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e7:SetTarget(cm.sumlimit)
c:RegisterEffect(e7)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_SSET)
e5:SetCondition(cm.con(7))
e5:SetTarget(aux.TRUE)
c:RegisterEffect(e5)
local e8=e4:Clone()
e8:SetCode(EFFECT_CANNOT_TURN_SET)
e8:SetCondition(cm.con(7))
e8:SetTarget(aux.TRUE)
c:RegisterEffect(e8)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return sumpos&POS_FACEDOWN >0
end
function cm.con(ct)
return function(e)
local tp=e:GetHandlerPlayer()
return Duel.GetCounter(tp,1,1,0x1a)>=ct
end
end
--带着孤独感与残星倩影做朋友吧
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33701007
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsss.CounterFunction(c)
local e4=rsef.FV_LIMIT(c,"atk",nil,cm.cfilter,{0,LOCATION_MZONE },cm.con(5))
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(cm.con(3))
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_SZONE)
e5:SetTarget(cm.sumlimit)
e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(1,1)
e5:SetCondition(cm.con(7))
c:RegisterEffect(e5)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return sumpos&POS_ATTACK >0 and c:IsLocation(LOCATION_EXTRA)
end
function cm.con(ct)
return function(e)
local tp=e:GetHandlerPlayer()
return Duel.GetCounter(tp,1,1,0x1a)>=ct
end
end
--带着伤悲感与残星倩影做朋友吧
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33701008
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c)
local e2=rsss.CounterFunction(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CHANGE_DAMAGE)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(1,0)
e4:SetValue(cm.damval)
c:RegisterEffect(e4)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_SZONE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(1,0)
e6:SetCode(EFFECT_REFLECT_DAMAGE)
e6:SetCondition(cm.con(7))
e6:SetValue(1)
c:RegisterEffect(e6)
end
function cm.con(ct)
return function(e)
local tp=e:GetHandlerPlayer()
return Duel.GetCounter(tp,1,1,0x1a)>=ct
end
end
function cm.damval(e,re,val,r,rp,rc)
if cm.con(7)(e) then return val end
if r&REASON_EFFECT ~=0 and cm.con(3)(e) then return 1 end
if r&REASON_BATTLE ~=0 and cm.con(5)(e) then return 1 end
return val
end
--GA-04 亚玛丽欧·维拉蒂安 【PR】
if not pcall(function() require("expansions/script/c33700990") end) then require("script/c33700990") end
local m=33701009
local cm=_G["c"..m]
function cm.initial_effect(c)
rscf.SetSummonCondition(c)
aux.AddXyzProcedureLevelFree(c,cm.mfilter,aux.TRUE,40,40)
local e1=rsef.I(c,{m,0},{1,m,2},"sp",nil,LOCATION_EXTRA+LOCATION_GRAVE,nil,rscost.lpcost(true),cm.sptg,cm.spop)
local e3=rsef.SV_ADD(c,"att",cm.attfilter)
local e5=rsef.SV_INDESTRUCTABLE(c,"battle",1,cm.con(ATTRIBUTE_LIGHT))
local e8=rsef.I(c,{m,2},1,"th","tg",LOCATION_MZONE,cm.con(ATTRIBUTE_WATER),nil,rstg.target({Card.IsAbleToHand,"th",LOCATION_ONFIELD,0,1,1,c}),cm.thop)
local e9,e10=rsef.FV_UPDATE(c,"atk,def",1000,cm.atktg,{LOCATION_MZONE,0},cm.con(ATTRIBUTE_FIRE))
local e11=rsef.FV_INDESTRUCTABLE(c,"effect",1,cm.atktg,{LOCATION_MZONE,0},cm.con(ATTRIBUTE_FIRE))
local e12,e13=rsef.FV_UPDATE(c,"atk,def",-1000,nil,{0,LOCATION_MZONE },cm.con(ATTRIBUTE_WIND))
local e14=rsef.FV_INDESTRUCTABLE(c,"battle",1,nil,{0,LOCATION_MZONE },cm.con(ATTRIBUTE_WIND))
local e18=rsef.STO(c,EVENT_LEAVE_FIELD,{m,3},nil,"sp","de,dsp",cm.rcon,nil,cm.rtg,cm.rop)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(cm.sumlimit)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.discon)
e4:SetTarget(cm.distg)
e4:SetOperation(cm.disop)
c:RegisterEffect(e4)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,1))
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_BE_BATTLE_TARGET)
e6:SetCondition(cm.con(ATTRIBUTE_DARK))
e6:SetOperation(cm.naop)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_DEFENSE_ATTACK)
e7:SetValue(1)
e7:SetCondition(cm.con(ATTRIBUTE_EARTH))
c:RegisterEffect(e7)
local e15=Effect.CreateEffect(c)
e15:SetType(EFFECT_TYPE_FIELD)
e15:SetCode(EFFECT_DIRECT_ATTACK)
e15:SetRange(LOCATION_MZONE)
e15:SetTargetRange(LOCATION_MZONE,0)
e15:SetCondition(cm.con(ATTRIBUTE_DEVINE))
c:RegisterEffect(e15)
local e16=Effect.CreateEffect(c)
e16:SetType(EFFECT_TYPE_FIELD)
e16:SetCode(EFFECT_CHANGE_DAMAGE)
e16:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e16:SetRange(LOCATION_MZONE)
e16:SetTargetRange(0,1)
e16:SetCondition(cm.con(ATTRIBUTE_DEVINE))
e16:SetValue(cm.damval)
c:RegisterEffect(e16)
local e17=Effect.CreateEffect(c)
e17:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e17:SetCode(EVENT_LEAVE_FIELD_P)
e17:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e17:SetOperation(cm.leaveop)
c:RegisterEffect(e17)
e18:SetLabelObject(e17)
end
function cm.rcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
end
function cm.rfilter(c,e,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
local og=e:GetLabelObject():GetLabelObject()
if chk==0 then return og:IsExists(cm.rfilter,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetTargetCard(og)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_GRAVE)
end
function cm.rop(e,tp)
local c=e:GetHandler()
local og=rsgf.GetTargetGroup()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=og:FilterSelect(tp,cm.rfilter,1,1,nil):GetFirst()
if tc and rssf.SpecialSummon(tc)>0 then
local e1=rsef.SV_IMMUNE_EFFECT({c,tc},rsval.imoe,nil,rsreset.est)
local e2=rsef.SV_INDESTRUCTABLE({c,tc},"battle",1,nil,rsreset.est)
end
end
function cm.leaveop(e,tp)
local c=e:GetHandler()
local g=c:GetOverlayGroup()
local rg=g:Filter(Card.IsType,nil,TYPE_XYZ)
if #rg>0 then
rg:KeepAlive()
e:SetLabelObject(rg)
else
e:SetLabelObject(nil)
end
end
function cm.val(e,re,dam,r,rp,rc)
return dam*2
end
function cm.mfilter(c,xyzc)
return c:IsRace(RACE_PSYCHO)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA)
end
function cm.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,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.cfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsLevelBelow(2)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,true,true,POS_FACEUP)~=0 then
c:CompleteProcedure()
local lp=rscost[e]
if not lp or lp<1000 or not c:IsType(TYPE_XYZ) then return end
local ct=math.floor(lp/1000)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_DECK,0,nil)
if #g<ct then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local xg=g:Select(tp,ct,ct,nil)
Duel.Overlay(c,xg)
end
end
function cm.attfilter(e)
local c=e:GetHandler()
local g=c:GetOverlayGroup()
local att=0
for tc in aux.Next(g) do
att=att|tc:GetAttribute()
end
return att
end
function cm.con(att)
return function(e)
return e:GetHandler():IsAttribute(att)
end
end
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local loc,tg=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TARGET_CARDS)
if not tg or not tg:IsContains(c) then return false end
return Duel.IsChainDisablable(ev) and loc~=LOCATION_DECK and cm.con(ATTRIBUTE_DARK)(e)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function cm.disop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.NegateEffect(ev)
end
function cm.naop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
end
function cm.thop(e,tp)
local tc=rscf.GetTargetCard()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
local lp=2*Duel.GetLP(tp)
Duel.SetLP(tp,lp)
end
end
function cm.atktg(e,c)
return c~=e:GetOwner()
end
\ No newline at end of file
......@@ -30,4 +30,6 @@
!setname 0x44e 铁虹(Rainblo
!setname 0x445 虚拟YouTuberVTuber
!counter 0x144b 虚空指示物(Void Counter
\ No newline at end of file
!counter 0x144b 虚空指示物(Void Counter
!setname 0x144d 残星倩影(Starspirit
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment