Commit 04a6fe10 authored by JoyJ's avatar JoyJ

initial commit

parents
--ラーの翼神竜EX
function c10000010.initial_effect(c)
--summon with 3 tribute
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LIMIT_SUMMON_PROC)
e1:SetCondition(c10000010.ttcon)
e1:SetOperation(c10000010.ttop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LIMIT_SET_PROC)
e2:SetCondition(c10000010.setcon)
c:RegisterEffect(e2)
--summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_DISABLE_SUMMON)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e3)
--summon success
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetOperation(c10000010.sumsuc)
c:RegisterEffect(e4)
--special summon condition
local e5=Effect.CreateEffect(c)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_CONDITION)
e5:SetValue(c10000010.splimit)
c:RegisterEffect(e5)
--One Turn Kill
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(10000010,0))
e6:SetCategory(CATEGORY_ATKCHANGE)
e6:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e6:SetCode(EVENT_SUMMON_SUCCESS)
e6:SetCost(c10000010.atkcost)
e6:SetOperation(c10000010.atkop)
c:RegisterEffect(e6)
e60=e6:Clone()
e60:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e60)
--destroy
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(10000010,1))
e7:SetCategory(CATEGORY_DESTROY)
e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetProperty(EFFECT_FLAG_CARD_TARGET)
e7:SetCode(EVENT_FREE_CHAIN)
e7:SetRange(LOCATION_MZONE)
e7:SetCountLimit(1)
e7:SetCondition(c10000010.descon)
e7:SetCost(c10000010.descost)
e7:SetTarget(c10000010.destg)
e7:SetOperation(c10000010.desop)
c:RegisterEffect(e7)
local ex1=Effect.CreateEffect(c)
ex1:SetDescription(aux.Stringid(10000010,2))
ex1:SetType(EFFECT_TYPE_IGNITION)
ex1:SetCategory(CATEGORY_TODECK+CATEGORY_TOHAND)
ex1:SetRange(LOCATION_DECK)
ex1:SetCountLimit(1,10000010+EFFECT_COUNT_CODE_DUEL)
ex1:SetTarget(c10000010.dthtg)
ex1:SetOperation(c10000010.dthop)
c:RegisterEffect(ex1)
local ex12=Effect.CreateEffect(c)
ex12:SetDescription(aux.Stringid(10000010,4))
ex12:SetType(EFFECT_TYPE_IGNITION)
ex12:SetCategory(CATEGORY_TODECK+CATEGORY_TOGRAVE)
ex12:SetRange(LOCATION_DECK)
ex12:SetCountLimit(1,10000010+EFFECT_COUNT_CODE_DUEL)
ex12:SetTarget(c10000010.dthtg2)
ex12:SetOperation(c10000010.dthop2)
c:RegisterEffect(ex12)
local ex2=Effect.CreateEffect(c)
ex2:SetType(EFFECT_TYPE_SINGLE)
ex2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ex2:SetCode(EFFECT_IMMUNE_EFFECT)
ex2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
ex2:SetRange(LOCATION_MZONE)
ex2:SetReset(RESET_EVENT+RESETS_STANDARD)
ex2:SetValue(c10000010.immune)
ex2:SetLabel(typ)
c:RegisterEffect(ex2)
local ex3=Effect.CreateEffect(c)
ex3:SetDescription(aux.Stringid(10000010,3))
ex3:SetCategory(CATEGORY_TOGRAVE)
ex3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
ex3:SetRange(LOCATION_MZONE)
ex3:SetCountLimit(1)
ex3:SetCode(EVENT_PHASE+PHASE_END)
ex3:SetCondition(c10000010.sptgcon)
ex3:SetOperation(c10000010.sptgop)
c:RegisterEffect(ex3)
local ex4=Effect.CreateEffect(c)
ex4:SetType(EFFECT_TYPE_SINGLE)
ex4:SetCode(EFFECT_PIERCE)
ex4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(ex4)
local ex5=Effect.CreateEffect(c)
ex5:SetCategory(CATEGORY_RECOVER)
ex5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ex5:SetRange(LOCATION_MZONE)
ex5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
ex5:SetCode(EVENT_BATTLE_DAMAGE)
ex5:SetCondition(c10000010.reccon)
ex5:SetOperation(c10000010.recop)
c:RegisterEffect(ex5)
end
function c10000010.reccon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c10000010.recop(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,ev,REASON_EFFECT)
end
function c10000010.sptgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c10000010.sptgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
function c10000010.immune(e,te)
return te:GetOwner()~=e:GetOwner()
and (e:GetOwner():IsSummonType(SUMMON_TYPE_SPECIAL)
or ((te:GetHandler():GetOriginalType())&(TYPE_TRAP+TYPE_MONSTER)>0))
end
function c10000010.dthtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGrave()
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetChainLimit(c10000010.chlimit)
end
function c10000010.dthop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,nil)
local tc=g:RandomSelect(tp,1)
if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
end
function c10000010.dthtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand()
and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetChainLimit(c10000010.chlimit)
end
function c10000010.dthop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,nil)
local tc=g:RandomSelect(tp,1)
if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)>0 and e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
function c10000010.chlimit(e,ep,tp)
return ep==tp
end
function c10000010.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function c10000010.ttcon(e,c,minc)
if c==nil then return true end
return minc<=3 and Duel.CheckTribute(c,3)
end
function c10000010.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectTribute(tp,c,3,3)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function c10000010.setcon(e,c,minc)
if not c then return true end
return false
end
function c10000010.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function c10000010.genchainlm(c)
return function (e,rp,tp)
return e:GetHandler()==c
end
end
function c10000010.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(c10000010.genchainlm(e:GetHandler()))
end
function c10000010.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLP(tp)>100 end
local lp=Duel.GetLP(tp)
e:SetLabel(lp-100)
Duel.PayLPCost(tp,lp-100)
end
function c10000010.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
end
function c10000010.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase() == PHASE_MAIN1 or Duel.GetCurrentPhase() == PHASE_MAIN2
end
function c10000010.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c10000010.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
Duel.SetChainLimit(c10000010.chlimit)
end
function c10000010.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
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