early exit for combat cycle

This commit is contained in:
2024-04-21 11:21:40 -05:00
parent bb5d257ae8
commit b8dbcb62db
+27 -10
View File
@@ -68,22 +68,39 @@ public enum CombatManager {
processAttack(attacker, target, mbEnums.EquipSlotType.RHELD);
if(attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter))
processAttack(attacker, target, mbEnums.EquipSlotType.LHELD);
} else if (mainWeapon == null && offWeapon != null && offWeapon.template.item_skill_required.containsKey("Block")) {
return;
}
if (mainWeapon != null && offWeapon == null) {
//swing right hand only
processAttack(attacker, target, mbEnums.EquipSlotType.RHELD);
return;
}
if (mainWeapon == null && offWeapon != null && offWeapon.template.item_skill_required.containsKey("Block") == false) {
//swing left hand only
processAttack(attacker, target, mbEnums.EquipSlotType.LHELD);
return;
}
if (mainWeapon == null && offWeapon != null && offWeapon.template.item_skill_required.containsKey("Block")) {
//no weapon equipped with a shield, punch with one hand
processAttack(attacker, target, mbEnums.EquipSlotType.RHELD);
} else if (mainWeapon != null && offWeapon != null && offWeapon.template.item_skill_required.containsKey("Block")) {
return;
}
if (mainWeapon != null && offWeapon != null && offWeapon.template.item_skill_required.containsKey("Block")) {
//one weapon equipped with a shield, swing with one hand
processAttack(attacker, target, mbEnums.EquipSlotType.RHELD);
} else if (mainWeapon != null && offWeapon != null && offWeapon.template.item_skill_required.containsKey("Block") == false) {
return;
}
if (mainWeapon != null && offWeapon != null && offWeapon.template.item_skill_required.containsKey("Block") == false) {
//two weapons equipped, swing both hands
processAttack(attacker, target, mbEnums.EquipSlotType.RHELD);
processAttack(attacker, target, mbEnums.EquipSlotType.LHELD);
} else if (mainWeapon == null && offWeapon != null && offWeapon.template.item_skill_required.containsKey("Block") == false) {
//swing left hand only
processAttack(attacker, target, mbEnums.EquipSlotType.LHELD);
} else if (mainWeapon != null && offWeapon == null) {
//swing left hand only
processAttack(attacker, target, mbEnums.EquipSlotType.RHELD);
if(attacker.getObjectType().equals(mbEnums.GameObjectType.PlayerCharacter))
processAttack(attacker, target, mbEnums.EquipSlotType.LHELD);
return;
}
}