Commit 5dba80ff authored by Tachibana's avatar Tachibana

1145141919810

parent f86173c9
...@@ -13,10 +13,10 @@ function Tenka.Shizuka(c) ...@@ -13,10 +13,10 @@ function Tenka.Shizuka(c)
eb:SetRange(LOCATION_MZONE) eb:SetRange(LOCATION_MZONE)
eb:SetCode(EFFECT_INDESTRUCTABLE_COUNT) eb:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
eb:SetCountLimit(1) eb:SetCountLimit(1)
eb:SetValue(Tenka.valcon) eb:SetValue(Tenka.ShizukaValcon)
c:RegisterEffect(eb) c:RegisterEffect(eb)
end end
function Tenka.valcon(e,re,r,rp) function Tenka.ShizukaValcon(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 return bit.band(r,REASON_BATTLE)~=0
end end
--Kitakami Reika, 81015xxx(81015028~ ), 0x81a --Kitakami Reika, 81015xxx(81015028~ ), 0x81a
...@@ -35,8 +35,8 @@ function Tenka.KoikakeRitual(c) ...@@ -35,8 +35,8 @@ function Tenka.KoikakeRitual(c)
ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE) ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ea:SetRange(LOCATION_MZONE) ea:SetRange(LOCATION_MZONE)
ea:SetCode(EFFECT_UPDATE_ATTACK) ea:SetCode(EFFECT_UPDATE_ATTACK)
ea:SetCondition(Tenka.atkcon) ea:SetCondition(Tenka.KoikakeAtkcon)
ea:SetValue(Tenka.btkval) ea:SetValue(Tenka.KoikakeAtkval)
c:RegisterEffect(ea) c:RegisterEffect(ea)
end end
function Tenka.KoikakeLink(c) function Tenka.KoikakeLink(c)
...@@ -45,22 +45,22 @@ function Tenka.KoikakeLink(c) ...@@ -45,22 +45,22 @@ function Tenka.KoikakeLink(c)
ea:SetCode(EFFECT_UPDATE_ATTACK) ea:SetCode(EFFECT_UPDATE_ATTACK)
ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE) ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ea:SetRange(LOCATION_MZONE) ea:SetRange(LOCATION_MZONE)
ea:SetCondition(Tenka.atkcon) ea:SetCondition(Tenka.KoikakeAtkcon)
ea:SetValue(Tenka.atkval) ea:SetValue(Tenka.KoikakeLinkAtkval)
c:RegisterEffect(ea) c:RegisterEffect(ea)
end end
function Tenka.atkcon(e) function Tenka.KoikakeAtkcon(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function Tenka.atkfilter(c) function Tenka.KoikakeAtkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:GetLevel()>0 return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:GetLevel()>0
end end
function Tenka.atkval(e,c) function Tenka.KoikakeLinkAtkval(e,c)
local lg=c:GetLinkedGroup():Filter(Tenka.atkfilter,nil) local lg=c:GetLinkedGroup():Filter(Tenka.KoikakeAtkfilter,nil)
return lg:GetSum(Card.GetLevel)*300 return lg:GetSum(Card.GetLevel)*300
end end
function Tenka.btkval(e,c) function Tenka.KoikakeAtkval(e,c)
return c:GetLevel()*300 return c:GetLevel()*300
end end
--kobayashi maid dragon --kobayashi maid dragon
...@@ -77,12 +77,14 @@ function Tenka.MaidDragon(c) ...@@ -77,12 +77,14 @@ function Tenka.MaidDragon(c)
c:RegisterEffect(ea) c:RegisterEffect(ea)
end end
-- --
--
function Tenka.Asamiya(c) function Tenka.Asamiya(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddCodeList(c,81027000) aux.AddCodeList(c,81027000)
aux.EnableChangeCode(c,81027000,LOCATION_MZONE+LOCATION_HAND) aux.EnableChangeCode(c,81027000,LOCATION_MZONE+LOCATION_HAND)
end end
-- --
--
function Tenka.Einstein(c) function Tenka.Einstein(c)
local ea=Effect.CreateEffect(c) local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_FIELD) ea:SetType(EFFECT_TYPE_FIELD)
...@@ -109,6 +111,7 @@ function Tenka.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -109,6 +111,7 @@ function Tenka.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(ep,81024000,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(ep,81024000,RESET_PHASE+PHASE_END,0,1)
end end
end end
--
function Tenka.EinMainCon(e,tp,eg,ep,ev,re,r,rp) function Tenka.EinMainCon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,81024000)~=0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return Duel.GetFlagEffect(tp,81024000)~=0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end end
...@@ -117,6 +120,7 @@ function Tenka.EinBattleCon(e,tp,eg,ep,ev,re,r,rp) ...@@ -117,6 +120,7 @@ function Tenka.EinBattleCon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and c:IsRelateToBattle() return ep==tp and c:IsRelateToBattle()
end end
-- --
--
function Tenka.Pendulum(c) function Tenka.Pendulum(c)
if not Auxiliary.PendulumChecklist then if not Auxiliary.PendulumChecklist then
Auxiliary.PendulumChecklist=0 Auxiliary.PendulumChecklist=0
...@@ -285,6 +289,7 @@ function Tenka.SelectGroupNew(tp,desc,cancelable,g,f,cg,min,max,...) ...@@ -285,6 +289,7 @@ function Tenka.SelectGroupNew(tp,desc,cancelable,g,f,cg,min,max,...)
return g:SelectSubGroup(tp,f,cancelable,min,max,...) return g:SelectSubGroup(tp,f,cancelable,min,max,...)
end end
-- --
--
function Tenka.MiyakoCost(e,tp,eg,ep,ev,re,r,rp,chk) 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.costfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
...@@ -295,6 +300,7 @@ function Tenka.costfilter(c,tp) ...@@ -295,6 +300,7 @@ function Tenka.costfilter(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()) 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 end
-- --
--
function Tenka.FlowerKnightGirl(c) function Tenka.FlowerKnightGirl(c)
--synchro limit --synchro limit
local ea=Effect.CreateEffect(c) local ea=Effect.CreateEffect(c)
...@@ -316,3 +322,121 @@ function Tenka.Chiyuufilter(c) ...@@ -316,3 +322,121 @@ function Tenka.Chiyuufilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x581f) return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x581f)
end end
-- --
--
function Tenka.Lamunation(c,m)
local ea=Effect.CreateEffect(c)
ea:SetCategory(CATEGORY_SPECIAL_SUMMON)
ea:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
ea:SetCode(EVENT_PHASE+PHASE_END)
ea:SetRange(LOCATION_GRAVE)
ea:SetCountLimit(1,m+900)
ea:SetTarget(Tenka.LamunationSptg)
ea:SetOperation(Tenka.LamunationSpop)
c:RegisterEffect(ea)
end
--
function Tenka.LamunationBeast(c,m)
local ea=Effect.CreateEffect(c)
ea:SetCategory(CATEGORY_SPECIAL_SUMMON)
ea:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
ea:SetCode(EVENT_PHASE+PHASE_STANDBY)
ea:SetRange(LOCATION_GRAVE)
ea:SetCountLimit(1,m+900)
ea:SetTarget(Tenka.LamunationSptg)
ea:SetOperation(Tenka.LamunationSpop)
c:RegisterEffect(ea)
end
--
function Tenka.LamunationFusion(c,m)
local ea=Effect.CreateEffect(c)
ea:SetCategory(CATEGORY_SPECIAL_SUMMON)
ea:SetType(EFFECT_TYPE_QUICK_O)
ea:SetCode(EVENT_FREE_CHAIN)
ea:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
ea:SetRange(LOCATION_GRAVE)
ea:SetCountLimit(1,m+900)
ea:SetCondition(Tenka.LamunationFusionSpcon)
ea:SetTarget(Tenka.LamunationSptg)
ea:SetOperation(Tenka.LamunationSpop)
c:RegisterEffect(ea)
end
function Tenka.LamunationCfilter(c)
return c:IsFaceup() and c:IsSummonLocation(LOCATION_GRAVE) and c:IsAttack(1550) and c:IsDefense(1050) and not c:IsType(TYPE_FUSION)
end
function Tenka.LamunationFusionSpcon(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then return false end
return Duel.IsExistingMatchingCard(Tenka.LamunationCfilter,tp,LOCATION_MZONE,0,1,nil)
end
--
function Tenka.LamunationFusion2(c,m)
local ea=Effect.CreateEffect(c)
ea:SetCategory(CATEGORY_SPECIAL_SUMMON)
ea:SetType(EFFECT_TYPE_QUICK_O)
ea:SetCode(EVENT_FREE_CHAIN)
ea:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
ea:SetRange(LOCATION_GRAVE)
ea:SetCountLimit(1,m+900)
ea:SetCondition(Tenka.LamunationFusionSpcon2)
ea:SetTarget(Tenka.LamunationSptg)
ea:SetOperation(Tenka.LamunationSpop)
c:RegisterEffect(ea)
end
function Tenka.LamunationDfilter(c)
return c:IsFaceup() and c:IsSummonLocation(LOCATION_GRAVE) and c:IsAttack(1550) and c:IsDefense(1050) and c:IsType(TYPE_FUSION) and not c:IsCode(m)
end
function Tenka.LamunationFusionSpcon2(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then return false end
return Duel.IsExistingMatchingCard(Tenka.LamunationDfilter,tp,LOCATION_MZONE,0,1,nil)
end
--
function Tenka.Lamunation2(c,m)
local ea=Effect.CreateEffect(c)
ea:SetCategory(CATEGORY_SPECIAL_SUMMON)
ea:SetType(EFFECT_TYPE_QUICK_O)
ea:SetCode(EVENT_FREE_CHAIN)
ea:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
ea:SetRange(LOCATION_GRAVE)
ea:SetCountLimit(1,m+900)
ea:SetCondition(Tenka.LamunationSpcon)
ea:SetTarget(Tenka.LamunationSptg)
ea:SetOperation(Tenka.LamunationSpop)
c:RegisterEffect(ea)
end
function Tenka.LamunationEfilter(c)
return c:IsFaceup() and c:IsSummonLocation(LOCATION_GRAVE) and c:IsAttack(1550) and c:IsDefense(1050) and not c:IsCode(m)
end
function Tenka.LamunationSpcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.IsExistingMatchingCard(Tenka.LamunationEfilter,tp,LOCATION_MZONE,0,1,nil) and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
--
function Tenka.LamunationSptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function Tenka.LamunationSpop(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
--
function Tenka.LamunationLimit(c,tp)
local c=e:GetHandler()
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_FIELD)
ea:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ea:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
ea:SetTargetRange(1,0)
ea:SetTarget(Tenka.LamunationSplimit)
if Duel.GetTurnPlayer()==tp then
ea:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
ea:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN)
end
Duel.RegisterEffect(ea,tp)
end
function Tenka.LamunationSplimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_DECK)
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