Skip to content

Commit

Permalink
LS: Add flood upwards chance, always kills players now, default to 50…
Browse files Browse the repository at this point in the history
…% chance of destroying blocks
  • Loading branch information
UnknownShadow200 committed Dec 25, 2022
1 parent f2ce59e commit ba01ec6
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 106 deletions.
158 changes: 79 additions & 79 deletions GUI/PropertyWindow/PropertyWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions GUI/PropertyWindow/PropertyWindow.Games.cs
Expand Up @@ -167,10 +167,10 @@ public partial class PropertyWindow : Form {
}

if (lsCurCfg == null) return;
ls_numKiller.Value = lsCurCfg.KillerChance;
ls_numFast.Value = lsCurCfg.FastChance;
ls_numWater.Value = lsCurCfg.WaterChance;
ls_numFast.Value = lsCurCfg.FastChance;
ls_numDestroy.Value = lsCurCfg.DestroyChance;
ls_numFloodUp.Value = lsCurCfg.FloodUpChance;

ls_numLayer.Value = lsCurCfg.LayerChance;
ls_numCount.Value = lsCurCfg.LayerCount;
Expand All @@ -183,10 +183,10 @@ public partial class PropertyWindow : Form {

void SaveLSMapSettings() {
if (lsCurCfg == null) return;
lsCurCfg.KillerChance = (int)ls_numKiller.Value;
lsCurCfg.FastChance = (int)ls_numFast.Value;
lsCurCfg.WaterChance = (int)ls_numWater.Value;
lsCurCfg.FastChance = (int)ls_numFast.Value;
lsCurCfg.DestroyChance = (int)ls_numDestroy.Value;
lsCurCfg.FloodUpChance = (int)ls_numFloodUp.Value;

lsCurCfg.LayerChance = (int)ls_numLayer.Value;
lsCurCfg.LayerCount = (int)ls_numCount.Value;
Expand Down
12 changes: 6 additions & 6 deletions MCGalaxy/Commands/Fun/CmdLavaSurvival.cs
Expand Up @@ -119,9 +119,9 @@ public sealed class CmdLavaSurvival : RoundsGameCmd {
void HandleSetBlock(Player p, string[] args, LSMapConfig cfg) {
if (args.Length < 3) {
p.Message("Fast lava chance: &b" + cfg.FastChance + "%");
p.Message("Killer lava/water chance: &b" + cfg.KillerChance + "%");
p.Message("Destroy blocks chance: &b" + cfg.DestroyChance + "%");
p.Message("Water flood chance: &b" + cfg.WaterChance + "%");
p.Message("Flood upwards chance: &b" + cfg.FloodUpChance + "%");
return;
}

Expand All @@ -131,12 +131,12 @@ public sealed class CmdLavaSurvival : RoundsGameCmd {

if (prop.CaselessEq("fast")) {
ok = ParseChance(p, "fast lava", args, ref cfg.FastChance);
} else if (prop.CaselessEq("killer")) {
ok = ParseChance(p, "killer lava/water", args, ref cfg.KillerChance);
} else if (prop.CaselessEq("destroy")) {
}else if (prop.CaselessEq("destroy")) {
ok = ParseChance(p, "destroy blocks", args, ref cfg.DestroyChance);
} else if (prop.CaselessEq("water")) {
ok = ParseChance(p, "water flood", args, ref cfg.WaterChance);
} else if (prop.CaselessEq("upwards")) {
ok = ParseChance(p, "flood upwards", args, ref cfg.FloodUpChance);
} else {
Help(p, "block");
}
Expand Down Expand Up @@ -204,8 +204,8 @@ public sealed class CmdLavaSurvival : RoundsGameCmd {
p.Message("&T/LS set block fast [chance] &H- Sets chance of fast lava");
p.Message("&T/LS set block water [chance]");
p.Message("&HSets chance of water instead of lava flood");
p.Message("&T/LS set block killer [chance]");
p.Message("&HSets chance of killer lava/water");
p.Message("&T/LS set block upwards [chance]");
p.Message("&HSets chance of lava/water flooding upwards");
p.Message("&T/LS set block destroy [chance]");
p.Message("&HSets chance of the lava/water destroying blocks");
} else if (message.CaselessEq("other")) {
Expand Down

0 comments on commit ba01ec6

Please sign in to comment.