From c409621c1e52a933ca67c6780a4a1ee04a45889a Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 17 Oct 2022 21:25:50 +0000 Subject: [PATCH] Addition of Primeval Isle Sayha buff. Contributed by petryxa. --- .../ai/areas/PrimevalIsle/SayhaBuff.java | 70 +++++++++++++++++++ .../game/data/stats/skills/50100-50199.xml | 11 +++ .../ai/areas/PrimevalIsle/SayhaBuff.java | 70 +++++++++++++++++++ .../game/data/stats/skills/50100-50199.xml | 11 +++ .../ai/areas/PrimevalIsle/SayhaBuff.java | 70 +++++++++++++++++++ .../game/data/stats/skills/50100-50199.xml | 11 +++ 6 files changed, 243 insertions(+) create mode 100644 L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/PrimevalIsle/SayhaBuff.java create mode 100644 L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/PrimevalIsle/SayhaBuff.java create mode 100644 L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/ai/areas/PrimevalIsle/SayhaBuff.java diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/PrimevalIsle/SayhaBuff.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/PrimevalIsle/SayhaBuff.java new file mode 100644 index 0000000000..d69325466f --- /dev/null +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/scripts/ai/areas/PrimevalIsle/SayhaBuff.java @@ -0,0 +1,70 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package ai.areas.PrimevalIsle; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; + +import ai.AbstractNpcAI; + +/** + * @author petryxa + */ +public class SayhaBuff extends AbstractNpcAI +{ + // NPCs + private static final int[] MONSTERS = + { + 21962, // Wild Strider + 21963, // Elroki + 21964, // Pachycephalosaurus + 21966, // Ornithomimus + 21968, // Ornithomimus + 21969, // Deinonychus + 21971, // Velociraptor + 21974, // Ornithomimus + 21976, // Deinonychus + 21978, // Tyrannosaurus + 22056, // Pachycephalosaurus + 22057, // Strider + 22058, // Ornithomimus + 22059, // Pterosaur + }; + // Skill + private static final SkillHolder BENEFACTION_OF_BLUE_HAWK = new SkillHolder(50123, 1); + + private SayhaBuff() + { + addKillId(MONSTERS); + } + + @Override + public String onKill(Npc npc, Player attacker, boolean isSummon) + { + if (!attacker.isAffectedBySkill(BENEFACTION_OF_BLUE_HAWK)) + { + BENEFACTION_OF_BLUE_HAWK.getSkill().applyEffects(attacker, attacker); + } + return super.onKill(npc, attacker, isSummon); + } + + public static void main(String[] args) + { + new SayhaBuff(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/50100-50199.xml b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/50100-50199.xml index 9d0f87c8bd..004e72453f 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/50100-50199.xml +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/dist/game/data/stats/skills/50100-50199.xml @@ -182,8 +182,19 @@ icon.ev_10th_present1 + 300 A2 4 + 1 + true + SELF + SINGLE + + + -50 + PER + + diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/PrimevalIsle/SayhaBuff.java b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/PrimevalIsle/SayhaBuff.java new file mode 100644 index 0000000000..d69325466f --- /dev/null +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/scripts/ai/areas/PrimevalIsle/SayhaBuff.java @@ -0,0 +1,70 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package ai.areas.PrimevalIsle; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; + +import ai.AbstractNpcAI; + +/** + * @author petryxa + */ +public class SayhaBuff extends AbstractNpcAI +{ + // NPCs + private static final int[] MONSTERS = + { + 21962, // Wild Strider + 21963, // Elroki + 21964, // Pachycephalosaurus + 21966, // Ornithomimus + 21968, // Ornithomimus + 21969, // Deinonychus + 21971, // Velociraptor + 21974, // Ornithomimus + 21976, // Deinonychus + 21978, // Tyrannosaurus + 22056, // Pachycephalosaurus + 22057, // Strider + 22058, // Ornithomimus + 22059, // Pterosaur + }; + // Skill + private static final SkillHolder BENEFACTION_OF_BLUE_HAWK = new SkillHolder(50123, 1); + + private SayhaBuff() + { + addKillId(MONSTERS); + } + + @Override + public String onKill(Npc npc, Player attacker, boolean isSummon) + { + if (!attacker.isAffectedBySkill(BENEFACTION_OF_BLUE_HAWK)) + { + BENEFACTION_OF_BLUE_HAWK.getSkill().applyEffects(attacker, attacker); + } + return super.onKill(npc, attacker, isSummon); + } + + public static void main(String[] args) + { + new SayhaBuff(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/50100-50199.xml b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/50100-50199.xml index 1e057cd73b..1828e66035 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/50100-50199.xml +++ b/L2J_Mobius_Essence_5.2_FrostLord/dist/game/data/stats/skills/50100-50199.xml @@ -182,8 +182,19 @@ icon.ev_10th_present1 + 300 A2 4 + 1 + true + SELF + SINGLE + + + -50 + PER + + diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/ai/areas/PrimevalIsle/SayhaBuff.java b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/ai/areas/PrimevalIsle/SayhaBuff.java new file mode 100644 index 0000000000..d69325466f --- /dev/null +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/scripts/ai/areas/PrimevalIsle/SayhaBuff.java @@ -0,0 +1,70 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package ai.areas.PrimevalIsle; + +import org.l2jmobius.gameserver.model.actor.Npc; +import org.l2jmobius.gameserver.model.actor.Player; +import org.l2jmobius.gameserver.model.holders.SkillHolder; + +import ai.AbstractNpcAI; + +/** + * @author petryxa + */ +public class SayhaBuff extends AbstractNpcAI +{ + // NPCs + private static final int[] MONSTERS = + { + 21962, // Wild Strider + 21963, // Elroki + 21964, // Pachycephalosaurus + 21966, // Ornithomimus + 21968, // Ornithomimus + 21969, // Deinonychus + 21971, // Velociraptor + 21974, // Ornithomimus + 21976, // Deinonychus + 21978, // Tyrannosaurus + 22056, // Pachycephalosaurus + 22057, // Strider + 22058, // Ornithomimus + 22059, // Pterosaur + }; + // Skill + private static final SkillHolder BENEFACTION_OF_BLUE_HAWK = new SkillHolder(50123, 1); + + private SayhaBuff() + { + addKillId(MONSTERS); + } + + @Override + public String onKill(Npc npc, Player attacker, boolean isSummon) + { + if (!attacker.isAffectedBySkill(BENEFACTION_OF_BLUE_HAWK)) + { + BENEFACTION_OF_BLUE_HAWK.getSkill().applyEffects(attacker, attacker); + } + return super.onKill(npc, attacker, isSummon); + } + + public static void main(String[] args) + { + new SayhaBuff(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/50100-50199.xml b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/50100-50199.xml index 9657baaa04..cd732e5067 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/50100-50199.xml +++ b/L2J_Mobius_Essence_6.2_Vanguard/dist/game/data/stats/skills/50100-50199.xml @@ -182,8 +182,19 @@ icon.ev_10th_present1 + 300 A2 4 + 1 + true + SELF + SINGLE + + + -50 + PER + +