Commit 236201e9 authored by TanakaKotoha's avatar TanakaKotoha

new and fix

parent 9f1a4299
--堕天司之王 路西法 --堕天司之王 路西法
function c47579900.initial_effect(c) function c47579900.initial_effect(c)
c:SetUniqueOnField(1,0,47579900) c:SetUniqueOnField(1,0,47579900)
--xyz summon --xyz summon
aux.AddXyzProcedureLevelFree(c,c47579900.mfilter,c47579900.xyzcheck,3,3) aux.AddXyzProcedureLevelFree(c,c47579900.mfilter,c47579900.xyzcheck,3,3)
c:EnableReviveLimit() c:EnableReviveLimit()
--pendulum summon --pendulum summon
aux.EnablePendulumAttribute(c,false) aux.EnablePendulumAttribute(c,false)
--cannot special summon --cannot special summon
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION) e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.xyzlimit) e0:SetValue(aux.xyzlimit)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--inactivatable --inactivatable
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_INACTIVATE) e1:SetCode(EFFECT_CANNOT_INACTIVATE)
e1:SetRange(LOCATION_SZONE) e1:SetRange(LOCATION_SZONE)
e1:SetValue(c47579900.effectfilter) e1:SetValue(c47579900.effectfilter)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DISEFFECT) e2:SetCode(EFFECT_CANNOT_DISEFFECT)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetValue(c47579900.effectfilter) e2:SetValue(c47579900.effectfilter)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atkup --atkup
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(47579900,0)) e3:SetDescription(aux.Stringid(47579900,0))
e3:SetCategory(CATEGORY_REMOVE) e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c47579900.xyzcon) e3:SetCondition(c47579900.xyzcon)
e3:SetTarget(c47579900.rmtg) e3:SetOperation(c47579900.rmop)
e3:SetOperation(c47579900.rmop) c:RegisterEffect(e3)
c:RegisterEffect(e3) --repeat attack
--repeat attack local e4=Effect.CreateEffect(c)
local e4=Effect.CreateEffect(c) e4:SetCategory(CATEGORY_TOHAND)
e4:SetCategory(CATEGORY_TOHAND) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e4:SetCode(EVENT_BATTLE_START)
e4:SetCode(EVENT_BATTLE_START) e4:SetOperation(c47579900.ovop)
e4:SetOperation(c47579900.ovop) c:RegisterEffect(e4)
c:RegisterEffect(e4) --effect gian
--effect gian local e5=Effect.CreateEffect(c)
local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e5:SetCode(EVENT_ADJUST)
e5:SetCode(EVENT_ADJUST) e5:SetRange(LOCATION_MZONE)
e5:SetRange(LOCATION_MZONE) e5:SetOperation(c47579900.efop)
e5:SetOperation(c47579900.efop) c:RegisterEffect(e5)
c:RegisterEffect(e5) --spsummon bgm
--spsummon bgm local e9=Effect.CreateEffect(c)
local e9=Effect.CreateEffect(c) e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e9:SetCode(EVENT_SPSUMMON_SUCCESS)
e9:SetCode(EVENT_SPSUMMON_SUCCESS) e9:SetOperation(c47579900.spsuc)
e9:SetOperation(c47579900.spsuc) c:RegisterEffect(e9)
c:RegisterEffect(e9)
end end
function c47579900.effectfilter(e,ct) function c47579900.effectfilter(e,ct)
local p=e:GetHandler():GetControler() local p=e:GetHandler():GetControler()
local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION) local te,tp,loc=Duel.GetChainInfo(ct,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER,CHAININFO_TRIGGERING_LOCATION)
return p==tp and te:GetHandler():IsCode(47579900) and bit.band(loc,LOCATION_ONFIELD)~=0 return p==tp and te:GetHandler():IsCode(47579900) and bit.band(loc,LOCATION_ONFIELD)~=0
end end
function c47579900.mfilter(c) function c47579900.mfilter(c)
return c:IsSetCard(0x95de) return c:IsSetCard(0x95de)
end end
function c47579900.xyzcheck(g) function c47579900.xyzcheck(g)
return g:GetClassCount(Card.GetCode)==g:GetCount() return g:GetClassCount(Card.GetCode)==g:GetCount()
end end
function c47579900.xyzcon(e,tp,eg,ep,ev,re,r,rp) function c47579900.xyzcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function c47579900.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c47579900.rmfilter(c)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end return c:IsType(TYPE_MONSTER)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_MZONE)
end end
function c47579900.rmop(e,tp,eg,ep,ev,re,r,rp) function c47579900.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_MONSTER,e:GetHandler()) local g=Duel.GetMatchingGroup(c47579900.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,aux.ExceptThisCard(e))
local tg=g:GetMaxGroup(Card.GetAttack) local tg=g:GetMaxGroup(Card.GetAttack)
if tg:GetCount()>0 then if tg:GetCount()>0 then
Duel.Remove(tg,POS_FACEDOWN,REASON_RULE) Duel.Remove(tg,POS_FACEDOWN,REASON_RULE)
end end
end end
function c47579900.ovop(e,tp,eg,ep,ev,re,r,rp) function c47579900.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetAttacker() local tc=Duel.GetAttacker()
if c==tc then tc=Duel.GetAttackTarget() end if c==tc then tc=Duel.GetAttackTarget() end
if tc and tc:IsRelateToBattle() then if tc and tc:IsRelateToBattle() then
local og=tc:GetOverlayGroup() local og=tc:GetOverlayGroup()
if og:GetCount()>0 then if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE) Duel.SendtoGrave(og,REASON_RULE)
end end
Duel.Overlay(c,Group.FromCards(tc)) Duel.Overlay(c,Group.FromCards(tc))
Duel.ChainAttack() Duel.ChainAttack()
end end
end end
function c47579900.effilter(c) function c47579900.effilter(c)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER)
end end
function c47579900.efop(e,tp,eg,ep,ev,re,r,rp) function c47579900.efop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ct=c:GetOverlayGroup(tp,1,0) local ct=c:GetOverlayGroup(tp,1,0)
local wg=ct:Filter(c47579900.effilter,nil,tp) local wg=ct:Filter(c47579900.effilter,nil,tp)
local wbc=wg:GetFirst() local wbc=wg:GetFirst()
while wbc do while wbc do
local code=wbc:GetOriginalCode() local code=wbc:GetOriginalCode()
if c:IsFaceup() and c:GetFlagEffect(code)==0 then if c:IsFaceup() and c:GetFlagEffect(code)==0 then
c:CopyEffect(code,RESET_EVENT+0x1fe0000+EVENT_CHAINING,1) c:CopyEffect(code,RESET_EVENT+0x1fe0000+EVENT_CHAINING,1)
c:RegisterFlagEffect(code,RESET_EVENT+0x1fe0000+EVENT_CHAINING,0,1) c:RegisterFlagEffect(code,RESET_EVENT+0x1fe0000+EVENT_CHAINING,0,1)
end end
wbc=wg:GetNext() wbc=wg:GetNext()
end end
end end
function c47579900.spsuc(e,tp,eg,ep,ev,re,r,rp) function c47579900.spsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(47579900,1)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(47579900,1))
Duel.Hint(HINT_SOUND,0,aux.Stringid(47579900,2)) Duel.Hint(HINT_SOUND,0,aux.Stringid(47579900,2))
end end
\ No newline at end of file
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