--Invasive Flames local cid,id=GetID() function cid.initial_effect(c) aux.AddOrigEvoluteType(c) aux.AddEvoluteProc(c,nil,5,cid.filter1,2) c:EnableReviveLimit() --summon success local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCondition(cid.sumcon) e2:SetOperation(cid.sumsuc) c:RegisterEffect(e2) --remove local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetCode(EVENT_FREE_CHAIN) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCost(cid.cost) e1:SetTarget(cid.target) e1:SetOperation(cid.operation) c:RegisterEffect(e1) end function cid.filter1(c,ec,tp) return c:IsAttribute(ATTRIBUTE_FIRE) or c:IsRace(RACE_PYRO) end function cid.sumcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_SPECIAL+388) end function cid.sumsuc(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_CHAINING) e1:SetOperation(cid.actop) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end function cid.actop(e,tp,eg,ep,ev,re,r,rp) local rc=re:GetHandler() if re:IsActiveType(TYPE_MONSTER) and rc:IsRace(RACE_PYRO) and ep==tp then Duel.SetChainLimit(cid.chainlm) end end function cid.chainlm(e,rp,tp) return tp==rp end function cid.cost(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:IsCanRemoveEC(tp,3,REASON_COST) end c:RemoveEC(tp,3,REASON_COST) end function cid.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:GetControler()~=tp and chkc:GetLocation()==LOCATION_GRAVE and chkc:IsAbleToRemove() end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) and Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)>0 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,1-tp,LOCATION_GRAVE) Duel.SetTargetPlayer(1-tp) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)*200) end function cid.operation(e,tp,eg,ep,ev,re,r,rp,chk) local tc=Duel.GetFirstTarget() local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then Duel.Damage(p,Duel.GetFieldGroupCount(p,LOCATION_HAND,0)*200,REASON_EFFECT) end end