Ember, on the other hand, deals out 60 damage to those that aren't resistant to fire type moves. However, Squirtle is resistant to fire type moves, so therefor, Squirtle will only take half the damage of Ember, which will result in Ember only doing 30 damage to Squirtle.

when an attack is not very effective it does half its base damage to the opponent. Causing ember to only do 30 base damage. Also, scratch has a high critical hit ratio making triple damage a possibility. 40 X 3 = 120 base damage. Scratch is the more effective move in this situation. In the original games pokemon also did not have abilities, so charmander would not gain the 1.3 X bonus from that ability, nor would he gain the 1.15 (?) bonus of using a same type attack.

Ember gets a STAB (same type attack bonus) from a fire type using it. I forget what ember's base attack is, but you take it, multiply it by 1.5 then add that number to the base. Now, any attack that is "not very effective" has the damaged reduced by half. So now you take the damage from ember after STAB, and cut it in half. That is damage done before you factor in defense or special defense. Yes I know I'm a nerd.

Then it would still do 20 points of damage initially, before factoring in the defending Pokemon's Special stat (in the original, special attack and special defense were both taken from the Special stat), since Ember has a base damage of 40 points.