--Radiazione Mondoassillo || Worldsbane Radiation --Scripted by: XGlitchy30 local s,id=GetID() function s.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) --immune local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_EQUIP) e2:SetCode(EFFECT_IMMUNE_EFFECT) e2:SetValue(s.efilter) c:RegisterEffect(e2) --attach local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_BATTLE_CONFIRM) e3:SetRange(LOCATION_SZONE) e3:SetCountLimit(1,id) e3:SetCondition(s.ddcon) e3:SetOperation(s.ddop) c:RegisterEffect(e3) end --activate function s.filter(c) return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xf90) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) end function s.eqlimit(e,c) return c:GetControler()==e:GetHandlerPlayer() and c:IsType(TYPE_XYZ) and c:IsSetCard(0xf90) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsLocation(LOCATION_SZONE) or not c:IsRelateToEffect(e) or c:IsStatus(STATUS_LEAVE_CONFIRMED) then return end local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.Equip(tp,c,tc) local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_EQUIP_LIMIT) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetValue(s.eqlimit) e3:SetReset(RESET_EVENT+RESETS_STANDARD) c:RegisterEffect(e3) end end function s.efilter(e,re) return e:GetHandlerPlayer()~=re:GetOwnerPlayer() end --attach function s.ddcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler():GetEquipTarget() local bc=c:GetBattleTarget() return c and c:IsFaceup() and c:IsRelateToBattle() and bc and bc:IsRelateToBattle() and bc:IsControler(1-e:GetHandler():GetControler()) end function s.ddop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler():GetEquipTarget() local bc=c:GetBattleTarget() if c:IsFaceup() and c:IsRelateToBattle() and bc:IsRelateToBattle() and not c:IsImmuneToEffect(e) and not bc:IsImmuneToEffect(e) then local og=bc:GetOverlayGroup() if #og>0 then Duel.SendtoGrave(og,REASON_RULE) end Duel.Overlay(c,Group.FromCards(bc)) end end