--Divine Blade - Liana function c88567304.initial_effect(c) --special summon local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(88567304,0)) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetRange(LOCATION_HAND) e1:SetCountLimit(1,88567304) e1:SetCondition(c88567304.spcon) c:RegisterEffect(e1) --remove local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(88567304,1)) e2:SetCategory(CATEGORY_REMOVE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_BATTLED) e2:SetCondition(c88567304.condition) e2:SetTarget(c88567304.target) e2:SetOperation(c88567304.operation) c:RegisterEffect(e2) --mill local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(88567304,2)) e3:SetCategory(CATEGORY_TOGRAVE) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetCode(EVENT_TO_GRAVE) e3:SetCondition(c88567304.tgcon) e3:SetTarget(c88567304.tgtg) e3:SetOperation(c88567304.tgop) c:RegisterEffect(e3) end function c88567304.filter(c) return c:IsFaceup() and c:IsSetCard(0x1bc2) end function c88567304.spcon(e,c) if c==nil then return true end return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c88567304.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) end function c88567304.condition(e,tp,eg,ep,ev,re,r,rp) local bc=e:GetHandler():GetBattleTarget() return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) end function c88567304.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end local bc=e:GetHandler():GetBattleTarget() Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,0,0) end function c88567304.operation(e,tp,eg,ep,ev,re,r,rp) local bc=e:GetHandler():GetBattleTarget() if bc:IsRelateToBattle() then Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) end end function c88567304.tgcon(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() return c:IsReason(REASON_COST) and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_OVERLAY) and re:GetHandler():IsSetCard(0x1bc2) end function c88567304.tgfilter(c) return c:IsSetCard(0x1bc2) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() end function c88567304.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c88567304.tgfilter,tp,LOCATION_DECK,0,1,nil) end Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) end function c88567304.tgop(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,c88567304.tgfilter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoGrave(g,REASON_EFFECT) end end