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 {
} }
} }
} }
public static void applyGuardStanceModifiers(Mob guard){
public static void setDamageAndSpeedForGuard(Mob guard){ float damageModifier = 1;
float attackRatingModifier = 1;
//handle stance for guard mob float defenseModifier = 1;
String stancePowerName = ""; float attackSpeedModifier = 1;
float powerDamageModifier = 1;
//handle stance modifiers for guard mob
if(guard.agentType.equals(Enum.AIAgentType.GUARDWALLARCHER)){ if(guard.agentType.equals(Enum.AIAgentType.GUARDWALLARCHER)){
//apply rogue offensive stance //apply rogue bonuses
stancePowerName = "STC-R-O"; attackRatingModifier += 0.5f;
defenseModifier += 0.5f;
}else { }else {
Integer contractID; Integer contractID;
if (guard.agentType.equals(Enum.AIAgentType.GUARDMINION)) { if (guard.agentType.equals(Enum.AIAgentType.GUARDMINION)) {
@ -293,16 +296,27 @@ public enum NPCManager {
} }
if (Enum.MinionType.ContractToMinionMap.get(contractID) != null && Enum.MinionType.ContractToMinionMap.get(contractID).isMage()){ if (Enum.MinionType.ContractToMinionMap.get(contractID) != null && Enum.MinionType.ContractToMinionMap.get(contractID).isMage()){
//apply mage offensive Stance //apply mage offensive Stance
stancePowerName = "STC-M-O"; powerDamageModifier += 0.5f;
} else{ } else{
//apply fighter offensive stance //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) { if(guard.equip == null) {
guard.minDamageHandOne = (int)(guard.mobBase.getDamageMin()); guard.minDamageHandOne = (int)(guard.mobBase.getDamageMin());

6
src/engine/objects/AbstractCharacter.java

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

1
src/engine/objects/Mob.java

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

Loading…
Cancel
Save