Commit 6f03fee3 authored by TanakaKotoha's avatar TanakaKotoha

gua

parent 12b3d90b
No preview for this file type
--堕天司之王 路西法 --堕天司之王 路西法
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: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.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,0,LOCATION_MZONE) 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(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,nil,TYPE_MONSTER,e:GetHandler())
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))
end Duel.ChainAttack()
if c:IsRelateToEffect(e) and c:IsChainAttackable() then end
Duel.ChainAttack()
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
...@@ -16,7 +16,6 @@ function c60150536.initial_effect(c) ...@@ -16,7 +16,6 @@ function c60150536.initial_effect(c)
e3:SetCode(EFFECT_CANNOT_ATTACK) e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE) e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(c60150536.thcon)
e3:SetTarget(c60150536.atktarget) e3:SetTarget(c60150536.atktarget)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--DISABLE --DISABLE
...@@ -25,17 +24,8 @@ function c60150536.initial_effect(c) ...@@ -25,17 +24,8 @@ function c60150536.initial_effect(c)
e5:SetCode(EFFECT_DISABLE) e5:SetCode(EFFECT_DISABLE)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,LOCATION_MZONE) e5:SetTargetRange(0,LOCATION_MZONE)
e5:SetCondition(c60150536.thcon)
e5:SetTarget(c60150536.atktarget2) e5:SetTarget(c60150536.atktarget2)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DISABLE_EFFECT)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetCondition(c60150536.thcon)
e4:SetTarget(c60150536.atktarget2)
c:RegisterEffect(e4)
-- --
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60150536,0)) e1:SetDescription(aux.Stringid(60150536,0))
...@@ -45,7 +35,7 @@ function c60150536.initial_effect(c) ...@@ -45,7 +35,7 @@ function c60150536.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c60150536.actcon) e1:SetCondition(c60150536.actcon)
e1:SetCost(c60150536.cost) e1:SetCost(c60150536.cost)
e1:SetTarget(c60150536.thtg) e1:SetTarget(c60150536.thtg)
e1:SetOperation(c60150536.thop) e1:SetOperation(c60150536.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -83,8 +73,8 @@ function c60150536.actcon(e) ...@@ -83,8 +73,8 @@ function c60150536.actcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,60150514) return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,60150514)
end end
function c60150536.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c60150536.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c60150536.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c60150536.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) 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