<gs-doc-navigation></gs-doc-navigation>

<style>
  pre:not(#LOG) {
    background-color:  rgba(240,240,250,1);
    padding: 6px;
    min-width: fit-content;
    width: calc(100% - 50px);
    border: dashed 1px gray;
  }
  .red {
        background-color:  rgba(240,240,250,1);
  }
</style>

# Items

Using an item has a reduced wait time (only half a turn wait time).

Using an item:

```javascript
item.potion(allies.first)
```

Query the amount of an item use have:

```javascript
item.potion.amount
```

<style>
dd {
  display: block;
}
</style>
<script>
import { items, Item } from "./../components/gs-simulator.js";
import { allStaticGetters } from "./../utils/utils.js";
import { parseParams } from "./params.js";

function nameToElement(key) {
  const item = items[key];

  return <div>
    <h2>{item.itemName} ({key})</h2>
    <div>{item.todo ? <span style='font-weight: bold; color: red'>TODO: {item.todo}</span> : ''}</div>
    <span>{item.desc()}</span>
    <div>{parseParams(item.params)}</div>
  </div>
}

<div>
  <h1>Items</h1>
  <ul>
    {...allStaticGetters(items).map(nameToElement)}
  </ul>
</div>;


</script>
