Commit de2ff509 authored by salix5's avatar salix5
parent 12a96645
......@@ -1532,7 +1532,7 @@ int32 field::check_lp_cost(uint8 playerid, uint32 lp) {
if(effect_replace_check(EFFECT_LPCOST_REPLACE, e))
return true;
cost[playerid].amount += val;
if(cost[playerid].amount < player[playerid].lp)
if(cost[playerid].amount <= player[playerid].lp)
return TRUE;
return FALSE;
}
......
......@@ -60,6 +60,9 @@ function c13959634.leaveop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e1,effp)
local e2=e1:Clone()
e2:SetCode(EFFECT_SKIP_M2)
Duel.RegisterEffect(e2,effp)
end
function c13959634.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
......
......@@ -42,6 +42,9 @@ function c2356994.skipop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
end
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_SKIP_M2)
Duel.RegisterEffect(e2,tp)
end
function c2356994.bpcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
......
......@@ -74,14 +74,21 @@ function c29223325.desop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_SKIP_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SKIP_M2)
if Duel.GetTurnPlayer()~=tp and ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c29223325.skipcon)
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,2)
e2:SetLabel(Duel.GetTurnCount())
e2:SetCondition(c29223325.skipcon)
e2:SetReset(RESET_PHASE+PHASE_MAIN2+RESET_OPPO_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,1)
e2:SetReset(RESET_PHASE+PHASE_MAIN2+RESET_OPPO_TURN,1)
end
Duel.RegisterEffect(e1,tp)
Duel.RegisterEffect(e2,tp)
end
function c29223325.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
......
......@@ -74,6 +74,9 @@ function c35842855.leaveop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e1,effp)
local e2=e1:Clone()
e2:SetCode(EFFECT_SKIP_M2)
Duel.RegisterEffect(e2,effp)
end
function c35842855.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
......
......@@ -22,7 +22,7 @@ function c35884610.initial_effect(c)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(1000)
c:RegisterEffect(e3)
local e4=Effect.Clone(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e4)
--damage double
......
......@@ -64,6 +64,9 @@ function c53027855.leaveop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e1,effp)
local e2=e1:Clone()
e2:SetCode(EFFECT_SKIP_M2)
Duel.RegisterEffect(e2,effp)
end
function c53027855.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
......
......@@ -13,19 +13,27 @@ function c57069605.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)+2000<=Duel.GetLP(1-tp)
end
function c57069605.activate(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SKIP_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
if Duel.GetTurnPlayer()~=tp and Duel.GetCurrentPhase()==PHASE_BATTLE then
local e2=e1:Clone()
e2:SetCode(EFFECT_SKIP_M2)
if Duel.GetTurnPlayer()~=tp and ph>PHASE_MAIN1 and ph<PHASE_MAIN2 then
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c57069605.skipcon)
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,2)
e2:SetLabel(Duel.GetTurnCount())
e2:SetCondition(c57069605.skipcon)
e2:SetReset(RESET_PHASE+PHASE_MAIN2+RESET_OPPO_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_BATTLE+RESET_OPPO_TURN,1)
e2:SetReset(RESET_PHASE+PHASE_MAIN2+RESET_OPPO_TURN,1)
end
Duel.RegisterEffect(e1,tp)
Duel.RegisterEffect(e2,tp)
end
function c57069605.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
......
......@@ -69,6 +69,9 @@ function c61468779.leaveop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
end
Duel.RegisterEffect(e1,effp)
local e2=e1:Clone()
e2:SetCode(EFFECT_SKIP_M2)
Duel.RegisterEffect(e2,effp)
end
function c61468779.skipcon(e)
return Duel.GetTurnCount()~=e:GetLabel()
......
......@@ -60,11 +60,15 @@ function c82301904.sgcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c82301904.damfilter(c,p)
return c:GetOwner()==p and c:IsAbleToGrave()
end
function c82301904.sgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetFieldGroup(tp,0xe,0xe)
local dc=g:FilterCount(c82301904.damfilter,nil,1-tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,g:GetCount()*300)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,dc*300)
end
function c82301904.sgfilter(c,p)
return c:IsLocation(LOCATION_GRAVE) and c:IsControler(p)
......
......@@ -31,7 +31,7 @@ end
function c83555666.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.Destroy(tc,REASON_EFFECT)~=0 then
local atk=tc:GetAttack()
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
local val=Duel.Damage(tp,atk,REASON_EFFECT)
if val>0 then
......
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