--灯火之魔女·青鸟 local m=28327024 local cm=_G["c"..m] xpcall(function() require("expansions/script/c28327000") end,function() require("script/c28327000") end) function cm.initial_effect(c) Yukino.ShikiNoAkari(c) --actlimit local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetTargetRange(0,1) e1:SetRange(LOCATION_MZONE) e1:SetValue(1) e1:SetCondition(cm.actcon) c:RegisterEffect(e1) --damage local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(m,1)) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_TO_GRAVE) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCountLimit(1,m) e2:SetCondition(cm.spcon) e2:SetOperation(cm.regop) c:RegisterEffect(e2) end function cm.actfilter(c) return c:IsFaceup() and c:IsCode(28327000) end function cm.actcon(e) local ph=Duel.GetCurrentPhase() local tp=e:GetHandlerPlayer() local c=e:GetHandler() return Duel.IsExistingMatchingCard(cm.actfilter,tp,LOCATION_MZONE,0,1,c) and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE end function cm.spcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp and e:GetHandler():GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) end function cm.regop(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCountLimit(1) e1:SetOperation(cm.damop) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end function cm.damfilter(c) return c:IsCode(28327000) and c:IsFaceup() end function cm.damop(e,tp,eg,ep,ev,re,r,rp) local ct=Duel.GetMatchingGroupCount(cm.damfilter,tp,LOCATION_MZONE,0,nil) if ct==0 then return end Duel.Hint(HINT_CARD,0,m) Duel.Damage(1-tp,ct*2700,REASON_EFFECT) end