From 1ec920c7e797d8eaa81381ce27b97e918ba35dc6 Mon Sep 17 00:00:00 2001 From: Justin DuJardin Date: Mon, 24 Oct 2022 22:37:27 -0700 Subject: [PATCH] feat(combat): add ocean specific combat zones - add new ocean 1-4 combat zones to wilderness map - update combat encounters to take into account boardedShip state - when on the ship, new water encounters are available --- src/app/behaviors/base-player.behavior.ts | 4 +- src/app/models/combat/combat.model.ts | 13 +- src/app/models/game-data/random-encounters.ts | 5 + .../models/game-state/game-state.service.ts | 7 +- .../behaviors/combat-encounter.behavior.ts | 83 ++++++++----- .../map/features/combat-feature.component.ts | 7 +- .../map/features/ship-feature.component.ts | 7 +- src/app/scene/tile-map.ts | 18 ++- src/assets/maps/castle.tmx | 10 +- src/assets/maps/combat.tmx | 112 ++++++++++++++++-- src/assets/maps/crypt.tmx | 22 ++-- src/assets/maps/keep.tmx | 8 +- src/assets/maps/port.tmx | 24 ++-- src/assets/maps/ruins.tmx | 2 +- src/assets/maps/sewer.tmx | 10 +- src/assets/maps/tiles/environment.tsx | 13 +- src/assets/maps/town.tmx | 16 +-- src/assets/maps/wilderness.tmx | 26 +++- 18 files changed, 260 insertions(+), 127 deletions(-) diff --git a/src/app/behaviors/base-player.behavior.ts b/src/app/behaviors/base-player.behavior.ts index f808e26f..68cacb59 100644 --- a/src/app/behaviors/base-player.behavior.ts +++ b/src/app/behaviors/base-player.behavior.ts @@ -108,7 +108,7 @@ export class BasePlayerComponent extends MovableBehavior { * @returns {boolean} True if the passable attribute was found and set to false. */ collideWithMap(at: Point, passableAttribute: string): boolean { - let map = this.host.scene.objectByType(TileMap); + let map = this.host.scene?.objectByType(TileMap); if (map) { const layers: ITiledLayer[] = map.getLayers(); for (let i = 0; i < layers.length; i++) { @@ -116,7 +116,7 @@ export class BasePlayerComponent extends MovableBehavior { if (!terrain) { continue; } - if (terrain[passableAttribute] === false) { + if (terrain.properties && terrain.properties[passableAttribute] === false) { return true; } } diff --git a/src/app/models/combat/combat.model.ts b/src/app/models/combat/combat.model.ts index 542f468c..7ad0bd94 100644 --- a/src/app/models/combat/combat.model.ts +++ b/src/app/models/combat/combat.model.ts @@ -1,10 +1,19 @@ import * as Immutable from 'immutable'; import { IPoint } from '../../../app/core/point'; +import { Rect } from '../../core'; import { CombatantTypes, IEnemy, IPartyMember } from '../base-entity'; /** Valid combat types */ export type CombatType = 'none' | 'fixed' | 'random'; +export interface IZoneTarget { + /** The zone name */ + name: string; + /** Is ship zone */ + water: boolean; + bounds: Rect; +} + /** * Describe a set of combat zones for a given point on a map. */ @@ -14,9 +23,9 @@ export interface IZoneMatch { */ map: string; /** - * The zone name for the target location on the map + * The zone names for the target location on the map */ - target: string; + targets: IZoneTarget[]; /** * The point that target refers to. */ diff --git a/src/app/models/game-data/random-encounters.ts b/src/app/models/game-data/random-encounters.ts index 14a14eba..f9d8949d 100644 --- a/src/app/models/game-data/random-encounters.ts +++ b/src/app/models/game-data/random-encounters.ts @@ -22,6 +22,11 @@ export const RANDOM_ENCOUNTERS_DATA: ITemplateRandomEncounter[] = [ zones: ['zone-sewer'], enemies: ['huge-spider', 'kobold', 'kobold'], }, + { + id: 'world-ocean-1-1', + zones: ['world-ocean-1'], + enemies: ['kobold', 'kobold', 'kobold-shaman'], + }, { id: 'world-forest-single', zones: ['world-forest'], diff --git a/src/app/models/game-state/game-state.service.ts b/src/app/models/game-state/game-state.service.ts index 564b44e4..8775414f 100644 --- a/src/app/models/game-state/game-state.service.ts +++ b/src/app/models/game-state/game-state.service.ts @@ -61,7 +61,12 @@ export class GameStateService { return this.store.pipe( first(), map((state: AppState) => { - const jsonData: string = JSON.stringify(state); + const most = { + ...state, + sprites: {}, + }; + const jsonData: string = JSON.stringify(most); + localStorage.setItem(GameStateService.STATE_KEY, jsonData); return state; }) diff --git a/src/app/routes/world/behaviors/combat-encounter.behavior.ts b/src/app/routes/world/behaviors/combat-encounter.behavior.ts index b41188fb..9b65883c 100644 --- a/src/app/routes/world/behaviors/combat-encounter.behavior.ts +++ b/src/app/routes/world/behaviors/combat-encounter.behavior.ts @@ -5,17 +5,25 @@ import { RANDOM_ENCOUNTERS_DATA } from 'app/models/game-data/random-encounters'; import * as Immutable from 'immutable'; import { List } from 'immutable'; import { Observable } from 'rxjs'; -import { map, take } from 'rxjs/operators'; +import { take, withLatestFrom } from 'rxjs/operators'; import { IEnemy } from '../../../../app/models/base-entity'; import { AppState } from '../../../app.model'; import { IMoveDescription } from '../../../behaviors/movable-behavior'; import { SceneObjectBehavior } from '../../../behaviors/scene-object-behavior'; import { CombatEncounterAction } from '../../../models/combat/combat.actions'; -import { CombatEncounter, IZoneMatch } from '../../../models/combat/combat.model'; +import { + CombatEncounter, + IZoneMatch, + IZoneTarget, +} from '../../../models/combat/combat.model'; import { Entity } from '../../../models/entity/entity.model'; import { instantiateEntity } from '../../../models/game-data/game-data.model'; import { GameStateSetBattleCounterAction } from '../../../models/game-state/game-state.actions'; -import { getGameBattleCounter, getGameParty } from '../../../models/selectors'; +import { + getGameBattleCounter, + getGameBoardedShip, + getGameParty, +} from '../../../models/selectors'; import { GameEntityObject } from '../../../scene/objects/game-entity-object'; import { Scene } from '../../../scene/scene'; import { TileMap } from '../../../scene/tile-map'; @@ -93,37 +101,48 @@ export class CombatEncounterBehaviorComponent extends SceneObjectBehavior { this.store .select(getGameParty) .pipe( - map((party: Immutable.List) => { - const viableEncounters = RANDOM_ENCOUNTERS_DATA.filter((enc: any) => { - return ( - enc.zones.indexOf(zone.map) !== -1 || - enc.zones.indexOf(zone.target) !== -1 - ); - }); - if (viableEncounters.length === 0) { - throw new Error('no valid encounters for this zone'); - } - const max = viableEncounters.length - 1; - const min = 0; - const encounter = - viableEncounters[Math.floor(Math.random() * (max - min + 1)) + min]; - const toCombatant = (id: string): IEnemy => { - const itemTemplate: IEnemy = getEnemyById(id) as any; - return instantiateEntity(itemTemplate, { - maxhp: itemTemplate.hp, + withLatestFrom( + this.store.select(getGameBoardedShip), + (party: Immutable.List, onShip: boolean) => { + const zoneTarget = zone.targets.find((zoneTarget: IZoneTarget) => { + if (onShip) { + return zoneTarget.water; + } else { + return !zoneTarget.water; + } + }); + + const viableEncounters = RANDOM_ENCOUNTERS_DATA.filter((enc: any) => { + return ( + enc.zones.indexOf(zone.map) !== -1 || + enc.zones.indexOf(zoneTarget.name) !== -1 + ); }); - }; + if (viableEncounters.length === 0) { + throw new Error(`no valid encounters for zone: ${zoneTarget.name}`); + } + const max = viableEncounters.length - 1; + const min = 0; + const encounter = + viableEncounters[Math.floor(Math.random() * (max - min + 1)) + min]; + const toCombatant = (id: string): IEnemy => { + const itemTemplate: IEnemy = getEnemyById(id) as any; + return instantiateEntity(itemTemplate, { + maxhp: itemTemplate.hp, + }); + }; - const payload: CombatEncounter = { - type: 'random', - id: encounter.id, - enemies: List(encounter.enemies.map(toCombatant)), - zone: zone.target || zone.map, - message: List(encounter.message), - party: List(party), - }; - this.store.dispatch(new CombatEncounterAction(payload)); - }), + const payload: CombatEncounter = { + type: 'random', + id: encounter.id, + enemies: List(encounter.enemies.map(toCombatant)), + zone: zoneTarget?.name || zone.map, + message: List(encounter.message), + party: List(party), + }; + this.store.dispatch(new CombatEncounterAction(payload)); + } + ), take(1) ) .subscribe(); diff --git a/src/app/routes/world/map/features/combat-feature.component.ts b/src/app/routes/world/map/features/combat-feature.component.ts index 64c2bfce..db341170 100644 --- a/src/app/routes/world/map/features/combat-feature.component.ts +++ b/src/app/routes/world/map/features/combat-feature.component.ts @@ -22,6 +22,7 @@ import { List } from 'immutable'; import { map, take } from 'rxjs/operators'; import { IEnemy } from '../../../../../app/models/base-entity'; import { AppState } from '../../../../app.model'; +import { Point } from '../../../../core'; import { CombatEncounterAction } from '../../../../models/combat/combat.actions'; import { CombatEncounter, IZoneMatch } from '../../../../models/combat/combat.model'; import { Entity } from '../../../../models/entity/entity.model'; @@ -76,7 +77,9 @@ export class CombatFeatureComponent extends TiledFeatureComponent { object.setPoint(object.point); // Find the combat zone and launch a fixed encounter. - const zone: IZoneMatch = this.party.map.getCombatZones(this.party.host.point); + const zone: IZoneMatch = this.party.map.getCombatZones( + new Point(this.party.host.point) + ); this.store .select(getGameParty) @@ -95,7 +98,7 @@ export class CombatFeatureComponent extends TiledFeatureComponent { type: 'fixed', id: encounter.id, enemies: List(encounter.enemies.map(toCombatant)), - zone: zone.target || zone.map, + zone: zone.targets[0].name || zone.map, message: List(encounter.message), party: List(party), }; diff --git a/src/app/routes/world/map/features/ship-feature.component.ts b/src/app/routes/world/map/features/ship-feature.component.ts index 26bc0304..4d8abc68 100644 --- a/src/app/routes/world/map/features/ship-feature.component.ts +++ b/src/app/routes/world/map/features/ship-feature.component.ts @@ -94,7 +94,6 @@ export class ShipFeatureComponent .subscribe((p: PointRecord) => { this.host.setPoint({ x: p.x, y: p.y }); }); - return true; } @@ -129,10 +128,8 @@ export class ShipFeatureComponent this.host.enabled = false; object.setSprite(this.host.icon, 0); this._tickInterval = setInterval(() => { - if ( - Point.equal(this.partyObject.point, this.party.targetPoint) && - !this.party.heading.isZero() - ) { + const partyTarget = Point.equal(this.partyObject.point, this.party.targetPoint); + if (partyTarget && !this.party.heading.isZero()) { const from: Point = new Point(this.partyObject.point); const to: Point = from.clone().add(this.party.heading); if ( diff --git a/src/app/scene/tile-map.ts b/src/app/scene/tile-map.ts index c7683f7a..f3d31b1f 100644 --- a/src/app/scene/tile-map.ts +++ b/src/app/scene/tile-map.ts @@ -16,9 +16,8 @@ // TODO: TileMap isn't getting added to Spatial DB properly. Can't query for it! // Scene assuming something about the spatial properties on objects? import * as _ from 'underscore'; -import { ITiledLayer } from '../../app/core/resources/tiled/tiled.model'; +import { ITiledLayer, ITiledObject } from '../../app/core/resources/tiled/tiled.model'; import { - IPoint, ITileInstanceMeta, Point, Rect, @@ -26,7 +25,7 @@ import { TiledTSXResource, TilesetTile, } from '../core'; -import { IZoneMatch } from '../models/combat/combat.model'; +import { IZoneMatch, IZoneTarget } from '../models/combat/combat.model'; import { GameWorld } from '../services/game-world'; import { Scene } from './scene'; import { SceneObject } from './scene-object'; @@ -162,10 +161,10 @@ export class TileMap extends SceneObject { * @param at The position to check for a sub-zone in the map * @returns {IZoneMatch} The map and target zones that are null if they don't exist */ - getCombatZones(at: IPoint): IZoneMatch { + getCombatZones(at: Point): IZoneMatch { const result: IZoneMatch = { map: null, - target: null, + targets: [], targetPoint: at, }; if (this.map?.properties) { @@ -175,7 +174,7 @@ export class TileMap extends SceneObject { } // Determine which zone and combat type const invTileSize = 1 / this.map.tilewidth; - const zones: any[] = _.map(this.zones?.objects, (z: any) => { + const zones: IZoneTarget[] = _.map(this.zones?.objects, (z: ITiledObject) => { const x = z.x * invTileSize; const y = z.y * invTileSize; const w = z.width * invTileSize; @@ -183,15 +182,12 @@ export class TileMap extends SceneObject { return { bounds: new Rect(x, y, w, h), name: z.name, + water: z.properties?.water || false, }; }); - // TODO: This will always get the first zone. What about overlapping zones? - const zone = _.find(zones, (z: any) => { + result.targets = zones.filter((z: IZoneTarget) => { return z.bounds.pointInRect(at) && z.name; }); - if (zone) { - result.target = zone.name; - } return result; } diff --git a/src/assets/maps/castle.tmx b/src/assets/maps/castle.tmx index 892c2ffc..5374b424 100644 --- a/src/assets/maps/castle.tmx +++ b/src/assets/maps/castle.tmx @@ -1,5 +1,5 @@ - + @@ -7,13 +7,13 @@ 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,61,61,61,39,61,61,61,9,9,33,33,33,9,30,33,33,33,30,9,33,33,33,9,9,39,39,39,39,39,39,39,9, -9,61,61,39,39,39,61,61,9,33,33,33,33,6,33,33,33,33,33,6,33,33,33,33,9,39,39,39,39,39,39,39,9, +9,61,61,39,39,39,61,61,9,33,33,33,33,163,33,33,33,33,33,163,33,33,33,33,9,39,39,39,39,39,39,39,9, 9,61,39,39,33,39,39,61,9,9,33,33,33,9,17,33,33,33,17,9,33,33,33,9,9,39,39,39,33,39,39,39,9, -9,61,61,61,33,61,61,61,61,9,9,9,6,9,9,17,33,17,9,9,6,9,9,9,39,39,39,33,33,33,39,39,9, +9,61,61,61,33,61,61,61,61,9,9,9,163,9,9,17,33,17,9,9,163,9,9,9,39,39,39,33,33,33,39,39,9, 9,61,61,39,33,39,61,61,61,9,9,33,33,33,9,33,33,33,9,33,33,33,9,9,39,39,39,39,33,39,39,39,9, -9,61,61,39,33,39,39,39,61,61,9,9,33,33,9,9,24,9,9,33,33,9,9,39,39,39,39,39,33,39,39,39,9, +9,61,61,39,33,39,39,39,61,61,9,9,33,33,9,9,33,9,9,33,33,9,9,39,39,39,39,39,33,39,39,39,9, 9,61,61,33,33,33,39,61,61,39,61,9,9,9,9,9,33,9,9,9,9,9,39,61,39,61,39,33,33,33,39,39,9, -9,61,61,33,33,33,33,33,33,33,33,6,33,33,33,33,33,33,33,33,33,6,33,33,33,33,33,33,33,33,39,61,9, +9,61,61,33,33,33,33,33,33,33,33,163,33,33,33,33,33,33,33,33,33,163,33,33,33,33,33,33,33,33,39,61,9, 9,61,61,33,33,33,39,61,61,39,61,9,9,9,9,9,33,9,9,9,9,9,39,61,39,61,39,33,33,33,39,39,9, 9,61,61,61,61,61,39,39,39,39,39,9,9,9,9,30,33,30,9,9,9,9,39,39,39,39,39,39,39,39,39,39,9, 9,61,61,61,39,61,61,61,61,61,39,9,9,9,9,9,24,9,9,9,9,9,39,39,39,39,39,39,61,39,39,61,9, diff --git a/src/assets/maps/combat.tmx b/src/assets/maps/combat.tmx index 2fa1bdaf..3c3ec976 100644 --- a/src/assets/maps/combat.tmx +++ b/src/assets/maps/combat.tmx @@ -1,5 +1,5 @@ - + @@ -197,13 +197,13 @@ - - - - - - - + + + + + + + @@ -251,6 +251,102 @@ 50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50, 50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50, 50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50 + + + + +46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46, +18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +3,3,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +18,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, +18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18 + + + + +46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46, +18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +3,3,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +18,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, +18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18 + + + + +46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46, +18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +3,3,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +18,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, +18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18 + + + + +46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46, +18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +3,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +3,3,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38, +18,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, +18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18, +18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18 diff --git a/src/assets/maps/crypt.tmx b/src/assets/maps/crypt.tmx index 9b30ce9b..346e6f89 100644 --- a/src/assets/maps/crypt.tmx +++ b/src/assets/maps/crypt.tmx @@ -6,7 +6,7 @@ - + 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, @@ -26,19 +26,19 @@ 32,32,55,55,55,55,32,55,55,23,23,23,32,23,23,32,23,23,32,32,32,32,23,23,32, 32,32,55,32,32,32,32,55,55,55,32,23,23,23,32,32,32,32,32,32,32,32,32,23,32, 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,23,32, -9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,6,9, +9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,0,9, 9,9,9,9,9,9,9,9,9,9,9,33,33,9,9,9,9,33,33,9,33,9,33,33,9, 9,9,9,9,9,9,9,33,33,9,9,33,33,9,9,9,9,33,33,9,33,9,33,9,9, -9,33,33,33,33,33,24,33,33,6,33,33,33,9,9,9,9,9,24,9,24,9,24,9,9, +9,33,33,33,33,33,24,33,33,0,33,33,33,9,9,9,9,9,24,9,24,9,24,9,9, 9,33,9,9,9,9,9,33,33,9,9,9,9,9,33,9,33,33,33,33,33,33,33,33,9, -9,33,33,33,33,9,9,9,9,9,9,9,33,33,33,6,33,33,33,33,33,33,33,33,9, +9,33,33,33,33,9,9,9,9,9,9,9,33,33,33,0,33,33,33,33,33,33,33,33,9, 9,9,9,9,33,33,9,9,9,9,9,9,33,9,33,9,33,33,33,33,33,33,33,33,9, 40,40,40,9,9,33,9,9,9,9,9,9,33,9,9,9,9,9,24,9,24,9,24,9,9, 39,39,40,40,9,33,9,9,9,9,9,9,33,9,9,9,9,33,33,9,33,9,33,9,9, 39,39,39,39,9,33,9,9,9,9,9,9,33,9,9,9,9,33,33,9,33,9,33,9,9, -39,39,39,39,9,6,9,9,33,33,33,9,33,9,9,9,9,9,9,9,9,9,9,9,9, -39,39,39,39,24,33,6,33,33,17,33,9,33,33,33,9,9,9,9,9,9,9,9,9,9, -39,39,39,39,9,6,9,9,33,33,33,9,9,9,33,33,9,9,9,9,9,9,9,9,9, +39,39,39,39,9,0,9,9,33,33,33,9,33,9,9,9,9,9,9,9,9,9,9,9,9, +39,39,39,39,24,33,0,33,33,17,33,9,33,33,33,9,9,9,9,9,9,9,9,9,9, +39,39,39,39,9,0,9,9,33,33,33,9,9,9,33,33,9,9,9,9,9,9,9,9,9, 39,39,39,39,9,33,9,9,9,9,9,9,9,9,9,33,33,9,9,9,9,9,9,9,9, 39,39,40,40,9,33,9,9,9,9,9,9,9,9,9,9,33,33,33,33,33,33,33,33,9, 40,9,9,9,9,33,9,9,33,9,9,9,9,9,9,9,9,9,9,9,9,9,9,33,9, @@ -76,7 +76,7 @@ - + @@ -87,7 +87,7 @@ - + @@ -99,7 +99,7 @@ - + @@ -118,7 +118,7 @@ - + diff --git a/src/assets/maps/keep.tmx b/src/assets/maps/keep.tmx index 49a86cc6..7f543ad7 100644 --- a/src/assets/maps/keep.tmx +++ b/src/assets/maps/keep.tmx @@ -9,7 +9,7 @@ 9,33,33,33,9,9,9,9,9,9,33,33,33,9,9,9,9,9,9,33,33,33,9, 9,33,33,33,9,9,9,9,9,9,33,33,33,9,9,9,9,9,9,33,33,33,9, 9,33,33,33,9,9,9,9,9,30,33,33,33,30,9,9,9,9,9,33,33,33,9, -9,9,6,9,9,33,33,33,33,33,33,33,33,33,33,33,33,33,9,9,6,9,9, +9,9,77,9,9,33,33,33,33,33,33,33,33,33,33,33,33,33,9,9,77,9,9, 9,9,33,9,9,33,33,33,33,33,30,33,30,33,33,33,33,33,9,9,33,9,9, 9,9,33,9,9,33,33,33,33,33,33,33,33,33,33,33,33,33,9,9,33,9,9, 9,9,33,9,9,33,33,33,33,33,33,33,33,33,33,33,33,33,9,9,33,9,9, @@ -18,10 +18,10 @@ 9,9,33,9,9,33,33,33,33,17,33,33,33,17,33,33,33,33,9,9,33,9,9, 9,9,33,9,9,33,33,33,33,33,33,33,33,33,33,33,33,33,9,9,33,9,9, 9,9,33,9,9,33,33,33,33,33,33,33,33,33,33,33,33,33,9,9,33,9,9, -9,9,33,9,9,9,9,9,9,9,9,24,9,9,9,9,9,9,9,9,33,9,9, -9,9,33,9,33,33,33,33,33,6,33,33,33,6,33,33,33,33,33,9,33,9,9, +9,9,33,9,9,9,9,9,9,9,9,77,9,9,9,9,9,9,9,9,33,9,9, +9,9,33,9,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,9,33,9,9, 9,9,33,9,33,33,33,33,9,9,9,33,9,9,9,33,33,33,33,9,33,9,9, -9,9,6,9,9,9,9,9,9,9,9,33,9,9,9,9,9,9,9,9,6,9,9, +9,9,77,9,9,9,9,9,9,9,9,33,9,9,9,9,9,9,9,9,77,9,9, 9,33,33,33,9,49,49,49,9,70,9,24,9,70,9,49,49,49,9,33,33,33,9, 9,33,33,33,9,49,49,49,9,70,49,49,49,70,9,49,49,49,9,33,33,33,9, 9,33,33,33,9,49,49,49,49,49,70,49,70,49,49,49,49,49,9,33,33,33,9, diff --git a/src/assets/maps/port.tmx b/src/assets/maps/port.tmx index afd49cf8..5dbfa711 100644 --- a/src/assets/maps/port.tmx +++ b/src/assets/maps/port.tmx @@ -5,14 +5,14 @@ - + 18,18,18,18,18,18,18,69,18,18,69,69,69,69,69,69,69,69,69,46,46,46,69,69,69,69,69,69,69, 18,18,18,18,18,18,18,69,18,69,69,69,69,69,69,69,69,69,69,46,46,46,69,69,69,69,69,69,69, 18,18,18,18,69,69,18,18,18,69,69,69,69,69,69,69,69,69,69,69,46,69,69,69,69,69,69,69,69, 18,18,18,18,18,18,18,18,69,69,69,69,69,69,69,69,69,69,69,69,46,69,69,69,69,69,69,69,69, -18,18,18,18,18,18,18,18,9,9,9,9,9,9,9,9,9,9,9,9,6,9,9,9,9,9,69,69,69, +18,18,18,18,18,18,18,18,9,9,9,9,9,9,9,9,9,9,9,9,0,9,9,9,9,9,69,69,69, 18,18,18,18,18,69,18,69,69,69,69,69,69,69,69,69,69,69,9,69,33,69,9,69,69,9,69,69,69, 18,18,18,18,18,18,18,69,69,69,69,69,69,69,69,69,69,69,9,46,33,46,9,69,69,9,69,69,69, 18,18,18,69,46,18,69,69,69,69,69,69,69,69,69,69,69,69,9,69,33,69,9,69,69,9,69,69,69, @@ -46,7 +46,7 @@ - + @@ -54,7 +54,7 @@ - + @@ -62,7 +62,7 @@ - + @@ -80,7 +80,7 @@ - + @@ -89,7 +89,7 @@ - + @@ -98,7 +98,7 @@ - + @@ -108,7 +108,7 @@ - + @@ -118,7 +118,7 @@ - + @@ -129,7 +129,7 @@ - + @@ -139,7 +139,7 @@ - + diff --git a/src/assets/maps/ruins.tmx b/src/assets/maps/ruins.tmx index d2553bf8..7632c3a7 100644 --- a/src/assets/maps/ruins.tmx +++ b/src/assets/maps/ruins.tmx @@ -62,7 +62,7 @@ 0,0,0,0,0,0,9,9,9,0,66,33,0,0,0,9,0,0,0, 0,0,0,0,0,0,44,0,0,0,0,33,44,9,9,9,0,0,0, 0,0,0,0,3,3,0,0,0,33,33,33,9,0,9,0,0,0,0, -0,0,0,0,0,0,33,33,33,33,33,33,33,0,6,0,0,0,0, +0,0,0,0,0,0,33,33,33,33,33,33,33,0,0,0,0,0,0, 0,0,0,0,3,3,0,0,0,33,33,33,9,0,9,0,0,0,0, 0,0,0,0,0,0,9,9,44,9,44,0,9,9,9,9,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0, diff --git a/src/assets/maps/sewer.tmx b/src/assets/maps/sewer.tmx index f56eb8a5..9eb737fb 100644 --- a/src/assets/maps/sewer.tmx +++ b/src/assets/maps/sewer.tmx @@ -15,7 +15,7 @@ 9,9,9,9,33,33,33,33,9,9,9,9,9,9,9,35,9,9,9,9,33,9,9, 9,9,9,9,33,33,33,33,9,9,9,9,9,9,9,35,9,9,33,33,33,9,9, 9,9,9,9,33,33,33,33,9,9,9,9,9,33,35,35,35,33,33,33,33,33,9, -9,9,9,9,9,6,9,9,9,9,9,9,9,33,35,35,35,33,33,9,9,33,9, +9,9,9,9,9,0,9,9,9,9,9,9,9,33,35,35,35,33,33,9,9,33,9, 9,9,9,9,9,33,9,9,9,9,9,9,9,33,35,35,35,33,9,9,9,33,9, 9,9,9,9,9,33,9,9,9,9,9,9,9,33,33,35,35,33,9,9,9,33,9, 9,9,9,9,9,33,9,9,33,33,33,33,33,33,33,35,33,33,9,9,9,33,9, @@ -24,10 +24,10 @@ 9,9,9,9,9,9,9,9,33,33,33,9,9,9,35,35,9,9,9,33,33,33,9, 9,9,9,9,9,9,9,9,33,33,33,9,9,35,35,35,9,9,9,33,9,9,9, 9,9,9,9,9,9,9,9,33,33,33,9,9,35,9,9,9,9,9,33,33,9,9, -9,9,9,33,33,33,6,33,33,33,33,33,33,35,9,9,9,9,9,33,33,9,9, +9,9,9,33,33,33,0,33,33,33,33,33,33,35,9,9,9,9,9,33,33,9,9, 9,9,9,33,33,33,9,9,9,9,9,9,33,35,9,9,9,33,33,33,33,9,9, 9,9,9,33,33,33,9,9,9,9,9,9,33,35,9,9,9,33,9,9,33,9,9, -9,9,9,6,9,9,9,9,9,9,9,9,33,35,9,9,9,33,9,9,33,9,9, +9,9,9,0,9,9,9,9,9,9,9,9,33,35,9,9,9,33,9,9,33,9,9, 9,9,9,33,9,9,9,9,9,9,9,9,33,35,9,9,9,33,9,9,33,9,9, 9,9,9,33,9,9,9,33,33,9,9,9,33,3,33,33,33,33,9,9,33,9,9, 9,9,9,33,9,9,9,33,9,9,9,9,9,35,9,9,9,9,9,9,33,9,9, @@ -37,9 +37,9 @@ 9,9,9,33,33,33,33,33,33,33,33,33,33,35,9,9,9,9,9,9,33,9,9, 9,9,9,9,9,9,9,33,33,33,33,33,33,35,9,9,9,9,9,9,33,9,9, 9,9,9,9,9,9,9,33,33,33,33,33,33,35,9,9,9,9,9,9,33,9,9, -9,9,9,9,9,9,9,9,9,9,6,9,9,35,9,9,9,9,9,9,33,9,9, +9,9,9,9,9,9,9,9,9,9,0,9,9,35,9,9,9,9,9,9,33,9,9, 9,9,35,35,35,35,35,35,9,9,33,9,9,35,9,9,9,9,9,9,33,9,9, -9,9,9,35,35,35,35,35,35,9,33,9,9,35,9,9,9,9,9,9,6,9,9, +9,9,9,35,35,35,35,35,35,9,33,9,9,35,9,9,9,9,9,9,0,9,9, 9,35,35,35,35,35,35,35,35,9,33,9,9,35,9,9,33,33,33,33,33,9,9, 9,9,35,9,9,35,35,35,35,35,12,35,35,35,9,9,33,33,33,33,33,9,9, 9,35,35,9,33,33,35,35,35,33,33,33,35,35,9,9,33,33,33,33,33,9,9, diff --git a/src/assets/maps/tiles/environment.tsx b/src/assets/maps/tiles/environment.tsx index d3e2e38f..424dc5ce 100644 --- a/src/assets/maps/tiles/environment.tsx +++ b/src/assets/maps/tiles/environment.tsx @@ -1,5 +1,5 @@ - + @@ -31,16 +31,6 @@ - - - - - - - - - - @@ -240,6 +230,7 @@ + diff --git a/src/assets/maps/town.tmx b/src/assets/maps/town.tmx index cc0a4f86..81163d16 100644 --- a/src/assets/maps/town.tmx +++ b/src/assets/maps/town.tmx @@ -5,7 +5,7 @@ - + 46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,18,18,18, @@ -33,20 +33,12 @@ - - - - - - - - - + @@ -54,7 +46,7 @@ - + @@ -62,7 +54,7 @@ - + diff --git a/src/assets/maps/wilderness.tmx b/src/assets/maps/wilderness.tmx index 86985dd8..72f047fc 100644 --- a/src/assets/maps/wilderness.tmx +++ b/src/assets/maps/wilderness.tmx @@ -1,5 +1,5 @@ - + @@ -145,7 +145,7 @@ 45,45,45,45,45,45,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,0,0,0,0,45,45,0,0,0,45,45,0,0,0,45,45,45,45,45,45,45,0,45,45,0,0,45,45,45,45,0,0,0,45,45,45,45,45,45, 45,45,45,45,45,45,45,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,45,45,45,45,45,45,45,0,0,0,45,45,45,0,0,0,45,45,45,45,45,45, 45,45,45,45,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,0,0,0,0,0,0,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,45,0,0,0,0,45,0,0,0,0,0,0,0,0,0,0,0,45,45,45,45,45,45,0,45,0,0,0,0,45,45,0,0,0,45,45,45,45,45,45, -45,45,45,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,45,45,45,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,45,45,45,0,0,0,0,0,0,45,45,45,45,45,45,45,45, +45,45,45,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,45,45,45,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,83,45,45,45,45,0,0,0,0,0,0,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,0,0,0,0,0,0,0,0,0,0,0,0,0,45,45,45,45,0,0,0,0,0,0,0,45,45,0,0,0,0,0,0,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,0,0,0,0,0,0,0,0,0,0,0,0,0,45,0,45,45,0,0,0,0,45,45,0,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,0,0,0,0,0,45,45,0,0,0,0,45,45,45,45,45,0,0,0,0,45,45,45,0,45,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,45,45,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,45,45,45,45,0,45,45,45,45,45,45,45,45,45,45, 45,45,45,45,45,45,0,0,0,0,0,45,45,45,45,0,0,45,45,45,45,0,0,0,0,45,45,45,45,45,45,45,45,0,0,0,0,0,45,45,45,45,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,0,0,0,45,45,0,0,0,45,0,45,45,0,0,0,0,0,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45, @@ -243,7 +243,6 @@ - @@ -379,5 +378,26 @@ + + + + + + + + + + + + + + + + + + + + +