implement stat modifications for the ZergMultiplier
This commit is contained in:
@@ -1187,10 +1187,15 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public final float modifyHealth(
|
public final float modifyHealth(float value, final AbstractCharacter attacker, final boolean fromCost) {
|
||||||
final float value,
|
|
||||||
final AbstractCharacter attacker,
|
if(attacker != null && attacker.getObjectType().equals(GameObjectType.PlayerCharacter)){
|
||||||
final boolean fromCost) {
|
value *= ((PlayerCharacter)attacker).ZergMultiplier;
|
||||||
|
} // Health modifications are modified by the ZergMechanic
|
||||||
|
|
||||||
|
if(attacker != null && attacker.getObjectType().equals(GameObjectType.Mob) && ((Mob)attacker).getOwner() != null){
|
||||||
|
value *= ((Mob)attacker).getOwner().ZergMultiplier;
|
||||||
|
}// Health modifications from pets are modified by the owner's ZergMechanic
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
@@ -1254,11 +1259,19 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final float modifyMana(
|
public final float modifyMana(
|
||||||
final float value,
|
float value,
|
||||||
final AbstractCharacter attacker,
|
final AbstractCharacter attacker,
|
||||||
final boolean fromCost
|
final boolean fromCost
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
if(attacker != null && attacker.getObjectType().equals(GameObjectType.PlayerCharacter)){
|
||||||
|
value *= ((PlayerCharacter)attacker).ZergMultiplier;
|
||||||
|
} // Health modifications are modified by the ZergMechanic
|
||||||
|
|
||||||
|
if(attacker != null && attacker.getObjectType().equals(GameObjectType.Mob) && ((Mob)attacker).getOwner() != null){
|
||||||
|
value *= ((Mob)attacker).getOwner().ZergMultiplier;
|
||||||
|
}// Health modifications from pets are modified by the owner's ZergMechanic
|
||||||
|
|
||||||
if (!this.isAlive()) {
|
if (!this.isAlive()) {
|
||||||
return 0f;
|
return 0f;
|
||||||
}
|
}
|
||||||
@@ -1293,11 +1306,19 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public final float modifyStamina(
|
public final float modifyStamina(
|
||||||
final float value,
|
float value,
|
||||||
final AbstractCharacter attacker,
|
final AbstractCharacter attacker,
|
||||||
final boolean fromCost
|
final boolean fromCost
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
if(attacker != null && attacker.getObjectType().equals(GameObjectType.PlayerCharacter)){
|
||||||
|
value *= ((PlayerCharacter)attacker).ZergMultiplier;
|
||||||
|
} // Health modifications are modified by the ZergMechanic
|
||||||
|
|
||||||
|
if(attacker != null && attacker.getObjectType().equals(GameObjectType.Mob) && ((Mob)attacker).getOwner() != null){
|
||||||
|
value *= ((Mob)attacker).getOwner().ZergMultiplier;
|
||||||
|
}// Health modifications from pets are modified by the owner's ZergMechanic
|
||||||
|
|
||||||
if (!this.isAlive()) {
|
if (!this.isAlive()) {
|
||||||
return 0f;
|
return 0f;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user