T1 walker thing done
BIN
core/assets-raw/sprites/units/merui-cell.png
Normal file
|
After Width: | Height: | Size: 254 B |
|
Before Width: | Height: | Size: 294 B After Width: | Height: | Size: 295 B |
|
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 289 B |
BIN
core/assets-raw/sprites/units/merui-weapon-heat.png
Normal file
|
After Width: | Height: | Size: 499 B |
BIN
core/assets-raw/sprites/units/merui-weapon.png
Normal file
|
After Width: | Height: | Size: 81 B |
|
|
@ -589,6 +589,24 @@ public class Fx{
|
|||
Drawf.light(e.x, e.y, 20f, e.color, 0.6f * e.fout());
|
||||
}),
|
||||
|
||||
hitSquaresColor = new Effect(14, e -> {
|
||||
color(Color.white, e.color, e.fin());
|
||||
|
||||
e.scaled(7f, s -> {
|
||||
stroke(0.5f + s.fout());
|
||||
Lines.circle(e.x, e.y, s.fin() * 5f);
|
||||
});
|
||||
|
||||
stroke(0.5f + e.fout());
|
||||
|
||||
randLenVectors(e.id, 5, e.fin() * 17f, (x, y) -> {
|
||||
float ang = Mathf.angle(x, y);
|
||||
Fill.square(e.x + x, e.y + y, e.fout() * 3.2f, ang);
|
||||
});
|
||||
|
||||
Drawf.light(e.x, e.y, 20f, e.color, 0.6f * e.fout());
|
||||
}),
|
||||
|
||||
hitFuse = new Effect(14, e -> {
|
||||
color(Color.white, Pal.surge, e.fin());
|
||||
|
||||
|
|
@ -1412,6 +1430,13 @@ public class Fx{
|
|||
Drawf.tri(e.x, e.y, w, 3f * e.fout(), e.rotation + 180f);
|
||||
}),
|
||||
|
||||
shootSmallColor = new Effect(8, e -> {
|
||||
color(e.color, Color.gray, e.fin());
|
||||
float w = 1f + 5 * e.fout();
|
||||
Drawf.tri(e.x, e.y, w, 15f * e.fout(), e.rotation);
|
||||
Drawf.tri(e.x, e.y, w, 3f * e.fout(), e.rotation + 180f);
|
||||
}),
|
||||
|
||||
shootHeal = new Effect(8, e -> {
|
||||
color(Pal.heal);
|
||||
float w = 1f + 5 * e.fout();
|
||||
|
|
|
|||
|
|
@ -2831,12 +2831,13 @@ public class UnitTypes{
|
|||
//region erekir - mech
|
||||
|
||||
merui = new ErekirUnitType("merui"){{
|
||||
speed = 0.75f;
|
||||
drag = 0.1f;
|
||||
speed = 0.7f;
|
||||
drag = 0.11f;
|
||||
hitSize = 9f;
|
||||
rotateSpeed = 3.5f;
|
||||
health = 700;
|
||||
armor = 5f;
|
||||
rotateSpeed = 3f;
|
||||
health = 680;
|
||||
armor = 4f;
|
||||
legStraightness = 0.3f;
|
||||
|
||||
legCount = 6;
|
||||
legLength = 8f;
|
||||
|
|
@ -2856,6 +2857,55 @@ public class UnitTypes{
|
|||
|
||||
visualElevation = 0.1f;
|
||||
groundLayer = Layer.legUnit - 1f;
|
||||
targetAir = false;
|
||||
|
||||
weapons.add(new Weapon("merui-weapon"){{
|
||||
mirror = false;
|
||||
x = 0f;
|
||||
y = 1f;
|
||||
shootY = 4f;
|
||||
reload = 60f;
|
||||
cooldownTime = 42f;
|
||||
heatColor = Pal.turretHeat;
|
||||
|
||||
bullet = new ArtilleryBulletType(3f, 40){{
|
||||
shootEffect = new MultiEffect(Fx.shootSmallColor, new Effect(9, e -> {
|
||||
color(Color.white, e.color, e.fin());
|
||||
stroke(0.7f + e.fout());
|
||||
Lines.square(e.x, e.y, e.fin() * 5f, e.rotation + 45f);
|
||||
|
||||
Drawf.light(e.x, e.y, 23f, e.color, e.fout() * 0.7f);
|
||||
}));
|
||||
|
||||
collidesTiles = true;
|
||||
recoil = 0.5f;
|
||||
backColor = hitColor = Pal.techBlue;
|
||||
frontColor = Color.white;
|
||||
|
||||
knockback = 0.8f;
|
||||
lifetime = 50f;
|
||||
width = height = 9f;
|
||||
splashDamageRadius = 19f;
|
||||
splashDamage = 30f;
|
||||
|
||||
trailLength = 27;
|
||||
trailWidth = 2.5f;
|
||||
trailEffect = Fx.none;
|
||||
trailColor = backColor;
|
||||
|
||||
trailInterp = Interp.slope;
|
||||
|
||||
shrinkX = 0.6f;
|
||||
shrinkY = 0.2f;
|
||||
|
||||
hitEffect = despawnEffect = new MultiEffect(Fx.hitSquaresColor, new WaveEffect(){{
|
||||
colorFrom = colorTo = Pal.techBlue;
|
||||
sizeTo = splashDamageRadius + 2f;
|
||||
lifetime = 9f;
|
||||
strokeFrom = 2f;
|
||||
}});
|
||||
}};
|
||||
}});
|
||||
|
||||
}};
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ public final class FogControl implements CustomChunk{
|
|||
});
|
||||
|
||||
Events.on(TileChangeEvent.class, event -> {
|
||||
if(state.rules.fog && event.tile.build != null && event.tile.isCenter() && !event.tile.build.team.isAI() && event.tile.block().flags.contains(BlockFlag.hasFogRadius)){
|
||||
if(state.rules.fog && event.tile.build != null && event.tile.isCenter() && !event.tile.build.team.isOnlyAI() && event.tile.block().flags.contains(BlockFlag.hasFogRadius)){
|
||||
var data = data(event.tile.team());
|
||||
if(data != null){
|
||||
data.dynamicUpdated = true;
|
||||
|
|
@ -78,7 +78,7 @@ public final class FogControl implements CustomChunk{
|
|||
|
||||
//on tile removed, dynamic fog goes away
|
||||
Events.on(TilePreChangeEvent.class, e -> {
|
||||
if(state.rules.fog && e.tile.build != null && !e.tile.build.team.isAI() && e.tile.block().flags.contains(BlockFlag.hasFogRadius)){
|
||||
if(state.rules.fog && e.tile.build != null && !e.tile.build.team.isOnlyAI() && e.tile.block().flags.contains(BlockFlag.hasFogRadius)){
|
||||
var data = data(e.tile.team());
|
||||
if(data != null){
|
||||
data.dynamicUpdated = true;
|
||||
|
|
@ -210,7 +210,7 @@ public final class FogControl implements CustomChunk{
|
|||
|
||||
for(var team : state.teams.present){
|
||||
//AI teams do not have fog
|
||||
if(!team.team.isAI()){
|
||||
if(!team.team.isOnlyAI()){
|
||||
//separate for each team
|
||||
unitEventQueue.clear();
|
||||
|
||||
|
|
|
|||
|
|
@ -103,11 +103,16 @@ public class Team implements Comparable<Team>{
|
|||
return state.teams.isActive(this);
|
||||
}
|
||||
|
||||
/** @return whether this team is solely comprised of AI, with no players. */
|
||||
/** @return whether this team is supposed to be AI-controlled. */
|
||||
public boolean isAI(){
|
||||
return (state.rules.waves || state.rules.attackMode) && this == state.rules.waveTeam;
|
||||
}
|
||||
|
||||
/** @return whether this team is solely comprised of AI (with no players possible). */
|
||||
public boolean isOnlyAI(){
|
||||
return isAI() && data().players.size == 0;
|
||||
}
|
||||
|
||||
/** @return whether this team needs a flow field for "dumb" wave pathfinding. */
|
||||
public boolean needsFlowField(){
|
||||
return isAI() && !rules().rtsAi;
|
||||
|
|
|
|||