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-2019 Vincent Quatrevieux |
18
|
|
|
*/ |
19
|
|
|
|
20
|
|
|
package fr.quatrevieux.araknemu.game.item.effect.use; |
21
|
|
|
|
22
|
|
|
import fr.quatrevieux.araknemu.game.exploration.ExplorationPlayer; |
23
|
|
|
import fr.quatrevieux.araknemu.game.exploration.map.cell.ExplorationMapCell; |
24
|
|
|
import fr.quatrevieux.araknemu.game.fight.fighter.player.PlayerFighter; |
25
|
|
|
import fr.quatrevieux.araknemu.game.item.effect.UseEffect; |
26
|
|
|
import org.checkerframework.checker.nullness.qual.Nullable; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* Null object for {@link UseEffectHandler} |
30
|
|
|
*/ |
31
|
1 |
|
public final class NullEffectHandler implements UseEffectHandler { |
32
|
1 |
|
public static final UseEffectHandler INSTANCE = new NullEffectHandler(); |
33
|
|
|
|
34
|
|
|
@Override |
35
|
|
|
public void apply(UseEffect effect, ExplorationPlayer caster) { |
36
|
|
|
// No-op method |
37
|
1 |
|
} |
38
|
|
|
|
39
|
|
|
@Override |
40
|
|
|
public boolean checkTarget(UseEffect effect, ExplorationPlayer caster, @Nullable ExplorationPlayer target, @Nullable ExplorationMapCell cell) { |
41
|
1 |
|
return true; |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
@Override |
45
|
|
|
public boolean check(UseEffect effect, ExplorationPlayer caster) { |
46
|
1 |
|
return true; |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
@Override |
50
|
|
|
public boolean checkFighter(UseEffect effect, PlayerFighter fighter) { |
51
|
1 |
|
return true; |
52
|
|
|
} |
53
|
|
|
} |
54
|
|
|
|