Commit c25e39ec authored by mercury233's avatar mercury233

fix dice effects

parent 3c53add8
......@@ -15,7 +15,7 @@ function c16135253.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c16135253.filter(c,e,tp,lv)
if (lv<6 and c:GetLevel()~=lv) or (lv==6 and c:GetLevel()<6) then return false end
if (lv~=6 and c:GetLevel()~=lv) or (lv==6 and c:GetLevel()<6) then return false end
return c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16135253.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -27,7 +27,7 @@ function c32015116.rdtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function c32015116.rdfilter(c,lv)
if lv<6 then
if lv~=6 then
return c:IsFaceup() and c:GetLevel()==lv
else
return c:IsFaceup() and c:GetLevel()>=6 end
......
......@@ -27,7 +27,7 @@ function c3493058.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,2,2,nil)
Duel.Destroy(dg,REASON_EFFECT)
else
elseif dc>=2 and dc<=4 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c3493058.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT)
......
......@@ -19,8 +19,16 @@ function c3549275.operation(e,tp,eg,ep,ev,re,r,rp)
d1,d2=Duel.TossDice(tp,1,1)
end
if d1<d2 then
if d2==6 then Duel.Damage(tp,6000,REASON_EFFECT) else Duel.Damage(tp,d2*500,REASON_EFFECT) end
if d2==6 then
Duel.Damage(tp,6000,REASON_EFFECT)
elseif d2>=2 and d2<=5 then
Duel.Damage(tp,d2*500,REASON_EFFECT)
end
else
if d1==6 then Duel.Damage(1-tp,6000,REASON_EFFECT) else Duel.Damage(1-tp,d1*500,REASON_EFFECT) end
if d1==6 then
Duel.Damage(1-tp,6000,REASON_EFFECT)
elseif d1>=2 and d1<=5 then
Duel.Damage(1-tp,d1*500,REASON_EFFECT)
end
end
end
......@@ -99,7 +99,7 @@ function c35606858.dcop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
elseif d==6 then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
elseif d>=2 and d<=5 then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
......@@ -58,7 +58,7 @@ function c36708764.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(1-tp,at:GetAttack(),REASON_EFFECT)
end
return
else
elseif dc==6 then
local at=Duel.GetFirstTarget()
if at:IsRelateToEffect(e) and at:IsControler(1-tp) and at:IsType(TYPE_MONSTER) then
Duel.Destroy(at,REASON_EFFECT)
......
......@@ -32,6 +32,7 @@ function c38299233.rdop(e,tp,eg,ep,ev,re,r,rp)
while d1==6 do
d1=Duel.TossDice(tp,1)
end
if d1>5 then return end
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,d1-1)
if tc then
Duel.Destroy(tc,REASON_EFFECT)
......
......@@ -66,7 +66,7 @@ function c42421606.efop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
else
elseif dc==6 then
if e:GetHandler():IsRelateToEffect(e) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
......
......@@ -30,7 +30,7 @@ function c62893810.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if g:GetCount()==0 then return end
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
else
elseif d>=2 and d<=5 then
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
......
......@@ -40,7 +40,7 @@ function c76895648.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.Destroy(g,REASON_EFFECT)
else
elseif dice==6 then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
......@@ -18,7 +18,7 @@ function c84397023.op(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g)
local ct=Duel.TossDice(tp,1)
if ct==1 then Duel.SendtoGrave(g,REASON_EFFECT)
else
elseif ct>=2 and ct<=6 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
......
......@@ -30,7 +30,7 @@ function c97642679.operation(e,tp,eg,ep,ev,re,r,rp)
elseif d==6 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
Duel.Destroy(g,REASON_EFFECT)
else
elseif d>=3 and d<=5 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil)
Duel.Destroy(g,REASON_EFFECT)
......
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