Closed godbit closed 6 years ago
How about we update SquadMember:
// Probably in PlayerData.wurst
constant EASY = 0
constant NORMAL = 1
constant HARD = 2
// Squad.wurst
public class SquadMember
int array u_ids
int num
SpawnPosition sp
spawnInterval si
construct(int array u_ids, int num, SpawnPosition sp, spawnInterval si)
this.u_ids = u_ids
this.num = num
this.sp = sp
this.si = si
function getUnitDifficulty(int difficulty) returns int
return this.u_ids[difficulty]
// Spawn.wurst
let u = createUnit(PLAYER_BROWN, single.getUnitDifficulty(pd.difficulty), pos, angle(PI/2))
Hmm, it will be quite the rewrite, but I'll think it will work.
Will affect:
Btw, I think we can remove the MobDefinitions STAG
, since they aren't used anywhere apparently.
// Stag
for i = 0 to 3-1
new MobDefinition(compiletime(UNIT_ID_GEN.next()), "Stag", Units.blackStagMale, "", 1, 1, scaleDifficulty(20, i), 0, 250, 1, 1.)
// Probably a better scaling function.
function scaleDifficulty(int hp, int difficulty) returns int
return hp+hp*(0.1*difficulty)
Yeah looks good, i was thinking about something similar. Add this as a Zone 1 milestone?
:+1:
Closed in: cdfb804f82e1b2b8f33bea6163250bc3b86e952b
At start of game/rmk set the a flag in PlayerData that stores that players difficulty.
In spawn use the mob for the current level that corresponds to the players chosen difficulty.