Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2018-05-26 16:22:53

Fotomac
Member
Registered: 2015-10-25
Post 315/332

Two to Five Attacks Effect

How do you alter the chance of it hitting 2, 3, 4, or 5 times? Because I was thinking of doing so for the latest update to my hack.

Offline

#2 2018-05-28 21:22:07

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 447/450
Website

Offline

#3 2018-06-02 00:48:16

Fotomac
Member
Registered: 2015-10-25
Post 316/332

Re: Two to Five Attacks Effect

I should like to be more specific. I want it to have a 33.3% chance of hitting 2 times, a 33.3% chance of hitting 3 times, a 16.7% chance of hitting 4 times, and a 16.7% chance of hitting 5 times, as it has been since Gen V.

Offline

#4 2018-06-02 22:56:46

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 448/450
Website

Re: Two to Five Attacks Effect

Fotomac wrote:

I should like to be more specific. I want it to have a 33.3% chance of hitting 2 times, a 33.3% chance of hitting 3 times, a 16.7% chance of hitting 4 times, and a 16.7% chance of hitting 5 times, as it has been since Gen V.

That's how it works already.

Offline

#5 2018-06-03 02:06:37

Fotomac
Member
Registered: 2015-10-25
Post 317/332

Re: Two to Five Attacks Effect

Actually, the ratio is kind of different. Before Gen V, each chance was 37.5%, 37.5%, 12.5%, and 12.5%, respectively.

Offline

#6 2018-06-03 10:22:22

Crystal_
Member
From: Spain
Registered: 2012-09-16
Post 449/450
Website

Re: Two to Five Attacks Effect

My bad, replace these lines:

call BattleRandom
and $3
cp $2
jr c, .gotNumHits
; if the number of hits was greater than 2, re-roll again for a lower chance
call BattleRandom
and $3
.gotNumHits
inc a
inc a

with:

  call BattleRandom
  ld h, 2
  cp 33 percent + 1
  jr c, .saveNumberOfHits_
  inc h
  cp 67 percent - 1
  jr c, .saveNumberOfHits_
  inc h
  cp 83 percent + 1
  jr c, .saveNumberOfHits_
  inc h
.saveNumberOfHits_
  ld a, h

Last edited by Crystal_ (2018-06-03 10:22:52)

Offline

Board footer

Powered by FluxBB