Commit ece0b9e9 authored by mercury233's avatar mercury233

add scripts NCF1

parent 2566d0a2
--CiNo.1000 夢幻虚光神ヌメロニアス・ヌメロニア
function c15862758.initial_effect(c)
--Xyz Summon
aux.AddXyzProcedure(c,nil,13,5)
c:EnableReviveLimit()
--Gains the following effects
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c15862758.condition)
e1:SetOperation(c15862758.operation)
c:RegisterEffect(e1)
--Negate Attack/Gains LP
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(15862758,0))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c15862758.nacon)
e2:SetCost(c15862758.nacost)
e2:SetTarget(c15862758.natg)
e2:SetOperation(c15862758.naop)
c:RegisterEffect(e2)
end
c15862758.xyz_number=1000
function c15862758.condition(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(89477759)
end
function c15862758.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--100,000 ATK
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c15862758.atkcon)
e1:SetValue(100000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--Must attack this card
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_MUST_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c15862758.effcon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_MUST_ATTACK_MONSTER)
e3:SetValue(c15862758.atklimit)
c:RegisterEffect(e3)
--Win Condition
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetCondition(c15862758.wincon)
e4:SetOperation(c15862758.winop)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4)
end
function c15862758.atkcon(e)
return Duel.GetTurnPlayer()==1-e:GetHandlerPlayer()
end
function c15862758.effcon(e)
return Duel.GetTurnCount()>=e:GetHandler():GetTurnID()+1
end
function c15862758.atklimit(e,c)
return c==e:GetHandler()
end
function c15862758.wincon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp and e:GetHandler():GetBattledGroupCount()==0 and c15862758.effcon(e)
end
function c15862758.winop(e,tp,eg,ep,ev,re,r,rp)
local WIN_REASON_NUMERONIUS_NUMERONIA=0x21
Duel.Win(tp,WIN_REASON_NUMERONIUS_NUMERONIA)
end
function c15862758.nacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c15862758.nacost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c15862758.natg(e,tp,eg,ep,ev,re,r,rp,chk)
local b=Duel.GetAttacker()
if chk==0 then return b and b:IsRelateToBattle() and b:IsFaceup() end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,b:GetAttack())
end
function c15862758.naop(e,tp,eg,ep,ev,re,r,rp)
local b=Duel.GetAttacker()
if Duel.NegateAttack() and b and b:IsRelateToBattle() and b:IsFaceup() then
Duel.Recover(tp,b:GetAttack(),REASON_EFFECT)
end
end
--ヌメロン・カオス・リチューアル
function c41850466.initial_effect(c)
--Activate/Special Summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c41850466.xyzcon)
e1:SetTarget(c41850466.xyztg)
e1:SetOperation(c41850466.xyzop)
c:RegisterEffect(e1)
if not c41850466.global_check then
c41850466.global_check=true
local ge1=Effect.GlobalEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DESTROYED)
ge1:SetOperation(c41850466.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c41850466.cfilter(c)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousCodeOnField()==79747096
and c:IsReason(REASON_EFFECT) and c:GetReasonEffect():IsActiveType(TYPE_MONSTER)
end
function c41850466.checkop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(c41850466.cfilter,nil)
for tc in aux.Next(g) do
Duel.RegisterFlagEffect(tc:GetPreviousControler(),41850466,RESET_PHASE+PHASE_END,0,1)
end
end
function c41850466.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,41850466)>0
end
function c41850466.xyzfilter1(c)
return c:IsType(TYPE_XYZ) and c:IsSetCard(0x114a) and c:IsCanOverlay() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c41850466.xyzfilter2(c)
return c:IsCode(41418852) and c:IsCanOverlay() and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c41850466.xyzfilter3(c,e,tp)
return c:IsCode(89477759) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c41850466.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c41850466.xyzfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
and Duel.IsExistingTarget(c41850466.xyzfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,4,nil)
and Duel.IsExistingMatchingCard(c41850466.xyzfilter3,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg1=Duel.SelectTarget(tp,c41850466.xyzfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg2=Duel.SelectTarget(tp,c41850466.xyzfilter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,4,4,nil)
sg1:Merge(sg2)
local g=sg1:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
if #g>0 then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,#g,0,0)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c41850466.mtfilter(c,e)
return c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e)
end
function c41850466.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c41850466.xyzfilter3,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local sc=sg:GetFirst()
if sc and Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(10000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetValue(1000)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
sc:RegisterEffect(e2)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local g=tg:Filter(c41850466.mtfilter,nil,e)
if #g==5 then
Duel.Overlay(sc,g)
end
end
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetTargetRange(1,0)
e1:SetLabel(c41850466.getsummoncount(tp))
e1:SetTarget(c41850466.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_LEFT_SPSUMMON_COUNT)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetLabel(c41850466.getsummoncount(tp))
e3:SetValue(c41850466.countval)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c41850466.getsummoncount(tp)
return Duel.GetActivityCount(tp,ACTIVITY_SUMMON)+Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)
end
function c41850466.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c41850466.getsummoncount(sump)>e:GetLabel()
end
function c41850466.countval(e,re,tp)
if c41850466.getsummoncount(tp)>e:GetLabel() then return 0 else return 1 end
end
--CNo.1000 夢幻虚神ヌメロニアス
function c89477759.initial_effect(c)
--Xyz Summon
aux.AddXyzProcedure(c,nil,12,5)
c:EnableReviveLimit()
--Destroy 1 other monster
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(89477759,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c89477759.descost1)
e1:SetTarget(c89477759.destg1)
e1:SetOperation(c89477759.desop1)
c:RegisterEffect(e1)
--Destroy all/Special Summon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_GRAVE_SPSUMMON)
e2:SetDescription(aux.Stringid(89477759,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c89477759.destg2)
e2:SetOperation(c89477759.desop2)
c:RegisterEffect(e2)
--Xyz Summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(89477759,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c89477759.spcon)
e3:SetTarget(c89477759.sptg)
e3:SetOperation(c89477759.spop)
c:RegisterEffect(e3)
end
c89477759.xyz_number=1000
function c89477759.descost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c89477759.destg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c89477759.desop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,aux.ExceptThisCard(e))
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
function c89477759.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local sg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c89477759.spfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c89477759.desop2(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if Duel.Destroy(dg,REASON_EFFECT)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local g=Duel.GetMatchingGroup(c89477759.spfilter2,tp,0,LOCATION_GRAVE,nil,e,tp)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(89477759,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
end
function c89477759.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetOverlayCount()>0 and c:IsPreviousLocation(LOCATION_MZONE)
and rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousControler(tp)
end
function c89477759.spfilter(c,e,tp)
return c:IsCode(15862758) and c:IsType(TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c89477759.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c89477759.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and e:GetHandler():IsCanOverlay() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c89477759.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c89477759.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c))
end
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