(no commit message)
[asgard.git] / docs / reqs / rpg_rev0.1.0.txt
bloba2aaa54a4cf20e90cdabb74072136bfba3061dd4
1 Fighter
2 =================
3 This object represents playable and non-playable battle participants.
5         -name: string
6         Name of the fighter.  Let's keep it down to 15 characters.
7         
8         -hp: int
9         Health Points.  No more than 1,000,000.
11         -strength: int
12         Affects "Attack" events.  Fall between 1 and 255.
14         -dexterity: int
15         Affects "Evasion."  Falls between 1 and 255.
17         -timeOfMove: int
18         Time that the Fighter gets to move next.
20         -playable: boolean
21         Whether the user get to decide this Fighter course of action or not.
23         +getName(): string
24         +setName(name:string): void
25         +getHp(): int
26         +setHp(hp:int): void
27         +getStrength(): int
28         +setStrength(str:int): void
29         +getDexterity(): int
30         +setDexterity(dex:int): void
32         +getAttack(): int
33                 Computes attack statistic, taking into account all modifiers.
35         +getDefense(): int
36                 Computes defense statistic, taking into account all modifiers.
37         
38         +getEvade(): int
39                 Computes evasde statistic, taking into account all modifiers.
41         +makeEvent(enemy: Party, currentTime: int): Event
42                 If the Fighter is playable.  An event selection menu is displayed, and an event type is selected from the user.  If the Fighter is not playable, a random enemy (alive) from the enemy party is selected.  An event type is then selected (at the moment "Attack" is the only type) from the list returned from getEventTypes().   Finally an Event is constructed and returned.
44                 Return the None object if the Fighter is not ready to move.
46         +isAlive(): boolean
47                 Return true if hp is greater than 0, false otherwise.
49         +getEventTypes(): string[]
50                 Return a list of event types available to this player.  (Currently only return Attack)