Commit 7fe6f0f8 authored by 聖園ミカ's avatar 聖園ミカ 🐟

reclean

parent a6954896
--ASTRO=FILMS --ASTRO=FILMS
local s,id=GetID() local s,id=GetID()
function s.eff1(c) function s.eff1(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetLabel(0) e1:SetLabel(0)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.cost) e1:SetCost(s.cost)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter) Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end end
function s.chainfilter(re,tp,cid) function s.chainfilter(re,tp,cid)
...@@ -37,10 +37,10 @@ function s.aclimit(e,re,tp) ...@@ -37,10 +37,10 @@ function s.aclimit(e,re,tp)
return true return true
end end
function s.eff1check(e,tp,eg,ep,ev,re,r,rp) function s.eff1check(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(300) Duel.SetTargetParam(300)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,300)
...@@ -48,7 +48,7 @@ end ...@@ -48,7 +48,7 @@ end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.NegateMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if #g>0 then if #g>0 then
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:IsFaceup() and not tc:IsDisabled() and not tc:IsImmuneToEffect(e) then if tc:IsFaceup() and not tc:IsDisabled() and not tc:IsImmuneToEffect(e) then
...@@ -69,42 +69,42 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,42 +69,42 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.eff2(c) function s.eff2(c)
if not s.global_check then if not s.global_check then
s.global_check=true s.global_check=true
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetOperation(s.checkop) e1:SetOperation(s.checkop)
Duel.RegisterEffect(e1,0) Duel.RegisterEffect(e1,0)
end end
end end
function s.checkop(e,tp,eg,ep,ev,re,r,rp) function s.checkop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
local p=re:GetHandlerPlayer() local p=re:GetHandlerPlayer()
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsCode(id) and Duel.GetFlagEffect(p,id)==0 then if re:IsHasType(EFFECT_TYPE_ACTIVATE) and rc:IsCode(id) and Duel.GetFlagEffect(p,id)==0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCondition(s.eff2con) e1:SetCondition(s.eff2con)
e1:SetOperation(s.eff2op) e1:SetOperation(s.eff2op)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,p) Duel.RegisterEffect(e1,p)
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1)
end end
end end
function s.eff2con(e,tp,eg,ep,ev,re,r,rp) function s.eff2con(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return rc:IsSetCard(0x438) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and not rc:IsCode(id) return rc:IsSetCard(0x438) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and not rc:IsCode(id)
end end
function s.eff2op(e,tp,eg,ep,ev,re,r,rp) function s.eff2op(e,tp,eg,ep,ev,re,r,rp)
if re:GetLabel()&0x8~=0 then return end if re:GetLabel()&0x8~=0 then return end
local op=re:GetOperation() local op=re:GetOperation()
local repop=function(e,tp,eg,ep,ev,re,r,rp) local repop=function(e,tp,eg,ep,ev,re,r,rp)
op(e,tp,eg,ep,ev,re,r,rp) op(e,tp,eg,ep,ev,re,r,rp)
local op2=s.activate local op2=s.activate
if s.eff1check(e,tp,eg,ep,ev,re,r,rp) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then if s.eff1check(e,tp,eg,ep,ev,re,r,rp) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.BreakEffect() Duel.BreakEffect()
op2(e,tp,eg,ep,ev,re,r,rp) op2(e,tp,eg,ep,ev,re,r,rp)
end end
end end
re:SetOperation(repop) re:SetOperation(repop)
...@@ -112,7 +112,7 @@ function s.eff2op(e,tp,eg,ep,ev,re,r,rp) ...@@ -112,7 +112,7 @@ function s.eff2op(e,tp,eg,ep,ev,re,r,rp)
re:SetLabel(re:GetLabel()|0x8) re:SetLabel(re:GetLabel()|0x8)
end end
function s.eff3(c) function s.eff3(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
...@@ -127,7 +127,7 @@ function s.eff3con(e,tp,eg,ep,ev,re,r,rp) ...@@ -127,7 +127,7 @@ function s.eff3con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetBattleDamage(tp)>0 return Duel.GetBattleDamage(tp)>0
end end
function s.eff3cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.eff3cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeckAsCost() end if chk==0 then return c:IsAbleToDeckAsCost() end
Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_COST) Duel.SendtoDeck(c,nil,SEQ_DECKBOTTOM,REASON_COST)
end end
...@@ -150,7 +150,7 @@ function s.eff3op(e,tp,eg,ep,ev,re,r,rp) ...@@ -150,7 +150,7 @@ function s.eff3op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.initial_effect(c) function s.initial_effect(c)
s.eff1(c) s.eff1(c)
s.eff2(c) s.eff2(c)
s.eff3(c) s.eff3(c)
end end
--STELLA --STELLA
local s,id=GetID() local s,id=GetID()
function s.sprule(c) function s.sprule(c)
c:SetUniqueOnField(1,0,47320507)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -9,7 +8,7 @@ function s.sprule(c) ...@@ -9,7 +8,7 @@ function s.sprule(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon rule --special summon rule
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetCode(EFFECT_SPSUMMON_PROC)
...@@ -32,7 +31,7 @@ end ...@@ -32,7 +31,7 @@ end
function s.sprcon(e,c) function s.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.IsExistingMatchingCard(s.sprfilter,tp,LOCATION_GRAVE,0,2,nil) return Duel.IsExistingMatchingCard(s.sprfilter,tp,LOCATION_GRAVE,0,2,nil) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function s.sprop(e,tp,eg,ep,ev,re,r,rp,c) function s.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
...@@ -68,7 +67,7 @@ function s.acinhand(c) ...@@ -68,7 +67,7 @@ function s.acinhand(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.initial_effect(c) function s.initial_effect(c)
s.sprule(c) s.sprule(c)
s.indes(c) s.indes(c)
s.atkall(c) s.atkall(c)
s.acinhand(c) s.acinhand(c)
......
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