diff --git a/src/assets/sprites/building/icons/params/pause.png b/src/assets/sprites/building/icons/params/delay.png similarity index 100% rename from src/assets/sprites/building/icons/params/pause.png rename to src/assets/sprites/building/icons/params/delay.png diff --git a/src/game/scenes/system/interface/building-info/styles.ts b/src/game/scenes/system/interface/building-info/styles.ts index a4fae364..a2362d3a 100644 --- a/src/game/scenes/system/interface/building-info/styles.ts +++ b/src/game/scenes/system/interface/building-info/styles.ts @@ -9,7 +9,7 @@ import { export const Wrapper = styled.div` @media ${INTERFACE_DESKTOP_BREAKPOINT} { - width: 260px; + width: 280px; position: absolute; transform: translate(-50%, -100%); margin-top: -32px; diff --git a/src/game/scenes/system/interface/building-params/styles.ts b/src/game/scenes/system/interface/building-params/styles.ts index 1d23722f..c7b1f528 100644 --- a/src/game/scenes/system/interface/building-params/styles.ts +++ b/src/game/scenes/system/interface/building-params/styles.ts @@ -30,8 +30,8 @@ export const Param = styled.div` `; export const IconContainer = styled.div` - width: 34px; - height: 34px; + width: 30px; + height: 30px; background: ${InterfaceBackgroundColor.BLACK_TRANSPARENT_50}; display: flex; align-items: center; @@ -40,8 +40,8 @@ export const IconContainer = styled.div` `; export const Icon = styled.img` - width: 15px; - height: 15px; + width: 14px; + height: 14px; `; export const Info = styled.div<{ @@ -56,8 +56,8 @@ export const Info = styled.div<{ export const Label = styled.div` font-family: ${InterfaceFont.PIXEL_TEXT}; - font-size: 10px; - line-height: 10px; + font-size: 9px; + line-height: 9px; opacity: 0.75; margin: -1px 0 2px 0; @media ${INTERFACE_MOBILE_BREAKPOINT} { diff --git a/src/game/scenes/world/entities/npc/variants/enemy/variants/explosive.ts b/src/game/scenes/world/entities/npc/variants/enemy/variants/explosive.ts index 4450aaad..b6399b42 100644 --- a/src/game/scenes/world/entities/npc/variants/enemy/variants/explosive.ts +++ b/src/game/scenes/world/entities/npc/variants/enemy/variants/explosive.ts @@ -6,7 +6,9 @@ import { IWorld } from '~type/world'; import { EffectAudio, EffectTexture } from '~type/world/effects'; import { EntityType } from '~type/world/entities'; import { IBuilding } from '~type/world/entities/building'; -import { EnemyVariantData, EnemyTexture, IEnemyTarget } from '~type/world/entities/npc/enemy'; +import { + EnemyVariantData, EnemyTexture, IEnemyTarget, IEnemy, +} from '~type/world/entities/npc/enemy'; import { Enemy } from '../enemy'; @@ -45,20 +47,21 @@ export class EnemyExplosive extends Enemy { }, }); - const targets: IEnemyTarget[] = this.scene.getEntities(EntityType.BUILDING); + let targets: IEnemyTarget[] = [this.scene.player]; - targets.push(this.scene.player); + targets = targets.concat(this.scene.getEntities(EntityType.ENEMY)); + targets = targets.concat(this.scene.getEntities(EntityType.BUILDING)); targets.forEach((target) => { - const distance = getIsometricDistance(position, target.getPositionOnGround()); + if (target !== this) { + const distance = getIsometricDistance(position, target.getPositionOnGround()); - if (distance >= radius) { - return; - } - - const damageByDistance = this.damage * (1 - (distance / radius)) * 0.5; + if (distance < radius) { + const damageByDistance = this.damage * (1 - (distance / radius)) * 0.5; - target.live.damage(damageByDistance); + target.live.damage(damageByDistance); + } + } }); this.scene.sound.play(EffectAudio.EXPLOSION); diff --git a/src/types/world/entities/building.ts b/src/types/world/entities/building.ts index 7050e312..8a640bb6 100644 --- a/src/types/world/entities/building.ts +++ b/src/types/world/entities/building.ts @@ -206,7 +206,7 @@ export enum BuildingIcon { DAMAGE = 'building/icons/params/damage', RESOURCES = 'building/icons/params/resources', SPEED = 'building/icons/params/speed', - DELAY = 'building/icons/params/pause', + DELAY = 'building/icons/params/delay', } export enum BuildingAudio { diff --git a/src/types/world/entities/npc/enemy.ts b/src/types/world/entities/npc/enemy.ts index 5111c1fc..24ca9957 100644 --- a/src/types/world/entities/npc/enemy.ts +++ b/src/types/world/entities/npc/enemy.ts @@ -26,7 +26,7 @@ export interface IEnemyFactory { new (scene: IWorld, data: EnemyVariantData): IEnemy } -export interface IEnemyTarget extends Vector2D { +export interface IEnemyTarget { readonly live: ILive getPositionOnGround(): Vector2D }