Difference between revisions of "Forum:The YANI about throwing to an arbitrary direction"

From NetHackWiki
Jump to navigation Jump to search
(Undo revision 149081 by NDos (talk))
(Tag: Undo)
(Fixed errors of the description)
Line 7: Line 7:
 
Basically, treat the level as a Euclidean grid of squares, and treat the ray/projectile to be traveling from the center of the origin tile to the center of the target tile.
 
Basically, treat the level as a Euclidean grid of squares, and treat the ray/projectile to be traveling from the center of the origin tile to the center of the target tile.
  
* Each time the ray/projectile crosses the edge (excluding vertices) between two tiles (excluding the origin and the target):
+
* Each time the ray/projectile enters a tile occupied by a monster:
** If one of the tiles is occupied by a monster:
+
** For a projectile, it has a chance of hitting that monster rather than the target.
*** For a projectile, it has a chance of hitting that monster rather than the target.
+
** For a ray, it has a chance of hitting the monster (and go through).
*** For a ray, it has a chance of hitting the monster.
+
** The "chance" mentioned above are determined by the Euclidean distance between the trajectory and the center of the monster's tile.
** If both of the tiles are occupied by monsters:
 
*** For a projectile, it may hit one of the monsters with a distributed chance.
 
*** For a ray, it has independent chances of hitting the monsters.
 
** The "chances" mentioned above are determined by the Euclidean distance between the trajectory and the center of the monster's tile.
 
* Depending of the type of the ray/projectile, if it hits a wall, it will stop at the lastly traveled tile, or it will reflect/ricochet back.
 
  
 
Of course, it would not so look nice on the TTY interface. Could be cool on graphical interfaces tho.
 
Of course, it would not so look nice on the TTY interface. Could be cool on graphical interfaces tho.
  
 
--[[User:NDos|NDos]] ([[User talk:NDos|talk]]) 07:39, 25 November 2022 (UTC)
 
--[[User:NDos|NDos]] ([[User talk:NDos|talk]]) 07:39, 25 November 2022 (UTC)

Revision as of 07:55, 25 November 2022


The Yet Another New Idea page mentions a SMOP saying "rays and projectiles can be fired at an arbitrary target square, not just vertically, horizontally and diagonally." As such, I had a few thoughts about how it would be implemented.

Basically, treat the level as a Euclidean grid of squares, and treat the ray/projectile to be traveling from the center of the origin tile to the center of the target tile.

  • Each time the ray/projectile enters a tile occupied by a monster:
    • For a projectile, it has a chance of hitting that monster rather than the target.
    • For a ray, it has a chance of hitting the monster (and go through).
    • The "chance" mentioned above are determined by the Euclidean distance between the trajectory and the center of the monster's tile.

Of course, it would not so look nice on the TTY interface. Could be cool on graphical interfaces tho.

--NDos (talk) 07:39, 25 November 2022 (UTC)