Lineage Justice

Spells & Skills

Lookup and validate skills and spells.

CubeQuake
MP: 35 HP: 0 Item: 49156 Amount: 1 Duration: 21 Skill Type: Change
Delay: 5000 Cast Invis: No Ignores CM: No Element: None Range: N/A Area: 3
Dmg Value: 0.0 Dmg Dice: 0 Dice Count: 0 Prob Value: 0 Prob Dice: 0 Prob Max: N/A
L1SkillUse Execution:

private void handleCube() {
	int xPlus = 0;
	int yPlus = 0;
	int head = _user.getHeading();
	if (head % 4 == 0) {
		xPlus = 0;
	} else if (head / 4 == 0) {
		xPlus = 1;
	} else {
		xPlus = -1;
	}
	head = (head + 2) % 8;
	if (head % 4 == 0) {
		yPlus = 0;
	} else if (head / 4 == 0) {
		yPlus = -1;
	} else {
		yPlus = 1;
	}
	if (!_user.getMap().isPassable(_targetX + xPlus, _targetY + yPlus)) {
		xPlus = 0;
		yPlus = 0;
	}
	int effect = 0;
	switch (_skillId) {
	case CUBE_IGNITION:
		effect = 80149;
		break;
	case CUBE_QUAKE:
		effect = 80150;
		break;
	case CUBE_SHOCK:
		effect = 80151;
		break;
	case CUBE_BALANCE:
		effect = 80152;
		break;
	}
	L1EffectSpawn.getInstance().spawnEffect(effect,
			_skill.getBuffDuration() * 1000, _targetX + xPlus,
			_targetY + yPlus, _user.getMapId(), (L1PcInstance) _user,
			_skillId);
}