boost(int,Modifier,int)
last analyzed

Size

Total Lines 1
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 1
ccs 0
cts 0
cp 0
c 0
b 0
f 0
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.spell.boost;
21
22
import fr.quatrevieux.araknemu.game.spell.Spell;
23
24
import java.util.Collection;
25
26
/**
27
 * Handle spells boosts effects
28
 */
29
public interface SpellsBoosts {
30 1
    public static enum Modifier {
31 1
        RANGE(281),
32 1
        MODIFIABLE_RANGE(282),
33 1
        DAMAGE(283),
34 1
        HEAL(284),
35 1
        AP_COST(285),
36 1
        REDUCE_DELAY(286),
37 1
        CRITICAL(287),
38 1
        LAUNCH_LINE(288),
39 1
        LINE_OF_SIGHT(289),
40 1
        LAUNCH_PER_TURN(290),
41 1
        LAUNCH_PER_TARGET(291),
42 1
        SET_DELAY(292),
43 1
        BASE_DAMAGE(293);
44
45
        private final int effectId;
46
47 1
        Modifier(int effectId) {
48 1
            this.effectId = effectId;
49 1
        }
50
51
        public int effectId() {
52 1
            return effectId;
53
        }
54
    }
55
56
    /**
57
     * Boost the spell
58
     *
59
     * @param spellId The spell to boost
60
     * @param modifier The effect modifier
61
     * @param value The boosted value
62
     *
63
     * @return The new boosted value
64
     */
65
    public int boost(int spellId, Modifier modifier, int value);
66
67
    /**
68
     * Set the modifier value
69
     *
70
     * @param spellId The spell to modify
71
     * @param modifier The spell modifier
72
     * @param value The new value
73
     *
74
     * @return The new value
75
     */
76
    public int set(int spellId, Modifier modifier, int value);
77
78
    /**
79
     * Remove the modifier
80
     *
81
     * @param spellId Spell
82
     * @param modifier The modifier
83
     */
84
    public void unset(int spellId, Modifier modifier);
85
86
    /**
87
     * Get spell modifiers for the spell id
88
     *
89
     * @param spellId The spell to check
90
     */
91
    public SpellModifiers modifiers(int spellId);
92
93
    /**
94
     * Get the boosted spell
95
     *
96
     * @param spell spell to boost
97
     */
98
    public Spell get(Spell spell);
99
100
    /**
101
     * Get all spells modifiers
102
     */
103
    public Collection<SpellModifiers> all();
104
}
105