aboutsummaryrefslogtreecommitdiff
path: root/src/a_ruminate.moon
blob: cf84eef0d4dd34452f2d26a7af0be048a1ab2b04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
reg = require "ability_reg"
import Ability from reg

class Ruminate extends Ability
	@text = "Ruminate"
	@description = "Ruminate"
	@hits_icon = {0,0,0,0,1,1,1,1}
	@speed = 5
	@distance = 1
	new: (...)=>
		super(...)
		@requirements = {
			{"consume_stat", "stamina", 1},
			{"status", "active"},
			{"distance", 1},
		}
	target: (world, party, char) =>
		room = world.player_party.room
		enemy_party = room.parties[1]
		if enemy_party == party
			enemy_party = room.parties[2]
	use: (world, party, char)->
		for _, member in pairs(party.members)
			char\set_field("hp",char.data.hp + 1)
	load: ()=>
		print("TODO!")
	
	unload:()=>
		print("TODO!")