Skip to content

Commit

Permalink
#34: Made magic duration time a global constant
Browse files Browse the repository at this point in the history
  • Loading branch information
wpernath committed Sep 10, 2022
1 parent 1555e1a commit 3aecd01
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default class MagicFirespin extends BaseWeapon {
game.world.removeChild(this);
this.owner.spell = null;
},
10000,
GlobalGameState.magicDurationTime,
true
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class MagicNebula extends BaseWeapon {
this.owner.spell = null;
this.owner.hasPlacedNebula = false;
},
15000,
GlobalGameState.magicDurationTime,
true
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default class MagicProtectionCircle extends BaseWeapon {
this.owner.spell = null;
GlobalGameState.invincible = false;
},
15000,
GlobalGameState.magicDurationTime,
true
);

Expand Down
3 changes: 2 additions & 1 deletion melonjs-client/src/main/client/js/util/global-game-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ const GlobalGameState = {
// some configs
enemyStunnedTime: 5000, // ms
playerInvincibleTime: 3000, // ms

magicDurationTime: 15000,

// adding score for different elements
scoreForPills: 10,
scoreForBombs: 50,
Expand Down

0 comments on commit 3aecd01

Please sign in to comment.