 	test.strictEqual query.val('SELECT level FROM characters WHERE id=2'), 1,
 		"should not add experience for PK"
 
-	game._handleDeathInBattle tx, 11, 1
+	game._handleDeathInBattle conn, 11, 1
 	test.strictEqual +query.val('SELECT count(*) FROM characters'), 2, 'should remove monster'
 	test.strictEqual query.val('SELECT exp FROM characters WHERE id=1'), 200,
 		"should add some experience to monster slayer"
 	test.strictEqual query.val('SELECT level FROM characters WHERE id=1'), 2,
 		"should account for level-ups"
 
-	tx.rollback.sync(tx)
 	test.done()
 
 

		power = 70
		damages = null

		userHP = -> query.val 'SELECT health FROM characters WHERE id=1'
		totalStr = -> query.val 'SELECT SUM(strength) FROM items'

		performSomeAttacks = ->
			damages = {}
			tx = transaction(conn)
			for i in [0..20]
				prevHP = userHP()
				prevSt = totalStr()

				hp = game._hitAndGetHealth tx, 1, power
				dmg = prevHP - hp
				damages[dmg] = true

				if dmg is 0
					test.ok prevSt > totalStr(), 'should reduce armor strength if damage was blocked'
			tx.rollback.sync(tx)


		insert 'items_proto', id:1, name: 'breastplate', coverage:25
		insert 'items_proto', id:2, name: 'greave', coverage:25

		for i in [0...5]
			tx = transaction(conn)
			hp = game._hitAndGetHealth tx, 1, power
			test.strictEqual shield(tx).strength, 100, 'shield should receive no damage if not equipped'
			test.strictEqual greave(tx).strength, 0, 'armor should receive all damage if shield is not equipped'
			tx.rollback.sync(tx)

		test.done()
