主页| 免费发布天堂1开机信息| 站长qq:1161903

幻术师-疼痛的欢愉的研究

来源:2TT天堂发布网 www.2tt.cc    发布时间:2019/3/4 0:53:18    浏览量:1622

幻术师-疼痛的欢愉的研究
疼痛的欢愉:牺牲自己1/3的体力来攻击敌人。
一般玩家使用这技能感觉好像无效.
实际上这技能有点类似骑士的反击屏障,不过只能反弹伤害给单一玩家.
反弹伤害公式=(幻术师最大血量 - 幻术师剩余血量)/5
假设:幻术师最大血量=6000 幻术师剩余血量=1000 , 反弹伤害=(6000-1000)/5=1000
如果玩家被放到此技能,又跑去打施法者.就会受到 1000的伤害.(如果不打就没事)
这技能如果在非变态服可能还好,如果在变态服反弹的伤害就很恐怖了....
==
以下是 疼痛欢愉 在L1PcInstance.java的程式码: 改好的
if(attacker.hasSkillEffect(JOY_OF_PAIN) && getId() != attacker.getId())
{
int nowDamage = getMaxHp() - getCurrentHp();
if (nowDamage > 0) {
//限制疼痛欢愉最大伤害
if ((nowDamage/5) >  Config.JOY_OF_PAIN_DMG){
nowDamage = Config.JOY_OF_PAIN_DMG * 5 ;
}
//
if (attacker instanceof L1PcInstance) {
L1PcInstance attackPc = (L1PcInstance) attacker;
attackPc.sendPackets(new S_DoActionGFX(attackPc
.getId(), ActionCodes.ACTION_Damage));
attackPc.broadcastPacket(new S_DoActionGFX(attackPc
.getId(), ActionCodes.ACTION_Damage));
attackPc.receiveDamage(this, (int) (nowDamage / 5));
attackPc.removeSkillEffect(JOY_OF_PAIN);//限定反弹一次伤害
} else if (attacker instanceof L1NpcInstance) {
L1NpcInstance attackNpc = (L1NpcInstance) attacker;
attackNpc.broadcastPacket(new S_DoActionGFX(attackNpc
.getId(), ActionCodes.ACTION_Damage));
attackNpc.receiveDamage(this, (int) (nowDamage / 5));
attackNpc.removeSkillEffect(JOY_OF_PAIN);//限定反弹一次伤害
}
}
}
====================================================================
Config.java
找到:public static int LV99_EXP;

在下面添加:public static int JOY_OF_PAIN_DMG;//限制疼痛欢愉伤害

找到:GLOBAL_CHAT_LEVEL = Short.parseShort(altSettings.getProperty("GlobalChatLevel", "30"));

在上面添加:JOY_OF_PAIN_DMG = Integer.parseInt(altSettings.getProperty("JOY_OF_PAIN_DMG", "10"));//限制疼痛欢愉伤害

模拟器\config\altsettings.properties

#限制疼痛的欢愉最大伤害
JOY_OF_PAIN_DMG = 50