1
|
|
|
/* |
2
|
|
|
* This file is part of Araknemu. |
3
|
|
|
* |
4
|
|
|
* Araknemu is free software: you can redistribute it and/or modify |
5
|
|
|
* it under the terms of the GNU Lesser General Public License as published by |
6
|
|
|
* the Free Software Foundation, either version 3 of the License, or |
7
|
|
|
* (at your option) any later version. |
8
|
|
|
* |
9
|
|
|
* Araknemu is distributed in the hope that it will be useful, |
10
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
11
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12
|
|
|
* GNU Lesser General Public License for more details. |
13
|
|
|
* |
14
|
|
|
* You should have received a copy of the GNU Lesser General Public License |
15
|
|
|
* along with Araknemu. If not, see <https://www.gnu.org/licenses/>. |
16
|
|
|
* |
17
|
|
|
* Copyright (c) 2017-2022 Vincent Quatrevieux |
18
|
|
|
*/ |
19
|
|
|
|
20
|
|
|
package fr.quatrevieux.araknemu.game.fight.castable.effect.handler.characteristic; |
21
|
|
|
|
22
|
|
|
import fr.quatrevieux.araknemu.game.fight.Fight; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* Effect handler for steal vitality |
26
|
|
|
* This effect is equivalent to chain {@link AddVitalityHandler} and {@link RemoveVitalityHandler} |
27
|
|
|
* |
28
|
|
|
* @see AlterVitalityHook |
29
|
|
|
* @see AddVitalityHandler |
30
|
|
|
* @see RemoveVitalityHandler |
31
|
|
|
*/ |
32
|
|
|
public final class StealVitalityHandler extends StealCharacteristicHandler { |
33
|
|
|
/** |
34
|
|
|
* @param fight Fight where the handler take effect |
35
|
|
|
* @param addEffectId Spell effect id used as "add vitality" effect |
36
|
|
|
* @param removeEffectId Spell effect id used as "remove vitality" effect |
37
|
|
|
*/ |
38
|
|
|
public StealVitalityHandler(Fight fight, int addEffectId, int removeEffectId) { |
39
|
1 |
|
super( |
40
|
1 |
|
AlterVitalityHook.add(fight), addEffectId, |
41
|
1 |
|
AlterVitalityHook.remove(fight), removeEffectId |
42
|
|
|
); |
43
|
1 |
|
} |
44
|
|
|
} |
45
|
|
|
|