--Path of the Lotus Blade - Exploration --Commissioned by: Leon Duvall --Scripted by: Remnance local cid,id=GetID() function cid.initial_effect(c) --activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_DRAW) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetTarget(cid.target) e1:SetOperation(cid.activate) c:RegisterEffect(e1) --atk local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x3ff)) e2:SetValue(cid.atkval) c:RegisterEffect(e2) end --filters function cid.costfilter(c) return c:IsSetCard(0x3ff) and c:IsAbleToRemoveAsCost() end function cid.atkfilter(c) return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsSetCard(0x3ff) end --activate function cid.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not Duel.PlayerHasFlagEffect(tp,CARD_LOTUS_BLADE_MIMICRY) or Duel.IsPlayerCanDraw(tp,2) end if Duel.PlayerHasFlagEffect(tp,CARD_LOTUS_BLADE_MIMICRY) then return else if Duel.IsExistingMatchingCard(cid.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) and Duel.IsPlayerCanDraw(tp,2) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.SelectMatchingCard(tp,cid.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) Duel.Remove(g,POS_FACEUP,REASON_COST) e:SetLabel(0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) else e:SetLabel(1) end end end function cid.activate(e,tp,eg,ep,ev,re,r,rp,chk) if Duel.PlayerHasFlagEffect(tp,CARD_LOTUS_BLADE_MIMICRY) or e:GetLabel()==0 then Duel.Draw(tp,2,REASON_EFFECT) end end --atk function cid.atkval(e,c) return Duel.GetMatchingGroupCount(cid.atkfilter,e:GetHandlerPlayer(),LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_REMOVED,nil)*200 end