Преглед на файлове

Add an equip() method to creatures

master
Fen Dweller преди 5 години
родител
ревизия
899a428090
променени са 1 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. +8
    -0
      src/game/creature.ts

+ 8
- 0
src/game/creature.ts Целия файл

@@ -74,6 +74,14 @@ export class Creature extends Vore implements Combatant {
return effect.onRemove(this)
}

equip (item: Equipment, slot: EquipmentSlot) {
const equipped = this.equipment.get(slot)
if (equipped !== undefined) {
this.items.push(equipped)
}
this.equipment.set(slot, item)
}

get status (): Array<VisibleStatus> {
const results: Array<VisibleStatus> = []



Loading…
Отказ
Запис