Navanax buff (#8925)
* Update UnitTypes.java its late at night imma just commit changes and pray i didnt fuck up anywhere * Allow changing suppress effect color * Fx.regenSuppressParticle and Fx.regenSuppressSeek now color-aware - regenSuppressParticle's color handling changed, allows changing the from color intead of the to color * Damage.applySuppression accepts color as an argument, old method signature still exists * SuppressionFieldAbility has a new field allowing to specify the color for effect particles * BulletType has a new field allowing to specify the color for suppress effect particles * BuildingComp has a new field storing the color to be used for suppression effect * name --------- Co-authored-by: BalaM314 <71201189+BalaM314@users.noreply.github.com>
This commit is contained in:
@@ -90,6 +90,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
|
||||
transient float healSuppressionTime = -1f;
|
||||
transient float lastHealTime = -120f * 10f;
|
||||
transient Color suppressColor = Pal.sapBullet;
|
||||
|
||||
private transient float lastDamageTime = -recentDamageTime;
|
||||
private transient float timeScale = 1f, timeScaleDuration;
|
||||
@@ -438,7 +439,11 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
}
|
||||
|
||||
public void applyHealSuppression(float amount){
|
||||
applyHealSuppression(amount, Pal.sapBullet);
|
||||
}
|
||||
public void applyHealSuppression(float amount, Color suppressColor){
|
||||
healSuppressionTime = Math.max(healSuppressionTime, Time.time + amount);
|
||||
this.suppressColor = suppressColor;
|
||||
}
|
||||
|
||||
public boolean isHealSuppressed(){
|
||||
@@ -1242,7 +1247,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
public boolean checkSuppression(){
|
||||
if(isHealSuppressed()){
|
||||
if(Mathf.chanceDelta(0.03)){
|
||||
Fx.regenSuppressParticle.at(x + Mathf.range(block.size * tilesize/2f - 1f), y + Mathf.range(block.size * tilesize/2f - 1f));
|
||||
Fx.regenSuppressParticle.at(x + Mathf.range(block.size * tilesize/2f - 1f), y + Mathf.range(block.size * tilesize/2f - 1f), suppressColor);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user