Thieves will, however, take bribes from anyone

This commit is contained in:
Eevee (Evelyn Woods) 2020-12-14 23:49:47 -07:00
parent 8b60a44b09
commit dae66de160

View File

@ -822,12 +822,12 @@ const TILE_TYPES = {
draw_layer: DRAW_LAYERS.terrain, draw_layer: DRAW_LAYERS.terrain,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid,
on_arrive(me, level, other) { on_arrive(me, level, other) {
if (! other.type.is_real_player)
return;
if (level.take_tool_from_actor(other, 'bribe')) { if (level.take_tool_from_actor(other, 'bribe')) {
// TODO bribe sound // TODO bribe sound
return; return;
} }
if (! other.type.is_real_player)
return;
let lost = level.take_all_tools_from_actor(other); let lost = level.take_all_tools_from_actor(other);
if (level.bonus_points > 0) { if (level.bonus_points > 0) {
@ -843,13 +843,12 @@ const TILE_TYPES = {
draw_layer: DRAW_LAYERS.terrain, draw_layer: DRAW_LAYERS.terrain,
blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid, blocks_collision: COLLISION.block_cc1 | COLLISION.monster_solid,
on_arrive(me, level, other) { on_arrive(me, level, other) {
if (! other.type.is_real_player)
return;
if (level.take_tool_from_actor(other, 'bribe')) { if (level.take_tool_from_actor(other, 'bribe')) {
// TODO bribe sound // TODO bribe sound
return; return;
} }
if (! other.type.is_real_player)
return;
let lost = level.take_all_keys_from_actor(other); let lost = level.take_all_keys_from_actor(other);
if (level.bonus_points > 0) { if (level.bonus_points > 0) {