A discord game where the chat leads soldiers to battle!
run monogoose web server in the dist folder
monogoose.exe
updates the dist folder
npx webpack
updates packages
npm install
UnitChange
- valueUsed: number;
- shouldDestroy: bool;
ChangeableState
- currentValue: number;
- max: number;
change(value: number, state: ChangeableState): UnitChange;
- health: number;
- maxHealth: number;
- addHealth(amt: number): UnitChange;
- level: number;
- nextLevel: number;
- experience: number;
- nextRatio: number;
- maxLevel: number;
- upgrade(value: number): UnitChange;
TeamSystem each team has a color and an image. This class allows to change the base team add any time. The team system also includes a neutral team. This will be the default team for a base.
- UnitImgKey: string;
- BaseImgKey: string;
- teamId: number;
- color: [number,number,number];
- name: string;
- team: TeamSystem;
- style: object;
- avatarUrl: string;
- name: string;
- message: string;
- player: Player;
GenerateState create units every second based on the level of the base.
- base: Base;
- generate(): void;
- unitHit(unit: Unit): void;
NeutralState must be repaired before it can be used to generate units.
- base: Base;
- unitHit(unit: Unit): void;
MoveState move from the current base to the toBase.
- speed: number;
- toBase: Base;
- user: UserAction;
AttackState attacks the to base
- speed: number;
- toBase: Base;
OribitState rotates around the current base
- speed: number;
SpawnState moves to the orbit state
- speed: number;
- distance: number;
- destination: Vector2;
UserAction represents the move a player makes. this includes multiple units.
- id: number;
- user: Player;
- units: Unit[];
- hp: Healthbar;
- team: TeamSystem;
- levelScale: number;
- xp: LevelSystem;
- baseState: BaseState;
- tint: number;
- baseId;
- value: number;
- team: TeamSystem;
- unitState: UnitState;
- currentBase: Base;
- tint: number;
- maxScale: number;
Occurs when an opposite unit attacks another base
- decreases base health
- goes to neutral state if health <= 0
- adds the negative value to the neutral base
- goes to neutral state if health <= 0
- decreases unit value
- deletes if unit value = 0
Occurs when the base has max health and a matching team unit hits the base
- increase the xp based on the value of the unit
- destroy the unit
- if xp >= nextLevel
- level++
- nextLevel *= nextRatio
Occurs when the base is NOT at max health and a matching team unit hits the base
- increases base health
- decrease unit value/destroy
- stop if base health = max health
Occurs when health = 0
- must be repaired to use
- when a unit first hits a neutral base, it increases the base health and changes the team
- if health >= maxHealth
- change to the generate state
- if an opposing team hits the base, decrease the health
when fps is low, units of the same team are combined, increasing their value
- the unit scale will be increased to the max
- the goal of the game is to DESTROY the other teams. You do this by destroying all of the teams bases
- Each base starts out with generating 1 unit per second. Units can be used to upgrade bases or attacking enemy bases.
- When a base is upgraded, the units used to upgrade the base are destroyed, but the base now generates 2 units per second. The base will also have more hitpoints.
- Some bases can be upgraded more than others and are therefore worth more.
- If a base is destoyed, it becomes neutral. Units have to be used to take over a enemy base for it to become yours.
- bases can be repaired in the game way that bases are upgraded. Units are used up to upgrade the bases.
- Discord users join a team using the
!join
or!join 1
command. This will add them to a team, allowing them to move units in the game. - The number of units a user can move is relative to the number of players on their team there are. If there are 2 players and 100 units on each team, a player can move 50 units at a time.
- players move units by the
!move
command. If there is base a and base b, a player can type!move a b
to move their max number of units from base a to base b. You can also specify an amount with!move 10 a b
, or!move 50% a b
. - Players can also upgrade the base by using the command
!upgrade a
,!upgrade 20% a
or!upgrade 10 a
. - Players can leave the game with the command
!leave
. - Players can see their name above the units they are moving and in the player list.
- Players can cancel a move command by calling
!retreat b
. This will reverse the units direction away from base b that player controls.
Name | Args | Description |
---|---|---|
!join | 1,2,3,etc... | Join a team in the game. |
!move | a b, 1 a b, 1% a b | Moves a certain number of units that the players has control over. |
!upgrade | a, 10 a, 10% a | Upgrades a base with a certain number of units that the player has control over. |
!leave | player leaves the game. | |
!retreat | a,b,etc... | Reverses the player's units movement away from the base specified. |