--Hybrid Cadmium Demon function c11000227.initial_effect(c) --fustion material aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1FA),2,true) c:EnableReviveLimit() --atkup local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetValue(c11000227.val) c:RegisterEffect(e1) --defup local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetRange(LOCATION_MZONE) e2:SetValue(c11000227.val) c:RegisterEffect(e2) --damage local e3=Effect.CreateEffect(c) e3:SetCategory(CATEGORY_DAMAGE) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCondition(c11000227.con) e3:SetTarget(c11000227.target) e3:SetOperation(c11000227.operation) c:RegisterEffect(e3) --Activate local e4=Effect.CreateEffect(c) e4:SetCategory(CATEGORY_CONTROL) e4:SetType(EFFECT_TYPE_IGNITION) e4:SetRange(LOCATION_MZONE) e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetCountLimit(1) e4:SetCost(c11000227.concost) e4:SetTarget(c11000227.contg) e4:SetOperation(c11000227.conop) c:RegisterEffect(e4) end function c11000227.valfil(c,tp) return c:IsSetCard(0x1FA) and c:IsType(TYPE_MONSTER) end function c11000227.val(e,c) return Duel.GetMatchingGroupCount(c11000227.valfil,c:GetControler(),LOCATION_GRAVE,0,nil,0x1FA)*200 end function c11000227.con(e,tp,eg,ep,ev,re,r,rp) return bit.band(e:GetHandler():GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION end function c11000227.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(800) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) end function c11000227.operation(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 c11000227.cfilter(c,tp) return c:IsSetCard(0x1FA) and (c:IsControler(tp) or c:IsFaceup()) and c:IsType(TYPE_MONSTER) end function c11000227.concost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckReleaseGroup(tp,c11000227.cfilter,1,nil,tp) end local sg=Duel.SelectReleaseGroup(tp,c11000227.cfilter,1,1,nil,tp) Duel.Release(sg,REASON_COST) end function c11000227.contg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) end function c11000227.conop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and not Duel.GetControl(tc,tp,0,0) then if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then Duel.Destroy(tc,REASON_EFFECT) end end end