Calculate multiple-hit per turn moves

This commit is contained in:
Kyle Coburn 2015-04-07 11:47:03 -07:00
parent d735fb8008
commit 029db5e8f2
2 changed files with 6 additions and 1 deletions

View File

@ -89,6 +89,9 @@ local function calcDamage(move, attacker, defender, rng)
typeEffect2 = 1
end
damage = floor(damage * typeEffect1 * typeEffect2)
if move.multiple then
damage = damage * move.multiple
end
if rng then
return damage, damage
end
@ -342,7 +345,7 @@ function Combat.inKillRange(draw)
if isConfused then
hpReq = hpReq + math.floor(ours.hp * 0.2)
end
if ours.hp < hpReq then
if ours.hp <= hpReq then
local outspeed = enemyAttack.outspeed
if outspeed and outspeed ~= true then
outspeed = Memory.value("battle", "turns") > 0

View File

@ -218,6 +218,7 @@ local moves = {
power = 30,
max_pp = 30,
accuracy = 100,
multiple = 2,
},
{
name = 'Mega-Kick',
@ -282,6 +283,7 @@ local moves = {
power = 15,
max_pp = 20,
accuracy = 85,
multiple = 2,
},
{
name = 'Horn-Drill',