I finally added the weapon’s accuracy into the battle calculation formula so you or the monster (but I haven’t made the monster fight back yet…) can miss when attacking. Simply added one line: if (Math.floor(Math.random()*100) > (acc-1)) dmg = 0; This is if acc is a number from 0 to 100, 100 being sure to [...]

Sean Madigan is a Senior at Towson University majoring in Computer Science, currently working on a social adaption of the Pokemon franchise integrated into the Facebook platform.