Added some medic specials, minor combat fixes

This commit is contained in:
Light2
2013-09-23 18:02:31 +02:00
parent 718880dfcf
commit fbcbc26065
19 changed files with 355 additions and 37 deletions
+5 -5
View File
@@ -79,10 +79,10 @@ public class CombatService implements INetworkDispatch {
boolean success = true;
if(!applySpecialCost(attacker, weapon, command))
if((command.getAttackType() == 0 || command.getAttackType() == 1 || command.getAttackType() == 3) && !attemptCombat(attacker, target))
success = false;
if((command.getAttackType() == 0 || command.getAttackType() == 1 || command.getAttackType() == 3) && !attemptCombat(attacker, target))
if(!applySpecialCost(attacker, weapon, command))
success = false;
if(!success) {
@@ -328,7 +328,7 @@ public class CombatService implements INetworkDispatch {
sendCombatPackets(attacker, target, weapon, command, actionCounter, damage, armorAbsorbed, hitType);
if(hitType != HitType.MISS && hitType != HitType.DODGE && hitType != HitType.PARRY)
if((hitType != HitType.MISS && hitType != HitType.DODGE && hitType != HitType.PARRY) || (command.getAddedDamage() == 0 && command.getPercentFromWeapon() == 0))
core.buffService.addBuffToCreature(target, command.getBuffNameTarget());
if(FileUtilities.doesFileExist("scripts/commands/combat/" + command.getCommandName() + ".py"))
@@ -456,7 +456,7 @@ public class CombatService implements INetworkDispatch {
}
private boolean applySpecialCost(CreatureObject attacker, WeaponObject weapon, CombatCommand command) {
public boolean applySpecialCost(CreatureObject attacker, WeaponObject weapon, CombatCommand command) {
float actionCost = command.getActionCost();
float healthCost = command.getHealthCost();
@@ -765,7 +765,7 @@ public class CombatService implements INetworkDispatch {
success = false;
if((command.getAttackType() == 0 || command.getAttackType() == 1 || command.getAttackType() == 3) && !attemptHeal(healer, target))
success = false;
target = healer;
if(!success) {
IoSession session = healer.getClient().getSession();