User Tools

Site Tools


skills:jumping

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
skills:jumping [2018/02/21 17:55]
karl Add mathematics, add internal links, add syntax
skills:jumping [2020/01/02 16:03] (current)
karl cosmetics, make carrying 500*1000 instead 500'000 in the example
Line 4: Line 4:
  
 User can '​skip'​ over 1-2 spaces in a selected direction. Distance depends on [[:​characters:​carrying_capacity|weight carried]] , [[:​characters:​str|STR]] and [[:​characters:​dex|DEX]] of the user. This skill may also be used as an attack. ​ Jumping is a Physique skill type. User can '​skip'​ over 1-2 spaces in a selected direction. Distance depends on [[:​characters:​carrying_capacity|weight carried]] , [[:​characters:​str|STR]] and [[:​characters:​dex|DEX]] of the user. This skill may also be used as an attack. ​ Jumping is a Physique skill type.
 +
 +:!: The jumping attack works as a [[:​skills:​melee]] attack probably as of server version //1.70.y// . \\ The current server //​1.12.svn//​ at [[:​servers:​metalforge]] [[http://​www.metalforge.net/​|.net]] seems not to compute the jump attack in //​attack_ob_simple()//​ or the functions before correctly. \\
 +The server since v.1.70.y issues the message //You feel more confident in combat.// to the client, when one of the melee skills is readied.
 +
  
 ===== Use Skill ===== ===== Use Skill =====
Line 17: Line 21:
  
 ===== Mathematics ===== ===== Mathematics =====
-From [[:​server:​server_compiling|Server]] source // crossfire/​server/​skills.c // __ int jump(object *pl, int dir, object *skill) ​__ : \\ +From [[:​server:​server_compiling|Server]] source ​code file // crossfire/​server/​skills.c // function // int jump(object *pl, int dir, object *skill) ​// : \\ 
-''​stats=str*str*str*dex * skill->​level;''​+''​stats=str*str*str*dex * skill->​level;''​\\ 
 +Which then translates as STR<​sup>​3</​sup>​ **multiply** DEX **multiply** SKILL_LEVEL \\ 
 +and this number is then **divided** by the carrying weight of the inventory to receive the sum of tiles to jump. 
 + 
 +Example : STR=25, DEX=17, JUMP_LEVEL=4,​ PL_CARRYING=500 * 1000  
 +>  ( (25 * 25 *25) * 17 * 4 ) / 500000 
 +>> ( 15625 * 17 * 4 ) / 500000 
 +>> ( 1062500 ) / 500000 
 +>>>​ 2.125
  
-Distance ​limited to 2 tiles:+The jumping distance is limited to 2 tiles:
 <code c> <code c>
     if(pl->​carrying!=0) /​* don't want div by zero !! */     if(pl->​carrying!=0) /​* don't want div by zero !! */
skills/jumping.1519257343.txt.gz · Last modified: 2018/02/21 17:55 by karl