Browse Source

stance modifiers for guards

feature-workorder
FatBoy-DOTC 1 year ago
parent
commit
c7abb4c920
  1. 38
      src/engine/gameManager/NPCManager.java
  2. 6
      src/engine/objects/AbstractCharacter.java
  3. 1
      src/engine/objects/Mob.java

38
src/engine/gameManager/NPCManager.java

@ -276,14 +276,17 @@ public enum NPCManager { @@ -276,14 +276,17 @@ public enum NPCManager {
}
}
}
public static void setDamageAndSpeedForGuard(Mob guard){
//handle stance for guard mob
String stancePowerName = "";
public static void applyGuardStanceModifiers(Mob guard){
float damageModifier = 1;
float attackRatingModifier = 1;
float defenseModifier = 1;
float attackSpeedModifier = 1;
float powerDamageModifier = 1;
//handle stance modifiers for guard mob
if(guard.agentType.equals(Enum.AIAgentType.GUARDWALLARCHER)){
//apply rogue offensive stance
stancePowerName = "STC-R-O";
//apply rogue bonuses
attackRatingModifier += 0.5f;
defenseModifier += 0.5f;
}else {
Integer contractID;
if (guard.agentType.equals(Enum.AIAgentType.GUARDMINION)) {
@ -293,16 +296,27 @@ public enum NPCManager { @@ -293,16 +296,27 @@ public enum NPCManager {
}
if (Enum.MinionType.ContractToMinionMap.get(contractID) != null && Enum.MinionType.ContractToMinionMap.get(contractID).isMage()){
//apply mage offensive Stance
stancePowerName = "STC-M-O";
powerDamageModifier += 0.5f;
} else{
//apply fighter offensive stance
stancePowerName = "STC-F-O";
damageModifier += 0.5f;
attackSpeedModifier -= 0.36f;
}
}
guard.minDamageHandOne *= damageModifier;
guard.minDamageHandTwo *= damageModifier;
guard.maxDamageHandOne *= damageModifier;
guard.maxDamageHandTwo *= damageModifier;
guard.atrHandOne *= attackRatingModifier;
guard.atrHandTwo *= attackRatingModifier;
guard.defenseRating *= defenseModifier;
guard.speedHandOne *= attackSpeedModifier;
guard.speedHandTwo *= attackSpeedModifier;
//TODO figure out how to apply +50% powerdamage to mage guards
}
public static void setDamageAndSpeedForGuard(Mob guard){
int stancePowerRank = MobAI.getGuardPowerRank(guard);
PowersBase stancePower = PowersManager.getPowerByIDString(stancePowerName);
PowersManager.useMobPower(guard,guard,stancePower,stancePowerRank);
if(guard.equip == null) {
guard.minDamageHandOne = (int)(guard.mobBase.getDamageMin());

6
src/engine/objects/AbstractCharacter.java

@ -92,8 +92,8 @@ public abstract class AbstractCharacter extends AbstractWorldObject { @@ -92,8 +92,8 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
public Resists resists = new Resists("Genric");
protected ConcurrentHashMap<String, JobContainer> timers;
protected ConcurrentHashMap<String, Long> timestamps;
protected int atrHandOne;
protected int atrHandTwo;
public int atrHandOne;
public int atrHandTwo;
public int minDamageHandOne;
public int maxDamageHandOne;
public int minDamageHandTwo;
@ -102,7 +102,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject { @@ -102,7 +102,7 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
protected float rangeHandTwo;
public float speedHandOne;
public float speedHandTwo;
protected int defenseRating;
public int defenseRating;
protected boolean isActive; // <-Do not use this for deleting character!
protected float altitude = 0; // 0=on terrain, 1=tier 1, 2=tier 2, etc.
protected ConcurrentHashMap<Integer, JobContainer> recycleTimers;

1
src/engine/objects/Mob.java

@ -1035,6 +1035,7 @@ public class Mob extends AbstractIntelligenceAgent { @@ -1035,6 +1035,7 @@ public class Mob extends AbstractIntelligenceAgent {
NPCManager.setAttackRatingForGuard(this);
NPCManager.setDefenseForGuard(this);
NPCManager.setDamageAndSpeedForGuard(this);
NPCManager.applyGuardStanceModifiers(this);
}else {
try {

Loading…
Cancel
Save