Dimensional Blessing addition.

Contributed by Iris and quangnguyen.
This commit is contained in:
MobiusDevelopment
2019-03-15 13:12:17 +00:00
parent 1d1de7a03b
commit c0184f6233
45 changed files with 1540 additions and 324 deletions

View File

@@ -147,6 +147,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("GetDamageLimit", GetDamageLimit::new);
EffectHandler.getInstance().registerHandler("GetMomentum", GetMomentum::new);
EffectHandler.getInstance().registerHandler("GiveClanReputation", GiveClanReputation::new);
EffectHandler.getInstance().registerHandler("GiveExpAndSp", GiveExpAndSp::new);
EffectHandler.getInstance().registerHandler("GiveFame", GiveFame::new);
EffectHandler.getInstance().registerHandler("GiveRecommendation", GiveRecommendation::new);
EffectHandler.getInstance().registerHandler("GiveSp", GiveSp::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 com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.effects.AbstractEffect;
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
import com.l2jmobius.gameserver.model.skills.Skill;
import com.l2jmobius.gameserver.network.SystemMessageId;
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
/**
* Give XP and SP effect implementation.
* @author quangnguyen
*/
public final class GiveExpAndSp extends AbstractEffect
{
private final int _xp;
private final int _sp;
public GiveExpAndSp(StatsSet params)
{
_xp = params.getInt("xp", 0);
_sp = params.getInt("sp", 0);
}
@Override
public boolean isInstant()
{
return true;
}
@Override
public void instant(L2Character effector, L2Character effected, Skill skill, L2ItemInstance item)
{
if (!effector.isPlayer() || !effected.isPlayer() || effected.isAlikeDead())
{
return;
}
if ((_sp != 0) && (_xp != 0))
{
effector.getActingPlayer().getStat().addExp(_xp);
effector.getActingPlayer().getStat().addSp(_sp);
SystemMessage sm = null;
sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_ACQUIRED_S1_XP_BONUS_S2_AND_S3_SP_BONUS_S4);
sm.addLong(_xp);
sm.addLong(0);
sm.addLong(_sp);
sm.addLong(0);
effector.sendPacket(sm);
}
}
}

View File

@@ -448,24 +448,38 @@
<!-- For 15 minutes transforms you into Dark Assassin. Cannot be exchanged, dropped, or sold in a private store. Can be stored in a private warehouse. Transformation into Dark Assassin: Max HP/MP +5%, P./M. Accuracy +1, P./M. Atk. +2%, P./M. Def. +2%, Atk. Spd. +3%, M. Critical Rate +10, Speed +4. -->
<set name="icon" val="icon.empty_bottle" />
<set name="default_action" val="SKILL_REDUCE" />
<set name="etcitem_type" val="POTION" />
<set name="material" val="PAPER" />
<set name="weight" val="5" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_depositable" val="true" />
<set name="is_clan_depositable" val="true" />
<set name="is_sellable" val="false" />
<set name="is_stackable" val="true" />
<set name="handler" val="ItemSkills" />
<skills>
<skill id="39205" level="1" /> <!-- Dark Assassin Transformation Potion -->
</skills>
</item>
<item id="90044" name="Dimensional Blessing" type="EtcItem">
<!-- Provides 37 million XP and 1.11 million SP. Cannot be exchanged, dropped, or sold in a private store. Can be stored in a private warehouse. -->
<set name="icon" val="icon.etc_blessed_kalie_i00" />
<set name="default_action" val="SKILL_REDUCE" />
<set name="etcitem_type" val="SCROLL" />
<set name="material" val="PAPER" />
<set name="is_tradable" val="false" />
<set name="is_dropable" val="false" />
<set name="is_depositable" val="false" />
<set name="is_depositable" val="true" />
<set name="is_clan_depositable" val="false" />
<set name="is_sellable" val="false" />
<set name="is_stackable" val="true" />
<set name="is_oly_restricted" val="true" />
<set name="handler" val="ItemSkills" />
<set name="commissionItemType" val="SCROLL_OTHER" />
<skills>
<skill id="39204" level="1" /> <!-- Dimensional Blessing -->
</skills>
</item>
<item id="90045" name="Magical Tablet" type="EtcItem">
<!-- A tablet filled with magic power. Collect 31 tablets and give them to Trader Lorenzo or Harmony to get Spellbook: 3rd Class Transfer. -->

View File

@@ -44,12 +44,97 @@
<skill id="39204" toLevel="1" name="Dimensional Blessing">
<!-- Gives 3,700,000 XP / 1,110,000 SP. -->
<icon>icon.BranchSys.icon.br_lucky_bag_i00</icon>
<operateType>A1</operateType>
<hitTime>200</hitTime>
<isMagic>2</isMagic> <!-- Static Skill -->
<itemConsumeCount>1</itemConsumeCount>
<itemConsumeId>90044</itemConsumeId>
<magicLvl>1</magicLvl>
<operateType>A1</operateType>
<reuseDelay>1000</reuseDelay>
<magicCriticalRate>5</magicCriticalRate>
<hitCancelTime>0</hitCancelTime>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="GiveExpAndSp">
<xp>
<value level="1">37000000</value>
</xp>
<sp>
<value level="1">1110000</value>
</sp>
</effect>
</effects>
</skill>
<skill id="39205" toLevel="1" name="Dark Assassin Transformation Potion">
<!-- You are transformed into Dark Assassin. For 15 minutes Max HP / MP +5%, P. / M. Accuracy +1, P. / M. Atk. +2%, P. / M. Def. +2%, Atk. Spd. +3%, M. Critical Rate +10, Speed +4. Cooldown: 10 minutes. -->
<icon>icon.empty_bottle</icon>
<operateType>A1</operateType>
<abnormalLvl>1</abnormalLvl>
<abnormalTime>900</abnormalTime>
<abnormalType>CHANGEBODY</abnormalType>
<abnormalVisualEffect>DARK_ASSASSIN_SUIT</abnormalVisualEffect>
<blockedInOlympiad>true</blockedInOlympiad>
<effectPoint>1</effectPoint>
<isMagic>4</isMagic> <!-- Magic Skill -->
<magicLvl>56</magicLvl>
<operateType>A2</operateType>
<reuseDelay>900000</reuseDelay>
<hitTime>600</hitTime>
<stayAfterDeath>true</stayAfterDeath>
<irreplacableBuff>true</irreplacableBuff>
<basicProperty>NONE</basicProperty>
<magicCriticalRate>5</magicCriticalRate>
<hitCancelTime>0</hitCancelTime>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<itemConsumeId>90043</itemConsumeId>
<itemConsumeCount>1</itemConsumeCount>
<effects>
<effect name="MaxHp">
<amount>5</amount>
<mode>PER</mode>
</effect>
<effect name="MaxMp">
<amount>5</amount>
<mode>PER</mode>
</effect>
<effect name="Speed">
<amount>4</amount>
<mode>DIFF</mode>
</effect>
<effect name="PhysicalAttackSpeed">
<amount>3</amount>
<mode>PER</mode>
</effect>
<effect name="Accuracy">
<amount>1</amount>
<mode>DIFF</mode>
</effect>
<effect name="MagicAccuracy">
<amount>1</amount>
<mode>DIFF</mode>
</effect>
<effect name="MagicCriticalRate">
<amount>10</amount>
<mode>DIFF</mode>
</effect>
<effect name="PAtk">
<amount>2</amount>
<mode>PER</mode>
</effect>
<effect name="MAtk">
<amount>2</amount>
<mode>PER</mode>
</effect>
<effect name="PhysicalDefence">
<amount>2</amount>
<mode>PER</mode>
</effect>
<effect name="MagicalDefence">
<amount>2</amount>
<mode>PER</mode>
</effect>
</effects>
</skill>
<skill id="39206" toLevel="1" name="Monster Arena Belt">
<!-- When using the Belt CON +1, HORN +1, HP Recovery Bonus +2.31, MP +1.54, CP +3.07, Max HP / MP / CP +10%%, damage received -3%. -->

View File

@@ -117,6 +117,7 @@ GetAgro: Causes enemy NPC to attack you.
GetDamageLimit: Sets the maximum amount of damage you can receive.
GetMomentum: Increases momentum by a given value at fixed rate.
GiveClanReputation: Gives clan reputation points to a players clan. (l2jmobius)
GiveExpAndSp: Gives a given amount of XP and SP. (l2jmobius)
GiveFame: Gives a given amount of Fame. (l2jmobius)
GiveRecommendation: Gives recommendations to a player. Blue name.
GiveSp: Gives a given amount of SP.

View File

@@ -1447,6 +1447,21 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="xp">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="value">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:unsignedInt">
<xs:attribute name="level" type="xs:unsignedByte" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="x">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0">