Skip to content

Instantly share code, notes, and snippets.

@barzamin
Last active August 1, 2016 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barzamin/7be8a0a6ea0559687db9ff8ebfaa5758 to your computer and use it in GitHub Desktop.
Save barzamin/7be8a0a6ea0559687db9ff8ebfaa5758 to your computer and use it in GitHub Desktop.
The Genesis Project player stats pseudostruct
///***!!! THIS IS NOT THE FINAL CODE NOR CODE THAT WILL GO DIRECTLY INTO THE GAME !!!***///
// It's simply a codification of the "stats" document, to make it easier for us to integrate stats when
// we start adding `Player` objects.
// I used C# because it was convenient and we want people on TGP to know it. There's no scope qualifiers etc,
// and is pretty much pseudocode, so **don't** directly copy-paste this!
// most properties should be self-explanatory
// some of the floats may need to be rolled down into ints for speed over the wire
// anything commented with (?) is of questionable necessity/usefulness and removal should be debated
struct Player {
// overarching "plot" stats
QuestType personalQuest;
Denizen denizen;
Classpect classpect; // Classpect should be a type with a class/aspect enum pair encapsulated
// Basic homestucky stats
int echeladderLevel;
int sylladexSize;
// Location
Planet homePlanet, currentPlanet;
Location currentLocation;
// STRIFE!-related stats
float attackStr_Physical; // attack strength. (isatomicunit)
float attackDef_Physical; // defense strength (in [HealthPoints]/[AttackStrength])
float attackSpd_Physical; // attack speed (in metres/sec)
// Body stats!
float jumpHeight; // how high the player will jump (in metres)
float blood; // a percentage of blood in the player's body, represented as a float (0-1)
float health; // HP! represented as a float (0-100)
float heathRegen; // HP regen ([HealthPoints]/sec)
LifeStatus aliveness; // alive/dead/(double-dead if we make that a thing)/undead/invuln/gt
float poisoning; // ([HealthPoints]/sec), should be a negative number unless you want infinite healing or something (don't do this lel)
// Abilities
Ability[] abilities; // ability stack (windy thing, flying thing, time thing, space thing)
// Personal/learned/classpect stats
float pulchritude; // (?) perhaps success in consort trades? or negotiation if implemented.
float imagination; // (?) i guess we're on a PS roll? affects summoning acuity
float luck; // (0-1) when 1, the RNG is always in favor of the player. when 0, the RNG is always against. when 0.5, the RNG is fair for the player.
float fortune, secrecy; // (?) don't know what these are for.
float karma; // (?) -/+ makes obvious sense. probably (-1 to 1).
float agility;
float beserkness; // (?) lowers agility but buffs speed, attackdamage
// Visual/auditory/interaction stats/buffs/debuffs
float transparency; // is the player doing the hidey thing? (0-1, fully transparent to fully opaque).
bool physicsTransparency; // when true, no collision or rigidbody interaction is performed.
float speedScaling; // Sonic the Hedgehog versus a s l o t h. scaling multiplier from base. TEMPORARY BUFF/DEBUFF! permanant abilities should go in abilities[].
float sizeScaling; // GIANTS & dwarfs. scaling multiplier from base. TEMPORARY BUFF/DEBUFF! permanant abilities should go in abilities[].
// abandon hope all ye who enter here
TimeSpan doom; // Time To Death
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment