More random unit effects (#5272)
* More random fall smoke effects * Do the same with status effects.
This commit is contained in:
@@ -348,13 +348,13 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
|||||||
|
|
||||||
//standard fall smoke
|
//standard fall smoke
|
||||||
if(Mathf.chanceDelta(0.1)){
|
if(Mathf.chanceDelta(0.1)){
|
||||||
Tmp.v1.setToRandomDirection().scl(hitSize);
|
Tmp.v1.rnd(Mathf.range(hitSize));
|
||||||
type.fallEffect.at(x + Tmp.v1.x, y + Tmp.v1.y);
|
type.fallEffect.at(x + Tmp.v1.x, y + Tmp.v1.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
//thruster fall trail
|
//thruster fall trail
|
||||||
if(Mathf.chanceDelta(0.2)){
|
if(Mathf.chanceDelta(0.2)){
|
||||||
float offset = type.engineOffset/2f + type.engineOffset/2f*elevation;
|
float offset = type.engineOffset/2f + type.engineOffset/2f * elevation;
|
||||||
float range = Mathf.range(type.engineSize);
|
float range = Mathf.range(type.engineSize);
|
||||||
type.fallThrusterEffect.at(
|
type.fallThrusterEffect.at(
|
||||||
x + Angles.trnsx(rotation + 180, offset) + Mathf.range(range),
|
x + Angles.trnsx(rotation + 180, offset) + Mathf.range(range),
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ public class StatusEffect extends UnlockableContent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(effect != Fx.none && Mathf.chanceDelta(effectChance)){
|
if(effect != Fx.none && Mathf.chanceDelta(effectChance)){
|
||||||
Tmp.v1.rnd(unit.type.hitSize /2f);
|
Tmp.v1.rnd(Mathf.range(unit.type.hitSize/2f));
|
||||||
effect.at(unit.x + Tmp.v1.x, unit.y + Tmp.v1.y);
|
effect.at(unit.x + Tmp.v1.x, unit.y + Tmp.v1.y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user