• Deals damage to target widget from a source unit.

    Parameters

    • whichUnit: Unit<UnitEventMap>

      The source of the damage. To actual deal damage it should be not null.

    • target: Widget<WidgetEventMap>

      The target being damaged.

    • amount: number

      How much damage is being dealt.

    • attack: boolean

      Consider the damage dealt as being an attack.

    • ranged: boolean

      Consider the damage dealt as being from a ranged source.

    • attackType: HandleHolder<"attacktype">
    • damageType: HandleHolder<"damagetype">
    • weaponType: HandleHolder<"weapontype">

    Returns boolean

    Note

    For some insight about the different configurations of the different types see this post.

Generated using TypeDoc