add score multiplier
This commit is contained in:
parent
431a591481
commit
9b23327df4
2 changed files with 2 additions and 1 deletions
|
@ -42,6 +42,7 @@ local common_cfg = {
|
|||
cap_time = 300,
|
||||
timer_loser = 1/2,
|
||||
decrement_reward = false, -- bad idea, encourages mario to run into goombas.
|
||||
score_multiplier = 1, -- how much the ingame score influences our rewards.
|
||||
}
|
||||
|
||||
local cfg = {
|
||||
|
|
2
main.lua
2
main.lua
|
@ -639,7 +639,7 @@ local function doit(dummy)
|
|||
--local reward_delta = screen_scroll_delta + status_delta * 256 + flagpole_bonus
|
||||
local score_delta = game.get_score() - score_old
|
||||
if score_delta < 0 then score_delta = 0 end
|
||||
local reward_delta = screen_scroll_delta + score_delta + flagpole_bonus
|
||||
local reward_delta = screen_scroll_delta + cfg.score_multiplier * (score_delta + flagpole_bonus)
|
||||
screen_scroll_delta = 0
|
||||
|
||||
if cfg.decrement_reward and reward_delta == 0 then reward_delta = reward_delta - 1 end
|
||||
|
|
Loading…
Reference in a new issue