--Anbionic Photoforge Dragon local s,id,o=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddOrigBigbangType(c) aux.AddBigbangProc(c,s.matfilter1,1,1,s.matfilter2,1) c:EnableCounterPermit(0x157) c:SetCounterLimit(0x157,2) --This card gains ATK/DEF equal to the original ATK/DEF of the Neutral monster used to Bigbang Summon this card. local e0=Effect.CreateEffect(c) e0:SetType(EFFECT_TYPE_SINGLE) e0:SetCode(EFFECT_MATERIAL_CHECK) e0:SetValue(s.valcheck) c:RegisterEffect(e0) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCondition(s.atkcon) e2:SetOperation(s.atkop) e2:SetLabelObject(e0) c:RegisterEffect(e2) --Each time your opponent activates a card or effect, place 1 Charge Counter on this card when it resolves (max. 2). local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetCode(EVENT_CHAINING) e3:SetRange(LOCATION_MZONE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetOperation(aux.chainreg) c:RegisterEffect(e3) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e4:SetCode(EVENT_CHAIN_SOLVED) e4:SetRange(LOCATION_MZONE) e4:SetCondition(s.ctcon) e4:SetOperation(s.ctop) c:RegisterEffect(e4) --Once per turn, when your opponent activates a card or effect (Quick Effect): You can remove 2 Charge Counters from your field; negate the activation, and if you do, destroy it. local e5=Effect.CreateEffect(c) e5:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) e5:SetType(EFFECT_TYPE_QUICK_O) e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e5:SetCode(EVENT_CHAINING) e5:SetRange(LOCATION_MZONE) e5:SetCountLimit(1) e5:SetCondition(s.negcon) e5:SetCost(s.negcost) e5:SetTarget(s.negtg) e5:SetOperation(s.negop) c:RegisterEffect(e5) end function s.matfilter1(c) return c:IsNeutral() and c:IsAttribute(ATTRIBUTE_LIGHT) end function s.matfilter2(c) return (c:IsPositive() or c:IsNegative()) and c:IsType(TYPE_TOKEN) end function s.valcheck(e,c) local g=c:GetMaterial() for tc in aux.Next(g) do if tc:IsNeutral() then e:SetLabelObject(tc) end end end function s.atkcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_BIGBANG) end function s.atkop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local atk=e:GetLabelObject():GetLabelObject():GetBaseAttack() local def=e:GetLabelObject():GetLabelObject():GetBaseDefense() if atk>0 or def>0 then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetValue(atk) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetValue(def) c:RegisterEffect(e2) end end function s.ctcon(e,tp,eg,ep,ev,re,r,rp) return re and rp==1-tp and e:GetHandler():GetFlagEffect(FLAG_ID_CHAINING)>0 end function s.ctop(e,tp,eg,ep,ev,re,r,rp) e:GetHandler():AddCounter(0x157,1) end function s.negcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return rp==1-tp and not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) end function s.negcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x157,2,REASON_COST) end Duel.RemoveCounter(tp,1,0,0x157,2,REASON_COST) end function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) end end function s.negop(e,tp,eg,ep,ev,re,r,rp) if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then Duel.Destroy(eg,REASON_EFFECT) end end