aliens

Author Topic: hand-to-hand fight  (Read 23394 times)

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: hand-to-hand fight
« Reply #30 on: August 30, 2012, 10:24:58 am »
May as well have a vector of battleTypes for a given item and check them all. (That's what I've done--allowed any item in the game to theoretically be used in any manner.
It's more a matter of screen space. The action menu is rather large and can only have 5 items in it. You have "throw" at the bottom, then room for "snapshot, autoshot, aimed shot". If you place "Hit" on top of that, the screen is full.



(and the coding style is actually SupSuper's, I only tried to follow his style in battlescape code)
« Last Edit: August 30, 2012, 10:40:19 am by Daiky »

Offline Kyzrati

  • Captain
  • ***
  • Posts: 56
    • View Profile
    • X@COM - The X-COM RL
Re: hand-to-hand fight
« Reply #31 on: August 30, 2012, 10:46:29 am »
Yeah, I was thinking of that as well, but UI isn't really a limiting factor since you wouldn't likely have weapons that are capable of every single possible type of attack--instead they have a smaller subset, but the range of the total set can be much larger. For example a sniper rifle that lacks other normal firing modes in favor of two kinds of aimed shots, one slightly quicker and one more careful. That would still only require maybe four actions: Throw, Aimed, Snipe, and Melee (assuming the addition of melee attacks for most weapons).

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: hand-to-hand fight
« Reply #32 on: August 30, 2012, 10:58:23 am »
You don't use sniper rifles for melee attacks. You just don't.

Other than that, you're right, of course :)

Offline Kyzrati

  • Captain
  • ***
  • Posts: 56
    • View Profile
    • X@COM - The X-COM RL
Re: hand-to-hand fight
« Reply #33 on: August 30, 2012, 11:01:27 am »
You do if you're out of ammo and they've snuck up on your position!

It would be great to smash an alien in the face with the butt of your sniper rifle. Or better yet, jam it down his throat.

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: hand-to-hand fight
« Reply #34 on: August 30, 2012, 11:19:10 am »
Quote
Items commonly carried by military or police snipers include: • Rifle Ammunition • Hand held Radio • Knife • Binoculars • Compass/GPS • Canteen or Water bladder • Whistle • Insect Repellent • Mini Thermometer • Food rations • First aid items • Ear Protection • Penlight w/ Filter • Chemical Mace • Camouflage Paste • Strobe Light • Pencil & Notebook • Laser Rangefinder
;D

Offline Kyzrati

  • Captain
  • ***
  • Posts: 56
    • View Profile
    • X@COM - The X-COM RL
Re: hand-to-hand fight
« Reply #35 on: August 30, 2012, 11:25:32 am »
Haha! Good one.

Well, we're talking about X-COM snipers, who would never be able to fit all that stuff because inventory items require a minimum of one "space" and 3 points of encumbrance each. (Now don't go overlaying all that stuff onto an X-COM inventory screen just to prove a point :P)

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: hand-to-hand fight
« Reply #36 on: August 30, 2012, 06:34:05 pm »
PS. I'm not good at inventing variable (and class) names, I always think of better ones, later on when I'm actually using them. But I hope they are clear enough :p
I know how that feels, I tend to do a lot of find&replaces whenever I think of better names for stuff. It's my code dammit, nobody can stop me from ripping it apart just to make it slightly more readable! :P