10 Commits

Author SHA1 Message Date
Aaron Suen
f37a918f0f Scaling and touch-hurt reforms
- Storeboxes are now scalable.
- Standardize touch-hurt operation.
- Touch-hurt damage on scaling.
- Now possible to alter scaling time via scaling_time
  group (percent of original scaling time)
2020-03-29 07:55:54 -04:00
Aaron Suen
756b12b7d4 Better record damage/heal types for stats. 2020-02-20 07:16:19 -05:00
Aaron Suen
3271dba8b2 Limit damage FX replay for fully hurt players. 2020-02-19 22:32:19 -05:00
Aaron Suen
00aa460942 Some damage buffs.
- Player hp_max is 8 now, so most injuries will block
  a whole slot each time.
- Player can be reduced to 1 slot, not 2.  The 2 slots
  was from back in the day when players needed to go
  to the surface to heal faster, to help them get up
  there.  Now the 1 slot is only needed in case the
  player is trapped in fire or something.
- Damage effects now don't stop playing just because
  the player has reached maximum injury, and healing
  is also delayed by continued injury.
2020-02-19 19:48:51 -05:00
Aaron Suen
8add276587 Make falling things bounce off players.
If the falling item/node causes enough damage to
trigger a "hurt" effect, then it loses much of its energy
and bounces upward off the player.

This will also reduce the "scraping" effect when nodes
fall through a player.  Hopefully the damage from
falling things is a little more consistent now.
2019-12-29 12:12:08 -05:00
Aaron Suen
80d3d9708c Deprecate player:get/set_attribute to player:get_meta(). 2019-04-06 20:46:13 -04:00
Aaron Suen
4d0f0734ba Beginning of a bold new health system.
- Eliminate health and breath stat bars.
- Players NO LONGER DIE FROM INJURY.
- Players no longer lose walking speed or mobility.
- Players lose inventory slots in proportion to injury; they're
  stuffed with an "injury" item, and items they displace are
  ejected.  Slots are displaced in random order.
- Healing rate is much faster, so players are usually mildly
  inconvenienced by injury, but can soon enough pick up their
  stuff and leave.
- Health and breath HUDs are gone.  Health is visible based on
  number of lost slots, and breath uses a vignette to narrow
  tunnel vision for O2 loss.

Overall, the old health system has been more of an immersion-
breaking annoyance than anything.  This allows health to get out
of the way of the primary gameplay.

UNFINISHED: Need a replacement for the old "suicide to get unstuck"
mechanic.
2019-03-10 15:47:22 -04:00
Aaron Suen
19bfab1c1f Glass now cools/quenches.
Almost done with this new feature; just need to craft lenses and
prisms from chroma glass...
2019-03-07 22:21:04 -05:00
Aaron Suen
fb75424335 Encumbered injured players walk slower.
Encumbrance is calculated from inventory slots filled (ignoring
count within stacks), compared to health; players can freely carry
the same proportion of slots as their health.

Players who are encumbered lose up to 80% of their walking speed
(i.e. for a full hotbar and no health).

This is another disadvantage for being injured, and an incentive
for players to take care of their health.
2019-02-24 13:54:58 -05:00
Aaron Suen
726f385e52 Add player natural healing.
- Players heal over time at variable speed, depending on subtle
  environmental factors.
- This frees us up to work on the death mechanic, since it's no
  longer the only way to restore health and prevent an untimely
  death.
2019-02-23 13:14:09 -05:00