Skip to content

CombatTracker, ChatCard, Fear Roll and localization fixes#307

Open
sasquach45932 wants to merge 13 commits intoXacus:masterfrom
sasquach45932:master
Open

CombatTracker, ChatCard, Fear Roll and localization fixes#307
sasquach45932 wants to merge 13 commits intoXacus:masterfrom
sasquach45932:master

Conversation

@sasquach45932
Copy link
Copy Markdown
Contributor

Thanks for pt-br transaltion to @nafeels !

@sasquach45932
Copy link
Copy Markdown
Contributor Author

image image image image image

@sasquach45932
Copy link
Copy Markdown
Contributor Author

Item macro

PrePass PostPass Description
preRollAttack postRollAttack Weapon
preRollTalent postRollTalent Talent/Special Attack
preRollSpell postRollSpell Spell
preRollItem postRollItem Inventory Item/Trait/Special Action, End Of The Round (*)
preRollItem postRollItem End Of The Round (**)

Global parameters: item, speaker, actor, token, character

Pass specific parameters:

Pass Parameters
preRollAttack attackAttribute, defenseAttribute, targetActorUuid
postRollTalent attackRoll, targetNumber, successfullHit ,plus20, targetActorUuid
preRollTalent targetActorUuid (*)
postRollTalent attackRoll, targetNumber, successfullHit ,plus20, targetActorUuid
preRollSpell attackAttribute, defenseAttribute, targetActorUuid
postRollSpell attackRoll, targetNumber, successfullHit ,plus20, targetActorUuid
preRollItem targetActorUuid (*)
postRollItem targetActorUuid (*)
preRollItem attackAttribute, defenseAttribute, targetActorUuid (*)
postRollItem attackRoll, targetNumber, successfullHit ,plus20, targetActorUuid (**)

(*) - Does not have attack attribute
(**) - Has attack attribute

Example Weapon macro.

In case of successful hit, it applies the Blinded affliction on the target for 1 round. If the total of the attack roll was 20 or higher and exceeds the score of the attribute or characteristic by 5 or more, the Blinded affliction duration is 3 rounds.

if (args.pass === 'postRollAttack' && args.successfullHit) {
    const targetActor = fromUuidSync(args.targetActorUuid)
    const blindedEffect = foundry.utils.deepClone(CONFIG.statusEffects.find(e => e.id === 'blinded'))
    blindedEffect['statuses'] = blindedEffect.id
    blindedEffect.duration.rounds = args.plus20 ? 3 : 1

    await ActiveEffect.create(blindedEffect, {
        parent: targetActor,
    })
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant