 	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()
 
 

		insert 'items', id:20, prototype:2, owner:1, strength:100, equipped: true

		power = 120
		shield = -> query.row('SELECT strength FROM items WHERE id=10')
		greave = -> query.row('SELECT strength FROM items WHERE id=20')

		# shield with 100% coverage
		for i in [0...5]
			tx = transaction(conn)
			hp = game._hitAndGetHealth tx, 1, power
			test.strictEqual hp, 1000, 'both shield and armor should block damage'
			test.strictEqual shield().strength, 0, 'shield should block damage first'
			test.strictEqual greave().strength, 80, 'armor should block damage not blocked by shield'
			tx.rollback.sync(tx)

		# shield with 50% coverage

		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()
