Lineage Justice
Spells & Skills
Lookup and validate skills and spells.
|
HolyWeapon
|
MP:
|
10
|
HP:
|
0
|
Item:
|
None
|
Amount:
|
N/A
|
Duration:
|
1200
|
Skill Type:
|
Change
|
Delay:
|
10
|
Cast Invis:
|
Yes
|
Ignores CM:
|
Yes
|
Element:
|
None
|
Range:
|
20
|
Area:
|
N/A
|
Dmg Value:
|
0.0
|
Dmg Dice:
|
0
|
Dice Count:
|
0
|
Prob Value:
|
0
|
Prob Dice:
|
0
|
Prob Max:
|
N/A
|
L1SkillUse Execution:
if (_skillId == HOLY_WEAPON
|| _skillId == BLESS_WEAPON) {
if (!(cha instanceof L1PcInstance)) {
return;
}
L1PcInstance pc = (L1PcInstance) cha;
if (pc.getWeapon() == null) {
pc.sendPackets(new S_ServerMessage(79)); // Nothing happened.
return;
}
for (L1ItemInstance item : pc.getInventory().getItems()) {
if (pc.getWeapon().equals(item)) {
pc.sendPackets(new S_ServerMessage(161, item
.getLogName(), "$245", "$247")); // your 'item' glows 'blue' for a 'moment'.
item.setSkillWeaponEnchant(pc, _skillId,
_skill.getBuffDuration() * 1000);
return;
}
}
}
L1ItemInstance Effect:
public void setSkillWeaponEnchant(L1PcInstance pc, int skillId,
int skillTime) {
if (getItem().getType2() != 1) {
return;
}
if (_isRunning) {
_timer.cancel();
setDmgByMagic(0);
setHolyDmgByMagic(0);
setHitByMagic(0);
_isRunning = false;
_timer = null;
}
switch (skillId) {
case HOLY_WEAPON:
setHolyDmgByMagic(1);
setHitByMagic(1);
break;
case ENCHANT_WEAPON:
setDmgByMagic(2);
break;
case BLESS_WEAPON:
setDmgByMagic(2);
setHitByMagic(2);
break;
case SHADOW_FANG:
setDmgByMagic(5);
break;
default:
break;
}
_pc = pc;
_timer = new EnchantTimer();
(new Timer()).schedule(_timer, skillTime);
_isRunning = true;
}