diff --git a/lib/game/components/android_acres/behaviors/ramp_bonus_behavior.dart b/lib/game/components/android_acres/behaviors/ramp_bonus_behavior.dart index b4fe80a0..f273319c 100644 --- a/lib/game/components/android_acres/behaviors/ramp_bonus_behavior.dart +++ b/lib/game/components/android_acres/behaviors/ramp_bonus_behavior.dart @@ -23,10 +23,13 @@ class RampBonusBehavior extends Component with ParentIsA { await super.onLoad(); await add( FlameBlocListener( - listenWhen: (previousState, newState) => - previousState.hits != newState.hits && - newState.hits != 0 && - newState.hits % 10 == 0, + listenWhen: (previousState, newState) { + final hasChanged = previousState.hits != newState.hits; + final hasHit = newState.hits != 0; + final achievedOneMillionPoints = newState.hits % 10 == 0; + + return hasChanged && hasHit && achievedOneMillionPoints; + }, onNewState: (state) { parent.add( ScoringBehavior(