LouieSqueaky

TXT Pastebin #1

Oct 21st, 2020 (edited)
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. player.alias = "you"
  2. player.hitpoints = 25
  3. player.damage = 3
  4. player.attack = 0
  5. player.defence = 1
  6. player.armour = 0
  7. player.changedhitpoints => {
  8. if (player.hitpoints > 0) {
  9. msg ("Hits points now " + player.hitpoints)
  10. }
  11. else {
  12. msg ("Wake up!")
  13. finish
  14. }
  15. }
  16.  
  17. this.damage = "1d6"
  18. this.attack = 3
  19. this.critdesc = "You smash the baseball bat down on #target# (#hits# hits)."
  20. this.attackdesc = "You swing the baseball bat at #target# (#hits# hits)."
  21. this.missdesc = "You swing wildly and entirely miss #target#."
  22.  
  23. this.damage = "2"
  24. this.attack = 0
  25. this.firearmdamage = "2d8"
  26. this.firearmattack = 3
  27. this.ammo = 6
  28. this.ammomax = 9
  29. this.critdesc = "A well placed shot with the snub-nosed revolver on #target# (#hits# hits)."
  30. this.attackdesc = "You shot the snub-nosed-revolver at #target# (#hits# hits)."
  31. this.missdesc = "You shoot wildly and entirely miss #target#."
  32. this.inventoryverbs = Split("Look at;Use;Drop", ";")
  33.  
  34. if (HasInt(game, "crittercount")) {
  35. game.crittercount = game.crittercount + 1
  36. }
  37. else {
  38. game.crittercount = 1
  39. }
  40. create ("critter" + game.crittercount)
  41. obj = GetObject("critter" + game.crittercount)
  42. obj.parent = room
  43. obj.displayverbs = Split("Look at;Attack;Shoot", ";")
  44. obj.dead = false
  45. obj.changedhitpoints => {
  46. if (this.hitpoints < 1) {
  47. msg ("You killed it! The corpse drops to the ground, returning to its former status.")
  48. this.dead = true
  49. }
  50. }
  51. names = Split("decipit;decomposing;shambling;disgusting;filthy;falling-apart", ";")
  52. obj.alias = StringListItem(names, game.crittercount % ListCount(names)) + " Corpse"
  53. obj.listalias = CapFirst(obj.alias)
  54. obj.look = ProcessText("A " + obj.alias + ", {random:covered in maggots:missing an arm:one eye hanging out}.")
  55. obj.hitpoints = 10
  56. obj.damage = 3
  57. obj.attack = 2
  58. obj.defence = 1
  59. obj.armour = 1
  60. obj.critdesc = "A well-placed blow by #attacker# sends you reeling (#hits# hits)."
  61. obj.attackdesc = "#Attacker# has hit you (#hits# hits)."
  62. obj.missdesc = "#Attacker# misses you."
  63.  
  64. if (not weapon.firearmdamage = null) {
  65. damageatt = "firearmdamage"
  66. attackatt = "firearmattack"
  67. weapon.ammo = weapon.ammo - 1
  68. }
  69. else {
  70. damageatt = "damage"
  71. attackatt = "attack"
  72. }
  73. roll = GetRandomInt(1, 20) + weapon.attack - target.defence
  74. damage = DiceRoll(weapon.damage) * (100 - target.armour) / 100
  75. if (damage < 1) {
  76. damage = 1
  77. }
  78. if (roll > 15) {
  79. damage = damage * 3
  80. AttackReport (weapon.critdesc, attacker, target, damage)
  81. target.hitpoints = target.hitpoints - damage
  82. }
  83. else if (roll > 10) {
  84. AttackReport (weapon.attackdesc, attacker, target, damage)
  85. target.hitpoints = target.hitpoints - damage
  86. }
  87. else {
  88. AttackReport (weapon.missdesc, attacker, target, 0)
  89. }
Advertisement
Add Comment
Please, Sign In to add comment