Commit e7c4c649 authored by nekrozar's avatar nekrozar

fix

parent ccb6b07e
--死なばもろとも --死なばもろとも
function c14057297.initial_effect(c) function c14057297.initial_effect(c)
--draw --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e1:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
...@@ -31,7 +31,7 @@ function c14057297.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function c14057297.activate(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.SelectMatchingCard(1-tp,aux.TRUE,tp,0,LOCATION_HAND,ct2,ct2,nil) local g2=Duel.SelectMatchingCard(1-tp,aux.TRUE,tp,0,LOCATION_HAND,ct2,ct2,nil)
g1:Merge(g2) g1:Merge(g2)
local count=Duel.SendtoDeck(g1,nil,1,REASON_EFFECT) local count=Duel.SendtoDeck(g1,nil,1,REASON_EFFECT)
if count>1 then if count>0 then
Duel.BreakEffect() Duel.BreakEffect()
local lp=Duel.GetLP(tp) local lp=Duel.GetLP(tp)
if lp<=count*300 then if lp<=count*300 then
...@@ -39,6 +39,7 @@ function c14057297.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,6 +39,7 @@ function c14057297.activate(e,tp,eg,ep,ev,re,r,rp)
else else
Duel.SetLP(tp,lp-count*300) Duel.SetLP(tp,lp-count*300)
end end
if lp==0 then return end
Duel.Draw(tp,5,REASON_EFFECT) Duel.Draw(tp,5,REASON_EFFECT)
Duel.Draw(1-tp,5,REASON_EFFECT) Duel.Draw(1-tp,5,REASON_EFFECT)
end end
......
...@@ -27,7 +27,7 @@ function c59546797.initial_effect(c) ...@@ -27,7 +27,7 @@ function c59546797.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c59546797.condition(e,tp,eg,ep,ev,re,r,rp) function c59546797.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.GetCurrentPhase()==PHASE_BATTLE and not Duel.CheckTiming(TIMING_BATTLE_START) and not Duel.CheckTiming(TIMING_BATTLE_END)
end end
function c59546797.target(e,tp,eg,ep,ev,re,r,rp,chk) function c59546797.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -38,6 +38,8 @@ function c59546797.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,6 +38,8 @@ function c59546797.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Recover(tp,1000,REASON_EFFECT) Duel.Recover(tp,1000,REASON_EFFECT)
else
Duel.SendtoGrave(c,REASON_RULE)
end end
end end
function c59546797.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c59546797.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
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