Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update new-effect-button.component.ts (Grapple preset) #677

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 55 additions & 47 deletions src/app/shared/automation-editor/new-effect-button.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,81 +387,89 @@ export class NewEffectButtonComponent implements OnInit {
effects: [
{
type: "check",
ability: ["acrobatics", "athletics"],
contestAbility: ["athletics"],
ability: [
"acrobatics",
"athletics"
],
contestAbility: "athletics",
success: [],
fail: [
{
type: "ieffect2",
name: "Grappled",
desc: "Grappled by {{caster.name}}",
name: "Grappling {{targets[0].name if str(targets[0])!=targets[0] else targets[0]}}",
attacks: [],
buttons: [
{
automation: [
{
type: "remove_ieffect",
removeParent: "always"
} as RemoveIEffect
],
label: "Release {{targets[0].name if str(targets[0])!=targets[0] else targets[0]}}",
verb: "lets go of {{targets[0].name if str(targets[0])!=targets[0] else targets[0]}}",
style: "3"
} as ButtonInteraction
],
end: false,
conc: false,
stacking: false,
save_as: "grappling",
target_self: true
} as IEffect,
{
type: "ieffect2",
name: "Grappled by {{caster.name}}",
attacks: [],
buttons: [
{
label: "Escape Grapple",
verb: "attempts to break out of the grapple",
style: "3",
automation: [
{
type: "target",
target: "children",
target: "parent",
effects: [
{
type: "check",
ability: ["athletics"],
contestAbility: ["acrobatics", "athletics"],
ability: "athletics",
contestAbility: [
"athletics",
"acrobatics"
],
"contestTie": "success"
success: [],
fail: [
{
type: "remove_ieffect"
type: "remove_ieffect",
removeParent: "always"
} as RemoveIEffect
],
contestTie: "fail"
} as AbilityCheck
]
} as Target
]
],
label: "Escape Grapple",
verb: "attempts to break out of the grapple",
style: "4"
} as ButtonInteraction
],
save_as: "grapple"
end: false,
conc: false,
desc: "Grappled by {{caster.name}}",
stacking: false,
save_as: "grapple",
parent: "grappling",
target_self: false
} as IEffect
],
contestTie: "neither"
"contestTie": "success"
} as AbilityCheck
]
} as Target,
{
type: "condition",
condition: "not lastCheckDidPass",
onTrue: [
{
type: "target",
target: "self",
effects: [
{
type: "ieffect2",
name: "Grappling",
desc: "Grappling {{targets[0].name if str(targets[0])!=targets[0] else targets[0]}}",
buttons: [
{
label: "Release Grapple",
verb: "lets go of their target",
style: "1",
automation: [
{
type: "remove_ieffect",
removeParent: "always"
} as RemoveIEffect
]
} as ButtonInteraction
],
parent: "grapple"
} as IEffect
]
} as Target
],
onFalse: [],
errorBehaviour: "false"
} as Condition
"type": "text",
"text": "When you want to grab a creature or wrestle with it, you can use the Attack action to make a special melee attack, a grapple. If you’re able to make multiple attacks with the Attack action, this attack replaces one of them.\n\nThe target of your grapple must be no more than one size larger than you and must be within your reach. Using at least one free hand, you try to seize the target by making a grapple check instead of an attack roll: a Strength (Athletics) check contested by the target’s Strength (Athletics) or Dexterity (Acrobatics) check (the target chooses the ability to use). You succeed automatically if the target is incapacitated. If you succeed, you subject the target to the grappled condition. The condition specifies the things that end it, and you can release the target whenever you like (no action required).",
"title": "Effect"
} as Text
];
this.context.parentArray.push(...effects);
this.created.emit();
Expand Down