... | ... | @@ -104,10 +104,15 @@ class Game { |
|
|
}
|
|
|
|
|
|
class Player {
|
|
|
- name: String
|
|
|
- pokemons: List<Pokemon>
|
|
|
+ choosePokemon(pokemon: Pokemon)
|
|
|
+ battle(opponent: Pokemon)
|
|
|
- itsName: String
|
|
|
- itsLevel: float
|
|
|
- itsDx: int
|
|
|
- itsDy: int
|
|
|
- itsX: int
|
|
|
- itsY: int
|
|
|
+ Player(x: int, y: int)
|
|
|
+ move(dX: int, dY: int): void
|
|
|
+ updateSprit(dX: int, dY: int): void
|
|
|
}
|
|
|
|
|
|
class Pokemon {
|
... | ... | @@ -115,19 +120,22 @@ class Pokemon { |
|
|
- type: PKType
|
|
|
- health: int
|
|
|
- level: int
|
|
|
- attacks: List<Attack>
|
|
|
+ attack(target: Pokemon, attack: Attack)
|
|
|
- attacks: List<Move>
|
|
|
+ move(target: Pokemon, move: Move)
|
|
|
+ takeDamage(damage: int)
|
|
|
}
|
|
|
|
|
|
class PKType {
|
|
|
- typeName: String
|
|
|
enum PKTYPE {
|
|
|
}
|
|
|
|
|
|
enum MOVENATURE {
|
|
|
}
|
|
|
|
|
|
class Attack {
|
|
|
class Move {
|
|
|
- name: String
|
|
|
- type: PKType
|
|
|
- power: int
|
|
|
- type: PKTYPE
|
|
|
- nature : MOVENATURE
|
|
|
+ execute(target: Pokemon)
|
|
|
}
|
|
|
|
... | ... | @@ -146,14 +154,13 @@ class Screen { |
|
|
|
|
|
class Model {
|
|
|
- data: Data
|
|
|
- save: Save
|
|
|
+ loadGame()
|
|
|
+ saveGame()
|
|
|
}
|
|
|
|
|
|
class Data {
|
|
|
+ getPokemonData(name: String): Pokemon
|
|
|
+ getAttackData(name: String): Attack
|
|
|
+ getMoveData(name: String): Move
|
|
|
}
|
|
|
|
|
|
class Map {
|
... | ... | @@ -181,8 +188,9 @@ Player --> Pokemon |
|
|
Combat --> Player
|
|
|
Combat --> Pokemon
|
|
|
Pokemon --> PKType
|
|
|
Pokemon --> Attack
|
|
|
Attack --> PKType
|
|
|
Pokemon --> Move
|
|
|
Move --> PKTYPE
|
|
|
Move --> MOVENATURE
|
|
|
Map --> Screen
|
|
|
GUI --> Game
|
|
|
Screen --> GUI
|
... | ... | |