matthileo

Untitled

Jan 17th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.35 KB | None | 0 0
  1. !! echo "";
  2.  
  3. newline = "
  4. ";
  5.  
  6. isDisadvantage=0;
  7. isAdvantage=0;
  8. isSneak=0;
  9. isHex=0;
  10. isAutoCrit=0;
  11. isPoison=0;
  12. isBless=0;
  13. isDark=0;
  14.  
  15. if ({1} == "adv" || {2} == "adv" || {3} == "adv" || {4} == "adv" || {5} == "adv" || {6} == "adv" || {7} == "adv" || {8} == "adv" || {9} == "adv") {
  16. isAdvantage=1;
  17. }
  18. if ({1} == "dis" || {2} == "dis" || {3} == "dis" || {4} == "dis" || {5} == "dis" || {6} == "dis" || {7} == "dis" || {8} == "dis" || {9} == "dis") {
  19. isDisadvantage=1;
  20. }
  21. if ({1} == "sneak" || {2} == "sneak" || {3} == "sneak" || {4} == "sneak" || {5} == "sneak" || {6} == "sneak" || {7} == "sneak" || {8} == "sneak" || {9} == "sneak")) {
  22. isSneak=1;
  23. }
  24. if ({1} == "hex" || {2} == "hex" || {3} == "hex" || {4} == "hex" || {5} == "hex" || {6} == "hex"|| {7} == "hex" || {8} == "hex"|| {9} == "hex") {
  25. isHex=1;
  26. }
  27. if ({1} == "poison" || {2} == "poison" || {3} == "poison" || {4} == "poison" || {5} == "poison" || {6} == "poison" || {7} == "poison" || {8} == "poison" || {9} == "poison") {
  28. isPoison=1;
  29. }
  30. if ({1} == "crit" || {2} == "crit" || {3} == "crit" || {4} == "crit" || {5} == "crit" || {6} == "crit" || {7} == "crit" || {8} == "crit" || {9} == "crit") {
  31. isAutoCrit=1;
  32. }
  33. if ({1} == "dark" || {2} == "dark" || {3} == "dark" || {4} == "dark" || {5} == "dark" || {6} == "dark" || {7} == "dark" || {8} == "dark" || {9} == "dark") {
  34. isDark=1;
  35. }
  36.  
  37. if ({1} == "bless" || {2} == "bless" || {3} == "bless" || {4} == "bless" || {5} == "bless" || {6} == "bless" || {7} == "bless" || {8} == "bless" || {9} == "bless") {
  38. isBless=1;
  39. }
  40.  
  41. bonus = user.bonus[user.weapon["pactweapon ability"]] + user.bonus["prof"];
  42. magicBonus = 0;
  43. bonus = bonus + magicBonus;
  44. if (isBless==1)
  45. {
  46. bonus = bonus + "+ 1d4";
  47. }
  48.  
  49. weaponDamageType = user.weapon["pactweapon type"];
  50. damageBonus = user.bonus[user.weapon["pactweapon ability"]] + magicBonus;
  51.  
  52. totalDamage=0;
  53. target={1};
  54. title = user.weapon["pactweapon phrase"];
  55. title = title + target + ".";
  56. tohit = roll("1d20 +" + bonus);
  57. result = tohit.die0;
  58.  
  59. if (isAdvantage==1)
  60. {
  61. tohit = roll("2d20-H +" + bonus);
  62. result = tohit.die1;
  63. }
  64.  
  65. if (isDisadvantage==1)
  66. {
  67. tohit = roll("2d20-L +" + bonus);
  68. result = tohit.die0;
  69. }
  70.  
  71. if (result == 20 || isAutoCrit==1)
  72. {
  73. sneakCrit = user.feature["sneakAttackDice"] * 2;
  74. weaponCrit = user.weapon["pactweapon dice"] * 2;
  75.  
  76. damage = roll(weaponCrit + "d" + user.weapon["pactweapon size"] + "+" + damageBonus);
  77. sneakDamage = roll(sneakCrit + "d6");
  78. hexDamage = roll("2d6");
  79.  
  80. } else
  81. {
  82. damage = roll(user.weapon["pactweapon dice"] + "d" + user.weapon["pactweapon size"] + "+" + damageBonus);
  83. sneakDamage = roll(user.feature["sneakAttackDice"] + "d6");
  84. hexDamage = roll("1d6");
  85. }
  86.  
  87. totalDamage = damage.die0 + damage.die1 + damageBonus;
  88.  
  89. echo title + newline;
  90.  
  91. if (isAutoCrit==1)
  92. {
  93. echo "**That's an automatic CRIT!**" + newline;
  94. }
  95.  
  96. echo "**To hit:** " + tohit + newline;
  97. echo "**Sword Damage:** " + damage + newline;
  98.  
  99. FAKEecho = "**Lifedrinker Damage:** `" + user.bonus["cha"]+"`"+ newline;
  100. FAKEtotalDamage = totalDamage + user.bonus["cha"];
  101.  
  102. if (isSneak==1)
  103. {
  104. totalDamage = totalDamage + sneakDamage.die0 + sneakDamage.die1 + sneakDamage.die2 + sneakDamage.die3 + sneakDamage.die4 + sneakDamage.die5 + sneakDamage.die6 + sneakDamage.die7 + sneakDamage.die8 + sneakDamage.die9;
  105. echo "**Sneak Attack Damage:** " + sneakDamage + newline;
  106. }
  107. if (isHex==1)
  108. {
  109. totalDamage = totalDamage+hexDamage.die0 + hexDamage.die1;
  110. echo "**Hex Damage:** " + hexDamage + newline;
  111. }
  112. if (isDark==1)
  113. {
  114. totalDamage = totalDamage + 2;
  115. echo "**Necrotic Damage: ** `2` *(in dim light or darker)*" + newline;
  116. }
  117.  
  118. echo "__**Total Damage:** `" + totalDamage + "`__" + newline;
  119. echo "**Effect:** Target must make a `DC 13` Constitution saving throw or have their Strength score reduced by 1 until they finish a short or long rest." + newline;
  120.  
  121. if (isPoison==1)
  122. {
  123. poisonDamage = roll(user.poison["die ammount"] + "d" + user.poison["die size"] + "+" + user.poison["damage bonus"]);
  124. totalPoisonDamage = totalDamage + poisonDamage.die0 + poisonDamage.die1 + user.poison["damage bonus"];
  125. echo newline;
  126. echo "*" + user.text["name"] + "'s blade is coated with " + user.poison["name"] + ".*" + newline;
  127. echo "**Poison Effect:** " + user.poison["effect"] + newline;
  128. }
  129.  
  130. attackPhrase = "attack" + roll("1d8").die0;
  131. fakeecho = '"' + user.phrase[attackPhrase] + '"' + newline;
Advertisement
Add Comment
Please, Sign In to add comment