Commit f1b610f2 authored by VanillaSalt's avatar VanillaSalt

fix

parent f1feb4a7
......@@ -21,6 +21,7 @@ function c10002346.initial_effect(c)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c10002346.reptg)
e3:SetOperation(c10002346.repop)
c:RegisterEffect(e3)
end
function c10002346.val(e,c)
......@@ -28,8 +29,8 @@ function c10002346.val(e,c)
end
function c10002346.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
if Duel.SelectYesNo(tp,aux.Stringid(10002346,0)) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
return true
else return false end
return Duel.SelectYesNo(tp,aux.Stringid(10002346,0))
end
function c10002346.repop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
end
......@@ -18,10 +18,10 @@ function c3549275.operation(e,tp,eg,ep,ev,re,r,rp)
while d1==d2 do
d1=Duel.TossDice(tp,1)
d2=Duel.TossDice(1-tp,1)
if d1<d2 then
if d2==6 then Duel.Damage(tp,6000,REASON_EFFECT) else Duel.Damage(tp,d2*500,REASON_EFFECT) end
elseif d1>d2 then
if d1==6 then Duel.Damage(1-tp,6000,REASON_EFFECT) else Duel.Damage(1-tp,d1*500,REASON_EFFECT) end
end
end
if d1<d2 then
if d2==6 then Duel.Damage(tp,6000,REASON_EFFECT) else 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
end
end
......@@ -14,7 +14,9 @@ function c39454112.initial_effect(c)
c:RegisterEffect(e2)
end
function c39454112.diceop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(39454112,0)) then
local cc=Duel.GetCurrentChain()
local cid=Duel.GetChainInfo(cc,CHAININFO_CHAIN_ID)
if c39454112[0]~=cid and Duel.SelectYesNo(tp,aux.Stringid(39454112,0)) then
Duel.Hint(HINT_CARD,0,39454112)
local dc={Duel.GetDiceResult()}
local ac=1
......@@ -27,5 +29,6 @@ function c39454112.diceop(e,tp,eg,ep,ev,re,r,rp)
if dc[ac]==1 or dc[ac]==3 or dc[ac]==5 then dc[ac]=6
else dc[ac]=1 end
Duel.SetDiceResult(table.unpack(dc))
c39454112[0]=cid
end
end
......@@ -92,7 +92,7 @@ function c71645242.desfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:IsDestructable()
end
function c71645242.filter2(c,atk,e,tp)
return c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,0x20,tp,false,false)
end
function c71645242.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c71645242.filter2(chkc,e:GetLabel(),e,tp) end
......@@ -100,7 +100,7 @@ function c71645242.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local atk=g:GetSum(Card.GetAttack)
local sc=g:FilterCount(Card.IsControler,nil,tp)
if chk==0 then return e:GetHandler():IsDestructable() and e:GetHandler():IsDestructable(e) and g:GetCount()>0
and (Duel.GetLocationCount(tp,LOCATION_MZONE)>-sc)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>-sc
and Duel.IsExistingTarget(c71645242.filter2,tp,LOCATION_GRAVE,0,1,nil,atk,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectTarget(tp,c71645242.filter2,tp,LOCATION_GRAVE,0,1,1,nil,atk,e,tp)
......@@ -113,10 +113,12 @@ function c71645242.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsRelateToEffect(e) and c:IsDestructable() and c:IsDestructable(e)) then return end
local dg=Duel.GetMatchingGroup(c71645242.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local atk=dg:GetSum(Card.GetAttack)
dg:AddCard(c)
Duel.Destroy(dg,REASON_EFFECT)
Duel.BreakEffect()
local og=Duel.GetOperatedGroup()
og:RemoveCard(c)
local atk=og:GetSum(Card.GetPreviousAttackOnField)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:GetAttack()==atk then
Duel.SpecialSummon(tc,0x20,tp,tp,false,false,POS_FACEUP)
......
......@@ -10,6 +10,7 @@ function c73659078.initial_effect(c)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c73659078.cost)
e1:SetTarget(c73659078.target)
e1:SetOperation(c73659078.operation)
c:RegisterEffect(e1)
--atkdown
......@@ -26,19 +27,20 @@ function c73659078.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and not c:IsPublic()
end
function c73659078.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
and Duel.IsExistingMatchingCard(c73659078.cfilter,tp,LOCATION_HAND,0,1,nil) end
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c73659078.cfilter,tp,LOCATION_HAND,0,1,99,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
e:SetLabel(g:GetCount())
end
function c73659078.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c73659078.cfilter,tp,LOCATION_HAND,0,1,nil) end
end
function c73659078.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end
local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,c73659078.cfilter,tp,LOCATION_HAND,0,1,99,nil)
Duel.ConfirmCards(1-tp,cg)
Duel.ShuffleHand(tp)
local ct=cg:GetCount()
for i=1,ct do
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(73659078,1))
local tc=g:Select(tp,1,1,nil):GetFirst()
......
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