Chaos Emperor Dragon - Envoy of the End
- Card ID:
120305001 - Format: Rush Duel
- Script:
Rush/Scripts/c120305001.lua
Stats
| Field | Value |
|---|---|
| Type | 0x29 |
| ATK | 3000 |
| DEF | 2500 |
| Level/Rank/Link | 0x8 |
| Race | 0x2000 |
| Attribute | 0x20 |
| Category | 0x440408 |
Card Text
text
You can Special Summon this card from your hand face-up to your field by placing 1 LIGHT Attribute and 1 DARK Attribute monster from your Graveyard on the bottom of the Deck in any order.
[REQUIREMENT]
If you have not activated any effect during the turn you Special Summoned this card the above way, pay 1000 LP.
[EFFECT]
Send all cards in both players' hands and fields to the Graveyard. Then, inflict damage to your opponent equal to [the number of cards sent to their Graveyard by this effect] x 300.Detected API Calls
Auxiliary.FALSEAuxiliary.StringidAuxiliary.gfcheckCard.GetControlerCard.IsAbleToDeckOrExtraAsCostCard.IsAbleToGraveCard.IsAttributeCard.IsControlerCard.RegisterEffectDuel.AddCustomActivityCounterDuel.BreakEffectDuel.DamageDuel.GetCustomActivityCountDuel.GetMZoneCountDuel.GetMatchingGroupDuel.GetOperatedGroupDuel.HintDuel.IsExistingMatchingCardDuel.SetOperationInfoEffect.CreateEffectEffect.GetHandlerEffect.GetLabelObjectEffect.SetCategoryEffect.SetConditionEffect.SetCostEffect.SetDescriptionEffect.SetLabelObjectEffect.SetOperationEffect.SetRangeEffect.SetTargetEffect.SetTypeGroup.CheckSubGroupGroup.DeleteGroupGroup.GetCountGroup.KeepAliveGroup.SelectSubGroupRushDuel.AddHandSpecialSummonProcedureRushDuel.CostPayLPRushDuel.SendToDeckBottomRushDuel.SendToGraveAndExists
Script
lua
local cm,m=GetID()
cm.name="混沌帝龙 -终焉的使者-"
function cm.initial_effect(c)
--Special Summon Procedure
RD.AddHandSpecialSummonProcedure(c,aux.Stringid(m,0),cm.spcon,cm.sptg,cm.spop,SUMMON_VALUE_SELF)
--Counter
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,aux.FALSE)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Special Summon Procedure
function cm.spcostfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsAbleToDeckOrExtraAsCost()
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetMZoneCount(tp)<=0 then return false end
local g=Duel.GetMatchingGroup(cm.spcostfilter,tp,LOCATION_GRAVE,0,nil)
return g:CheckSubGroup(aux.gfcheck,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(cm.spcostfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,aux.gfcheck,true,2,2,Card.IsAttribute,ATTRIBUTE_LIGHT,ATTRIBUTE_DARK)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=e:GetLabelObject()
RD.SendToDeckBottom(sg,e,tp,REASON_SPSUMMON)
sg:DeleteGroup()
end
--Destroy
function cm.filter(c)
return c:IsAbleToGrave()
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+SUMMON_VALUE_SELF
and Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==0
end
cm.cost=RD.CostPayLP(1000)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_HAND+LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_HAND+LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_HAND+LOCATION_ONFIELD,LOCATION_HAND+LOCATION_ONFIELD,nil)
if g:GetCount()>0 and RD.SendToGraveAndExists(g) then
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsControler,nil,1-tp)
if ct>0 then
Duel.BreakEffect()
Duel.Damage(1-tp,ct*300,REASON_EFFECT)
end
end
end