Skip to content

Commit

Permalink
equipment factories
Browse files Browse the repository at this point in the history
  • Loading branch information
Greegko committed Jun 10, 2023
1 parent b80ff19 commit 8fb7c5b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { generate } from "shortid";

import { AttackEffectType, DefenseEffectType, EffectType } from "@models";
import { Armor, ItemType, Shield, Weapon } from "@models";
import { AttackEffectType, DefenseEffectType, EffectType } from "../effect";
import { Armor, ItemType, Shield, Weapon } from "./item-types";

export function weaponFactory(): Weapon {
return {
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/models/item/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export * from "./item";
export * from "./equipment";
export * from "./base-item";
export * from "./item-types";
export * from "./equipment-factory";
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@ import { append, evolve } from "rambda";
import { commandHandler } from "@core";

import { UnitID, UnitService } from "@features/unit";
import { AttackEffectType, Effect, EffectType, EquipmentItem, Item, ItemID, ItemType } from "@models";
import {
AttackEffectType,
Effect,
EffectType,
EquipmentItem,
Item,
ItemID,
ItemType,
armorFactory,
shieldFactory,
weaponFactory,
} from "@models";
import { StashLocation, VillageStashService } from "@modules/village";
import { armorFactory, shieldFactory, weaponFactory } from "@modules/village/lib/equipment-factory";

import {
BlacksmithCommand,
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/modules/village/lib/hero-factory.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { sample } from "@lib/sample";

import { Unit, UnitType } from "@features/unit";

import { armorFactory, shieldFactory, weaponFactory } from "./equipment-factory";
import { armorFactory, shieldFactory, weaponFactory } from "@models";

const lastname = [
"Emperor",
Expand Down

0 comments on commit 8fb7c5b

Please sign in to comment.