Commit 5a6ab11b authored by 森野さくら's avatar 森野さくら 🐟

update

parent 273ef087
No preview for this file type
#created by ...
#main
17292021
81015059
81015060
81015062
......@@ -8,6 +9,10 @@
81018051
81018052
81018053
81028033
81041045
#extra
81015061
!side
81028000
81028017
\ No newline at end of file
--成为偶像的二叶柚实
local m=17292021
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
aux.EnableDualAttribute(c)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(aux.IsDualState)
e3:SetTarget(cm.smtg)
e3:SetOperation(cm.smop)
c:RegisterEffect(e3)
end
function cm.smfilter(c,e,tp)
return bit.band(c:GetOriginalType(),TYPE_DUAL)~=0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.smtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.smfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(cm.smfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,nil,e,tp)
local sg=Group.CreateGroup()
local codes={}
for c in aux.Next(g) do
local code=c:GetCode()
if not sg:IsExists(Card.IsCode,1,nil,code) then
sg:AddCard(c)
table.insert(codes,code)
end
end
table.sort(codes)
local afilter={codes[1],OPCODE_ISCODE}
if #codes>1 then
--or ... or c:IsCode(codes[i])
for i=2,#codes do
table.insert(afilter,codes[i])
table.insert(afilter,OPCODE_ISCODE)
table.insert(afilter,OPCODE_OR)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local code=Duel.AnnounceCard(tp,table.unpack(afilter))
getmetatable(e:GetHandler()).announce_filter={TYPE_MONSTER,OPCODE_ISTYPE,TYPE_NORMAL,OPCODE_ISTYPE,TYPE_DUAL,OPCODE_ISTYPE,OPCODE_OR,OPCODE_AND}
Duel.SetTargetParam(code)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function cm.smop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local code=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local og=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.smfilter),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,nil,e,tp):Filter(Card.IsCode,nil,code)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=og:Select(tp,1,1,nil):GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
tc:EnableDualState()
end
Duel.SpecialSummonComplete()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function cm.aclimit(e,re,tp)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsType(TYPE_DUAL)
end
......@@ -58,7 +58,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,81015999,0x81a,TYPES_TOKEN_MONSTER,0,0,lv,RACE_FAIRY,ATTRIBUTE_EARTH) then return end
local code=81015999
if lv=3 then
if lv==3 then
code=code-1
end
local token=Duel.CreateToken(tp,code)
......
......@@ -41,11 +41,11 @@ function cm.activate(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_CHAIN_SOLVED)
e1:SetOperation(s.lpop)
e1:SetOperation(cm.lpop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.lpop(e,tp,eg,ep,ev,re,r,rp)
function cm.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
if rp==tp and re:GetHandler():IsSetCard(0x81b) then
......
......@@ -3,7 +3,7 @@ local m=81028000
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),nil,nil,aux.FilterBoolFunction(Card.IsType,TYPE_TUNER),1,99)
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),nil,nil,aux.Tuner(nil),1,99)
c:EnableReviveLimit()
--spsummon condition
local e1=Effect.CreateEffect(c)
......@@ -43,9 +43,6 @@ function cm.initial_effect(c)
e9:SetCode(21142671)
c:RegisterEffect(e9)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (bit.band(st,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO and not se)
end
function cm.costfilter(c)
return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost()
end
......
......@@ -41,9 +41,6 @@ function cm.initial_effect(c)
e9:SetCode(21142671)
c:RegisterEffect(e9)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or (bit.band(st,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO and not se)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),nil,nil,aux.FilterBoolFunction(Card.IsType,TYPE_TUNER),1,99)
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),nil,nil,aux.Tuner(nil),1,99)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
......
--所见皆我·白石唯
local m=81028033
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--synchro custom
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e0:SetCondition(cm.syncon)
e0:SetCode(EFFECT_HAND_SYNCHRO)
e0:SetTargetRange(0,1)
e0:SetTarget(cm.tfilter)
c:RegisterEffect(e0)
--spsummon from szone
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--to hand or special summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetCountLimit(1,m+900)
e3:SetCondition(cm.sscon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(cm.sstg)
e3:SetOperation(cm.ssop)
c:RegisterEffect(e3)
end
function cm.tfilter(e,c)
return c:IsSynchroType(TYPE_TUNER)
end
function cm.syncon(e)
return e:GetHandler():IsLocation(LOCATION_MZONE)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsMainPhase() and Duel.GetTurnPlayer()==1-tp
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,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function cm.spfilter(c)
return c:IsSynchroSummonable(nil) and c:IsType(TYPE_TUNER) and c:IsRace(RACE_ZOMBIE) and c:IsAttribute(ATTRIBUTE_WIND)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.AdjustAll()
if Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil)
end
end
end
end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function cm.ssfilter(c,e,tp)
if not c:IsType(TYPE_TUNER) then return false end
local sp=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if c:IsRace(RACE_ZOMBIE) and c:IsAttribute(ATTRIBUTE_WIND) then
return c:IsAbleToHand() or sp and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
else return c:IsAbleToHand() end
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.ssfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.ssfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,cm.ssfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetFirst():IsRace(RACE_ZOMBIE) and g:GetFirst():IsAttribute(ATTRIBUTE_WIND) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
else
e:SetCategory(CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if tc:IsRace(RACE_ZOMBIE) and tc:IsAttribute(ATTRIBUTE_WIND)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--
local m=81041045
local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
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:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
--grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.tg)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
end
cm.att1550_def1050=true
function cm.filter(c,tp)
return c:IsFaceup() and c:IsDefense(1050) and c:IsAttack(1550)
and Duel.IsExistingMatchingCard(cm.sfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttribute())
end
function cm.sfilter(c,attr)
return not c:IsAttribute(attr) and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) then
local attr=tc:GetAttribute()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.sfilter,tp,LOCATION_DECK,0,1,1,nil,attr)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsLevelAbove(1)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1)
tc:RegisterEffect(e1)
end
end
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