--Mondoassillo Guanti || Worldsbane Gloves --Scripted by: XGlitchy30 local s,id=GetID() function s.initial_effect(c) --destroy local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_DESTROY) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetCondition(s.con) e1:SetTarget(s.tg) e1:SetOperation(s.op) c:RegisterEffect(e1) --xyz local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e2:SetCost(s.cost) e2:SetTarget(s.xyztg) e2:SetOperation(s.xyzop) c:RegisterEffect(e2) --pseudo pandemonium summon local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(id,2)) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCode(EVENT_FREE_CHAIN) e3:SetRange(LOCATION_MZONE) e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE) e3:SetCost(s.cost) e3:SetTarget(s.pstg) e3:SetOperation(s.psop) c:RegisterEffect(e3) end --destroy function s.con(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_PANDEMONIUM) end function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsOnField() end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) end function s.op(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end end --xyz function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) end function s.mfilter(c) return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_REPTILE) and not c:IsType(TYPE_TOKEN) end function s.xyzfilter(c,mg) return c:IsType(TYPE_XYZ) and c:IsRace(RACE_REPTILE) and c:IsXyzSummonable(mg) end function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local g=Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_MZONE,0,nil) return Duel.IsExistingMatchingCard(s.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,g) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) end function s.xyzop(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.mfilter,tp,LOCATION_MZONE,0,nil) local xyzg=Duel.GetMatchingGroup(s.xyzfilter,tp,LOCATION_EXTRA,0,nil,g) if #xyzg>0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local xyz=xyzg:Select(tp,1,1,nil):GetFirst() Duel.XyzSummon(tp,xyz,g,1,99) end end --pseudo pandemonium summon function s.pfilter(c,e,tp) local ls,rs=c:GetLeftScale(),c:GetRightScale() if not ls or not rs or math.abs(ls-rs)<=1 then return false end if ls>rs then ls,rs=rs,ls end return c:IsFaceup() and c:IsSetCard(0x9fa) and c:GetFlagEffect(726)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,c,e,tp,ls,rs,true) end function s.spfilter(c,e,tp,ls,rs,mode) return c:GetLevel()>0 and c:GetLevel()>ls and c:GetLevel()0) or (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and (mode or Duel.GetLocationCountFromEx(tp,tp,nil,c)>0))) end ------------ function s.pstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and s.pfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.pfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g=Duel.SelectTarget(tp,s.pfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0) end function s.psop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc and tc:IsRelateToEffect(e) and s.pfilter(tc,e,tp) then local lscale=tc:GetLeftScale() local rscale=tc:GetRightScale() if lscale>rscale then lscale,rscale=rscale,lscale end local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft2=Duel.GetLocationCountFromEx(tp) local ft=Duel.GetUsableMZoneCount(tp) if Duel.IsPlayerAffectedByEffect(tp,59822133) then if ft1>0 then ft1=1 end if ft2>0 then ft2=1 end ft=1 end local loc=0 local loclimit,max_eloc,locfilter,excfilter=nil,99,nil,nil if ft1>0 then loc=loc|LOCATION_HAND end if ft2>0 then loc=loc|LOCATION_EXTRA end local tg=Duel.GetMatchingGroup(s.spfilter,tp,loc,0,nil,e,tp,lscale,rscale,false) ft1=math.min(ft1,tg:FilterCount(aux.NOT(Card.IsLocation),nil,LOCATION_EXTRA)) ft2=math.min(ft2,tg:FilterCount(Card.IsLocation,nil,LOCATION_EXTRA)) local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp] if ect and ect0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then Duel.BreakEffect() Duel.Destroy(tc,REASON_EFFECT) end end end