Commit 7eba87b3 authored by wyykak's avatar wyykak

fix dots

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent a0998e51
Pipeline #39559 passed with stage
in 1 minute and 26 seconds
......@@ -23,7 +23,13 @@ if not DOT.DotCounter then
num1 = num1+dmg1
num2 = num2+dmg2
end
Debug.Message('下一波持续伤害:'..num1..
local name
if tp == 0 then
name = '先手玩家'
else
name = '后手玩家'
end
Debug.Message(name..'下一波持续伤害:'..num1..
'剩余持续伤害:'..num2)
class._n[tp] = {52001, num1, num2}
end
......
......@@ -86,9 +86,10 @@ function c19047.damop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(ct)
c:SetTurnCounter(ct)
Duel.Damage(1-tp,400,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-400,e)
if ct==3 then
DOT.DotCounter.Add(nil,1-tp,0,-400,-400,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-400,e)
end
end
end
......
......@@ -60,9 +60,10 @@ function c21024.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(tp,400,REASON_EFFECT,true)
Duel.Damage(1-tp,400,REASON_EFFECT,true)
Duel.RDComplete()
DOT.DotCounter.Add(nil,1-tp,0,0,-400,e)
if ct==3 then
DOT.DotCounter.Add(nil,1-tp,0,-400,-400,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-400,e)
end
end
end
......
......@@ -58,9 +58,10 @@ function c21091.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(tp,dam,REASON_EFFECT,true)
Duel.Damage(1-tp,dam,REASON_EFFECT,true)
Duel.RDComplete()
DOT.DotCounter.Add(nil,1-tp,0,0,-dam,e)
if ct==3 then
DOT.DotCounter.Add(nil,1-tp,0,-dam,-dam,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-dam,e)
end
end
end
......
......@@ -55,9 +55,10 @@ function c21146.damop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(ct)
c:SetTurnCounter(ct)
Duel.Damage(1-tp,300,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-300,e)
if ct==4 then
DOT.DotCounter.Add(nil,1-tp,0,-300,-300,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-300,e)
end
end
end
......@@ -57,6 +57,7 @@ function c21161.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(c21161.damop)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
DOT.DotCounter.Add(nil,tp,0,400,800,e)
DOT.DotCounter.Add(nil,1-tp,0,400,800,e)
end
end
......@@ -70,9 +71,12 @@ function c21161.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(tp,400,REASON_EFFECT,true)
Duel.Damage(1-tp,400,REASON_EFFECT,true)
Duel.RDComplete()
DOT.DotCounter.Add(nil,1-tp,0,0,-400,e)
if ct==2 then
DOT.DotCounter.Add(nil,tp,0,-400,-400,e)
DOT.DotCounter.Add(nil,1-tp,0,-400,-400,e)
else
DOT.DotCounter.Add(nil,tp,0,0,-400,e)
DOT.DotCounter.Add(nil,1-tp,0,0,-400,e)
end
end
end
......
......@@ -92,10 +92,24 @@ function c22111.dmop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetLabel(0)
e1:SetCondition(c24066.damcon)
e1:SetOperation(c24066.damop)
e1:SetLabel(0,rt)
e1:SetOperation(c22111.damop)
e1:SetReset(RESET_PHASE+PHASE_END,7)
Duel.RegisterEffect(e1,tp)
DOT.DotCounter.Add(nil,1-tp,0,rt,rt*7,e)
end
function c22111.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct,rt=e:GetLabel()
if(ct<7) then
ct=ct+1
e:SetLabel(ct,rt)
c:SetTurnCounter(ct)
Duel.Damage(1-tp,rt,REASON_EFFECT)
if ct==7 then
DOT.DotCounter.Add(nil,1-tp,0,-rt,-rt,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-rt,e)
end
end
end
\ No newline at end of file
......@@ -94,9 +94,10 @@ function c22174.damop(e,tp,eg,ep,ev,re,r,rp)
c:SetTurnCounter(ct)
Duel.Hint(HINT_CARD,0,22174)
Duel.Damage(1-tp,1000,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-1000,e)
if ct==4 then
DOT.DotCounter.Add(nil,1-tp,0,-1000,-1000,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-1000,e)
end
end
end
......@@ -55,9 +55,10 @@ function c24055.damop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(ct)
c:SetTurnCounter(ct)
Duel.Damage(1-tp,300,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-300,e)
if ct==3 then
DOT.DotCounter.Add(nil,1-tp,0,-300,-300,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-300,e)
end
end
end
......
......@@ -69,9 +69,10 @@ function c24059.damop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(ct)
c:SetTurnCounter(ct)
Duel.Damage(1-tp,600,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-600,e)
if ct==3 then
DOT.DotCounter.Add(nil,1-tp,0,-600,-600,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-600,e)
end
end
end
......@@ -44,9 +44,10 @@ function c24066.damop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(ct)
c:SetTurnCounter(ct)
Duel.Damage(1-tp,300,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-300,e)
if ct==5 then
DOT.DotCounter.Add(nil,1-tp,0,-300,-300,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-300,e)
end
end
end
......@@ -79,9 +79,10 @@ function c24074.damop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(ct)
c:SetTurnCounter(ct)
Duel.Damage(1-tp,400,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-400,e)
if ct==3 then
DOT.DotCounter.Add(nil,1-tp,0,-400,-400,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-400,e)
end
end
end
......@@ -80,9 +80,10 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(ct)
c:SetTurnCounter(ct)
Duel.Damage(1-tp,300,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-700,e)
if ct==2 then
DOT.DotCounter.Add(nil,1-tp,0,-700,-700,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-700,e)
end
end
end
......@@ -121,9 +121,10 @@ function c25043.damop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(ct)
c:SetTurnCounter(ct)
Duel.Damage(1-tp,500,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-500,e)
if ct==3 then
DOT.DotCounter.Add(nil,1-tp,0,-500,-500,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-500,e)
end
end
end
......@@ -42,9 +42,10 @@ function c25048.damop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(ct)
c:SetTurnCounter(ct)
Duel.Damage(1-tp,500,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-500,e)
if ct==5 then
DOT.DotCounter.Add(nil,1-tp,0,-500,-500,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-500,e)
end
end
end
......@@ -56,9 +56,10 @@ function c25050.damop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(ct)
c:SetTurnCounter(ct)
Duel.Damage(1-tp,800,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-800,e)
if ct==2 then
DOT.DotCounter.Add(nil,1-tp,0,-800,-800,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-800,e)
end
end
end
......@@ -54,9 +54,10 @@ function c25051.damop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
if(ct<3) then
Duel.Damage(1-tp,400,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-400,e)
if ct==3 then
DOT.DotCounter.Add(nil,1-tp,0,-400,-400,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-400,e)
end
end
end
......
......@@ -84,9 +84,10 @@ function s.damop1(e,tp,eg,ep,ev,re,r,rp)
if(ct>0) then
e:GetHandler():SetTurnCounter(ct-1)
Duel.Damage(1-tp,dam,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-dam,e)
if ct==1 then
DOT.DotCounter.Add(nil,1-tp,0,-dam,0,e)
DOT.DotCounter.Add(nil,1-tp,0,-dam,-dam,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-dam,e)
end
end
end
......
......@@ -94,9 +94,10 @@ function c31013.damop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(ct)
c:SetTurnCounter(ct)
Duel.Damage(1-tp,500,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-500,e)
if ct==3 then
DOT.DotCounter.Add(nil,1-tp,0,-500,-500,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-500,e)
end
end
end
......@@ -95,9 +95,10 @@ function s.damop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(ct)
c:SetTurnCounter(ct)
Duel.Damage(1-tp,500,REASON_EFFECT)
DOT.DotCounter.Add(nil,1-tp,0,0,-500,e)
if ct==3 then
DOT.DotCounter.Add(nil,1-tp,0,-500,-500,e)
else
DOT.DotCounter.Add(nil,1-tp,0,0,-500,e)
end
end
end
......@@ -21,6 +21,7 @@ function c888174.initial_effect(c)
Duel.RegisterEffect(e1,0)
local e2=e1:Clone()
Duel.RegisterEffect(e2,1)
c888174.burn_cts={{},{}}
end
end
function c888174.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -31,35 +32,28 @@ function c888174.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c888174.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetLabel(0)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,4)
e1:SetCode(EFFECT_FLAG_EFFECT+888174)
Duel.RegisterEffect(e1,tp)
local cts=c888174.burn_cts[tp+1]
table.insert(cts,4)
DOT.DotCounter.Add(nil,1-tp,0,1000,4000,e)
end
function c888174.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and Duel.GetFlagEffect(tp,888174)>0
local cts=c888174.burn_cts[tp+1]
return Duel.GetTurnPlayer()~=tp and #cts>0
end
function c888174.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
if(ct<4) then
ct=ct+1
e:SetLabel(ct)
c:SetTurnCounter(ct)
local n=Duel.GetFlagEffect(tp,888174)
for i=1,n do
local cts=c888174.burn_cts[tp+1]
local new_cts={}
for _,ct in ipairs(cts) do
ct=ct-1
Duel.Hint(HINT_CARD,0,888174)
Duel.Damage(1-tp,1000,REASON_EFFECT)
if ct>0 then
table.insert(new_cts,ct)
DOT.DotCounter.Add(nil,1-tp,0,0,-1000,e)
end
if ct==4 then
else
DOT.DotCounter.Add(nil,1-tp,0,-1000,-1000,e)
end
end
c888174.burn_cts[tp+1]=new_cts
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