|
|
@ -342,12 +342,28 @@ public enum NPCManager { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
public static void setDefenseForGuard(Mob guard){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void setAttackRatingForGuard(Mob guard){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void setDefenseForGuard(Mob guard){ |
|
|
|
|
|
|
|
int dexterity = guard.getStatDexCurrent(); |
|
|
|
|
|
|
|
if(dexterity < 1) |
|
|
|
|
|
|
|
dexterity = 1; |
|
|
|
|
|
|
|
int baseDef = guard.mobBase.getDefenseRating(); |
|
|
|
|
|
|
|
int armorDefense = 0; |
|
|
|
|
|
|
|
for(MobEquipment equipped : guard.equip.values()) |
|
|
|
|
|
|
|
if(equipped.getItemBase().isArmor() || equipped.getItemBase().isShield()) |
|
|
|
|
|
|
|
armorDefense += equipped.getItemBase().getDefense(); |
|
|
|
|
|
|
|
guard.defenseRating = dexterity + baseDef + armorDefense; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void setAttackRatingForGuard(Mob guard) { |
|
|
|
|
|
|
|
int strength = guard.getStatStrCurrent(); |
|
|
|
|
|
|
|
int baseAtr = guard.mobBase.getAttackRating(); |
|
|
|
|
|
|
|
if (guard.equip.get(1) != null) |
|
|
|
|
|
|
|
guard.atrHandOne = baseAtr + (int) ((strength * 0.5f) + (guard.equip.get(1).getItemBase().getPercentRequired() * 4) + (guard.equip.get(1).getItemBase().getPercentRequired() * 3)); |
|
|
|
|
|
|
|
else if (guard.equip.get(2) != null && !guard.equip.get(2).getItemBase().isShield()) |
|
|
|
|
|
|
|
guard.atrHandTwo = baseAtr + (int) ((strength * 0.5f) + (guard.equip.get(2).getItemBase().getPercentRequired() * 4) + (guard.equip.get(2).getItemBase().getPercentRequired() * 3)); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
guard.atrHandOne = baseAtr; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void setMaxHealthForGuard(Mob guard){ |
|
|
|
public static void setMaxHealthForGuard(Mob guard){ |
|
|
@ -376,6 +392,7 @@ public enum NPCManager { |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void applyMobbaseEffects(Mob mob) { |
|
|
|
public static void applyMobbaseEffects(Mob mob) { |
|
|
|
EffectsBase effectsBase; |
|
|
|
EffectsBase effectsBase; |
|
|
|
for (MobBaseEffects mbe : mob.mobBase.effectsList) { |
|
|
|
for (MobBaseEffects mbe : mob.mobBase.effectsList) { |
|
|
|