Lineage Justice
Spells & Skills
Lookup and validate skills and spells.
|
ThunderGrab
|
MP:
|
0
|
HP:
|
35
|
Item:
|
None
|
Amount:
|
N/A
|
Duration:
|
3
|
Skill Type:
|
Attack
|
Delay:
|
4000
|
Cast Invis:
|
No
|
Ignores CM:
|
No
|
Element:
|
Wind
|
Range:
|
8
|
Area:
|
N/A
|
Dmg Value:
|
40.0
|
Dmg Dice:
|
8
|
Dice Count:
|
5
|
Prob Value:
|
35
|
Prob Dice:
|
0
|
Prob Max:
|
50
|
L1SkillUse Execution:
if (_skill.getType() == L1Skill.TYPE_ATTACK
&& _user.getId() != cha.getId()) {
if (_user instanceof L1PcInstance) {
((L1PcInstance)_user).setLastAggressiveAct();
}
if (isUseCounterMagic(cha)) {
iter.remove();
if(cha instanceof L1PcInstance && _user instanceof L1PcInstance) {
L1PcInstance target = (L1PcInstance) cha;
((L1PcInstance) _user)._pinkName.onAction(target);
}
continue;
}
dmg = _magic.calcMagicDamage(_skillId);
_dmg = dmg;
if(_skillId != TRIPLE_ARROW)
cha.removeSkillEffect(ERASE_MAGIC);
}
L1Magic Calculation:
public int calcMagicDamage(int skillId) {
int damage = 0;
if (_calcType == PC_PC || _calcType == NPC_PC) {
damage = calcPcMagicDamage(skillId);
} else if (_calcType == PC_NPC || _calcType == NPC_NPC) {
damage = calcNpcMagicDamage(skillId);
}
damage = calcMrDefense(damage);
damage = calcExceptionMagicDamage(skillId, damage);
if (_calcType == PC_NPC && _pc.getDmgMessages()) {
_pc.sendPackets(new S_SystemMessage(L1NamedSkill.getName(skillId)
+ " Dealt:" + String.valueOf(damage)));
}
return damage;
}
L1SkillUse Execution:
if (_skillId == THUNDER_GRAB) {
boolean hitsTarget = _magic.calcProbabilityMagic(_skillId);
RandomGenerator random = RandomGeneratorFactory
.getSharedRandom();
if(hitsTarget && !(cha.hasSkillEffect(STATUS_HOLD))) {
int durationCalculator = random.nextInt(400);
int time = 0;
if(durationCalculator >= 335) {
time = 4000; // 16% chance for 4 second
} else if(durationCalculator >= 210) {
time = 3000; // 32% chance for 3 second
} else if(durationCalculator >= 80) {
time = 2000; // 31% chance for 2 second
} else {
time = 1000; // 20% chance for 1 second
}
L1EffectSpawn.getInstance().spawnEffect(81182, time,
cha.getX(), cha.getY(), cha.getMapId());
if (cha instanceof L1PcInstance) {
L1PcInstance targetPc = (L1PcInstance) cha;
targetPc.setSkillEffect(STATUS_FREEZE, time);
targetPc.sendPackets(new S_SkillSound(targetPc
.getId(), 4184));
targetPc.broadcastPacket(new S_SkillSound(targetPc
.getId(), 4184));
targetPc.sendPackets(new S_Paralysis(
S_Paralysis.TYPE_BIND, true));
} else if (cha instanceof L1MonsterInstance
|| cha instanceof L1SummonInstance
|| cha instanceof L1PetInstance) {
L1NpcInstance npc = (L1NpcInstance) cha;
npc.setSkillEffect(STATUS_HOLD, time);
npc.broadcastPacket(new S_SkillSound(npc.getId(),
4184));
npc.setParalyzed(true);
}
}
}