Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Less shield hitpoints but faster regen
  • Loading branch information
cswinter committed Feb 14, 2021
1 parent d6f9a8c commit 4b01e5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -17,11 +17,13 @@ object GameConstants {
/** The speed of missiles measured in units distance per timestep. */
final val MissileSpeed = 17

/** The number of timesteps it takes for shield hitpoints to increase by one (per shield generator module). */
final val ShieldRegenerationInterval = 100
/** The number of timesteps it takes for shield hitpoints to increase by one (per shield generator module).
* Cooldown resets whenever drone takes damage.
* */
final val ShieldRegenerationInterval = 35

/** The amount of hitpoints provided per shield generator module. */
final val ShieldMaximumHitpoints = 7
final val ShieldMaximumHitpoints = 4

/** The largest distance at which minerals can be harvested. */
final val HarvestingRange = 70
Expand Down
Expand Up @@ -37,6 +37,7 @@ private[core] class ShieldGeneratorModule(positions: Seq[Int], owner: DroneImpl)
def absorbDamage(damage: Int): Int = {
owner.invalidateModelCache()
val absorbed = math.min(damage, _currHitpoints)
regenCooldown = ShieldRegenerationInterval
_currHitpoints -= absorbed
damage - absorbed
}
Expand Down

0 comments on commit 4b01e5a

Please sign in to comment.