--Kamissekai of Virtuous Knights - Alanna function c249001273.initial_effect(c) c:SetUniqueOnField(1,0,249001273) c:EnableReviveLimit() --Cannot special summon local e1=Effect.CreateEffect(c) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetValue(aux.FALSE) c:RegisterEffect(e1) --remove local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(7572887,0)) e2:SetCategory(CATEGORY_REMOVE) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_BATTLED) e2:SetTarget(c249001273.target) e2:SetOperation(c249001273.operation) c:RegisterEffect(e2) --battle indestructable local e3=Effect.CreateEffect(c) e3:SetType(EFFECT_TYPE_SINGLE) e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e3:SetValue(1) c:RegisterEffect(e3) --cannot be target local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetRange(LOCATION_MZONE) e1:SetCondition(c249001273.tgcon) e1:SetValue(aux.tgoval) c:RegisterEffect(e1) end function c249001273.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local a=Duel.GetAttacker() local t=Duel.GetAttackTarget() if chk==0 then return (t==c and a:IsAbleToRemove()) or (a==c and t~=nil and t:IsAbleToRemove()) end local g=Group.CreateGroup() if a:IsRelateToBattle() and a~=c then g:AddCard(a) end if t~=nil and t:IsRelateToBattle() and t~=c then g:AddCard(t) end Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) end function c249001273.operation(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local a=Duel.GetAttacker() local d=Duel.GetAttackTarget() local g=Group.FromCards(a,d) g:RemoveCard(c) local rg=g:Filter(Card.IsRelateToBattle,nil) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,504) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) Duel.HintSelection(g) Duel.SendtoGrave(g,REASON_EFFECT) end end function c249001273.tgcon(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>1 end