2016-09-07 18:50:38 +02:00
Public Class BattleGrowStatsScreen
Inherits Screen
Dim mainTexture As Texture2D
Dim newMaxHP As Integer = 0
Dim newAttack As Integer = 0
Dim newDefense As Integer = 0
Dim newSpDefense As Integer = 0
Dim newSpAttack As Integer = 0
Dim newSpeed As Integer = 0
Dim Delay As Single = 0 . 0F
Dim Pokemon As Pokemon = Nothing
Dim OldStats ( ) As Integer
Public Sub New ( ByVal currentScreen As Screen , ByVal p As Pokemon , ByVal OldStats ( ) As Integer )
Me . mainTexture = TextureManager . GetTexture ( " GUI\Menus\Menu " )
Me . PreScreen = currentScreen
Me . Identification = Identifications . BattleGrowStatsScreen
newMaxHP = p . MaxHP - OldStats ( 0 )
newAttack = p . Attack - OldStats ( 1 )
newDefense = p . Defense - OldStats ( 2 )
newSpAttack = p . SpAttack - OldStats ( 3 )
newSpDefense = p . SpDefense - OldStats ( 4 )
newSpeed = p . Speed - OldStats ( 5 )
Me . Pokemon = p
Me . OldStats = OldStats
End Sub
Public Overrides Sub Draw ( )
PreScreen . Draw ( )
Dim p As New Vector2 ( Core . windowSize . Width - ( 544 ) , 32 )
2016-10-06 19:42:31 +02:00
Canvas . DrawImageBorder ( TextureManager . GetTexture ( mainTexture , New Rectangle ( 0 , 0 , 48 , 48 ) ) , 2 , New Rectangle ( CInt ( p . X ) , CInt ( p . Y ) , 480 , 352 ) )
2018-05-03 04:58:10 +02:00
Dim pokeTexture = Pokemon . GetMenuTexture ( )
Core . SpriteBatch . Draw ( pokeTexture , New Rectangle ( CInt ( p . X + 20 ) , CInt ( p . Y + 20 ) , pokeTexture . Width * 2 , 64 ) , Color . White )
2016-09-07 18:50:38 +02:00
Core . SpriteBatch . DrawString ( FontManager . InGameFont , Pokemon . GetDisplayName ( ) , New Vector2 ( p . X + 90 , p . Y + 32 ) , Color . Black )
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " reached level " & Pokemon . Level & " ! " , New Vector2 ( p . X + 90 + FontManager . InGameFont . MeasureString ( Pokemon . GetDisplayName ( ) ) . X , p . Y + 41 ) , Color . Black )
If Delay >= 3 . 0F Then
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " Max HP: " & OldStats ( 0 ) . ToString ( ) , New Vector2 ( p . X + 32 , p . Y + 84 ) , Color . Black )
2017-01-22 00:01:31 +01:00
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " Attack: " & OldStats ( 1 ) . ToString ( ) , New Vector2 ( p . X + 32 , p . Y + 124 ) , Color . Black )
2016-09-07 18:50:38 +02:00
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " Defense: " & OldStats ( 2 ) . ToString ( ) , New Vector2 ( p . X + 32 , p . Y + 164 ) , Color . Black )
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " Sp Attack: " & OldStats ( 3 ) . ToString ( ) , New Vector2 ( p . X + 32 , p . Y + 204 ) , Color . Black )
2017-01-22 00:01:31 +01:00
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " Sp Defense: " & OldStats ( 4 ) . ToString ( ) , New Vector2 ( p . X + 32 , p . Y + 244 ) , Color . Black )
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " Speed: " & OldStats ( 5 ) . ToString ( ) , New Vector2 ( p . X + 32 , p . Y + 284 ) , Color . Black )
2016-09-07 18:50:38 +02:00
End If
If Delay >= 5 . 0F Then
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " + " & newMaxHP , New Vector2 ( p . X + 200 , p . Y + 84 ) , Color . Black )
End If
If Delay >= 5 . 5F Then
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " + " & newAttack , New Vector2 ( p . X + 200 , p . Y + 124 ) , Color . Black )
End If
If Delay >= 6 . 0F Then
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " + " & newDefense , New Vector2 ( p . X + 200 , p . Y + 164 ) , Color . Black )
End If
If Delay >= 6 . 5F Then
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " + " & newSpAttack , New Vector2 ( p . X + 200 , p . Y + 204 ) , Color . Black )
End If
If Delay >= 7 . 0F Then
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " + " & newSpDefense , New Vector2 ( p . X + 200 , p . Y + 244 ) , Color . Black )
End If
If Delay >= 7 . 5F Then
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " + " & newSpeed , New Vector2 ( p . X + 200 , p . Y + 284 ) , Color . Black )
End If
If Delay >= 9 . 0F Then
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " = " & Pokemon . MaxHP , New Vector2 ( p . X + 252 , p . Y + 84 ) , Color . Black )
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " = " & Pokemon . Attack , New Vector2 ( p . X + 252 , p . Y + 124 ) , Color . Black )
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " = " & Pokemon . Defense , New Vector2 ( p . X + 252 , p . Y + 164 ) , Color . Black )
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " = " & Pokemon . SpAttack , New Vector2 ( p . X + 252 , p . Y + 204 ) , Color . Black )
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " = " & Pokemon . SpDefense , New Vector2 ( p . X + 252 , p . Y + 244 ) , Color . Black )
Core . SpriteBatch . DrawString ( FontManager . MiniFont , " = " & Pokemon . Speed , New Vector2 ( p . X + 252 , p . Y + 284 ) , Color . Black )
End If
If Delay >= 11 . 0F Then
Dim newStat As Integer = 0
newStat = newAttack + newDefense + newSpAttack + newMaxHP + newSpDefense + newSpeed
Core . SpriteBatch . DrawString ( FontManager . MiniFont , Pokemon . GetDisplayName ( ) & " got a boost of " & newStat . ToString ( ) & " ! " , New Vector2 ( p . X + 32 , p . Y + 320 ) , Color . DarkRed )
End If
End Sub
Public Overrides Sub Update ( )
Delay += 0 . 1F
If Controls . Accept ( ) = True Then
If Delay >= 13 . 0F Then
Fix audio engine & contentpacks (#35)
* Replaced existing Gen 2 SFX with better sounding ones (no ugly reverb)
Replaced MediaPlayer with NAudio(and NAudio.Vorbis) for playing music in order to fix random stopping issues.
The game now directly loads .ogg files instead of the .wma/.xnb combination from before.
ContentPacks are now able to replace Music and SFX again (I haven't added a menu yet for choosing ContentPacks).
To make older GameModes work with current versions, you can add the GameMode property EnterType and set it to "1", this will make the game use the older 2D NewGameScreen.
* Delete GameController.vb
* Add gamecontroller.vb back
* Fix sfx missing
* Battleintro doodle now doesn't loop anymore (for no trainer)
Changed the shutter sound (aka Large Door sound) to something more large door-y
Made the enter sound slightly louder
The enter sound now plays when going through any warp to or from an indoor map (including falling through holes)
The flying sound effect is played earlier in the animation after selecting a location
Changed played sound effect when using the Escape Rope to "teleport" instead of "destroy"
The bump noise now also plays when bumping into something in first person
Fixed small gap between the end of the intro song and the start of the main song
Replaced some songs with better songs
* Fixed some more intro issues
* Forgot to change a thing
* Fixed an error where the main music would play, ignoring the muted musicmanager.
* fix indenting in musicmanager
* The music player will now only start playback on a new song if the music player is not muted, fixed the end time calculation of the intro of a song after muting, Music can't be unmuted now as long as a sound effect plays that stops the music.
* Fixed league restplace position, fixed sound effects sharing the volume slider of the music, sound effects are now also muted when pressing M, changed music on/off popup to audio on/off, removed bump delay in first person, added more control on whether played songs should be looping or not.
* Fixed some more scripts that turn on thirdperson mode but don't check if it was on before or set it back to what it was before afterwards, also fixed a small error in creditsscreen.vb.
* Fixed indenting error in musicmanager.vb, fixed an error of mine where the loopsong parameter would be seen as the playintro parameter.
* Added more music commands, added quite some menu select noises, will add more later
* More select sound effects!
* Fix music not resuming after soundeffect
* Trainer using item now plays the single_heal soundeffect
* Pokémon cries now sound louder
* Possibly fixing crash when playing Pokémon cry at volume higher than 0.71
* Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720.
* Sound effects now sound louder
* Revert "Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720."
This reverts commit 8c9296ed1a82144d17f303a52c3f2e9e65a5bfea.
* Fixed the cause of why the title screen music plays even when the game is muted
* Tabs to spaces
* Revert
Co-authored-by: darkfire006 <blazer257@live.com>
Co-authored-by: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com>
Co-authored-by: JappaWakkaP3D <jasper.speelman@outlook.com>
Co-authored-by: Vitaly Mikhailov <personal@aragas.org>
2020-07-09 19:59:42 +02:00
SoundManager . PlaySound ( " select " )
2016-09-07 18:50:38 +02:00
Core . SetScreen ( Me . PreScreen )
End If
End If
End Sub
End Class