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

Replace c10000100.lua

parent 30033824
Pipeline #30326 canceled with stages
in 8 seconds
......@@ -244,13 +244,13 @@ function tarot.spcon1(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(REASON_COST,tp,tarot.rfilter,1,nil,tp)
return ft>-1 and Duel.CheckReleaseGroupEx(tp,tarot.rfilter,1,REASON_SPSUMMON,false,nil,tp)
end
function tarot.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,tarot.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
local g=Duel.SelectReleaseGroupEx(tp,tarot.rfilter,1,1,REASON_SPSUMMON,false,nil,tp)
Duel.Release(g,REASON_SPSUMMON)
end
function tarot.cfilter(c)
return c:IsFaceup() and c:IsCode(tarot.beiao)
......@@ -432,9 +432,9 @@ function chana.rmcostfilter(c)
return c:IsAbleToRemoveAsCost()
end
function chana.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmcostfilter,tp,LOCATION_ONFIELD,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(researcher.rmcostfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rmcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,researcher.rmcostfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Remove(g,POS_FACEDOWN,REASON_COST)
end
function chana.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -468,6 +468,7 @@ function future.summon(c,m)
--summon self
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SUMMON)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCost(future.summoncost)
e1:SetTarget(future.summontg)
......@@ -571,6 +572,9 @@ function bo.base_cost(e,tp,eg,ep,ev,re,r,rp,chk)
if e:GetProperty() then pro=e:GetProperty() end
e:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
c:AddCounter(0x50a,1)
if c:IsLocation(LOCATION_MZONE) then
Duel.RaiseEvent(c,EVENT_CUSTOM+10031031,e,0,tp,tp,0)
end
e:SetProperty(pro)
end
------------------------------------------------------伴生双子------------------------------------------
......@@ -650,5 +654,159 @@ function twins.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return twins.getsummoncount(sump)>sumpcount+count
end
function twins.countval(e,re,tp)
if twins.getsummoncount(tp)>sumpcount+count then return 0 else return cm.getsummoncount(sump)-e:GetLabel()+count end
end
\ No newline at end of file
if twins.getsummoncount(tp)>sumpcount+count then return 0 else return researcher.getsummoncount(sump)-e:GetLabel()+count end
end
--------------------------------------------------梦魔
succubus=succubus or {}
function succubus.base(c)
--battle indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
--reflect battle damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REFLECT_BATTLE_DAMAGE)
e3:SetValue(1)
c:RegisterEffect(e3)
--todeck
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetCondition(succubus.tdcon)
e1:SetValue(LOCATION_DECKBOT)
c:RegisterEffect(e1)
local e11=e1:Clone()
e11:SetCode(EFFECT_REMOVE_REDIRECT)
c:RegisterEffect(e11)
return e1,e2,e3
end
function succubus.tdcon(e)
return e:GetHandler():IsLocation(LOCATION_MZONE)
end
--------------------------------------------------神器研究员
researcher=researcher or {}
--SpecialSummon limit
function researcher.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsType(TYPE_SYNCHRO)
end
function researcher.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
function researcher.cost(e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(researcher.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--have syn monster
function researcher.check(tp)
return Duel.IsExistingMatchingCard(researcher.checkfilter,tp,LOCATION_MZONE,0,1,nil)
end
function researcher.checkfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:IsFaceup()
end
--SynchroSummon
function researcher.syn(c,m)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,m)
e1:SetLabel(m)
e1:SetCost(researcher.spcost)
e1:SetTarget(researcher.sptg)
e1:SetOperation(researcher.spop)
c:RegisterEffect(e1)
end
function researcher.matfilter(c)
return not c:IsType(TYPE_TUNER) and c:IsLevelAbove(1) and c:IsAbleToRemove()
end
function researcher.fselect(g,tp,lv)
Duel.SetSelectedCard(g)
return g:CheckWithSumEqual(Card.GetLevel,lv)
end
function researcher.spfilter(c,e,tp,mg)
local lv=c:GetLevel()
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,Group.__add(mg,e:GetHandler()),c)>0
and mg:CheckWithSumEqual(Card.GetLevel,lv-e:GetHandler():GetOriginalLevel(),1,mg:GetCount())
end
function researcher.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(researcher.matfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,c)
if chk==0 then return Duel.GetCustomActivityCount(e:GetLabel(),tp,ACTIVITY_SPSUMMON)==0 and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(researcher.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg) end
Duel.Remove(c,POS_FACEUP,REASON_COST)
researcher.cost(e,tp)
end
function researcher.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
end
function researcher.spop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(researcher.matfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,researcher.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mg):GetFirst()
if sc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=mg:SelectWithSumEqual(tp,Card.GetLevel,sc:GetLevel()-e:GetHandler():GetLevel(),1,mg:GetCount())
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)>0 then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
-------------------------------------仪式次元
shouer=shouer or {}
--SpecialSummon self
function shouer.spf(c)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetOperation(shouer.regop)
c:RegisterEffect(e2)
return e2
end
function shouer.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsSummonType(SUMMON_TYPE_RITUAL) then
local e1=Effect.CreateEffect(c)
--e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA)
e1:SetTarget(shouer.spftg)
e1:SetOperation(shouer.spfop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
function shouer.spftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return (c:IsLocation(LOCATION_GRAVE) or (c:IsLocation(LOCATION_EXTRA+LOCATION_REMOVED) and c:IsFaceup()))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function shouer.spfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
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