matthileo

Untitled

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