Skip to content

Commit

Permalink
Support modifiers on magical items
Browse files Browse the repository at this point in the history
  • Loading branch information
Socolin committed Apr 14, 2024
1 parent 7abbcd2 commit 0dd8204
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/app/item/item-editor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export class ItemEditorComponent implements OnInit {
|| item.type === 'head'
|| item.type === 'handWeapon'
|| item.type === 'necklace'
|| item.type === 'magical'
|| item.type === 'ring'
|| item.type === 'shield'
|| item.type === 'weapon')
Expand All @@ -181,6 +182,7 @@ export class ItemEditorComponent implements OnInit {
|| item.type === 'hand'
|| item.type === 'head'
|| item.type === 'handWeapon'
|| item.type === 'magical'
|| item.type === 'necklace'
|| item.type === 'ring'
|| item.type === 'shield')
Expand Down
1 change: 1 addition & 0 deletions src/models/item/lvl0-item-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export function getItemModifiersIfAvailable(data: Lvl0ItemData): { [id: string]:
|| data.type == 'hand'
|| data.type == 'head'
|| data.type == 'necklace'
|| data.type == 'magical'
|| data.type == 'foot'
|| data.type == 'ring'
|| data.type == 'weapon')
Expand Down
4 changes: 3 additions & 1 deletion src/models/item/properties/magical-item-properties.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {ItemPropertiesTemplateBase} from './item-properties-template-base';
import {ItemPropertiesTemplateStatModifiers} from './item-properties-template-stat-modifiers';
import {ItemPropertiesTemplateExtraSkills} from './item-properties-template-extra-skills';

export interface MagicalItemPropertiesData extends ItemPropertiesTemplateBase {
export interface MagicalItemPropertiesData extends ItemPropertiesTemplateBase, ItemPropertiesTemplateStatModifiers, ItemPropertiesTemplateExtraSkills {
}

export interface MagicalItemProperties {
Expand Down
4 changes: 2 additions & 2 deletions src/repositories/data/item-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export default <Record<UnionKeys<Lvl0Item, 'type'>, ItemTypeConfig>>{
},
magical: {
canBeEquiped: true,
canHaveModifiers: false,
canHaveExtraSkills: false,
canHaveModifiers: true,
canHaveExtraSkills: true,
},
misc: {
canBeEquiped: false,
Expand Down

0 comments on commit 0dd8204

Please sign in to comment.