--Combatustion Arm Dragon local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddOrigBigbangType(c) aux.AddBigbangProc(c,Card.IsNeutral,1,Card.IsNegative,2) --Must first be BigBang Summoned. local e0=Effect.CreateEffect(c) e0:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_SPSUMMON_CONDITION) e0:SetValue(s.bblimit) c:RegisterEffect(e0) --If another card you control, except a Token, is destroyed by battle or an opponent's card effect: You can Special Summon 1 "Combat Arm Token" (Machine/DARK/Level 2/ATK 1000/DEF 1000) in Defense Position. local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_DESTROYED) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,{id,0}) e1:SetCondition(s.spcon) e1:SetTarget(s.sptg) e1:SetOperation(s.spop) c:RegisterEffect(e1) --While you control a "Combat Arm Token", this card cannot be destroyed by battle or card effects. local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetRange(LOCATION_MZONE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCondition(s.indcon) e2:SetValue(1) c:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) c:RegisterEffect(e3) --You can Tribute 1 Token you control; inflict damage to your opponent equal to this card's original DEF. local e4=Effect.CreateEffect(c) e4:SetCategory(CATEGORY_DAMAGE) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetCountLimit(1,{id,1}) e4:SetCost(s.damcost) e4:SetTarget(s.damtg) e4:SetOperation(s.damop) c:RegisterEffect(e4) --If a "Combat Arm Token" is destroyed or used as material: Banish this card, and if you do, take 1000 damage. local e5=Effect.CreateEffect(c) e5:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e5:SetCode(EVENT_LEAVE_FIELD) e5:SetRange(LOCATION_MZONE) e5:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e5:SetCountLimit(1,{id,2}) e5:SetCondition(s.bancon) e5:SetTarget(s.bantg) e5:SetOperation(s.banop) c:RegisterEffect(e5) end s.listed_names={id+1} function s.bblimit(e,se,sp,st) return st&SUMMON_TYPE_BIGBANG==SUMMON_TYPE_BIGBANG end function s.cfilter(c,tp) return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and not c:IsType(TYPE_TOKEN) and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT)) and c:GetReasonPlayer()==1-tp) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,1000,1000,2,RACE_MACHINE,ATTRIBUTE_DARK) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) end function s.spop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,id+1,0,TYPES_TOKEN,1000,1000,2,RACE_MACHINE,ATTRIBUTE_DARK) then local token=Duel.CreateToken(tp,id+1) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE) end end function s.indcon(e) return Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil,id+1) end function s.damcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroupCost(tp,Card.IsType,1,false,nil,nil,TYPE_TOKEN) end local g=Duel.SelectReleaseGroupCost(tp,Card.IsType,1,1,false,nil,nil,TYPE_TOKEN) Duel.Release(g,REASON_COST) end function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(e:GetHandler():GetBaseDefense()) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetHandler():GetBaseDefense()) end function s.damop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) Duel.Damage(p,d,REASON_EFFECT) end function s.banfilter(c,tp) return c:IsPreviousControler(tp) and c:GetPreviousCodeOnField()==id+1 and (c:IsReason(REASON_DESTROY) or c:IsReason(REASON_MATERIAL)) end function s.bancon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.banfilter,1,nil,tp) end function s.bantg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_REMOVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,1000) end function s.banop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 then Duel.Damage(tp,1000,REASON_EFFECT) end end