Items
InfinityEngine.item — Functionitem([game], ref)Returns the item with given reference.
InfinityEngine.items — Functionitems([game], [regex]; [type])Returns an iterator over all items. If a regex is provided then only those items with matching reference are included.
If a type keyword argument is passed, then only those items with the given type will be returned.
InfinityEngine.Item — TypeItemStructure representing a game item. Fields include:
- name,- unidentified_name,- description,- unidentified_description: game strings;
- abilities: vector of- GameAbilitiesrepresenting activated abilities;
- effects: vector of- GameEffectsrepresenting passive game effects .
InfinityEngine.ItemAbility — TypeItemAbilityAn activated item ability (including weapon attacks).
Damage type and value can be set by assigning to the damage property:
item("sw1h01").ability[1].damage = Crushing(1d6+1)The setproperty! value is overloaded so that the previous line of code updates the damage_type, damage_bonus, dice_thrown and dice_sides fields all at once.
Item templating
Any item may be used as a template for creating a new item:
albruin = item("sw1h34")
heavysword = albruin(weight = 500, enchantment = +5)In addition to this, most of the item types are useable as resource templates. The following items will, when used as resource templates, produce a basic version of the item:
- Amulet - Arrow - Axe - BastardSword - Belt - Bolt - Boots - Bracers - Buckler - Bullet - ChainMail - Crossbow - Dagger - Dart - Flail - FullPlate - Gem - Halberd - HalfPlate - Hammer - HideArmor - Katana - LeatherArmor - LongBow - LongSword - Mace - Morningstar - Quarterstaff - Ring - Scimitar - Scroll - ShortBow - ShortSword - Sling - Spear - SplintMail - StuddedLeatherArmor - TwoHandedSword