Commit 95419d59 authored by salix5's avatar salix5

fix バーサーク・デーモン

parent 92e8f335
...@@ -6,6 +6,7 @@ function s.initial_effect(c) ...@@ -6,6 +6,7 @@ function s.initial_effect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
...@@ -16,8 +17,9 @@ function s.initial_effect(c) ...@@ -16,8 +17,9 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DAMAGE) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_CUSTOM+id) e2:SetCode(EVENT_CUSTOM+id)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.atkcon) e2:SetCondition(s.atkcon)
e2:SetTarget(s.atktg) e2:SetTarget(s.atktg)
e2:SetOperation(s.atkop) e2:SetOperation(s.atkop)
...@@ -52,16 +54,14 @@ end ...@@ -52,16 +54,14 @@ end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp) function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
return tp==rp and eg and eg:IsContains(e:GetHandler()) return tp==rp and eg and eg:IsContains(e:GetHandler())
end end
function s.fselect1(g) function s.atkfilter(c)
return g:GetSum(Card.GetBaseAttack)>0 return c:IsFaceup() and c:GetBaseAttack()>0
end end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.atkfilter(chkc) end
local rg=Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE,nil,e) if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,0,LOCATION_MZONE,ev,nil) end
if chk==0 then return rg:CheckSubGroup(s.fselect1,ev,ev) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local sg=rg:SelectSubGroup(tp,s.fselect1,false,ev,ev) Duel.SelectTarget(tp,s.atkfilter,tp,0,LOCATION_MZONE,ev,ev,nil)
Duel.SetTargetCard(rg)
end end
function s.atkop(e,tp,eg,ep,ev,re,r,rp) function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
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