//public static readonly Dictionary<string, object> statCodes = new Dictionary<string, object>() { // // Gravity // { "gravity", "How strong does gravity apply to the character? Default value is 0.5" }, // // Abilities // { "fast-cast", "Is the character able to use weapons and powers faster than usual? Set to TRUE or FALSE." }, // { "shell-mastery", "Is the character given special protection against shell damage? Set to TRUE or FALSE." }, // { "safe-above", "Is the character protected from damage from above? Set to TRUE or FALSE." }, // { "damage-above", "Does the character cause extra damage to objects above? Set to TRUE or FALSE." }, // // Wound Stats // { "maxhealth", "What is the maximum amount of health the character can possess? Default value is 3." }, // { "maxarmor", "What is the maximum amount of armor the character can possess? Default value is 3." }, //}; public static void CheatStatWall() { string currentIns = ConsoleTrack.GetArgAsString(); ConsoleTrack.PrepareTabLookup(wallStatCodes, currentIns, "Assign wall-related stats for the character."); // If the stat instruction is a full word, then we can indicate that it's time to provide additional help text: if (wallStatCodes.ContainsKey(currentIns)) { ConsoleTrack.possibleTabs = ""; ConsoleTrack.helpText = wallStatCodes[currentIns].ToString(); } if (ConsoleTrack.activate) { Character character = ConsoleTrack.character; // Abilities if (currentIns == "can-wall-jump") { bool boolVal = ConsoleTrack.GetArgAsBool(); character.stats.CanWallJump = boolVal; character.stats.CanWallSlide = boolVal; } else if (currentIns == "can-grab") { character.stats.CanWallGrab = ConsoleTrack.GetArgAsBool(); } else if (currentIns == "can-slide") { character.stats.CanWallSlide = ConsoleTrack.GetArgAsBool(); } // Wall Jumping else if (currentIns == "jump-duration") { character.stats.WallJumpDuration = (byte)Math.Round(ConsoleTrack.GetArgAsFloat()); } else if (currentIns == "jump-strength") { character.stats.WallJumpXStrength = (byte)Math.Round(ConsoleTrack.GetArgAsFloat()); } else if (currentIns == "jump-height") { character.stats.WallJumpYStrength = (byte)Math.Round(ConsoleTrack.GetArgAsFloat()); } } }
public static void CheatCodeStats() { string statIns = ConsoleTrack.GetArgAsString(); ConsoleTrack.PrepareTabLookup(statCodes, statIns, "Assign stats for the character."); // If the stat instruction is a full word, then we can indicate that it's time to provide additional help text: if (statCodes.ContainsKey(statIns)) { if (statCodes[statIns] is Action[]) { (statCodes[statIns] as Action[])[0].Invoke(); return; } ConsoleTrack.possibleTabs = ""; ConsoleTrack.helpText = statCodes[statIns].ToString(); } if (ConsoleTrack.activate) { Character character = ConsoleTrack.character; // Reset All Stats if (statIns == "reset-all") { character.stats.ResetCharacterStats(); } // Gravity if (statIns == "gravity") { character.stats.BaseGravity = FInt.Create(ConsoleTrack.GetArgAsFloat()); } // Abilities else if (statIns == "fast-cast") { character.stats.CanFastCast = ConsoleTrack.GetArgAsBool(); } else if (statIns == "shell-mastery") { character.stats.ShellMastery = ConsoleTrack.GetArgAsBool(); } else if (statIns == "safe-above") { character.stats.SafeVsDamageAbove = ConsoleTrack.GetArgAsBool(); } else if (statIns == "damage-above") { character.stats.InflictDamageAbove = ConsoleTrack.GetArgAsBool(); } // Wound Stats else if (statIns == "maxhealth") { character.wounds.WoundMaximum = (byte)ConsoleTrack.GetArgAsInt(); } else if (statIns == "maxarmor") { character.wounds.WoundMaximum = (byte)ConsoleTrack.GetArgAsInt(); } } }