master
a327ex 2021-07-26 11:03:00 -03:00
parent 805c2ad830
commit 1fff7cdefd
1 changed files with 10 additions and 4 deletions

View File

@ -681,10 +681,14 @@ function Player:init(args)
local units = self:get_all_units()
local unit_1 = random:table(units)
local runs = 0
if unit_1 then
while table.any(non_attacking_characters, function(v) return v == unit_1.character end) and runs < 1000 do unit_1 = random:table(units); runs = runs + 1 end
end
local unit_2 = random:table(units)
local runs = 0
if unit_2 then
while table.any(non_attacking_characters, function(v) return v == unit_2.character end) and runs < 1000 do unit_2 = random:table(units); runs = runs + 1 end
end
if unit_1 then
unit_1.fairy_aspd_m = 3
unit_1.fairyd = true
@ -1011,9 +1015,11 @@ function Player:init(args)
if enchanter_amount >= 2 then
local unit = random:table(units)
local runs = 0
if unit then
while table.any(non_attacking_characters, function(v) return v == unit.character end) and runs < 1000 do unit = random:table(units); runs = runs + 1 end
unit.enchanted_aspd_m = (self.enchanted == 1 and 1.33) or (self.enchanted == 2 and 1.66) or (self.enchanted == 3 and 1.99)
end
end
end)
end