Addition of Sayha's Grace.

Contributed by Mode.
This commit is contained in:
MobiusDevelopment
2020-12-20 23:17:20 +00:00
parent b1afeec428
commit 17ff75bfc0
27 changed files with 434 additions and 79 deletions

View File

@@ -90,20 +90,20 @@
<ingredient id="91663" count="50" /> <!-- L-Coin -->
<production id="952" /> <!-- Scroll: Enchant C-grade Armor (Exchangeable) -->
</product>
<!--
<product id="8" category="2">
<ingredient id="91663" count="120" /> L-Coin
<production id="71900" /> Limited Sayha's Blessing (1 Day)
<ingredient id="91663" count="120" /> <!-- L-Coin -->
<production id="71900" /> <!-- Limited Sayha's Blessing (1 Day) -->
</product>
<!--
<product id="9" category="2">
<ingredient id="91663" count="2000" /> L-Coin
<production id="71899" /> Limited Sayha's Blessing (30 Day)
</product>
<product id="11" category="2">
<ingredient id="91663" count="20" /> L-Coin
<production id="91641" /> Sayha's Blessing
</product>
-->
<product id="11" category="2">
<ingredient id="91663" count="20" /> <!-- L-Coin -->
<production id="91641" /> <!-- Sayha's Blessing -->
</product>
<product id="12" category="2">
<ingredient id="91663" count="6" /> <!-- L-Coin -->
<production id="90907" /> <!-- Soulshot Ticket -->

View File

@@ -22,19 +22,6 @@
<schedule name="clanLeaderApply" hour="06" minute="30" dayOfWeek="3">
<event name="#onClanLeaderApply" />
</schedule>
<!-- Schedule the vitality reset task every WEDNESDAY at 6:30 -->
<!-- <schedule name="vitalityReset" hour="06" minute="30" dayOfWeek="3">
<event name="#onVitalityReset" />
</schedule> -->
<!-- Attach condition to reset if server boots up in after 6:30 and hasn't reset yet -->
<!-- <conditionalSchedule>
<run name="reset" if="HASNT_RUN" />
<run name="clanLeaderApply" if="HASNT_RUN" />
<run name="vitalityReset" if="HASNT_RUN" />
</conditionalSchedule> -->
</scheduler>
</event>
</list>

View File

@@ -306,6 +306,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("Root", Root::new);
EffectHandler.getInstance().registerHandler("SacrificeSummon", SacrificeSummon::new);
EffectHandler.getInstance().registerHandler("SafeFallHeight", SafeFallHeight::new);
EffectHandler.getInstance().registerHandler("SayhaGraceSupport", SayhaGraceSupport::new);
EffectHandler.getInstance().registerHandler("SendSystemMessageToClan", SendSystemMessageToClan::new);
EffectHandler.getInstance().registerHandler("ServitorShare", ServitorShare::new);
EffectHandler.getInstance().registerHandler("SetHp", SetHp::new);

View File

@@ -48,7 +48,8 @@ public class SkillConditionMasterHandler
SkillConditionHandler.getInstance().registerHandler("CanUseInBattlefield", CanUseInBattlefieldSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CanUseInDragonLair", CanUseInDragonLairSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CanUseSwoopCannon", CanUseSwoopCannonSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CanUseVitalityConsumeItem", CanUseVitalityConsumeItemSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("HasVitalityPoints", HasVitalityPointsSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CanUseVitalityIncreaseItem", CanUseVitalityIncreaseItemSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CheckLevel", CheckLevelSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("CheckSex", CheckSexSkillCondition::new);
SkillConditionHandler.getInstance().registerHandler("ConsumeBody", ConsumeBodySkillCondition::new);

View File

@@ -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 <http://www.gnu.org/licenses/>.
*/
package handlers.effecthandlers;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
import org.l2jmobius.gameserver.model.skills.Skill;
/**
* @author Mode
*/
public class SayhaGraceSupport extends AbstractEffect
{
public SayhaGraceSupport(StatSet params)
{
}
@Override
public boolean canStart(Creature effector, Creature effected, Skill skill)
{
return (effected != null) && effected.isPlayer();
}
@Override
public boolean isInstant()
{
return true;
}
@Override
public void instant(Creature effector, Creature effected, Skill skill, ItemInstance item)
{
final PlayerInstance player = effected.getActingPlayer();
final double rnd = Rnd.nextDouble() * 100;
if (rnd <= 0.1) // 4h
{
player.setSayhaGraceSupportEndTime(System.currentTimeMillis() + (3600000 * 4));
}
else if (rnd <= 0.3) // 3h
{
player.setSayhaGraceSupportEndTime(System.currentTimeMillis() + (3600000 * 3));
}
else if (rnd <= 0.6) // 2h
{
player.setSayhaGraceSupportEndTime(System.currentTimeMillis() + (3600000 * 2));
}
else if (rnd <= 1.1) // 1h
{
player.setSayhaGraceSupportEndTime(System.currentTimeMillis() + (3600000 * 1));
}
}
}

View File

@@ -16,6 +16,7 @@
*/
package handlers.effecthandlers;
import org.l2jmobius.gameserver.enums.UserInfoType;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.effects.AbstractEffect;
@@ -52,6 +53,8 @@ public class VitalityPointUp extends AbstractEffect
public void instant(Creature effector, Creature effected, Skill skill, ItemInstance item)
{
effected.getActingPlayer().updateVitalityPoints(_value, false, false);
effected.getActingPlayer().sendPacket(new UserInfo(effected.getActingPlayer()));
final UserInfo ui = new UserInfo(effected.getActingPlayer());
ui.addComponentType(UserInfoType.VITA_FAME);
effected.getActingPlayer().sendPacket(ui);
}
}

View File

@@ -0,0 +1,52 @@
/*
* 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 <http://www.gnu.org/licenses/>.
*/
package handlers.skillconditionhandlers;
import org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.WorldObject;
import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
import org.l2jmobius.gameserver.model.actor.stat.PlayerStat;
import org.l2jmobius.gameserver.model.skills.ISkillCondition;
import org.l2jmobius.gameserver.model.skills.Skill;
/**
* @author Mode
*/
public class CanUseVitalityIncreaseItemSkillCondition implements ISkillCondition
{
private final int _amount;
public CanUseVitalityIncreaseItemSkillCondition(StatSet params)
{
_amount = params.getInt("amount");
}
@Override
public boolean canUse(Creature caster, Skill skill, WorldObject target)
{
if (caster.isPlayer())
{
PlayerInstance player = caster.getActingPlayer();
if ((player.getVitalityPoints() + _amount) <= PlayerStat.MAX_VITALITY_POINTS)
{
return true;
}
}
return false;
}
}

View File

@@ -22,15 +22,28 @@ import org.l2jmobius.gameserver.model.actor.Creature;
import org.l2jmobius.gameserver.model.skills.ISkillCondition;
import org.l2jmobius.gameserver.model.skills.Skill;
public class CanUseVitalityConsumeItemSkillCondition implements ISkillCondition
/**
* @author Mode
*/
public class HasVitalityPointsSkillCondition implements ISkillCondition
{
public CanUseVitalityConsumeItemSkillCondition(StatSet params)
private final int _amount;
public HasVitalityPointsSkillCondition(StatSet params)
{
_amount = params.getInt("amount");
}
@Override
public boolean canUse(Creature caster, Skill skill, WorldObject target)
{
return true;
if (caster.isPlayer())
{
if (caster.getActingPlayer().getVitalityPoints() >= _amount)
{
return true;
}
}
return false;
}
}

View File

@@ -404,13 +404,18 @@
<item id="91641" name="Sayha's Blessing" additionalName="Event" type="EtcItem">
<!-- Sayha's Grace points +35,000. -->
<set name="icon" val="icon.etc_wind_potion_i00" />
<set name="default_action" val="SKILL_REDUCE_ON_SKILL_SUCCESS" />
<set name="default_action" val="SKILL_REDUCE" />
<set name="material" val="STEEL" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<set name="is_stackable" val="true" />
<set name="handler" val="ItemSkills" />
<set name="immediate_effect" val="true" />
<skills>
<skill id="39191" level="1" /> <!-- Sayha's Blessing -->
</skills>
</item>
<item id="91642" name="15th Anniversary Gift Box" type="EtcItem">
<!-- Double-click to obtain one of the following items: Manuscript Chest, Dragon Dye Box, Spirit Transformation Scroll - Singer, Transformation Scroll: White Assassin, Rice Cake of Fighting Spirit. -->

View File

@@ -117,18 +117,22 @@
<set name="is_sellable" val="false" />
<set name="is_stackable" val="true" />
</item>
<item id="91712" name="Sayha's Storm Lv. 3" additionalName="Event" type="EtcItem">
<item id="91712" name="Sayha's Storm Lv. 3" type="EtcItem">
<!-- Sayha's Grace points +100%, Acquired XP/ SP +200%. The effect remains after death. Duration: 20 min. Cooldown: 1 min. Available if Sayha's Grace point bar is filled by more than one unit. -->
<set name="icon" val="icon.bm_sayha_storm" />
<set name="default_action" val="SKILL_REDUCE" />
<set name="material" val="STEEL" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_sellable" val="false" />
<set name="is_stackable" val="true" />
<set name="handler" val="ItemSkills" />
<set name="immediate_effect" val="true" />
<skills>
<skill id="51436" level="1" /> <!-- Sayha's Storm Lv. 3 -->
</skills>
</item>
<item id="91713" name="Sayha's Storm Lv. 3" type="EtcItem">
<item id="91713" name="Sayha's Storm Lv. 3 (Exchangeable)" type="EtcItem">
<!-- Sayha's Grace points +100%, Acquired XP/ SP +200%. The effect remains after death. Duration: 20 min. Cooldown: 1 min. Available if Sayha's Grace point bar is filled by more than one unit. -->
<set name="icon" val="icon.bm_sayha_storm" />
<set name="default_action" val="SKILL_REDUCE" />
@@ -136,6 +140,11 @@
<set name="is_dropable" val="false" />
<set name="is_sellable" val="false" />
<set name="is_stackable" val="true" />
<set name="handler" val="ItemSkills" />
<set name="immediate_effect" val="true" />
<skills>
<skill id="51437" level="1" /> <!-- Sayha's Storm Lv. 3 (Exchangeable) -->
</skills>
</item>
<item id="91714" name="Sayha's Summoning Stick" type="EtcItem">
<!-- Randomly summons 1 of the 6 monsters. The killer of that monster receives a certain amount of XP that is not affected by any bonus XP effects. Cooldown: 10 sec. -->

View File

@@ -1878,7 +1878,18 @@
</skill>
<skill id="39191" toLevel="1" name="Sayha's Blessing">
<operateType>A1</operateType>
<reuseDelay>600000</reuseDelay>
<reuseDelay>300</reuseDelay>
<conditions>
<condition name="CanUseVitalityIncreaseItem">
<amount>35000</amount>
</condition>
</conditions>
<effects>
<effect name="SayhaGraceSupport" />
<effect name="VitalityPointUp">
<value>35000</value>
</effect>
</effects>
</skill>
<skill id="39192" toLevel="1" name="Sayha's Silver Light Blessing">
<operateType>A1</operateType>

View File

@@ -198,18 +198,58 @@
<coolTime>500</coolTime>
</skill>
<skill id="51436" toLevel="1" name="Sayha's Storm Lv. 3">
<!-- For 20 min., Momentum Consumption +100%, Acquired XP/ SP +200%. Cooldown: 1 min. The effect remains after death. -->
<!-- For 20 min., Sayha's Grace Consumption +100%%, acquired XP/ SP +200%%. Cooldown: 1 min.\nThe effect remains after death. You can cancel the effect by yourself. -->
<icon>icon.bm_sayha_storm</icon>
<operateType>A1</operateType>
<isMagic>4</isMagic>
<operateType>A2</operateType>
<reuseDelay>60000</reuseDelay>
<abnormalTime>1200</abnormalTime>
<isMagic>4</isMagic>
<stayAfterDeath>true</stayAfterDeath>
<abnormalType>BR_EVENT_BUF6</abnormalType>
<conditions>
<condition name="HasVitalityPoints">
<amount>35000</amount>
</condition>
</conditions>
<effects>
<effect name="SayhaGracePointsRate">
<amount>100</amount>
<mode>PER</mode>
</effect>
<effect name="ExpModify">
<amount>200</amount>
</effect>
<effect name="SpModify">
<amount>200</amount>
</effect>
</effects>
</skill>
<skill id="51437" toLevel="1" name="Sayha's Storm Lv. 3 (Exchangeable)">
<!-- For 20 min., Momentum Consumption +100%, Acquired XP/ SP +200%. Cooldown: 1 min. The effect remains after death. -->
<!-- For 20 min., Sayha's Grace Consumption +100%%, acquired XP/ SP +200%%. Cooldown: 1 min.\nThe effect remains after death. You can cancel the effect by yourself. -->
<icon>icon.bm_sayha_storm</icon>
<operateType>A1</operateType>
<isMagic>4</isMagic>
<operateType>A2</operateType>
<reuseDelay>60000</reuseDelay>
<abnormalTime>1200</abnormalTime>
<isMagic>4</isMagic>
<stayAfterDeath>true</stayAfterDeath>
<abnormalType>BR_EVENT_BUF6</abnormalType>
<conditions>
<condition name="HasVitalityPoints">
<amount>35000</amount>
</condition>
</conditions>
<effects>
<effect name="SayhaGracePointsRate">
<amount>100</amount>
<mode>PER</mode>
</effect>
<effect name="ExpModify">
<amount>200</amount>
</effect>
<effect name="SpModify">
<amount>200</amount>
</effect>
</effects>
</skill>
<skill id="51438" toLevel="1" name="Sayha's Summoning Stick">
<!-- Use it to summon various monsters. -->

View File

@@ -275,6 +275,7 @@ ReuseSkillById: Resets reuse time for the skill with the specific id. (l2jmobius
Root: Stops movement.
SacrificeSummon: Sacrifices the players summon. (l2jmobius)
SafeFallHeight: Minimum falling height for taking damage stat.
SayhaGraceSupport: Set Sayha Grace support end time. (l2jmobius)
SendSystemMessageToClan: Sends the specified SystemMessageId to the clan.
ServitorShare: Servitor share effect.
SetHp: Sets current HP to the given amount.