doodle/pkg/balance/cheats.go
Noah Petherbridge ad67e2b42b New Doodad: Blue Bird
* The blue bird follows the same base AI as the red bird (it has a
  target altitude that it tries to maintain, and it will dive at the
  player) but the blue bird flies in a sine wave pattern around its
  target altitude. It also has a longer scan radius to search for the
  player than the red bird.
* The sine wave pattern of the blue bird means you may fly under its
  radar depending how high it is on average.

Cheat codes that replace the player character are refactored to make
it easier to extend, and new cheats have been added:

* super azulian: play as the Red Azulian.
* hyper azulian: play as the White Azulian.
* bluebird: play as the new Bird (blue).
2022-04-30 17:59:55 -07:00

50 lines
1.5 KiB
Go

package balance
// Store a copy of the PlayerCharacterDoodad original value.
var playerCharacterDefault string
func init() {
playerCharacterDefault = PlayerCharacterDoodad
}
// IsPlayerCharacterDefault returns whether the balance.PlayerCharacterDoodad
// has been modified at runtime away from its built-in default. This is a cheat
// detection method: high scores could be tainted if you `fly like a bird` right
// to the exit in a couple of seconds.
func IsPlayerCharacterDefault() bool {
return PlayerCharacterDoodad == playerCharacterDefault
}
// The game's cheat codes
var (
CheatUncapFPS = "unleash the beast"
CheatEditDuringPlay = "don't edit and drive"
CheatScrollDuringPlay = "scroll scroll scroll your boat"
CheatAntigravity = "import antigravity"
CheatNoclip = "ghost mode"
CheatShowAllActors = "show all actors"
CheatGiveKeys = "give all keys"
CheatDropItems = "drop all items"
CheatPlayAsBird = "fly like a bird"
CheatGodMode = "god mode"
CheatDebugLoadScreen = "test load screen"
CheatUnlockLevels = "master key"
)
// Global cheat boolean states.
var (
CheatEnabledUnlockLevels bool
)
// Actor replacement cheats
var CheatActors = map[string]string{
"pinocchio": "boy",
"the cell": "azu-blue",
"super azulian": "azu-red",
"hyper azulian": "azu-white",
"fly like a bird": "bird-red",
"bluebird": "bird-blue",
"megaton weight": "anvil",
"play as thief": "thief",
}