... | ... | @@ -96,9 +96,10 @@ left to right direction |
|
|
class Game {
|
|
|
- screen: Screen
|
|
|
- player: Player
|
|
|
- combat: Combat
|
|
|
- battle: Battle
|
|
|
- model: Model
|
|
|
- map: Map
|
|
|
- gui: GUI
|
|
|
+ startGame()
|
|
|
+ endGame()
|
|
|
}
|
... | ... | @@ -110,20 +111,23 @@ class Player { |
|
|
- itsDy: int
|
|
|
- itsX: int
|
|
|
- itsY: int
|
|
|
- team: List<Pokemon>
|
|
|
+ Player(x: int, y: int)
|
|
|
+ move(dX: int, dY: int): void
|
|
|
+ updateSprit(dX: int, dY: int): void
|
|
|
+ updateSprite(dX: int, dY: int): void
|
|
|
+ addPokemon(pokemon: Pokemon): void
|
|
|
+ removePokemon(pokemon: Pokemon): void
|
|
|
}
|
|
|
|
|
|
class Pokemon {
|
|
|
- itsName: String
|
|
|
- itsType: PKType
|
|
|
- itsType: PKTYPE
|
|
|
- itsHealth: int
|
|
|
- itsSpeed: int
|
|
|
- itsAtk: int
|
|
|
- itsSpeatk: int
|
|
|
- itsSpAtk: int
|
|
|
- itsDef: int
|
|
|
- itsSpedef: int
|
|
|
- itsSpDef: int
|
|
|
- itsLevel: int
|
|
|
- moves: List<Move>
|
|
|
+ executeMove(target: Pokemon, move: Move)
|
... | ... | @@ -147,11 +151,13 @@ class Move { |
|
|
+ execute(target: Pokemon)
|
|
|
}
|
|
|
|
|
|
class Combat {
|
|
|
class Battle {
|
|
|
- player: Player
|
|
|
- opponent: Pokemon
|
|
|
- isBossBattle: boolean
|
|
|
+ startBattle()
|
|
|
+ endBattle()
|
|
|
+ chooseMove(move: Move): void
|
|
|
}
|
|
|
|
|
|
class Screen {
|
... | ... | @@ -188,15 +194,21 @@ class GUI { |
|
|
+ updateGUI()
|
|
|
}
|
|
|
|
|
|
class BattleHUD {
|
|
|
- attackOptions: List<Move>
|
|
|
+ displayOptions()
|
|
|
+ chooseOption(option: Move)
|
|
|
}
|
|
|
|
|
|
Game --> Screen
|
|
|
Game --> Combat
|
|
|
Game --> Battle
|
|
|
Game --> Model
|
|
|
Game --> Map
|
|
|
Game --> GUI
|
|
|
Model --> Data
|
|
|
Player --> Pokemon
|
|
|
Combat --> Player
|
|
|
Combat --> Pokemon
|
|
|
Battle --> Player
|
|
|
Battle --> Pokemon
|
|
|
Pokemon --> PKTYPE
|
|
|
Pokemon --> Move
|
|
|
Move --> PKTYPE
|
... | ... | @@ -204,4 +216,7 @@ Move --> MOVENATURE |
|
|
Map --> Screen
|
|
|
GUI --> Game
|
|
|
Screen --> GUI
|
|
|
Screen --> BattleHUD
|
|
|
Battle --> Move
|
|
|
BattleHUD --> Combat
|
|
|
``` |
|
|
\ No newline at end of file |