Prototype #1 - Waug/MonsterCrasher GitHub Wiki
Prototype Requirements
This document will reference "forward" from Player 1's perspective.
A board must exist A square must be 1x1 unit. (scale undefined currently, but ratios 1:1 required) Its dimensions must be 8 squares across by 8 squares long (8x8 like a chessboard) A square must be black or white. A square must recognize it is black or white. A square must have a coordinate. Coordinates are based on a chessboard pattern system. (A1 - H8) Board Coordinates are objective. A1 is the bottom left square H8 is the top right square These are from P1's perspective. Coordinate number 0 is P1. Coordinate number 9 is P2. A square may have at most one gameobject placed on it. If placed on a square, That square must have a reference to that gameobject. The board must be able to take in a square coordinate, direction, and player and calculate the resulting coordinate. (In the future, direction sets may be used. Directions defined below)
A creature must be spawnable on any selectable square P1 may spawn creatures A1 to H1 P2 may spawn creatures A8 to H8 A creature requires an owner assigned to a player as part of the spawn action. There are 2 players Each player "owns" a side of the board. If a player observes a creature not assigned to them, that creature is considering an opposing creature to ones that are assigned to that player.
A player's life total is 10.
A creature must have an attack stat of 1 and a defense stat of 1. A creature must have an attack stat of 1 and a defense stat of 2. A creature must have a movement. Movement is defined relative to the owner player. Directions are defined as Illustrated
-
- | FP| F | FS|
- |||___|
- | P | H | S |
- |||___|
- | BP| B | BS|
- |||___|
-
P1
H = Home : The space creature is currently occupying F = Forward : The direction toward the opposing player B = Backward : The Direction toward the owning player P = Port : The Left-handed side of the creature S = Starboard : The Right-handed side of the creature FP, FS, BP, BS: Diagonals defined always by referencing the Forward or Backward movement first. For the current prototype, only F and H are required. (A direction set will contain numbers and multiple Directions. (A number followed by a direction will mean perform that direction as many times as the number. (There will never be the number 1. (Direction sets will always be written in this priority: H - F - B - FP - FS - BP - BS - P - S (A double move forward would look like this: 2F (To replicate a knight's move in chess would look like this: FSS (Should there ever be a direction used again to make a complex move or a specific path required, then a comma will separate the sets. All direction sets will always follow this pattern. (A zig zag would look like this: FPFS,FPFS,FPFS,FPFS : Reverse Zigzag would look like this: FS,FPSFS,FPFS,FPFS,FP (All movement must be normalized. If two moves can become 1, they will : F2S -> FSS
A UI turn button must exist A creature must be able to reference the square it is placed on. A creature must be able to find and reference the square to its F. Referencing squares means it is capable of accessing information about the square (e.g. black/white and square coordinate) When a turn button is pressed, the creature must move 1 square F. (Refer to board for processing responsibility)
A creature may only move F. or stay on H.
All directions are relative to the player When Player 1 (P1) looks at a board and takes position at a side, F for P1 creatures will be the square on the far side of H. Look at figure for P1. A P1 Creature placed on A1 will have an F of A2 When Player 2 (P2) takes position at the board, they will take the opposite side. An opponent's position will be F to P1 from P1's perspective. A P2 Creature placed on A8 will have an F of A7 The directions are relative, so when P2 plays, P1 will also be F from P2's perspective. (I'm trying to be as techincal possible, but simple, each player's "forward" is relative and they do not share, i.e. P1 F = P2 B)
No matter how many creatures, no matter which owner, when the turn button is pressed, each creature must move its relative F.
Combat occurs when two creatures attempt to enter each other's square, or when they attempt to both enter the same square. More techincally: SITUATION 1: if P1 Creature's H is P2 Creature's F &&and&& P2 Creature's H is P1 Creature's F, they will combat. SITUATION 2: if P1 Creature's F is the same as P2 Creature's F, they will combat Combat: Simultaneously, creature 1 takes its power stat and subtracts that stat from creature 2's defense stat, and creature 2 uses its power stat and subtracts that stat from creature 1's defense stat. When two creatures attempt to move into the other creature's space, combat occurs (Creature1 (c1) is a power 1 / defense 2 creature. Creature 2 (c2) is a power 1 / defense 2 creature.) c1 defense 2 - c2 power 1 = c1 defense 1 ; c2 defense 2 - c1 power 1 = defense 1 ; After combat, c1 is a power 1 / defense 1 creature: After combat, c2 is a power 1 / defense 1 creature
SITUATION 1: If two opposing creatures attempt to enter the same square, they will combat. After combat, If both still have defense and their defenses are the same, neither move into the square. If two opposing creatures attempt to enter the same square, they will combat. After combat, if both still have defense, the creature with higher defense will move into the square. If two opposing creatures attempt to enter the same square, they will combat. After combat, if only one creature still has defense, it will move into the square.
If a creature has 0 or less defense after combat, it is defeated and destroyed. The winning creature will finish its move. The defeated creature (0 defense) is removed from the board.
If a creature's F coordinate has a 0 or 9 when the turn button is pressed, the player who does not own that creature will lose life equal to the power of that creature. The creature is the removed from the board.
A creature must visually present its current power and defense at all times.
When a Player's life becomes 0, the game is over.