... | ... | @@ -9,6 +9,9 @@ These instances are "owned" by the Character, and not shared with another Charac |
|
|
But the code of the class Ability only contains the cast/cooldown mechanism and , it does not contain the actual "effects" of the ability. This is where the Effect class comes in.
|
|
|
The instances of the Effect class contain the code that will apply modifications to the gameContent.
|
|
|
|
|
|
## 2) Abilities
|
|
|
|
|
|
|
|
|
## 3) Effects
|
|
|
### a) Definition
|
|
|
Here is the main method of an Effect, which defines a modification of the gameContent:
|
... | ... | @@ -29,6 +32,7 @@ Effects are built using the methods from EffectBuilder and composing them. There |
|
|
* makes a random test that has chances/outOf probability of success. On a success, the character is added to a list l.
|
|
|
* After this loop, the original Event is applied to the list l.
|
|
|
```
|
|
|
So
|
|
|
## 2) How to add an ability to the game
|
|
|
|
|
|
`AbilityKey` is an enum whose members correspond to particular abilities. |
|
|
\ No newline at end of file |