!\--------------------------------------------------------------------------- SPURVERB.HUG by Kent Tessman (c) 1995-1997 New and replaced verb routines for Spur ---------------------------------------------------------------------------\! !---------------------------------------------------------------------------- ! First, the replaced routines from HUGOLIB.H and VERBSTUB.H: replace DoScore { local endofgame if not score {"Well, seeing as how you haven't \Idone\i anything yet, your score amounts to a big fat nothing." return} if not endofgame "As in, you'd like to know how you're doing, right?\n" if royheffer is scored " Well, although you did wind up killing Roy Heffer, it was in self defense."; if liquorstash is visited " And while you did break into Grady's liquor stash, that doesn't really count as being productive."; if littlejimmy is scored " It would also be interesting to see who would think highly of your stealing Little Jimmy's candy."; if sarah is not scored and counter > 615 and note is scored " Not to mention the fact that you missed your little ten o'clock rendezvous, and now you're probably never going to figure out who S. is."; if hayfieldobject.misc = 1 " At the moment, don't forget, you've also got a bonfire going on in a bone-dry hayfield. Very responsible of you."; elseif hayfieldobject.misc = 2 " You've also managed to completely torch a hayfield. \ That's something, isn't it?"; if yourroom is scored "\n\nOn the bright side, you figured out a way to slip out of your hotel room unnoticed."; if redstallion is scored " And putting together that plan to steal Stratford's stallion showed at least a little ingenuity."; elseif topbranch is scored " And managing to find the hidden meadow showed at least a little ingenuity."; if weed in grady " Plus, if it weren't so seedy and practically dishonest, having wits enough to bamboozle Grady with a weed looking like a four-leaf clover would almost be commendable."; if hayfieldobject.misc " Maybe you deserve some points for managing to construct a bomb out of an empty whiskey bottle and the most volatile hootch on the planet. (Or maybe not.)"; if glenheffer is dead " But maybe it's the score that tells the story in the end--you: 2, the Heffer family: 0."; if dustyroad.misc "\n\n(Although at the moment, it would seem you're wandering aimlessly on a dusty road, going nowhere fast.)"; if score = 10 { "\n\nSo somewhere along the way you managed to become a genuine Western hero, up there with John Wayne and Roy Rogers and the best of them--no small feat, that." return true } if not endofgame { "\n\nThat's what you've managed to get done so far. "; select score case 1: "Not exactly a spectacular start to the day." case 2: "Being generally disruptive, that is." case 3: "Getting in over your head, that is." } } replace DoHelp {Help_mainmenu} !---------------------------------------------------------------------------- ! Then the all-new routines: routine DoDraw { if not object { if child(holster) and holster in player object = child(holster) else object = SelectFirearm if not object {"Nice try, but you don't have any gun." return false} } if object in player {"You're already holding "; print The(object); "." return false} if not Acquire(player, object) {"Your hands are too full to draw "; print The(object); "." return true} if not object.after print "You pull "; The(object); " out of your holster." return true } routine DoKill { if object is not living { "It is difficult to say what "; The(object) " did to earn your wrath, but it's probably not all that important, since you can't kill something that isn't living in the first place." } elseif SelectFirearm return DoShoot else "Would be helpful on your part if you could come up with a bit more specific means of doing that." } routine DoShoot { local p if not xobject { xobject = SelectFirearm if not xobject {"Sorry to break this to you, but you don't have any gun." return false} } if xobject.type ~= gun {"With "; Art(xobject) "? Oh. Okay. Sure. Whatever." return false} if xobject not in player {"Would help if you had "; The(xobject) " in your hand." return false} xobject.just_clicked = false if xobject.ammo = 0 {"You pull the trigger, and--CLICK. "; print CThe(xobject); " is empty." xobject.just_clicked = true} elseif object is not shootable {"You can't shoot "; print The(object); "."} else { xobject.ammo = xobject.ammo - 1 if object.corpse {remove object move object.corpse to location object.corpse is shot object.corpse is known} if object is living { ! Since the after routine for horses checks to see ! if the player is on the horse when it is killed, ! the object-drops-everything routine below must ! be overridden. if player in object: p = 1 while child(object) ! drops everything move child(object) to location CancelScript(object) ! if there is one if p: move player to object } if object = player: return true ! automatic after ! called by engine if not object.after { "You pull the trigger, and put "; if object is shot: "another"; else: "a"; " bullethole in "; print The(object); "." local i for i in location { if i is living and i ~= player { print "" if not i.gunshot_reaction {CThe(i) " looks at you like you're out of your gourd." break} } } } object is shot return true } } routine DoShootAt { local a a = xobject xobject = object object = a Perform(&DoShootAt, object, xobject) } routine SelectFirearm { if yourgun in you: return yourgun ! in hand if roysgun in you: return roysgun if FindObject(yourgun, you): return yourgun ! or holster, etc. if FindObject(roysgun, you): return roysgun } routine DoLoad { local n, a a = object.ammo_type if object.type ~= gun "You can't load that." elseif not FindObject(a, location) { if FindObject(parent(a), location) and parent(a) is openable \ and parent(a) is not open {"Except that "; The(parent(a)) " isn't open."} else {"You don't have any "; print a.name; print " to put in "; print The(object); "."} } elseif parent(a).misc = 0 {"Except that "; print parent(a).name; " is empty."} elseif object.ammo = object.max_ammo {CThe(object) " is already full--there's no need to take any more "; print a.name; " out of the box."} else { n = lower(parent(a).misc, object.max_ammo - object.ammo) "You take "; print NumberWord(n); " "; if n > 1: print a.name; else: print a.name #2; " from the box and put "; if n > 1: "them"; else: "it"; print " into "; The(object); "." parent(a).misc = parent(a).misc - n object.ammo += n if parent(a).misc = 0 parent(a).article = "an" ! for "an empty..." } } replace DoSleep ! already in VERBSTUB.H { if player in yourbed "You aren't tired enough to fall asleep." elseif yourbed in location {move player to yourbed "You get into bed, but aren't tired enough to fall asleep."} else "Would be nice, but there's no where to lie down." } routine DoSleepOn { if object ~= yourbed "Wouldn't recommend that." else: Perform(DoSleep) } routine DoFill { if object = bottle { if not xobject { if xxxkeg in location: xobject = xxx } if not xobject {"Nothing to fill "; print The(object); " with."} else Perform(&DoPutIn, xobject, bottle) } else {"You can't fill "; print The(object); "."} } routine DoPour { if object = xxx { if location = liquorstash { if not xobject { if bottle in player xobject = bottle } if not xobject "You've got nothing to carry the hootch in." elseif xobject ~= bottle {"You can't carry the hootch in "; print The(xobject); "."} else Perform(&DoPutIn, xxx, xobject) } else Perform(&DoEmpty, parent(xxx)) } else {"You can't pour "; print The(object); "."} } routine DoPlug { if not xobject {"You'll have to be a little more specific about what you'd like to plug "; print The(object); " with."} else Perform(&DoPutIn, xobject, object) } routine DoBuy { if object is living "Easy, big spender." elseif location = saloon and object = adrink Perform(&DoAsk, grady, adrink) elseif location ~= generalstore "Normally you'd have to be in a store to buy something." elseif object.type ~= storeitem "You can't buy that." elseif not FindObject(dollarbill, you) and FindObject(quarter, you) "Except that all you've got is a lousy quarter." elseif dollarbill is special {"Except that you already blew your dough on "; print The(dollarbill.misc); "."} elseif not FindObject(dollarbill, you) "With what? You're broke, cowboy." elseif object.price > 1 {"You've only got a dollar. "; CThe(object) print " is "; NumberWord(object.price); " dollars. Do the math."} else { Acquire(player, object) "You plunk down your dollar--Roy's dollar, actually, but he's not going to be needing it--and buy "; print The(object); "." dollarbill.misc = object dollarbill is special remove dollarbill return true } } routine DoLean { if ladder not in player "You're not even holding onto the ladder." elseif not xobject {"You'll have to be a little more specific about what you'd like to lean "; The(object) " against." return false} elseif xobject = loftobject or xobject = stablewall \ or xobject = gradyswall {"You lean the ladder against "; The(xobject) if xobject = loftobject ", just where the hayloft begins"; print "." move ladder to location ladder.misc = xobject return true} else {"You can't lean the ladder against "; print The(xobject); "."} } routine DoExtinguish { "Except that "; The(object) " isn't on fire." } routine LittleJimmyRun(char, obj) ! for Little Jimmy's char. script { local loc, dir, newloc loc = parent(littlejimmy) ! from here dir = obj.dir_to ! going this direction newloc = loc.dir ! to here if location = loc {"\nLittle Jimmy goes running off to "; print The(obj); "." event_flag = true taffy is known} elseif location = newloc { "\nLittle Jimmy comes running past you from "; print The(obj.dir_from); "."; event_flag = true if royheffer_corpse in location " He stops for a second, looks at Roy's stiff, and raises his eyebrows. \"Oooh. Dead guy.\"" print newline taffy is known } move littlejimmy to newloc }