Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- player.alias = "you"
- player.hitpoints = 25
- player.damage = 3
- player.attack = 0
- player.defence = 1
- player.armour = 0
- player.changedhitpoints => {
- if (player.hitpoints > 0) {
- msg ("Hits points now " + player.hitpoints)
- }
- else {
- msg ("Wake up!")
- finish
- }
- }
- this.damage = "1d6"
- this.attack = 3
- this.critdesc = "You smash the baseball bat down on #target# (#hits# hits)."
- this.attackdesc = "You swing the baseball bat at #target# (#hits# hits)."
- this.missdesc = "You swing wildly and entirely miss #target#."
- this.damage = "2"
- this.attack = 0
- this.firearmdamage = "2d8"
- this.firearmattack = 3
- this.ammo = 6
- this.ammomax = 9
- this.critdesc = "A well placed shot with the snub-nosed revolver on #target# (#hits# hits)."
- this.attackdesc = "You shot the snub-nosed-revolver at #target# (#hits# hits)."
- this.missdesc = "You shoot wildly and entirely miss #target#."
- this.inventoryverbs = Split("Look at;Use;Drop", ";")
- if (HasInt(game, "crittercount")) {
- game.crittercount = game.crittercount + 1
- }
- else {
- game.crittercount = 1
- }
- create ("critter" + game.crittercount)
- obj = GetObject("critter" + game.crittercount)
- obj.parent = room
- obj.displayverbs = Split("Look at;Attack;Shoot", ";")
- obj.dead = false
- obj.changedhitpoints => {
- if (this.hitpoints < 1) {
- msg ("You killed it! The corpse drops to the ground, returning to its former status.")
- this.dead = true
- }
- }
- names = Split("decipit;decomposing;shambling;disgusting;filthy;falling-apart", ";")
- obj.alias = StringListItem(names, game.crittercount % ListCount(names)) + " Corpse"
- obj.listalias = CapFirst(obj.alias)
- obj.look = ProcessText("A " + obj.alias + ", {random:covered in maggots:missing an arm:one eye hanging out}.")
- obj.hitpoints = 10
- obj.damage = 3
- obj.attack = 2
- obj.defence = 1
- obj.armour = 1
- obj.critdesc = "A well-placed blow by #attacker# sends you reeling (#hits# hits)."
- obj.attackdesc = "#Attacker# has hit you (#hits# hits)."
- obj.missdesc = "#Attacker# misses you."
- if (not weapon.firearmdamage = null) {
- damageatt = "firearmdamage"
- attackatt = "firearmattack"
- weapon.ammo = weapon.ammo - 1
- }
- else {
- damageatt = "damage"
- attackatt = "attack"
- }
- roll = GetRandomInt(1, 20) + weapon.attack - target.defence
- damage = DiceRoll(weapon.damage) * (100 - target.armour) / 100
- if (damage < 1) {
- damage = 1
- }
- if (roll > 15) {
- damage = damage * 3
- AttackReport (weapon.critdesc, attacker, target, damage)
- target.hitpoints = target.hitpoints - damage
- }
- else if (roll > 10) {
- AttackReport (weapon.attackdesc, attacker, target, damage)
- target.hitpoints = target.hitpoints - damage
- }
- else {
- AttackReport (weapon.missdesc, attacker, target, 0)
- }
Advertisement
Add Comment
Please, Sign In to add comment