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

reclean

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