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

1+1=3

parent d03caa8b
......@@ -52,11 +52,11 @@ function Tenka.KoikakeAtkcon(e)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function Tenka.KoikakeAtkfilter(c)
function Tenka.KoikakeAtkFilter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:GetLevel()>0
end
function Tenka.KoikakeLinkAtkval(e,c)
local lg=c:GetLinkedGroup():Filter(Tenka.KoikakeAtkfilter,nil)
local lg=c:GetLinkedGroup():Filter(Tenka.KoikakeAtkFilter,nil)
return lg:GetSum(Card.GetLevel)*300
end
function Tenka.KoikakeAtkval(e,c)
......@@ -76,21 +76,21 @@ function Tenka.Einstein(c)
ea:SetRange(LOCATION_MZONE)
ea:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ea:SetTargetRange(0,1)
ea:SetCondition(Tenka.rfcon)
ea:SetCondition(Tenka.EinsteinRfcon)
c:RegisterEffect(ea)
if not Tenka.global_check then
Tenka.global_check=true
local gea=Effect.CreateEffect(c)
gea:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
gea:SetCode(EVENT_DAMAGE)
gea:SetOperation(Tenka.checkop)
gea:SetOperation(Tenka.EinsteinCheckOp)
Duel.RegisterEffect(gea,0)
end
end
function Tenka.rfcon(e)
function Tenka.EinsteinRfcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
function Tenka.checkop(e,tp,eg,ep,ev,re,r,rp)
function Tenka.EinsteinCheckOp(e,tp,eg,ep,ev,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then
Duel.RegisterFlagEffect(ep,81024000,RESET_PHASE+PHASE_END,0,1)
end
......@@ -104,21 +104,21 @@ function Tenka.EinBattleCon(e,tp,eg,ep,ev,re,r,rp)
end
--Miyako
function Tenka.MiyakoCost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Tenka.costfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(Tenka.MiyakoCostFilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Tenka.costfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp)
local g=Duel.SelectMatchingCard(tp,Tenka.MiyakoCostFilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function Tenka.costfilter(c,tp)
function Tenka.MiyakoCostFilter(c,tp)
return ((c:IsFaceup() and bit.band(c:GetOriginalType(),TYPE_TRAP)~=0 and bit.band(c:GetOriginalType(),TYPE_CONTINUOUS)~=0 and c:IsType(TYPE_MONSTER)) or c:IsHasEffect(81049012,tp)) and c:IsAbleToGraveAsCost() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
end
--Chiyuu
function Tenka.Chiyuu(c,m)
c:SetSPSummonOnce(m)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x581f),4,2,Tenka.Chiyuufilter,aux.Stringid(81066000,0))
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x581f),4,2,Tenka.ChiyuuFilter,aux.Stringid(81066000,0))
c:EnableReviveLimit()
end
function Tenka.Chiyuufilter(c)
function Tenka.ChiyuuFilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x581f)
end
--Arisa
......@@ -129,7 +129,7 @@ function Tenka.ArisugawaArisa(c)
ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ea:SetRange(LOCATION_MZONE)
ea:SetCondition(Tenka.Arisugawaiscon)
ea:SetValue(Tenka.Arisugawaesfilter)
ea:SetValue(Tenka.ArisugawaesFilter)
c:RegisterEffect(ea)
local eb=Effect.CreateEffect(c)
eb:SetDescription(aux.Stringid(60018000,0))
......@@ -145,7 +145,7 @@ function Tenka.Arisugawaiscon(e)
local seq=e:GetHandler():GetSequence()
return seq==0 or seq==4
end
function Tenka.Arisugawaesfilter(e,te)
function Tenka.ArisugawaesFilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function Tenka.Arisugawamvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......@@ -171,7 +171,7 @@ function Tenka.ArisugawaArisaB(c)
ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ea:SetRange(LOCATION_MZONE)
ea:SetCondition(Tenka.Arisugawaiscon)
ea:SetValue(Tenka.Arisugawaesfilter)
ea:SetValue(Tenka.ArisugawaesFilter)
c:RegisterEffect(ea)
local eb=Effect.CreateEffect(c)
eb:SetDescription(aux.Stringid(60018000,0))
......@@ -290,16 +290,16 @@ function Tenka.YunaHeath(c)
end
--
function Tenka.MiuCost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Tenka.costfilter,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return Duel.IsExistingMatchingCard(Tenka.MiuCostFilter,tp,LOCATION_GRAVE,0,1,nil)
or Duel.IsPlayerAffectedByEffect(tp,1090006) end
if Duel.IsExistingMatchingCard(Tenka.costfilter,tp,LOCATION_GRAVE,0,1,nil)
if Duel.IsExistingMatchingCard(Tenka.MiuCostFilter,tp,LOCATION_GRAVE,0,1,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,1090006) or not Duel.SelectYesNo(tp,aux.Stringid(1090006,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Tenka.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,Tenka.MiuCostFilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_COST)
end
end
function Tenka.costfilter(c,tp)
function Tenka.MiuCostFilter(c,tp)
return c:IsCode(1090000) and c:IsAbleToDeckOrExtraAsCost()
end
--
......@@ -326,17 +326,17 @@ end
function Tenka.NagikoSplimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function Tenka.NagikoSpfilter(c,tp,sc)
function Tenka.NagikoSpFilter(c,tp,sc)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_PSYCHO) and c:IsControler(tp) and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0
and c:IsCanBeFusionMaterial(sc,SUMMON_TYPE_SPECIAL)
end
function Tenka.NagikoSpcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroupEx(c:GetControler(),Tenka.NagikoSpfilter,2,REASON_SPSUMMON,false,nil,c:GetControler(),c)
return Duel.CheckReleaseGroupEx(c:GetControler(),Tenka.NagikoSpFilter,2,REASON_SPSUMMON,false,nil,c:GetControler(),c)
and Duel.CheckLPCost(c:GetControler(),1000)
end
function Tenka.NagikoSptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(Tenka.NagikoSpfilter,nil,tp,c)
local rg=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON):Filter(Tenka.NagikoSpFilter,nil,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:SelectSubGroup(tp,aux.mzctcheckrel,true,2,2,tp,REASON_SPSUMMON)
if sg then
......
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