Commit f82f8aaa authored by wind2009's avatar wind2009

Fix

parent 508e83e7
...@@ -18,17 +18,25 @@ function s.initial_effect(c) ...@@ -18,17 +18,25 @@ function s.initial_effect(c)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetValue(RACE_PLANT) e2:SetValue(RACE_PLANT)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--damage --to grave
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCategory(CATEGORY_DAMAGE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,id) e3:SetCondition(s.regcon)
e3:SetTarget(s.damtg) e3:SetOperation(s.regop)
e3:SetOperation(s.damop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--damage
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EVENT_DESTROYED)
e4:SetCountLimit(1,id)
e4:SetTarget(s.damtg)
e4:SetOperation(s.damop)
c:RegisterEffect(e4)
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0x1123) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x1123) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
...@@ -45,11 +53,20 @@ end ...@@ -45,11 +53,20 @@ end
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceupEx() and c:IsRace(RACE_PLANT) return c:IsFaceupEx() and c:IsRace(RACE_PLANT)
end end
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT) and re and re:IsActivated()
and (re:GetHandler():IsRelateToChain(ev) and re:GetHandler():IsCode(73580471)
or not re:GetHandler():IsRelateToChain(ev) and re:GetHandler():GetPreviousCodeOnField()==73580471)
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local dam=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)*100 local dam=Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)*100
if dam>0 then if dam>0 then
if re:GetHandler():IsCode(73580471) then if e:GetHandler():GetFlagEffect(id)>0 then
dam=dam+2400 dam=dam+2400
e:SetLabel(1) e:SetLabel(1)
else else
......
...@@ -85,7 +85,7 @@ function s.atktg(e,c) ...@@ -85,7 +85,7 @@ function s.atktg(e,c)
return c:IsAttribute(ATTRIBUTE_WIND) return c:IsAttribute(ATTRIBUTE_WIND)
end end
function s.discon(e,tp,eg,ep,ev,re,r,rp) function s.discon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActivated() and re:GetHandler():IsCode(5318639) return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsCode(5318639)
end end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.NegateAnyFilter(chkc) end
......
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