Revert "changed boons to bool since all boons go to 5 people"
This reverts commit c14e676029
.
This commit is contained in:
parent
ebbf458425
commit
318f289d5c
4 changed files with 52 additions and 44 deletions
|
@ -134,10 +134,10 @@ namespace Lieb.Data
|
||||||
|
|
||||||
foreach(GuildWars2Build build in signedUpUsers.Values)
|
foreach(GuildWars2Build build in signedUpUsers.Values)
|
||||||
{
|
{
|
||||||
Alac += build.Alacrity ? 5 : 0;
|
Alac += build.Alacrity;
|
||||||
Quick += build.Quickness ? 5 : 0;
|
Quick += build.Quickness;
|
||||||
Heal += build.Heal ? 5 : 0;
|
Heal += build.Heal;
|
||||||
Might += build.Might ? 5 : 0;
|
Might += build.Might;
|
||||||
}
|
}
|
||||||
if(Alac > 10)
|
if(Alac > 10)
|
||||||
{
|
{
|
||||||
|
@ -186,14 +186,15 @@ namespace Lieb.Data
|
||||||
{
|
{
|
||||||
foreach (var userBuild in signedUpUsers)
|
foreach (var userBuild in signedUpUsers)
|
||||||
{
|
{
|
||||||
if(userBuild.Value.Alacrity && currentAlac > 10)
|
if(userBuild.Value.Alacrity > 0 && currentAlac > 10)
|
||||||
{
|
{
|
||||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => !b.GuildWars2Build.Alacrity).OrderBy(u => _random.Next()).FirstOrDefault();
|
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Alacrity == 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||||
if (newBuild != null)
|
if (newBuild != null)
|
||||||
{
|
{
|
||||||
|
currentAlac -= userBuild.Value.Alacrity;
|
||||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||||
currentAlac -= 5;
|
currentAlac += signedUpUsers[userBuild.Key].Alacrity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -203,14 +204,15 @@ namespace Lieb.Data
|
||||||
{
|
{
|
||||||
foreach (var userBuild in signedUpUsers)
|
foreach (var userBuild in signedUpUsers)
|
||||||
{
|
{
|
||||||
if (!userBuild.Value.Alacrity && currentAlac < 10)
|
if (userBuild.Value.Alacrity == 00 && currentAlac < 10)
|
||||||
{
|
{
|
||||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Alacrity).OrderBy(u => _random.Next()).FirstOrDefault();
|
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Alacrity > 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||||
if (newBuild != null)
|
if (newBuild != null)
|
||||||
{
|
{
|
||||||
|
currentAlac -= userBuild.Value.Alacrity;
|
||||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||||
currentAlac += 5;
|
currentAlac += signedUpUsers[userBuild.Key].Alacrity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -220,14 +222,15 @@ namespace Lieb.Data
|
||||||
{
|
{
|
||||||
foreach (var userBuild in signedUpUsers)
|
foreach (var userBuild in signedUpUsers)
|
||||||
{
|
{
|
||||||
if (userBuild.Value.Quickness && currentQuick > 10)
|
if (userBuild.Value.Quickness > 0 && currentQuick > 10)
|
||||||
{
|
{
|
||||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => !b.GuildWars2Build.Quickness).OrderBy(u => _random.Next()).FirstOrDefault();
|
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Quickness == 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||||
if (newBuild != null)
|
if (newBuild != null)
|
||||||
{
|
{
|
||||||
|
currentQuick -= userBuild.Value.Quickness;
|
||||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||||
currentQuick -=5;
|
currentQuick += signedUpUsers[userBuild.Key].Quickness;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -237,14 +240,15 @@ namespace Lieb.Data
|
||||||
{
|
{
|
||||||
foreach (var userBuild in signedUpUsers)
|
foreach (var userBuild in signedUpUsers)
|
||||||
{
|
{
|
||||||
if (!userBuild.Value.Quickness && currentQuick < 10)
|
if (userBuild.Value.Quickness == 00 && currentQuick < 10)
|
||||||
{
|
{
|
||||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Quickness).OrderBy(u => _random.Next()).FirstOrDefault();
|
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Quickness > 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||||
if (newBuild != null)
|
if (newBuild != null)
|
||||||
{
|
{
|
||||||
|
currentQuick -= userBuild.Value.Quickness;
|
||||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||||
currentQuick += 5;
|
currentQuick += signedUpUsers[userBuild.Key].Quickness;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -254,14 +258,15 @@ namespace Lieb.Data
|
||||||
{
|
{
|
||||||
foreach (var userBuild in signedUpUsers)
|
foreach (var userBuild in signedUpUsers)
|
||||||
{
|
{
|
||||||
if (userBuild.Value.Might && currentMight > 10)
|
if (userBuild.Value.Might > 0 && currentMight > 10)
|
||||||
{
|
{
|
||||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => !b.GuildWars2Build.Might).OrderBy(u => _random.Next()).FirstOrDefault();
|
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Might == 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||||
if (newBuild != null)
|
if (newBuild != null)
|
||||||
{
|
{
|
||||||
|
currentMight -= userBuild.Value.Might;
|
||||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||||
currentMight -=5;
|
currentMight += signedUpUsers[userBuild.Key].Might;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -271,14 +276,15 @@ namespace Lieb.Data
|
||||||
{
|
{
|
||||||
foreach (var userBuild in signedUpUsers)
|
foreach (var userBuild in signedUpUsers)
|
||||||
{
|
{
|
||||||
if (!userBuild.Value.Might && currentMight < 10)
|
if (userBuild.Value.Might == 00 && currentMight < 10)
|
||||||
{
|
{
|
||||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Might).OrderBy(u => _random.Next()).FirstOrDefault();
|
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Might > 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||||
if (newBuild != null)
|
if (newBuild != null)
|
||||||
{
|
{
|
||||||
|
currentMight -= userBuild.Value.Might;
|
||||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||||
currentMight += 5;
|
currentMight += signedUpUsers[userBuild.Key].Might;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -288,14 +294,15 @@ namespace Lieb.Data
|
||||||
{
|
{
|
||||||
foreach (var userBuild in signedUpUsers)
|
foreach (var userBuild in signedUpUsers)
|
||||||
{
|
{
|
||||||
if (userBuild.Value.Heal && currentHeal > 10)
|
if (userBuild.Value.Heal > 0 && currentHeal > 10)
|
||||||
{
|
{
|
||||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => !b.GuildWars2Build.Heal).OrderBy(u => _random.Next()).FirstOrDefault();
|
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Heal == 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||||
if (newBuild != null)
|
if (newBuild != null)
|
||||||
{
|
{
|
||||||
|
currentHeal -= userBuild.Value.Heal;
|
||||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||||
currentHeal -= 5;
|
currentHeal += signedUpUsers[userBuild.Key].Heal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -305,14 +312,15 @@ namespace Lieb.Data
|
||||||
{
|
{
|
||||||
foreach (var userBuild in signedUpUsers)
|
foreach (var userBuild in signedUpUsers)
|
||||||
{
|
{
|
||||||
if (!userBuild.Value.Heal && currentHeal < 10)
|
if (userBuild.Value.Heal == 00 && currentHeal < 10)
|
||||||
{
|
{
|
||||||
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key);
|
||||||
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Heal).OrderBy(u => _random.Next()).FirstOrDefault();
|
Equipped newBuild = signUp.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.Heal > 0).OrderBy(u => _random.Next()).FirstOrDefault();
|
||||||
if (newBuild != null)
|
if (newBuild != null)
|
||||||
{
|
{
|
||||||
|
currentHeal -= userBuild.Value.Heal;
|
||||||
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
signedUpUsers[userBuild.Key] = newBuild.GuildWars2Build;
|
||||||
currentHeal += 5;
|
currentHeal += signedUpUsers[userBuild.Key].Heal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,26 +24,26 @@
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
<InputCheckbox @bind-Value="_build.Might" />
|
Might:
|
||||||
Might
|
<InputNumber @bind-Value="_build.Might" />
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
<InputCheckbox @bind-Value="_build.Quickness" />
|
Quickness:
|
||||||
Quickness
|
<InputNumber @bind-Value="_build.Quickness" />
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
<InputCheckbox @bind-Value="_build.Alacrity" />
|
Alacrity:
|
||||||
Alacrity
|
<InputNumber @bind-Value="_build.Alacrity" />
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
<InputCheckbox @bind-Value="_build.Heal" />
|
Heal:
|
||||||
Heal
|
<InputNumber @bind-Value="_build.Heal" />
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
@ -35,10 +35,10 @@
|
||||||
</td>
|
</td>
|
||||||
<td>@build.Class.ToString()</td>
|
<td>@build.Class.ToString()</td>
|
||||||
<td>@build.EliteSpecialization.ToString()</td>
|
<td>@build.EliteSpecialization.ToString()</td>
|
||||||
<td><input type="checkbox" checked="@(build.Might)" disabled="disabled" /></td>
|
<td>@build.Might.ToString()</td>
|
||||||
<td><input type="checkbox" checked="@(build.Heal)" disabled="disabled" /></td>
|
<td>@build.Heal.ToString()</td>
|
||||||
<td><input type="checkbox" checked="@(build.Quickness)" disabled="disabled" /></td>
|
<td>@build.Quickness.ToString()</td>
|
||||||
<td><input type="checkbox" checked="@(build.Alacrity)" disabled="disabled" /></td>
|
<td>@build.Alacrity.ToString()</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -70,10 +70,10 @@
|
||||||
<td>@build.BuildName</td>
|
<td>@build.BuildName</td>
|
||||||
<td>@build.Class.ToString()</td>
|
<td>@build.Class.ToString()</td>
|
||||||
<td>@build.EliteSpecialization.ToString()</td>
|
<td>@build.EliteSpecialization.ToString()</td>
|
||||||
<td><input type="checkbox" checked="@(build.Might)" disabled="true" /></td>
|
<td><input type="checkbox" checked="@(build.Might > 0)" disabled="true" /></td>
|
||||||
<td><input type="checkbox" checked="@(build.Heal)" disabled="true" /></td>
|
<td><input type="checkbox" checked="@(build.Heal > 0)" disabled="true" /></td>
|
||||||
<td><input type="checkbox" checked="@(build.Quickness)" disabled="true" /></td>
|
<td><input type="checkbox" checked="@(build.Quickness > 0)" disabled="true" /></td>
|
||||||
<td><input type="checkbox" checked="@(build.Alacrity)" disabled="true" /></td>
|
<td><input type="checkbox" checked="@(build.Alacrity > 0)" disabled="true" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue