# Effectiveness

## 🎯 Effectiveness Struct

Represents the effectiveness of one attribute against another.

> **Namespace:** `Esper.Inventool.Stats`\
> **Access:** `public`\
> **Type:** `struct`\
> **Attributes:** `[Serializable]`

***

### 📦 Fields

| Access   | Field        | Type        | Description                                         |
| -------- | ------------ | ----------- | --------------------------------------------------- |
| `public` | `attribute`  | `Attribute` | The target attribute.                               |
| `public` | `multiplier` | `float`     | The effectiveness multiplier against the attribute. |

***

### 🔍 Properties

| Access   | Property          | Type   | Description                                            |
| -------- | ----------------- | ------ | ------------------------------------------------------ |
| `public` | `IsWeakAgainst`   | `bool` | Returns `true` if the multiplier is less than `1f`.    |
| `public` | `IsStrongAgainst` | `bool` | Returns `true` if the multiplier is greater than `1f`. |

***

### 🧰 Constructors

| Access   | Constructor                                            | Description                                                                |
| -------- | ------------------------------------------------------ | -------------------------------------------------------------------------- |
| `public` | `Effectiveness(Attribute attribute, float multiplier)` | Creates a new effectiveness entry with the given attribute and multiplier. |

***

## Creating an Effectiveness

This requires a reference to an [attribute](https://stylishesper.gitbook.io/inventool/inventool-v1/scripting/api/stats/attribute "mention").

```csharp
// x2 effectiveness against an attribute
Effectiveness effectiveness = new Effectiveness(attribute, 2f);
```
