Author Topic: weapon maxRange "1" extended to diagonals / allow maxRange=1.5 ?  (Read 11553 times)

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
That sounds perfectly reasonable, I agree. So maybe really use "maxRange = 0" for "directly adjacent only" and "maxRange = 1" for "all 8 neighboring tiles"? ("maxRange = 0" wouldn't make any other sense, I guess - although "own tile only" might be adequate for suicide bombing weapons...)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: weapon maxRange "1" extended to diagonals / allow maxRange=1.5 ?
« Reply #16 on: August 26, 2015, 03:17:05 am »
well, this ain't heroquest, and we're talking about ranged weapons here, so i don't think the spear thing really enters into it
(although that IS a cool mechanic i must admit)
in any case, i added some 'special handling' for short ranged weapons (read: hacks) to allow range 1 to go diagonal, and range 2 to go diagonally up and down (the corners if you think of it in terms of a rubick's cube)

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: weapon maxRange "1" extended to diagonals / allow maxRange=1.5 ?
« Reply #17 on: August 26, 2015, 04:06:13 am »
From memory of HeroQuest, in that game most weapons allow attack in 4 neighboring tiles, the only weapon which allows attack in diagonal (spear) has some definite advantages :

In Disgaea, on the other hand, spear worked like Range 2 weapon in OXCom (1 tile diagonally or 2 tiles straight), while swords etc. could only attack 1 tile straight :)

Offline Bloax

  • Colonel
  • ****
  • Posts: 322
  • do you want to be any of those things
    • View Profile
Re: weapon maxRange "1" extended to diagonals / allow maxRange=1.5 ?
« Reply #18 on: August 26, 2015, 10:48:23 am »
probably easier just to allow range: 1 to work diagonally.
Yes, it would literally be a simple special case for MaxRange=1 so that it is much less useless and counterintuitive.
If you want examples for where such a thing has already been done, then (Dungeon) Crawl is one of those things - since "no diagonal attacks" only for range 1 spells is a hilariously stupid situation.

And this isn't HeroQuest - you can move diagonally just fine in this game.

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: weapon maxRange "1" extended to diagonals / allow maxRange=1.5 ?
« Reply #19 on: August 26, 2015, 02:34:01 pm »
well, this ain't heroquest, and we're talking about ranged weapons here, so i don't think the spear thing really enters into it
(although that IS a cool mechanic i must admit)
in any case, i added some 'special handling' for short ranged weapons (read: hacks) to allow range 1 to go diagonal, and range 2 to go diagonally up and down (the corners if you think of it in terms of a rubick's cube)
I'm afraid this is an unending chase...
For example, Range 3 gives this pattern of reachable tiles, and I'm not sure this is what everybody prefers :
Code: [Select]
   X
 XXXXX
XXX0XXX
 XXXXX
   X

This is why I thought the sub-tile precision of "maxRange" was the best answer : it lets the modder decide the precise round shapes.
Ex: a range 3.2, pattern:
Code: [Select]
  XXX
 XXXXX
XXX0XXX
 XXXXX
  XXX
a range 3.9 pattern:
Code: [Select]
XXXXX
XXXXXXX
XXX0XXX
XXXXXXX
 XXXXX

Offline mrxian

  • Colonel
  • ****
  • Posts: 109
    • View Profile
Re: weapon maxRange "1" extended to diagonals / allow maxRange=1.5 ?
« Reply #20 on: August 26, 2015, 09:22:51 pm »
Couldn't these issues be solved by rounding the result of the range calculation down before using it to check if a weapon's target is in range? It would change range patterns a bit, but not too drastically.