- UID
- 327379
- 主题
- 0
- 阅读权限
- 20
- 帖子
- 225
- 精华
- 0
- 积分
- 113
- 金钱
- 1505
- 荣誉
- 0
- 人气
- 0
- 在线时间
- 336 小时
- 评议
- 0
- 帖子
- 225
- 精华
- 0
- 积分
- 113
- 金钱
- 1505
- 荣誉
- 0
- 人气
- 0
- 评议
- 0
|
PS:我混合了很多Mod,不知道有没有影响,大礼包汉化+视角+魔术+自己修改的挖宝。
我把魔术的贪婪能力改了,变成累加挖宝概率。
lvlskill.lua
function lvlskill_greedy_apply(unit)
g_greedy=g_greedy+1
if not Attack.act_is_spell(unit,"lvlskill_greedy") then
Attack.act_apply_spell_begin(unit,"lvlskill_greedy",-100,false)
Attack.act_apply_spell_end()
end
end
zsystem.lua
function custom_genbox( racemask ) --眖addon_pets.lua眔
local mapk = Game.MapLocDifficulty()
local K = Boxgen.rnd(100)
--эㄏ备笵ㄣpcbun
K = K - 10 - 5*tonumber(g_greedy)
if K < 0 then --э莉眔杆称
if not Boxgen.object( mapk ) then -- 沐礤痂痼弪? 镳邃戾? 篷腓 礤 胥屙屦桦?, 蝾 溴睃汨
-- cant add object, add money
K = K + 10 + 5*tonumber(g_greedy) --Boxgen.parcount( "money", "*7" ) -- 沐礤痂?溴礤?Mini,Small,Average
end
return true
end
--эㄏ备笵ㄣpcbun
K = K - 15 - 3*tonumber(g_greedy)
if K < 0 then -- 镳铖蝾?疋栩铌
local r = Boxgen.rnd(100)
local count = 3
if r < 80 then
count = 1
elseif r < 95 then
count = 2
end
if not Boxgen.scroll( Game.MapLocDifficulty(), count ) then
-- cant add scroll, add money
K = K + 15 + 3*tonumber(g_greedy) --Boxgen.parcount( "money", "*7" ) -- 沐礤痂?溴礤?Mini,Small,Average
end
return true
end
K = K - 2 - 2*tonumber(g_greedy)
if K < 0 then
local num = Boxgen.rnd(100)
if num < 50 then
Boxgen.parlimit("mana", "1")
elseif num < 75 then
Boxgen.parlimit("mana", "2")
elseif num < 90 then
Boxgen.parlimit("mana", "3")
else
Boxgen.parlimit("mana", "4")
end
return true
end
K = K - 2 - 2*tonumber(g_greedy)
if K < 0 then
local num = Boxgen.rnd(100)
if num < 50 then
Boxgen.parlimit("rage", "1")
elseif num < 75 then
Boxgen.parlimit("rage", "2")
elseif num < 90 then
Boxgen.parlimit("rage", "3")
else
Boxgen.parlimit("rage", "4")
end
return true
end
K = K - 1 - tonumber(g_greedy)
if K < 0 then
local num = Boxgen.rnd(100)
if num < 50 then
Boxgen.parcount("attack", "1")
elseif num < 75 then
Boxgen.parcount("attack", "2")
elseif num < 90 then
Boxgen.parcount("attack", "3")
else
Boxgen.parcount("attack", "4")
end
return true
end
K = K - 1 - tonumber(g_greedy)
if K < 0 then
local num = Boxgen.rnd(100)
if num < 50 then
Boxgen.parcount("defense", "1")
elseif num < 75 then
Boxgen.parcount("defense", "2")
elseif num < 90 then
Boxgen.parcount("defense", "3")
else
Boxgen.parcount("defense", "4")
end
return true
end
K = K - 1 - tonumber(g_greedy)
if K < 0 then
local num = Boxgen.rnd(100)
if num < 50 then
Boxgen.parcount("intellect", "1")
elseif num < 75 then
Boxgen.parcount("intellect", "2")
elseif num < 90 then
Boxgen.parcount("intellect", "3")
else
Boxgen.parcount("intellect", "4")
end
return true
end
K = K - 3 - 2*tonumber(g_greedy)
if K < 0 then
local num = Boxgen.rnd(100)
if num < 50 then
Boxgen.parcount("leadership", "15")
elseif num < 75 then
Boxgen.parcount("leadership", "30")
elseif num < 90 then
Boxgen.parcount("leadership", "70")
else
Boxgen.parcount("leadership", "150")
end
return true
end
K = K - 5 -3*tonumber(g_greedy)
if K < 0 then
local num = Boxgen.rnd(100)
local r = Boxgen.rnd(3)
if num < 50 then
if r == 0 then
Boxgen.parcount( "rune_might", "1" )
elseif r == 1 then
Boxgen.parcount( "rune_magic", "1" )
else
Boxgen.parcount( "rune_mind", "1" )
end
elseif num < 75 then
if r == 0 then
Boxgen.parcount( "rune_might", "2" )
elseif r == 1 then
Boxgen.parcount( "rune_magic", "2" )
else
Boxgen.parcount( "rune_mind", "2" )
end
elseif num < 90 then
if r == 0 then
Boxgen.parcount( "rune_might", "3" )
elseif r == 1 then
Boxgen.parcount( "rune_magic", "3" )
else
Boxgen.parcount( "rune_mind", "3" )
end
else
if r == 0 then
Boxgen.parcount( "rune_might", "4" )
elseif r == 1 then
Boxgen.parcount( "rune_magic", "4" )
else
Boxgen.parcount( "rune_mind", "4" )
end
end
return true
end
K = K - 10 - 5*tonumber(g_greedy)
if K < 0 then
local r = Boxgen.rnd(100)
if r < 50 then
Boxgen.parcount( "crystals", "1" )
elseif r < 75 then
Boxgen.parcount( "crystals", "2" )
elseif r < 90 then
Boxgen.parcount( "crystals", "3" )
else
Boxgen.parcount( "crystals", "5" )
end
return true
end
K = K - 10 - 5*tonumber(g_greedy)
if K < 0 then
if not Boxgen.scroll( ) then
-- cant add scroll, add money
K = K + 10 + 5*tonumber(g_greedy)--Boxgen.parcount( "money", "*7" )
end
return true
end
-- Boxgen.parcount( "money", "*7" ) -- 沐礤痂?溴礤?Mini,Small,Average
local r = Boxgen.rnd(100)
if r < 40 then
Boxgen.parcount( "money", "*tonumber(g_greedy)" ) -- 沐礤痂?溴礤?Mini
elseif r < 75 then
Boxgen.parcount( "money", "*2*tonumber(g_greedy)" ) -- 沐礤痂?溴礤?Small
else
Boxgen.parcount( "money", "*4*tonumber(g_greedy)" ) -- 沐礤痂?溴礤?Average
end
return true
end |
|