Remove all piercing from shocked status

This commit is contained in:
Anuken
2023-09-24 12:24:48 -04:00
parent 65aecbed20
commit 2b12800123
2 changed files with 14 additions and 16 deletions

View File

@ -64,12 +64,12 @@ public class StatusEffects{
init(() -> opposite(fast)); init(() -> opposite(fast));
}}; }};
fast = new StatusEffect("fast"){{ fast = new StatusEffect("fast"){{
color = Pal.boostTo; color = Pal.boostTo;
speedMultiplier = 1.6f; speedMultiplier = 1.6f;
init(() -> opposite(slow)); init(() -> opposite(slow));
}}; }};
wet = new StatusEffect("wet"){{ wet = new StatusEffect("wet"){{
color = Color.royal; color = Color.royal;
@ -80,10 +80,8 @@ public class StatusEffects{
init(() -> { init(() -> {
affinity(shocked, (unit, result, time) -> { affinity(shocked, (unit, result, time) -> {
float pierceFraction = 0.3f; unit.damage(transitionDamage);
unit.damagePierce(transitionDamage * pierceFraction);
unit.damage(transitionDamage * (1f - pierceFraction));
if(unit.team == state.rules.waveTeam){ if(unit.team == state.rules.waveTeam){
Events.fire(Trigger.shock); Events.fire(Trigger.shock);
} }

View File

@ -349,7 +349,7 @@ public class ServerControl implements ApplicationListener{
}); });
handler.register("host", "[mapname] [mode]", "Open the server. Will default to survival and a random map if not specified.", arg -> { handler.register("host", "[mapname] [mode]", "Open the server. Will default to survival and a random map if not specified.", arg -> {
if(state.is(State.playing)){ if(state.isGame()){
err("Already hosting. Type 'stop' to stop hosting first."); err("Already hosting. Type 'stop' to stop hosting first.");
return; return;
} }
@ -501,7 +501,7 @@ public class ServerControl implements ApplicationListener{
}); });
handler.register("say", "<message...>", "Send a message to all players.", arg -> { handler.register("say", "<message...>", "Send a message to all players.", arg -> {
if(!state.is(State.playing)){ if(!state.isGame()){
err("Not hosting. Host a game first."); err("Not hosting. Host a game first.");
return; return;
} }
@ -575,7 +575,7 @@ public class ServerControl implements ApplicationListener{
}); });
handler.register("fillitems", "[team]", "Fill the core with items.", arg -> { handler.register("fillitems", "[team]", "Fill the core with items.", arg -> {
if(!state.is(State.playing)){ if(!state.isGame()){
err("Not playing. Host first."); err("Not playing. Host first.");
return; return;
} }
@ -750,7 +750,7 @@ public class ServerControl implements ApplicationListener{
}); });
handler.register("kick", "<username...>", "Kick a person by name.", arg -> { handler.register("kick", "<username...>", "Kick a person by name.", arg -> {
if(!state.is(State.playing)){ if(!state.isGame()){
err("Not hosting a game yet. Calm down."); err("Not hosting a game yet. Calm down.");
return; return;
} }
@ -843,7 +843,7 @@ public class ServerControl implements ApplicationListener{
}); });
handler.register("admin", "<add/remove> <username/ID...>", "Make an online user admin", arg -> { handler.register("admin", "<add/remove> <username/ID...>", "Make an online user admin", arg -> {
if(!state.is(State.playing)){ if(!state.isGame()){
err("Open the server first."); err("Open the server first.");
return; return;
} }
@ -902,7 +902,7 @@ public class ServerControl implements ApplicationListener{
}); });
handler.register("runwave", "Trigger the next wave.", arg -> { handler.register("runwave", "Trigger the next wave.", arg -> {
if(!state.is(State.playing)){ if(!state.isGame()){
err("Not hosting. Host a game first."); err("Not hosting. Host a game first.");
}else{ }else{
logic.runWave(); logic.runWave();
@ -911,7 +911,7 @@ public class ServerControl implements ApplicationListener{
}); });
handler.register("load", "<slot>", "Load a save from a slot.", arg -> { handler.register("load", "<slot>", "Load a save from a slot.", arg -> {
if(state.is(State.playing)){ if(state.isGame()){
err("Already hosting. Type 'stop' to stop hosting first."); err("Already hosting. Type 'stop' to stop hosting first.");
return; return;
} }
@ -937,7 +937,7 @@ public class ServerControl implements ApplicationListener{
}); });
handler.register("save", "<slot>", "Save game state to a slot.", arg -> { handler.register("save", "<slot>", "Save game state to a slot.", arg -> {
if(!state.is(State.playing)){ if(!state.isGame()){
err("Not hosting. Host a game first."); err("Not hosting. Host a game first.");
return; return;
} }