This is my second attempt at a Combat Automation script of D&D 4th edition. If you find a power that you can't get working post its name and I will look it up and see what I need to do to fix it. Please don't post powers that need: AOE Automated Status effects (ie dealing the damage each turn for you, etc) I already know about these and will add them in when I can. Usage: In order to be able to automate as many different powers as possible I split powers into three sections I call these Power, Check and Action. Power - A power is what you would think it is, it represents the power you are trying to use. It doesn't do very much on its own. There should only be one power for each of the character's powers. Check - A check is needed every time you want a different target or want to make some sort of attack roll. There can be many checks in each power. Action - Something that happens, this always happens to the target of the associated check, some examples would be dealing damage, healing or outputting text. There can be many actions in each check. The Commands: !ca-power @{selected|token_id} [name] [key] options... Required: @{selected|token_id} - This is needed for now. [name] - The name of the power. [key] - A unique (unique to the token using the power) name for the power. The Sorter the better. Options: --usage [eg: Encounter, At-Will] --action [eg: Standard Action] --powercard [power card key] - this is used to pass custom power card options to the power card output, please see Power Cards for details. You may have more than one of these. !ca-check @{selected|token_id} [key] [power key] options... Required: @{selected|token_id} - This is needed for now. [key] - A unique (unique to the power) name for the check. The Sorter the better. [power key] - The key of the power this check goes with. Options: --target @{target|Main|token_id} - The token id of the target. --roll [[inline roll]] - An attack roll. Requires Target and VS. --vs [ie: AC, Fort] - The defence to roll against. Requires Target and Roll. --crittarget [number] - lowers the crit target value from 20 to this. Valid Defences: "ac","fort","ref","will" --indent [power card indent ie: ^2] - Indent to be applied to the attack roll display. --condition [conditions] - conditions should be a string of comer separated check keys and tags in this format "check.tag" eg "myCheck.hit,myCheck.even". you can put multiple --condition, tags in one condition separated by comers will be treated as an AND ie: "myCheck.hit,myCheck.even" means if myCheck hits and the dice roll is even. Separate --condition will be treated as a OR ie: --condition "myCheck.hit" --condition "myCheck.even" would be if myCheck hits or the dice roll is even. Valid tags: "effect" - always happens,"hit" - On a hit,"miss" - On a miss,"crit" - On a crit,"fail" - On a nat 1,"odd" - If the dice rolls odd,"even" - If the dice rolls even. You can also use any icon as a tag. !ca-action @{selected|token_id} [key] [check key] [power key] options... Required: @{selected|token_id} - This is needed for now. [key] - A unique (unique to the Check) name for the action. The Sorter the better. [check key] - The key of the check this action goes with. [power key] - The key of the power this action goes with. Options: --damage [[inline roll]] - an inline roll for how much damage to deal. --type [damage types] - Comer separated list of damage types. --maxoncrit - If this is set the damage in this action will be maximised on a crit. Valid Damage Types: "acid","cold","fire","force","lightning","necrotic","poison","psychic","radiant","thunder" --heal [[inline roll]] - an inline roll for how much to heal. --temp - Just add this to make it heal temp damage instead. --textkey [key] - key should be the part from before the "|" in a power card option without the --. --text [some text] - What ever text you want displayed, you can include results from healing or damage using the format [checkKey.actionKey.damge] ie: "Heal [mycheck.myaction.heal] damage." --icon [icons] -icons should be a comer separated list of status icons you want put on the target. --condition [conditions] - conditions should be a string of comer separated check keys and tags or tags on their own in this format "check.tag" eg
"myCheck.hit,myCheck.even". you can put multiple --condition, tags in
one condition separated by comers will be treated as an AND ie:
"myCheck.hit,myCheck.even" means if myCheck hits and the dice roll is
even. Separate --condition will be treated as a OR ie: --condition "myCheck.hit" --condition "myCheck.even" would be if myCheck hits or the dice roll is even. If you put a tag on its own it will be checked against the check this action is connected to, if you put a key as well it will check what ever check you put the key for. Valid tags: "effect" - always happens,"hit" - On a hit,"miss" - On a
miss,"crit" - On a crit,"fail" - On a nat 1,"odd" - If the dice rolls
odd,"even" - If the dice rolls even. You can also use any icon as a tag. !ca-run @{selected|token_id} This is just needed once at the end of a power after all the checks and actions. Example: !ca-power @{selected|token_id} "Skip the Rock" "SkiptheRock" --usage "Encounter" --action "Standard Action" --powercard "Keywords|Martial, Weapon" --powercard "Range|Ranged weapon" --powercard "Requirement|You must be wielding a sling." --powercard "Primary Target|One creature"
!ca-check @{selected|token_id} "firstAttack" "SkiptheRock" --roll [[d20+@{DEX}+floor(@{LVL}/2)+2+2+1]] --vs "AC" --target @{target|Main|token_id}
!ca-action @{selected|token_id} "firstAttackDamage" "firstAttack" "SkiptheRock" --damage [[d6+@{DEX}+floor(@{LVL}/2)+2+1]] --condition "hit"
!ca-action @{selected|token_id} "firstAttackHitText" "firstAttack" "SkiptheRock" --text "[firstAttack.firstAttackDamage.damage] damage, Make a secondary Attack" --textkey "Hit" --condition "hit"
!ca-action @{selected|token_id} "secondAttackTargetText" "firstAttack" "SkiptheRock" --text "One creature within 10 squares of the primary target. " --textkey "^Secondary Target" --condition "hit"
!ca-check @{selected|token_id} "secondAttack" "SkiptheRock" --roll [[d20+@{DEX}+floor(@{LVL}/2)+2+2+1]] --vs "AC" --target @{target|Second|token_id} --condition "firstAttack.hit" --indent "^"
!ca-action @{selected|token_id} "secondAttackDamage" "secondAttack" "SkiptheRock" --damage [[@{DEX}]] --condition "hit"
!ca-action @{selected|token_id} "secondAttackHitText" "secondAttack" "SkiptheRock" --text "[secondAttack.secondAttackDamage.damage] damage, and the secondary target is dazed until the end of your next turn." --textkey "^Hit" --condition "hit"
!ca-action @{selected|token_id} "secondAttackHitIcon" "secondAttack" "SkiptheRock" --icon "stopwatch" --condition "hit"
!ca-action @{selected|token_id} "cunningSneakDamage" "secondAttack" "SkiptheRock" --damage [[@{INT}]] --condition "hit"
!ca-action @{selected|token_id} "secondAttackHitText" "secondAttack" "SkiptheRock" --text "The secondary attack deals [secondAttack.cunningSneakDamage.damage] extra damage." --textkey "^Cunning Sneak" --condition "hit"
!ca-run @{selected|token_id} "SkiptheRock" This is an example of the power Skip the Rock that was posted in the Power Cards thread by Brian. Credits: HoneyBadger - Custom Power Cards Script that is used to make all the chat output for this script. Script Gist Link: <a href="https://gist.github.com/pigalot/9647281" rel="nofollow">https://gist.github.com/pigalot/9647281</a>