Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user.maneuver = function()
- {
- var args = quoteArgs(Array.from(arguments));
- var character = user.characters[user.currentCharacter];
- var atkPhrase = character.sheet.name + " makes a ";
- var APO = atkPhrase;
- var toHitPhrase="";
- var damagePhrase="";
- var effectPhrase="";
- var sd = "d10";
- var dice = 1;
- var toHitDie = getDieRoll(character.lastAttack.toHit);
- var isCrit = (toHitDie == 20 || inArguments(args,"crit"));
- var isNat20 = (toHitDie == 20);
- if (inArguments(args,"crit") || isCrit) dice *= 2;
- sd = dice + sd;
- if (inArguments(args,"precision"))
- {
- atkPhrase += "precision";
- proll = roll(character.lastAttack.toHit.plain + " [Original To Hit] + " + "1d10 [Superiority Die]");
- toHitPhrase = "**NEW To Hit: **" + proll.string;
- damagePhrase = "**Damage: **" + character.lastAttack.damage.string;
- }
- if (inArguments(args,"trip"))
- {
- if (atkPhrase==APO) atkPhrase += "trip";
- else atkPhrase+=", trip";
- proll = roll(character.lastAttack.damage.plain + " [Original Damage] + " + sd + "[Superiority Die]");
- damagePhrase = "**NEW Damage: **" + proll.string;
- effectPhrase = "**Effect:** If Target is Large or smaller, it must make a `DC "+parseInt(8+character.sheet.strMod+character.sheet.proficiencyBonus)+"` Strength saving throw or be knocked prone.";
- }
- if (inArguments(args,"menace"))
- {
- if (atkPhrase==APO) atkPhrase += "menacing";
- else atkPhrase += ", menacing";
- proll = roll(character.lastAttack.damage.plain + " [Original Damage] + " + sd + "[Superiority Die]");
- damagePhrase = "**NEW Damage: **" + proll.string;
- effectPhrase = "**Effect:** Target must make a `DC "+parseInt(8+character.sheet.strMod+character.sheet.proficiencyBonus)+"` Wisdom saving throw or, it is frightened of me until the end of my next turn.";
- }
- echo("\n*" + atkPhrase + " attack!*\n");
- if (toHitPhrase!="") echo(toHitPhrase + "\n");
- if (damagePhrase!="") echo(damagePhrase + "\n");
- if (effectPhrase!="") echo(effectPhrase + "\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment