Date: 2019/12/30 23:14:21 UTC-08:00
Type: Denizen Script
hungersteal:
type: world
debug: true
events:
on player damaged by player:
# - narrate "<red>Oh no, I've lost hunger!" targets:<context.entity>
- feed amount:-2 target:<context.entity>
- feed amount:2 target:<context.damager>
# - narrate "<green>I got hunger!" targets:<context.damager>
# - narrate "I just dropped bread" targets:<context.entity>
- displayitem bread <context.entity.location> duration:1s save:breadparticle
- adjust <entry[breadparticle].dropped> velocity:<util.random.decimal[-0.20].to[0.20]>,<util.random.decimal[0].to[0.3]>,<util.random.decimal[-0.20].to[0.20]>
- displayitem bread <context.entity.location> duration:1s save:breadparticle
- adjust <entry[breadparticle].dropped> velocity:<util.random.decimal[-0.20].to[0.20]>,<util.random.decimal[0].to[0.3]>,<util.random.decimal[-0.20].to[0.20]>
- displayitem bread <context.entity.location> duration:1s save:breadparticle
- adjust <entry[breadparticle].dropped> velocity:<util.random.decimal[-0.20].to[0.20]>,<util.random.decimal[0].to[0.3]>,<util.random.decimal[-0.20].to[0.20]>
- narrate "You now have <context.entity.food_level> hunger bars" targets:<context.entity>
- while <context.entity.food_level> == 0:
- inject damagenofood
damagenofood:
type: task
debug: true
script:
- wait 1s
- narrate "uh oh im losing health" targets:<context.entity>
- hurt 1 <context.entity>