Add some saturation to the palette

Opinions are mixed, but not mine.  I like this.
This commit is contained in:
Eevee (Evelyn Woods) 2024-04-17 03:50:19 -06:00
parent 2439048f59
commit 849010fc75
5 changed files with 33 additions and 4 deletions

View File

@ -894,6 +894,10 @@ const TILE_ENCODING = {
name: 'sand', name: 'sand',
is_extension: true, is_extension: true,
}, },
0xe8: {
name: 'grass',
is_extension: true,
},
0xed: { 0xed: {
name: 'ankh', name: 'ankh',
has_next: true, has_next: true,

View File

@ -1161,6 +1161,7 @@ export const LL_TILESET_LAYOUT = {
open: [1, 7], open: [1, 7],
}, },
cracked_floor: [2, 6], cracked_floor: [2, 6],
grass: [2, 7],
thin_walls: { thin_walls: {
__special__: 'thin_walls', __special__: 'thin_walls',

View File

@ -6,7 +6,7 @@ function activate_me(me, level) {
me.type.activate(me, level); me.type.activate(me, level);
} }
function blocks_leaving_thin_walls(me, actor, direction) { function blocks_leaving_thin_walls(me, level, actor, direction) {
return me.type.thin_walls.has(direction) && actor.type.name !== 'ghost'; return me.type.thin_walls.has(direction) && actor.type.name !== 'ghost';
} }
@ -384,7 +384,7 @@ const TILE_TYPES = {
return false; return false;
return (me.edges & DIRECTIONS[direction].opposite_bit) !== 0; return (me.edges & DIRECTIONS[direction].opposite_bit) !== 0;
}, },
blocks_leaving(me, actor, direction) { blocks_leaving(me, level, actor, direction) {
if (actor.type.name === 'ghost') if (actor.type.name === 'ghost')
return false; return false;
return (me.edges & DIRECTIONS[direction].bit) !== 0; return (me.edges & DIRECTIONS[direction].bit) !== 0;
@ -397,7 +397,7 @@ const TILE_TYPES = {
// stop something from leaving // stop something from leaving
one_way_walls: { one_way_walls: {
layer: LAYERS.thin_wall, layer: LAYERS.thin_wall,
blocks_leaving(me, actor, direction) { blocks_leaving(me, level, actor, direction) {
if (actor.type.name === 'ghost') if (actor.type.name === 'ghost')
return false; return false;
return (me.edges & DIRECTIONS[direction].bit) !== 0; return (me.edges & DIRECTIONS[direction].bit) !== 0;
@ -625,7 +625,7 @@ const TILE_TYPES = {
return me.type._is_affected(me, other) && return me.type._is_affected(me, other) &&
! me.type.has_opening(me, DIRECTIONS[direction].opposite); ! me.type.has_opening(me, DIRECTIONS[direction].opposite);
}, },
blocks_leaving(me, other, direction) { blocks_leaving(me, level, other, direction) {
// FIXME needs the same logic as redirect_exit, so that an illegal entrance can't leave // FIXME needs the same logic as redirect_exit, so that an illegal entrance can't leave
// at all // at all
return me.type._is_affected(me, other) && ! me.type.has_opening(me, direction); return me.type._is_affected(me, other) && ! me.type.has_opening(me, direction);
@ -730,6 +730,30 @@ const TILE_TYPES = {
blocks_collision: COLLISION.block_cc1 | COLLISION.block_cc2, blocks_collision: COLLISION.block_cc1 | COLLISION.block_cc2,
speed_factor: 0.5, speed_factor: 0.5,
}, },
grass: {
layer: LAYERS.terrain,
blocks_collision: COLLISION.block_cc1 | COLLISION.block_cc2,
blocks(me, level, other) {
// These guys with big wheels can't do grass
return (
other.type.name === 'tank_blue' || other.type.name === 'tank_yellow' ||
other.type.name === 'rover');
},
blocks_leaving(me, level, other, direction) {
// Both kinds of bugs prefer to stay in the grass
if (other.type.name === 'bug' || other.type.name === 'paramecium') {
let neighbor = level.get_neighboring_cell(me.cell, direction);
if (neighbor && neighbor.get_terrain().type.name !== 'grass')
return true;
}
},
on_arrive(me, level, other) {
if (other.type.name === 'fireball') {
level.transmute_tile(me, 'fire');
level.spawn_animation(me.cell, 'puff');
}
},
},
dash_floor: { dash_floor: {
layer: LAYERS.terrain, layer: LAYERS.terrain,
speed_factor: 2, speed_factor: 2,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.