Add Aran High Defense functionality (#512)

* Add High Defense functionality

* Use proper morph models
This commit is contained in:
BHB88
2019-09-13 14:17:28 +10:00
committed by Ronan Lana
parent ab756a1f5a
commit da2395cc3a
3 changed files with 11 additions and 4 deletions

View File

@@ -47,6 +47,7 @@ public class Aran {
public static final int HIDDEN_FULL_TRIPLE = 21110008;
public static final int SMART_KNOCKBACK = 21111001;
public static final int OVER_SWING = 21120002;
public static final int HIGH_DEFENSE = 21120004;
public static final int COMBO_TEMPEST = 21120006;
public static final int COMBO_BARRIER = 21120007;
public static final int HIDDEN_OVER_DOUBLE = 21120009;

View File

@@ -240,6 +240,12 @@ public final class TakeDamageHandler extends AbstractMaplePacketHandler {
if (achilles != 0 && achilles1 != null) {
damage *= (achilles1.getEffect(achilles).getX() / 1000.0);
}
Skill highDef = SkillFactory.getSkill(Aran.HIGH_DEFENSE);
int hdLevel = chr.getSkillLevel(highDef);
if (highDef != null && hdLevel > 0) {
damage *= (highDef.getEffect(hdLevel).getX() / 1000.0);
}
}
Integer mesoguard = chr.getBuffedValue(MapleBuffStat.MESOGUARD);
if (chr.getBuffedValue(MapleBuffStat.MAGIC_GUARD) != null && mpattack == 0) {

View File

@@ -1774,10 +1774,10 @@ public class MapleStatEffect {
}
private int getMorph(MapleCharacter chr) {
if (morphId % 10 == 0) {
return morphId + chr.getGender();
}
return morphId + 100 * chr.getGender();
if (morphId == 1000 || morphId == 1001 || morphId == 1003) { // morph skill
return chr.getGender() == 0 ? morphId : morphId + 100;
}
return morphId;
}
private SummonMovementType getSummonMovementType() {