Sunday, March 20, 2011

Project : Chibi Wars algorithms

So XJ asked me what do I mean by algorithms, well, here's an explanation that's hopefully good enough.

Movement Algorithm
So imagine moving a character across the grid. he starts at grid (8,8) as shown:



the moves he can make if his speed is 1 is labeled 1, the moves he can make if his speed is 7 is from 1-7, and the moves he can make if is speed is 3 is from 1-3.

basically, if a character has a speed of 1, he can move from (8,8) to (7,7) , (7,8) (7,9) , (8,7) , (8,9) , (9,7) , (9,8) or (9,9) if you can understand what I'm getting at, you are probably fit for the job.


Battle Algorithm
Another type of algorithm I need are battle algorithms.

Here's a battle algorithm I modified from the one in sengoku rance:

HP modifier: (HP-500)/2+500
Atk modifier: (((base atk+ boost atk)*20)-((enemy base def+enemy boost def)*16))/100
Technique modifier: depends on skill

a character with 1000 hp with 7 atk and using a normal technique (x1 dmg) attacks a guy with 7 def with no boost will deal

dmg = ((1000-500)/2+500)*((((7+0)*20)-((7+0)*16))/100)*1
=750*0.28*1
=210 dmg

No comments:

Post a Comment