Skip to content

Commit

Permalink
now resting takes about 10 seconds no matter what your stamina level is
Browse files Browse the repository at this point in the history
  • Loading branch information
zachio committed Mar 19, 2017
1 parent 7334385 commit ac2f3e9
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
12 changes: 10 additions & 2 deletions _site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@ A topdown roguelike game! This game is in active development. Come join us on

## Instructions

### Install
### Install locally

$git clone https://github.com/zachdyer/chrome-rogue.git
$cd chrome-rogue
$nemo .
Open index.html

### How to setup a Cloud9 development environment

### Demo
To setup your Cloud9 environment copy the SSH link `[email protected]:zachdyer/chrome-rogue.git`.
Go to the Cloud9 dashboard at `https://c9.io/yourusername` and create a new workspace.
Paste the SSH link in the clone from Git field. Select HTML5 environment and
name your workspace. Click create workspace. In bash execute `git checkout` and
wait for the files to download to Cloud9.

## Demo
To demo the game go to https://zachdyer.github.io/chrome-rogue/
1 change: 1 addition & 0 deletions _site/js/game.assets.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var game = game || {};

game.assets = {
files: [
Expand Down
5 changes: 4 additions & 1 deletion _site/js/game.player.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ game.player = {
break;
}
//Stamina
//Sprinting state
if(game.skill.stamina.cooldown > 0) {
game.skill.stamina.cooldown -= game.movement.speedPerSecond(1000);
game.skill.stamina.exp += game.movement.speedPerSecond(1000);
Expand All @@ -164,8 +165,10 @@ game.player = {
game.player.speed = 4;
game.player.sprinting = false;
}
//Resting state
} else {
if(game.skill.stamina.cooldown < game.skill.stamina.max) game.skill.stamina.cooldown += game.movement.speedPerSecond(500);
if(game.skill.stamina.cooldown < game.skill.stamina.max)
game.skill.stamina.cooldown += game.movement.speedPerSecond(game.skill.stamina.max * 0.1);
else game.skill.stamina.cooldown = game.skill.stamina.max;
}
if(Date.now() - game.combat.coolDown < 200) this.cropX = 0;
Expand Down
5 changes: 4 additions & 1 deletion js/game.player.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ game.player = {
break;
}
//Stamina
//Sprinting state
if(game.skill.stamina.cooldown > 0) {
game.skill.stamina.cooldown -= game.movement.speedPerSecond(1000);
game.skill.stamina.exp += game.movement.speedPerSecond(1000);
Expand All @@ -164,8 +165,10 @@ game.player = {
game.player.speed = 4;
game.player.sprinting = false;
}
//Resting state
} else {
if(game.skill.stamina.cooldown < game.skill.stamina.max) game.skill.stamina.cooldown += game.movement.speedPerSecond(500);
if(game.skill.stamina.cooldown < game.skill.stamina.max)
game.skill.stamina.cooldown += game.movement.speedPerSecond(game.skill.stamina.max * 0.1);
else game.skill.stamina.cooldown = game.skill.stamina.max;
}
if(Date.now() - game.combat.coolDown < 200) this.cropX = 0;
Expand Down

0 comments on commit ac2f3e9

Please sign in to comment.