2022-01-09 02:27:37 +00:00
|
|
|
package balance
|
|
|
|
|
2023-01-02 20:36:12 +00:00
|
|
|
import magicform "git.kirsle.net/SketchyMaze/doodle/pkg/uix/magic-form"
|
|
|
|
|
2022-01-09 02:27:37 +00:00
|
|
|
// 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"
|
2022-05-01 22:18:23 +00:00
|
|
|
CheatGiveGems = "give all gems"
|
2022-01-09 02:27:37 +00:00
|
|
|
CheatDropItems = "drop all items"
|
|
|
|
CheatPlayAsBird = "fly like a bird"
|
2022-01-18 06:02:27 +00:00
|
|
|
CheatGodMode = "god mode"
|
2022-03-06 06:44:54 +00:00
|
|
|
CheatDebugLoadScreen = "test load screen"
|
2022-09-25 01:39:02 +00:00
|
|
|
CheatDebugWaitScreen = "test wait screen"
|
2022-03-26 20:55:06 +00:00
|
|
|
CheatUnlockLevels = "master key"
|
2022-05-04 04:15:39 +00:00
|
|
|
CheatSkipLevel = "warp whistle"
|
2022-03-26 20:55:06 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Global cheat boolean states.
|
|
|
|
var (
|
|
|
|
CheatEnabledUnlockLevels bool
|
2022-01-09 02:27:37 +00:00
|
|
|
)
|
2022-05-01 00:59:55 +00:00
|
|
|
|
|
|
|
// Actor replacement cheats
|
|
|
|
var CheatActors = map[string]string{
|
2023-02-18 05:49:19 +00:00
|
|
|
"pinocchio": PlayerCharacterDoodad,
|
2022-05-01 22:18:23 +00:00
|
|
|
"the cell": "azu-blu",
|
2022-05-01 00:59:55 +00:00
|
|
|
"super azulian": "azu-red",
|
|
|
|
"hyper azulian": "azu-white",
|
|
|
|
"fly like a bird": "bird-red",
|
|
|
|
"bluebird": "bird-blue",
|
|
|
|
"megaton weight": "anvil",
|
|
|
|
"play as thief": "thief",
|
|
|
|
}
|
2023-01-02 20:36:12 +00:00
|
|
|
|
|
|
|
// Options for the "Play as:" drop-down in the Cheat Menu window.
|
|
|
|
var CheatMenuActors = []magicform.Option{
|
|
|
|
{
|
|
|
|
Value: "",
|
|
|
|
Label: "Play as . . .",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Value: "boy.doodad",
|
|
|
|
Label: "Boy",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Value: "thief.doodad",
|
|
|
|
Label: "Thief",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Value: "azu-blu.doodad",
|
|
|
|
Label: "Azulian",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Value: "bird-red.doodad",
|
|
|
|
Label: "Bird",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Value: "crusher.doodad",
|
|
|
|
Label: "Crusher",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Value: "snake.doodad",
|
|
|
|
Label: "Snake",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Value: "anvil.doodad",
|
|
|
|
Label: "Anvil",
|
|
|
|
},
|
|
|
|
}
|