Partial 7.0 merge - API preview

This commit is contained in:
Anuken
2021-06-02 11:08:08 -04:00
parent ea75a357ca
commit 28b235ef07
531 changed files with 12356 additions and 6286 deletions
+19 -10
View File
@@ -12,7 +12,7 @@ import mindustry.graphics.*;
import static mindustry.Vars.*;
public class StatusEffects implements ContentList{
public static StatusEffect none, burning, freezing, unmoving, slow, wet, muddy, melting, sapped, tarred, overdrive, overclock, shielded, shocked, blasted, corroded, boss, sporeSlowed, disarmed;
public static StatusEffect none, burning, freezing, unmoving, slow, wet, muddy, melting, sapped, tarred, overdrive, overclock, shielded, shocked, blasted, corroded, boss, sporeSlowed, disarmed, electrified;
@Override
public void load(){
@@ -27,10 +27,10 @@ public class StatusEffects implements ContentList{
init(() -> {
opposite(wet, freezing);
affinity(tarred, ((unit, time, newTime, result) -> {
affinity(tarred, ((unit, result, time) -> {
unit.damagePierce(transitionDamage);
Fx.burning.at(unit.x + Mathf.range(unit.bounds() / 2f), unit.y + Mathf.range(unit.bounds() / 2f));
result.set(burning, Math.min(time + newTime, 300f));
result.set(burning, Math.min(time + result.time, 300f));
}));
});
}};
@@ -45,7 +45,7 @@ public class StatusEffects implements ContentList{
init(() -> {
opposite(melting, burning);
affinity(blasted, ((unit, time, newTime, result) -> {
affinity(blasted, ((unit, result, time) -> {
unit.damagePierce(transitionDamage);
result.set(freezing, time);
}));
@@ -70,14 +70,14 @@ public class StatusEffects implements ContentList{
transitionDamage = 14;
init(() -> {
affinity(shocked, ((unit, time, newTime, result) -> {
affinity(shocked, ((unit, result, time) -> {
unit.damagePierce(transitionDamage);
if(unit.team == state.rules.waveTeam){
Events.fire(Trigger.shock);
}
result.set(wet, time);
}));
opposite(burning);
opposite(burning, melting);
});
}};
@@ -86,6 +86,7 @@ public class StatusEffects implements ContentList{
speedMultiplier = 0.94f;
effect = Fx.muddy;
effectChance = 0.09f;
show = false;
}};
melting = new StatusEffect("melting"){{
@@ -97,10 +98,10 @@ public class StatusEffects implements ContentList{
init(() -> {
opposite(wet, freezing);
affinity(tarred, ((unit, time, newTime, result) -> {
affinity(tarred, ((unit, result, time) -> {
unit.damagePierce(8f);
Fx.burning.at(unit.x + Mathf.range(unit.bounds() / 2f), unit.y + Mathf.range(unit.bounds() / 2f));
result.set(melting, Math.min(time + newTime, 200f));
result.set(melting, Math.min(time + result.time, 200f));
}));
});
}};
@@ -113,6 +114,14 @@ public class StatusEffects implements ContentList{
effectChance = 0.1f;
}};
electrified = new StatusEffect("electrified"){{
color = Pal.heal;
speedMultiplier = 0.7f;
reloadMultiplier = 0.6f;
effect = Fx.electrified;
effectChance = 0.1f;
}};
sporeSlowed = new StatusEffect("spore-slowed"){{
color = Pal.spore;
speedMultiplier = 0.8f;
@@ -126,8 +135,8 @@ public class StatusEffects implements ContentList{
effect = Fx.oily;
init(() -> {
affinity(melting, ((unit, time, newTime, result) -> result.set(melting, newTime + time)));
affinity(burning, ((unit, time, newTime, result) -> result.set(burning, newTime + time)));
affinity(melting, ((unit, result, time) -> result.set(melting, result.time + time)));
affinity(burning, ((unit, result, time) -> result.set(burning, result.time + time)));
});
}};