public static double GetTestValue(EventContext context, Game game, string value) { //These values must match the special cases on IsSpecialName if (value == "TIME") return game.CurrentTime; else if (value == "AGE") return context.CurrentCharacter.Age; else if (value == "GOLD") return context.CurrentCharacter.Money; double dValue; if (double.TryParse(value, out dValue)) return dValue; return context.GetVariable(context.CurrentCharacter, value); }