Lineage Justice
Spells & Skills
Lookup and validate skills and spells.
|
ProtectionFromElemental
|
MP:
|
6
|
HP:
|
0
|
Item:
|
40319
|
Amount:
|
1
|
Duration:
|
64
|
Skill Type:
|
Change
|
Delay:
|
0
|
Cast Invis:
|
Yes
|
Ignores CM:
|
Yes
|
Element:
|
None
|
Range:
|
N/A
|
Area:
|
N/A
|
Dmg Value:
|
0.0
|
Dmg Dice:
|
0
|
Dice Count:
|
0
|
Prob Value:
|
0
|
Prob Dice:
|
0
|
Prob Max:
|
N/A
|
Add Effect:
private static final int ELEMENTUP = 50;
@Override
public void addEffect(L1Character user, L1Character target,
int durationSeconds) {
if (target instanceof L1PcInstance) {
L1PcInstance pc = (L1PcInstance) target;
int attr = pc.getElfAttr();
if (attr == Element.Earth) {
pc.addEarth(ELEMENTUP);
} else if (attr == Element.Fire) {
pc.addFire(ELEMENTUP);
} else if (attr == Element.Water) {
pc.addWater(ELEMENTUP);
} else if (attr == Element.Wind) {
pc.addWind(ELEMENTUP);
}
pc.sendPackets(new S_OwnCharAttrDef(pc));
}
}
Remove Effect:
private static final int ELEMENTUP = 50;
@Override
public void addEffect(L1Character user, L1Character target,
int durationSeconds) {
if (target instanceof L1PcInstance) {
L1PcInstance pc = (L1PcInstance) target;
int attr = pc.getElfAttr();
if (attr == Element.Earth) {
pc.addEarth(-ELEMENTUP);
} else if (attr == Element.Fire) {
pc.addFire(-ELEMENTUP);
} else if (attr == Element.Water) {
pc.addWater(-ELEMENTUP);
} else if (attr == Element.Wind) {
pc.addWind(-ELEMENTUP);
}
pc.sendPackets(new S_OwnCharAttrDef(pc));
}
}