More random unit effects (#5272)
* More random fall smoke effects * Do the same with status effects.
This commit is contained in:
@@ -348,7 +348,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
|
||||
//standard fall smoke
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ public class StatusEffect extends UnlockableContent{
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user