Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
L2j Server Datapack
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
L2j
L2j Server Datapack
Commits
22886dc5
Commit
22886dc5
authored
4 years ago
by
Maneco2
Browse files
Options
Downloads
Patches
Plain Diff
Change format for latest commit
parent
d941b8db
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/com/l2jserver/datapack/ai/individual/NecromancerOfTheValley.java
+10
-20
10 additions, 20 deletions
...server/datapack/ai/individual/NecromancerOfTheValley.java
with
10 additions
and
20 deletions
src/main/java/com/l2jserver/datapack/ai/individual/NecromancerOfTheValley.java
+
10
−
20
View file @
22886dc5
...
...
@@ -31,8 +31,7 @@ import com.l2jserver.gameserver.model.skills.Skill;
* @author Maneco2
* @since 2.6.2.0
*/
public
class
NecromancerOfTheValley
extends
AbstractNpcAI
{
public
class
NecromancerOfTheValley
extends
AbstractNpcAI
{
// NPCs
private
static
final
int
EXPLODING_ORC_GHOST
=
22818
;
private
static
final
int
WRATHFUL_ORC_GHOST
=
22819
;
...
...
@@ -44,8 +43,7 @@ public class NecromancerOfTheValley extends AbstractNpcAI
// Misc
private
static
final
double
HP_PERCENTAGE
=
0.60
;
public
NecromancerOfTheValley
()
{
public
NecromancerOfTheValley
()
{
super
(
NecromancerOfTheValley
.
class
.
getSimpleName
(),
"ai/individual"
);
addAttackId
(
NECROMANCER_OF_THE_VALLEY
);
addSpawnId
(
EXPLODING_ORC_GHOST
);
...
...
@@ -53,12 +51,9 @@ public class NecromancerOfTheValley extends AbstractNpcAI
}
@Override
public
String
onAttack
(
L2Npc
npc
,
L2PcInstance
attacker
,
int
damage
,
boolean
isSummon
)
{
if
(
npc
.
getCurrentHp
()
<
(
npc
.
getMaxHp
()
*
HP_PERCENTAGE
))
{
if
((
getRandom
(
100
)
<
10
)
&&
!
npc
.
getVariables
().
getBoolean
(
MID_HP_FLAG
,
false
))
{
public
String
onAttack
(
L2Npc
npc
,
L2PcInstance
attacker
,
int
damage
,
boolean
isSummon
)
{
if
(
npc
.
getCurrentHp
()
<
(
npc
.
getMaxHp
()
*
HP_PERCENTAGE
))
{
if
((
getRandom
(
100
)
<
10
)
&&
!
npc
.
getVariables
().
getBoolean
(
MID_HP_FLAG
,
false
))
{
npc
.
getVariables
().
set
(
MID_HP_FLAG
,
true
);
addAttackDesire
(
addSpawn
((
getRandomBoolean
()
?
EXPLODING_ORC_GHOST
:
WRATHFUL_ORC_GHOST
),
npc
,
true
),
attacker
);
}
...
...
@@ -67,12 +62,9 @@ public class NecromancerOfTheValley extends AbstractNpcAI
}
@Override
public
String
onSpawn
(
L2Npc
npc
)
{
for
(
L2Character
obj
:
npc
.
getKnownList
().
getKnownCharactersInRadius
(
200
))
{
if
(
obj
.
isPlayer
()
&&
!
obj
.
isDead
())
{
public
String
onSpawn
(
L2Npc
npc
)
{
for
(
L2Character
obj
:
npc
.
getKnownList
().
getKnownCharactersInRadius
(
200
))
{
if
(
obj
.
isPlayer
()
&&
!
obj
.
isDead
())
{
addSkillCastDesire
(
npc
,
obj
,
SELF_DESTRUCTION
,
1000000L
);
}
}
...
...
@@ -80,10 +72,8 @@ public class NecromancerOfTheValley extends AbstractNpcAI
}
@Override
public
String
onSpellFinished
(
L2Npc
npc
,
L2PcInstance
player
,
Skill
skill
)
{
if
((
skill
==
SELF_DESTRUCTION
.
getSkill
())
&&
(
npc
!=
null
)
&&
!
npc
.
isDead
())
{
public
String
onSpellFinished
(
L2Npc
npc
,
L2PcInstance
player
,
Skill
skill
)
{
if
((
skill
==
SELF_DESTRUCTION
.
getSkill
())
&&
(
npc
!=
null
)
&&
!
npc
.
isDead
())
{
npc
.
doDie
(
player
);
}
return
super
.
onSpellFinished
(
npc
,
player
,
skill
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment