Commit f512f867 authored by wind2009's avatar wind2009

Fix 射敵

parent d3ed1db9
No preview for this file type
......@@ -8,6 +8,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -26,10 +27,10 @@ function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function s.desilter(c)
return c:IsFaceup() and c:GetLevel()>0
return c:IsFaceup() and c:IsLevelAbove(1)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.desilter(chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.desilter(chkc)
and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(s.desilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
......@@ -41,8 +42,8 @@ end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local dc=Duel.TossDice(tp,1)
local dc=Duel.TossDice(tp,1)
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) then
if dc>tc:GetLevel() then
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
local lv=tc:GetOriginalLevel()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment