Tidied up semicolon use, refactored random dungeon generation code, fixed visual bug in Day Care debug screen

This commit is contained in:
Maruno17
2021-08-22 23:18:34 +01:00
parent ecc5a040cd
commit 8bb70a226e
64 changed files with 1286 additions and 926 deletions

View File

@@ -541,10 +541,13 @@ def pbHeadbuttEffect(event=nil)
a = (event.x+(event.x/24).floor+1)*(event.y+(event.y/24).floor+1)
a = (a*2/5)%10 # Even 2x as likely as odd, 0 is 1.5x as likely as odd
b = $Trainer.public_ID % 10 # Practically equal odds of each value
chance = 1 # ~50%
if a==b; chance = 8 # 10%
elsif a>b && (a-b).abs<5; chance = 5 # ~30.3%
elsif a<b && (a-b).abs>5; chance = 5 # ~9.7%
chance = 1 # ~50%
if a==b # 10%
chance = 8
elsif a>b && (a-b).abs<5 # ~30.3%
chance = 5
elsif a<b && (a-b).abs>5 # ~9.7%
chance = 5
end
if rand(10)>=chance
pbMessage(_INTL("Nope. Nothing..."))